/* Auth (login) page — full-screen split layout */

:root {
    --primary: #000080;
    --primary-dark: #0d2a4a;
    --primary-light: #1a4fd6;
    --accent: #1a73e8;
    --light: #f8f9fa;
    --dark: #212529;
    --muted: #6c757d;
    --input-bg: #f8f9fa;
    --input-border: #e9ecef;
    --success: #28a745;
    --danger: #dc3545;
    --md: 768px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
}

.login-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ── Left brand panel ── */

.brand-section {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.brand-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.brand-content {
    position: relative;
    z-index: 1;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.brand-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
}

.brand-mascot {
    width: 80px;
    max-width: 100%;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.brand-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.brand-title .bida,
.brand-title .boss {
    color: white;
}

.brand-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    max-width: 320px;
}

.brand-features {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    text-align: left;
    width: 100%;
    max-width: 420px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1rem;
    color: white;
}

.feature h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature p {
    font-size: 0.8rem;
    opacity: 0.85;
    line-height: 1.4;
}

/* ── Right login panel ── */

.login-section {
    flex: 1;
    width: 100%;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    overflow-y: auto;
}

.login-panel-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-header {
    margin-bottom: 32px;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    line-height: 1.2;
}

.login-title .highlight {
    color: var(--primary-light);
}

.login-subtitle {
    color: var(--muted);
    font-size: 0.88rem;
}

.login-form {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dark);
}

.input-field {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.input-field input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    border: 2px solid var(--input-border);
    border-radius: 14px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    background-color: var(--input-bg);
    color: var(--dark);
}

.input-field input::placeholder {
    color: #a8b4c4;
}

.input-field input:focus {
    border-color: var(--accent);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
    outline: none;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-light);
    cursor: pointer;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-continue {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(19, 58, 113, 0.2);
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(19, 58, 113, 0.3);
}

.btn-continue .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.btn-clear {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
}

.btn-clear:hover {
    border-color: #cbd5e1;
    color: var(--dark);
    background: #f8fafc;
}

.login-footer {
    margin-top: 40px;
    text-align: center;
}

.login-footer p {
    color: var(--muted);
    font-size: 0.8rem;
}

/* ── Alert toast ── */

.alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 90%;
    width: max-content;
}

.alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.alert.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px);
}

.alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.alert-error {
    background: linear-gradient(135deg, var(--danger), #c82333);
    border-left: 5px solid #bd2130;
}

.alert-close {
    margin-left: 15px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0 5px;
}

.alert-close:hover {
    opacity: 1;
}

/* ── Animations ── */

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

.animated {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

/* ── Mobile: compact brand banner ── */

@media (max-width: 767px) {
    .brand-section {
        min-height: 30vh;
    }

    .brand-content {
        padding: 1.5rem 1.5rem;
    }

    .login-section {
        flex: 1;
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.6rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-continue,
    .btn-clear {
        width: 100%;
        justify-content: center;
    }
}

/* ── Desktop: 50/50 full-screen split ── */

@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
    }

    .brand-section,
    .login-section {
        width: 50%;
        flex: 0 0 50%;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .brand-content {
        padding: 48px 44px;
        align-items: center;
    }

    .brand-logo-wrap {
        margin-bottom: 28px;
    }

    .brand-mascot {
        width: 140px;
        margin-bottom: 16px;
    }

    .brand-title {
        font-size: 2.2rem;
        margin-bottom: 8px;
    }

    .brand-subtitle {
        font-size: 0.95rem;
        max-width: 360px;
    }

    .brand-features {
        display: flex;
    }

    .login-section {
        flex: 0 0 50%;
        padding: 48px;
        overflow-y: auto;
    }
}
