/* Authentication Pages Styles */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-page .auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-page .auth-header {
    background: #ffffff;
    color: #1a202c;
    border-bottom: 1px solid #e2e8f0;
    padding: 40px 30px;
    text-align: center;
}

.auth-page .auth-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: none;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.auth-header p {
    font-size: 16px;
    color: #4a5568;
    margin: 0;
}

.auth-page .auth-form-container {
    padding: 40px 30px;
}

.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-tab { background: #f3f4f6; border: 1px solid #e5e7eb; color: #374151; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.auth-tab--active { background: #2563eb; border-color: #2563eb; color: #fff; }
.form-inline { display: flex; align-items: center; gap: 8px; }

/* Cute checkbox shared line */
.remember-line { margin: 8px 0 18px 0; }
.cute-checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; color: #374151; }
.cute-checkbox input { display: none; }
.cute-checkbox .checkmark { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #9ca3af; display: inline-block; position: relative; transition: all 0.2s ease; background: #fff; }
.cute-checkbox .checkmark::after { content: ''; position: absolute; width: 6px; height: 12px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); top: 2px; left: 7px; transition: transform 0.15s ease; }
.cute-checkbox input:checked + .checkmark { background: #2563eb; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.cute-checkbox input:checked + .checkmark::after { transform: rotate(45deg) scale(1); }

/* Error helper under input */
.input-error { color: #B91C1C; font-size: 13px; margin-top: 6px; display: none; }

/* Phone row with country code */
.phone-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }

/* Bootstrap-native input-group: avoid overrides; ensure no-wrap layout */
.auth-page .input-group.flex-nowrap .form-select { flex: 0 0 auto; min-width: 110px; }
.auth-page .input-group.flex-nowrap .form-control { flex: 1 1 auto; min-width: 0; }

/* Compact and prominent style for OTP label in input-group */
.auth-page .input-group label[for="otp_code"].input-group-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0A5597;               /* primary highlight */
    background-color: #eef5ff;    /* subtle background */
    border-color: #bcd3ff;        /* softer border */
    padding: 8px 10px;            /* compact spacing */
}

.auth-page .input-group label[for="otp_code"].input-group-text i {
    margin-right: 6px;
    font-size: 0.95em;            /* slightly smaller than text */
    color: inherit;               /* follow label color */
}

.auth-centered {
    text-align: center;
}

.auth-page .auth-form {
    margin-bottom: 30px;
}

.auth-page .form-group {
    margin-bottom: 20px;
}

.auth-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: #0A5597;
    width: 16px;
}

.form-group {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    line-height: 1.5;
    box-sizing: border-box;
}

/* Password field with eye icon */
.form-group input[type="password"],
.form-group input[type="text"] {
    padding-right: 50px;
}

.form-group input:focus {
    outline: none;
    border-color: #0A5597;
    background: white;
    box-shadow: 0 0 0 3px rgba(10, 85, 151, 0.1);
}

/* Placeholder styling - light gray color to avoid confusion */
.form-group input::placeholder,
.form-control::placeholder {
    color: #9ca3af;
    opacity: 0.7;
    font-weight: 400;
}

/* Password toggle button styling */
.password-toggle {
    position: absolute;
    right: 12px;
    top: calc(50% - 16px);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    z-index: 10;
    margin: 0;
    margin-top: 15px;
    line-height: 1;
}

.password-toggle:hover {
    background: rgba(113, 128, 150, 0.1);
    color: #4a5568;
    padding: 4px;
}

.password-toggle:active {
    background: rgba(113, 128, 150, 0.2);
    transform: scale(0.95);
    padding: 4px;
}

.password-toggle i {
    font-size: 16px;
    transition: all 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.password-toggle.active {
    color: #0A5597;
}

.password-toggle.active:hover {
    background: rgba(10, 85, 151, 0.1);
    color: #1e3c72;
    padding: 4px;
}

.auth-page .checkbox-group {
    margin-bottom: 25px;
}

.auth-page .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.auth-page .checkbox-text {
    color: #4a5568;
}

.auth-page .terms-link {
    color: #0A5597;
    text-decoration: none;
    font-weight: 600;
}

.terms-link:hover {
    text-decoration: underline;
}

.auth-page .form-actions {
    margin-bottom: 25px;
}


.auth-page .auth-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.auth-page .auth-link {
    color: #0A5597;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    background: #f7fafc;
    color: #1e3c72;
}

.auth-page .social-login {
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
}

.auth-page .divider {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 20px;
    color: #718096;
    font-size: 14px;
    position: relative;
}

.auth-page .btn-social {
    width: 100%;
    margin-bottom: 10px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.btn-social:hover {
    border-color: #0A5597;
    color: #0A5597;
    transform: translateY(-1px);
}

.auth-page .btn-google {
    border-color: #db4437;
    color: #db4437;
}

.btn-google:hover {
    background: #db4437;
    color: white;
}

.auth-page .alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}

.auth-page .alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert i {
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-page {
        padding: 15px;
    }
    
    .auth-container {
        border-radius: 15px;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-form-container {
        padding: 30px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Mobile password toggle adjustments */
    .password-toggle {
        width: 36px;
        height: 36px;
        right: 10px;
        top: calc(50% - 18px);
        margin-top: 18px;
    }
    
    .password-toggle i {
        font-size: 18px;
    }
    
    .form-group input[type="password"],
    .form-group input[type="text"] {
        padding-right: 55px;
    }
}

@media (max-width: 480px) {
    .auth-header {
        padding: 25px 15px;
    }
    
    .auth-form-container {
        padding: 25px 15px;
    }
    
    .auth-logo {
        width: 50px;
        height: 50px;
    }
    
    .auth-header h1 {
        font-size: 22px;
    }
    
    /* Small mobile password toggle adjustments */
    .password-toggle {
        width: 40px;
        height: 40px;
        right: 8px;
        top: calc(50% - 20px);
        margin-top: 20px;
    }
    
    .password-toggle i {
        font-size: 20px;
    }
    
    .form-group input[type="password"],
    .form-group input[type="text"] {
        padding-right: 60px;
    }
}
