* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f8fafc;
}

.back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.back-home-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* LAYOUT */
.login-container {
    display: flex;
    height: 100vh;
    min-height: 100vh;
    width: 100%;
}

/* LEFT SIDE */
.login-left {
    flex: 1;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('/assets/images/taytayclinic.png') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: fadeIn 1s ease-in;
    overflow: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.left-content {
    position: relative;
    color: #fff;
    text-align: left;
    max-width: 500px;
    padding: 40px;
    z-index: 2;
}

.left-content h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.8s ease-out;
}

.subtitle {
    font-size: 20px;
    color: #e0e0e0;
    margin-bottom: 40px;
    font-weight: 300;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.feature-list {
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    color: #f0f0f0;
}

.feature-item i {
    margin-right: 12px;
    font-size: 18px;
    color: #4fc3f7;
    width: 20px;
    text-align: center;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* RIGHT SIDE - NO CONTAINER BOX */
.login-right {
    flex: 1;
    background: rgba(28, 51, 68, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.right-content {
    width: 100%;
    max-width: 450px;
    color: white;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LOGO */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.clinic-logo {
    width: 90px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.clinic-logo:hover {
    transform: scale(1.05);
}

/* WELCOME SECTION */
.welcome-section {
    text-align: center;
    margin-bottom: 35px;
}

.welcome-section h2 {
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-section p {
    color: #e2e8f0;
    font-size: 16px;
    font-weight: 400;
}

/* AUTH FORM */
.auth-form {
    width: 100%;
}

/* FORM GROUPS */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

/* INPUT FIELDS */
.input-field {
    position: relative;
    transition: all 0.3s ease;
}

.input-field i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #cbd5e0;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-field input {
    width: 100%;
    padding: 14px 45px 14px 45px;
    border: 2px solid #4a5568;
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.input-field input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.input-field input:focus {
    outline: none;
    border-color: #63b3ed;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
}

.input-field.focused i {
    color: #63b3ed;
}

.input-field input:focus + i {
    color: #63b3ed;
}

.toggle-password {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #cbd5e0;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #63b3ed;
}

/* FORM ROW FOR REGISTER */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.form-group.half-width {
    flex: 1;
    margin-bottom: 25px;
}

/* REMEMBER & FORGOT */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #63b3ed;
    cursor: pointer;
}

.remember-me label {
    cursor: pointer;
    user-select: none;
}

.forgot-password {
    color: #63b3ed;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #90cdf4;
    text-decoration: underline;
}

/* TERMS AGREEMENT */
.terms-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #e2e8f0;
    line-height: 1.4;
}

.terms-agreement input[type="checkbox"] {
    margin-top: 2px;
    accent-color: #63b3ed;
    cursor: pointer;
}

.terms-agreement label {
    cursor: pointer;
    user-select: none;
}

.terms-link {
    color: #63b3ed;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #90cdf4;
    text-decoration: underline;
}

/* AUTH BUTTON */
.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, #63b3ed 0%, #4299e1 100%);
    color: white;
    padding: 15px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.auth-btn::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;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 179, 237, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

/* AUTH LINK */
.auth-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #4a5568;
}

.link-text {
    color: #cbd5e0;
    font-size: 14px;
}

.link {
    color: #63b3ed;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link:hover {
    color: #90cdf4;
    text-decoration: underline;
}

/* MESSAGES */
.error-message {
    background: linear-gradient(135deg, rgba(254, 178, 178, 0.2) 0%, rgba(254, 178, 178, 0.1) 100%);
    color: #fc8181;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(252, 129, 129, 0.3);
    animation: shake 0.5s ease-in-out;
    backdrop-filter: blur(10px);
}

.success-message {
    background: linear-gradient(135deg, rgba(104, 211, 145, 0.2) 0%, rgba(72, 187, 120, 0.1) 100%);
    color: #68d391;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(104, 211, 145, 0.3);
    animation: slideInUp 0.5s ease-out;
    backdrop-filter: blur(10px);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message i,
.success-message i {
    font-size: 16px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        min-height: 100vh;
        overflow: auto;
    }
    
    .login-left {
        min-height: 40vh;
        padding: 40px 20px;
        flex: none;
    }
    
    .left-content {
        text-align: center;
        max-width: 600px;
    }
    
    .left-content h1 {
        font-size: 32px;
    }
    
    .feature-list {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .feature-item {
        margin-bottom: 0;
    }
    
    .login-right {
        padding: 40px 20px;
        flex: none;
    }

    .back-home {
        position: absolute;
    }
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half-width {
        margin-bottom: 20px;
    }
    
    .terms-agreement {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 30px 15px;
    }
    
    .left-content h1 {
        font-size: 28px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .welcome-section h2 {
        font-size: 28px;
    }
    
    .remember-forgot {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .terms-agreement {
        align-items: flex-start;
    }
    
    .terms-agreement label {
        line-height: 1.3;
    }

    .back-home {
        position: fixed; 
        top: 15px;
        left: 15px;
    }

    .back-home-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .feature-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .input-field input {
        padding: 12px 40px 12px 40px;
        font-size: 14px;
    }
}

/* For landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        flex-direction: row; /* Keep side-by-side in landscape */
    }
    
    .login-left {
        min-height: 100vh;
    }
    
    .login-right {
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .left-content {
        padding: 20px;
    }
    
    .left-content h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .feature-list {
        display: none; /* Hide features in landscape to save space */
    }
}

/* COMPACT REGISTER FORM STYLES */
.compact-form {
    max-width: 420px;
}

.compact-auth-form {
    margin-top: 10px;
}

.compact-group {
    margin-bottom: 18px !important;
}

.compact-input input {
    padding: 12px 40px 12px 40px !important;
    font-size: 14px !important;
}

.compact-row {
    gap: 12px !important;
    margin-bottom: 0 !important;
}

.compact-message {
    padding: 12px 14px !important;
    margin-bottom: 20px !important;
    font-size: 13px !important;
}

.compact-terms {
    margin-bottom: 20px !important;
    font-size: 13px !important;
}

.compact-terms label {
    line-height: 1.3 !important;
}

.compact-btn {
    padding: 13px 20px !important;
    font-size: 15px !important;
}

.compact-link {
    margin-top: 20px !important;
    padding-top: 20px !important;
}

.compact-toggle {
    padding: 3px !important;
}

/* Adjust logo and welcome section for compact layout */
.compact-form .logo-container {
    margin-bottom: 20px !important;
}

.compact-form .welcome-section {
    margin-bottom: 25px !important;
}

.compact-form .welcome-section h2 {
    font-size: 28px !important;
    margin-bottom: 5px !important;
}

.compact-form .welcome-section p {
    font-size: 14px !important;
}

/* Responsive adjustments for compact form */
@media (max-width: 1024px) {
    .compact-form {
        max-width: 380px;
    }
    
    .compact-group {
        margin-bottom: 16px !important;
    }
    
    .compact-input input {
        padding: 11px 38px 11px 38px !important;
    }
}

@media (max-width: 768px) {
    .compact-form {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .compact-row {
        flex-direction: column;
        gap: 0 !important;
    }
    
    .form-group.half-width {
        margin-bottom: 16px !important;
    }
}


@media (max-height: 800px) {
    .login-right {
        padding: 20px !important;
    }
    
    .compact-form .logo-container {
        margin-bottom: 15px !important;
    }
    
    .compact-form .welcome-section {
        margin-bottom: 20px !important;
    }
    
    .compact-group {
        margin-bottom: 15px !important;
    }
    
    .compact-input input {
        padding: 10px 38px 10px 38px !important;
    }
}

/* OTP VERIFICATION STYLES */
.otp-container {
    margin-bottom: 10px;
}

.otp-input-field {
    position: relative;
    transition: all 0.3s ease;
}

.otp-input {
    width: 100%;
    padding: 16px 50px 16px 50px !important;
    border: 2px solid #4a5568 !important;
    border-radius: 12px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-align: center !important;
    letter-spacing: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
}

.otp-input::placeholder {
    color: #a0aec0 !important;
    letter-spacing: normal !important;
    font-weight: 400 !important;
}

.otp-input:focus {
    outline: none !important;
    border-color: #63b3ed !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1) !important;
    letter-spacing: 8px !important;
}

.otp-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: #cbd5e0;
    font-size: 16px;
    transition: all 0.3s ease;
}

.otp-input-field.focused .otp-icon {
    color: #63b3ed;
}

.otp-info {
    background: rgba(99, 179, 237, 0.1);
    border: 1px solid rgba(99, 179, 237, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #63b3ed;
}

.otp-info i {
    margin-right: 8px;
}

.otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
}

.otp-timer i {
    color: #f56565;
}

.otp-actions {
    text-align: center;
    margin-bottom: 20px;
}

.resend-btn {
    background: transparent;
    border: 2px solid #4a5568;
    color: #cbd5e0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.resend-btn:hover:not(:disabled) {
    border-color: #63b3ed;
    color: #63b3ed;
    transform: translateY(-1px);
}

.resend-btn.active {
    border-color: #63b3ed;
    color: #63b3ed;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Multiple OTP input boxes (alternative design) */
.otp-boxes {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.otp-box {
    width: 50px;
    height: 60px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.otp-box:focus {
    outline: none;
    border-color: #63b3ed;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(99, 179, 237, 0.2);
}

/* Responsive OTP */
@media (max-width: 480px) {
    .otp-input {
        padding: 14px 45px 14px 45px !important;
        font-size: 16px !important;
        letter-spacing: 6px !important;
    }
    
    .otp-boxes {
        gap: 8px;
    }
    
    .otp-box {
        width: 45px;
        height: 55px;
        font-size: 20px;
    }
    
    .otp-timer {
        font-size: 13px;
    }
    
    .resend-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}