* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated background overlay */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(30, 87, 153, 0.7) 0%,
        rgba(32, 124, 202, 0.7) 50%,
        rgba(30, 87, 153, 0.7) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.register-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    min-height: 570px;
    display: flex;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-left {
    flex: 1;
    background: linear-gradient(
        135deg,
        rgba(30, 87, 153, 0.9) 0%,
        rgba(32, 124, 202, 0.9) 100%
    );
    /* backdrop-filter: blur(10px); */
    color: white;
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.register-right {
    flex: 1;
    padding: 2.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95)!important;
    /* backdrop-filter: blur(10px); */
}

.register-left::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(255,255,255,0);stop-opacity:0" /></radialGradient></defs><circle cx="20%" cy="20%" r="10%" fill="url(%23a)" /><circle cx="80%" cy="30%" r="8%" fill="url(%23a)" /><circle cx="30%" cy="70%" r="12%" fill="url(%23a)" /><circle cx="70%" cy="80%" r="6%" fill="url(%23a)" /></svg>')
        no-repeat;
    background-size: cover;
    animation: float 20s ease-in-out infinite;
    opacity: 0.3;
    z-index: 0;
}

@keyframes float {
    0%,
    100% {
        transform: translate(0, 0) rotate(0);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.clinic-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.25);
    /* backdrop-filter: blur(10px); */
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
}

.register-left h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.register-left p {
    font-size: 1rem;
    opacity: 0.95;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.register-form h2 {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group label {
    position: absolute;
    left: 2.5rem;
    top: 0.9rem;
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    z-index: 1;
}

.form-group.focused label,
.form-group.filled label {
    transform: translateY(-2rem) scale(0.85);
    color: #1e5799;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 0.35rem;
    border-radius: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.9rem;
    color: #9ca3af;
    font-size: 1rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 0.875rem 0.875rem 0.875rem 2.5rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s ease;
    outline: none;
    background: rgba(255, 255, 255, 0.85);
    /* backdrop-filter: blur(5px);  */
}

.form-control:focus {
    border-color: #1e5799;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(30, 87, 153, 0.1);
    transform: translateY(-1px);
}

.form-control:focus + .input-icon {
    color: #1e5799;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 3;
    padding: 0.6rem;
    border-radius: 6px;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #1e5799;
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-50%) scale(1.05);
}

.password-field-wrapper {
    position: relative;
}

.password-field-wrapper .form-control {
    padding-right: 3.5rem;
}

.btn-register {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #1e5799 0%, #207cca 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-register::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 87, 153, 0.4);
}

.btn-register:hover::before {
    left: 100%;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: none;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.1),
        rgba(220, 38, 38, 0.1)
    );
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    backdrop-filter: blur(10px);
}

.login-link {
    text-align: center;
    margin-top: 1rem;
}

.login-link a {
    color: #1e5799;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.login-link a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 50%;
    background: #1e5799;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.login-link a:hover::after {
    width: 100%;
}

.login-link a:hover {
    color: #207cca;
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        align-items: flex-start;
        background-attachment: scroll;
    }

    .register-container {
        flex-direction: column;
        margin: 1rem auto;
        width: 92%;
        max-width: 540px;
        min-height: auto;
        border-radius: 16px;
    }

    .register-left {
        padding: 1.5rem 1.125rem;
        min-height: 220px;
    }

    .register-right {
        padding: 1.5rem 1.125rem;
    }

    .register-left h1 {
        font-size: 1.6rem;
    }

    .clinic-logo {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }
}

/* Main container */
.register-container {
    max-width: 1200px !important;
    /* balanced width — not too wide */
    margin: 0 auto;
    display: flex;
    border-radius: 15px;
    overflow: hidden;
}

/* Right side (form panel) */
.register-right {
    flex: 1.1;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #0c0c0c;
}

/* Form grid layout */
.register-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1.1rem;
    /* just enough space */
    width: 100%;
}

.register-form h2,
.register-form .register-subtitle,
.register-form .alert,
.register-form .btn-register,
.register-form .login-link {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 0.6rem;
}

/* Error styling */
.is-invalid {
    border-color: #ef4444 !important;
}

.invalid-feedback {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Email hint tooltip */
.email-hint {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    color: #dc2626;
}

.form-group:focus-within .email-hint {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.email-hint.valid {
    display: none;
}

.email-hint i {
    margin-right: 0.4rem;
    color: #dc2626;
}

/* Password Requirements Tooltip */
.password-requirements {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 0.875rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.form-group:focus-within .password-requirements,
.password-requirements:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.password-requirements h4 {
    color: #1e40af;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
}

.password-requirements h4 i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

.password-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.requirement {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 0.45rem;
    transition: all 0.3s ease;
    color: #6b7280;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement i {
    margin-right: 0.45rem;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.requirement.valid {
    color: #16a34a;
}

.requirement.valid i {
    color: #16a34a;
}

.requirement.valid i.bi-x-circle-fill:before {
    content: "\f26a";
}

.requirement:not(.valid) i {
    color: #dc2626;
}

.password-strength {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #dc2626;
}

.strength-fill.fair {
    width: 50%;
    background: #f59e0b;
}

.strength-fill.good {
    width: 75%;
    background: #3b82f6;
}

.strength-fill.strong {
    width: 100%;
    background: #16a34a;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.strength-text.weak {
    color: #dc2626;
}

.strength-text.fair {
    color: #f59e0b;
}

.strength-text.good {
    color: #3b82f6;
}

.strength-text.strong {
    color: #16a34a;
}

.password-match {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    font-weight: 500;
}

.password-match.match {
    color: #16a34a;
}

.password-match.no-match {
    color: #dc2626;
}

/* Slight responsive shrink */
@media (max-width: 950px) {
    .register-container {
        max-width: 90vw !important;
    }

    .register-form {
        grid-template-columns: 1fr;
    }

    .register-right {
        padding: 1.75rem;
    }

    /* .password-requirements,
    .email-hint {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: 1rem;
        margin: 0;
        max-width: calc(100vw - 2rem);
    } */
}

/* Mobile view */
@media (max-width: 700px) {
    .register-container {
        flex-direction: column;
        border-radius: 0;
    }

    .register-right {
        padding: 1.25rem 1rem;
    }
}
