/* ============================================
   LOGIN PAGE SPECIFIC STYLES
   WiFiHapa - Login Page Styles
   ============================================ */

/* ----- LOGIN CONTAINER ----- */
.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* ----- LOGIN CARD ----- */
.login-card {
    background: var(--card-bg, white);
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.05));
    transition: var(--transition, all 0.3s ease);
}

body.dark .login-card {
    background: var(--card-bg, #1e2538);
}

@media (max-width: 768px) {
    .login-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.2rem;
    }
}

/* ----- LOGIN HEADER ----- */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: #0d6efd;
    background: #e4edff;
    padding: 1rem;
    border-radius: 30px;
    margin-bottom: 1rem;
    transition: var(--transition, all 0.3s ease);
}

body.dark .login-header i {
    background: #2a3448;
}

.login-header h2 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #0a2c3d);
}

.login-header p {
    color: var(--text-secondary, #5e6f7d);
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .login-header i {
        font-size: 2rem;
        padding: 0.8rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
}

/* ----- FORM LABELS ----- */
.form-label {
    font-weight: 600;
    color: var(--text-primary, #0a2c3d);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ----- FORM CONTROLS ----- */
.form-control-custom {
    border-radius: 16px;
    padding: 0.85rem 1.2rem;
    border: 1.5px solid #e9ecef;
    width: 100%;
    transition: var(--transition, all 0.2s ease);
    background: var(--input-bg, white);
    color: var(--text-primary, #0a2c3d);
    font-size: 1rem;
}

body.dark .form-control-custom {
    background: var(--input-bg, #2d3748);
    border-color: var(--border-light, rgba(255, 255, 255, 0.05));
}

.form-control-custom:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
    outline: none;
}

.form-control-custom::placeholder {
    color: var(--text-secondary, #adb5bd);
    font-size: 0.9rem;
}

/* ----- PASSWORD WRAPPER (with eye icon) ----- */
.password-wrapper {
    position: relative;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary, #6c757d);
    transition: var(--transition, all 0.2s ease);
    z-index: 2;
    font-size: 1.1rem;
}

.password-wrapper .toggle-password:hover {
    color: #0d6efd;
}

.password-wrapper .form-control-custom {
    padding-right: 45px;
}

/* ----- BUTTONS ----- */
.btn-login {
    background: #0d6efd;
    border: none;
    border-radius: 50px;
    padding: 0.9rem;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    width: 100%;
    transition: var(--transition, all 0.2s ease);
    cursor: pointer;
}

.btn-login:hover {
    background: #0b5ed7;
    transform: scale(0.98);
}

.btn-login:active {
    transform: scale(0.96);
}

.btn-login-demo {
    background: transparent;
    border: 1.5px solid #d4a11e;
    border-radius: 50px;
    padding: 0.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #d4a11e;
    width: 100%;
    transition: var(--transition, all 0.2s ease);
    cursor: pointer;
}

.btn-login-demo:hover {
    background: #d4a11e;
    color: white;
}

.btn-login-demo:active {
    transform: scale(0.98);
}

.btn-outline-primary {
    background: transparent;
    border: 1.5px solid #0d6efd;
    border-radius: 50px;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #0d6efd;
    transition: var(--transition, all 0.2s ease);
    text-decoration: none;
    display: inline-block;
}

.btn-outline-primary:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 576px) {
    .btn-login,
    .btn-login-demo {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    .btn-outline-primary {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* ----- REMEMBER & FORGOT SECTION ----- */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-forgot .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-forgot .form-check-input {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: #0d6efd;
}

.remember-forgot .form-check-label {
    color: var(--text-secondary, #5e6f7d);
    font-size: 0.85rem;
    cursor: pointer;
}

.remember-forgot a {
    color: var(--text-secondary, #5e6f7d);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition, all 0.2s ease);
}

.remember-forgot a:hover {
    color: #0d6efd;
}

@media (max-width: 576px) {
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ----- DIVIDER ----- */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e9ecef;
}

body.dark .divider::before,
body.dark .divider::after {
    border-bottom-color: var(--border-light, rgba(255, 255, 255, 0.05));
}

.divider span {
    padding: 0 1rem;
    color: var(--text-secondary, #5e6f7d);
    font-size: 0.85rem;
}

/* ----- DEMO CREDENTIALS BOX ----- */
.demo-credentials {
    background: var(--badge-light-bg, #f8fafd);
    border-radius: 20px;
    padding: 1rem;
    margin-top: 1rem;
    transition: var(--transition, all 0.3s ease);
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.03));
}

body.dark .demo-credentials {
    background: var(--badge-light-bg, #2a3448);
}

.demo-credentials .d-flex {
    gap: 0.5rem;
}

.demo-credentials .fw-semibold {
    font-size: 0.85rem;
    color: var(--text-primary, #0a2c3d);
}

.demo-credentials .small {
    font-size: 0.8rem;
}

.demo-credentials .text-secondary {
    color: var(--text-secondary, #5e6f7d);
}

/* ----- ALERT MESSAGES ----- */
.alert-custom {
    border-radius: 16px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

body.dark .alert-error {
    background: #3a1a1a;
    color: #ffaaaa;
    border-color: #5a2a2a;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

body.dark .alert-success {
    background: #1a3a1a;
    color: #aaffaa;
    border-color: #2a5a2a;
}

.alert-custom i {
    font-size: 1rem;
}

/* ----- CREATE ACCOUNT SECTION ----- */
.text-center a {
    text-decoration: none;
}

/* ----- RESPONSIVE STYLES ----- */
@media (max-width: 480px) {
    .login-card {
        padding: 1rem;
    }
    
    .form-control-custom {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .demo-credentials {
        padding: 0.8rem;
    }
    
    .demo-credentials .small {
        font-size: 0.7rem;
    }
    
    .alert-custom {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* ----- TOUCH DEVICE OPTIMIZATIONS ----- */
@media (hover: none) and (pointer: coarse) {
    .btn-login,
    .btn-login-demo,
    .btn-outline-primary,
    .toggle-password {
        min-height: 44px;
    }
    
    .form-control-custom {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}