@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Nunito:wght@400;500;600;700&display=swap');

:root {
    --coffee: #6F4E37;
    --coffee-dark: #5A3E2B;
    --coffee-darker: #4A3324;
    --latte: #B08968;
    --latte-soft: #EADFD4;
    --cream: #FAF7F2;
    --surface: #FFFFFF;
    --ink: #2D2A26;
    --muted: #94887F;
    --line: #ECE5DD;
    --danger: #C0563F;
    --radius: 22px;
    --radius-sm: 12px;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--ink);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 12% 18%, rgba(176, 137, 104, 0.22), transparent 60%),
        radial-gradient(900px 500px at 88% 82%, rgba(74, 51, 36, 0.20), transparent 55%),
        var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ---------- Card shell ---------- */
.auth-wrapper {
    width: 100%;
    max-width: 920px;
}

.auth-card {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(74, 51, 36, 0.22);
    border: 1px solid var(--line);
    min-height: 540px;
}

/* ---------- Brand panel ---------- */
.auth-brand {
    position: relative;
    color: #fff;
    background:
        radial-gradient(700px 420px at 80% -10%, rgba(255, 255, 255, 0.14), transparent 60%),
        linear-gradient(150deg, var(--coffee), var(--coffee-darker));
    display: flex;
    align-items: center;
    overflow: hidden;
}
.auth-brand::after {
    /* subtle steam / circle accents */
    content: "";
    position: absolute;
    width: 320px; height: 320px;
    right: -110px; bottom: -120px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}
.auth-brand::before {
    content: "";
    position: absolute;
    width: 180px; height: 180px;
    left: -70px; top: -60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}
.auth-brand-inner {
    position: relative;
    z-index: 1;
    padding: 48px 44px;
}
.auth-logo {
    width: 70px; height: 70px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    margin-bottom: 26px;
    color: #fff;
}
.auth-brand h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 2.35rem;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin: 0 0 16px;
}
.auth-brand p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 0 24px;
}
.auth-badge {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- Form panel ---------- */
.auth-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.auth-form-inner {
    width: 100%;
    max-width: 340px;
}
.auth-mobile-logo {
    display: none;
    color: var(--coffee);
    margin-bottom: 14px;
}
.auth-form h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.7rem;
    letter-spacing: -0.4px;
    margin: 0 0 6px;
    color: var(--ink);
}
.auth-sub {
    color: var(--muted);
    margin: 0 0 26px;
    font-size: 0.95rem;
}

label {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
    display: block;
}

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

/* input with leading icon + optional trailing toggle */
.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon > svg {
    position: absolute;
    left: 14px;
    color: var(--latte);
    pointer-events: none;
}
.input-icon .form-control {
    width: 100%;
    border: 1px solid var(--line);
    background: #fcfaf7;
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem 0.72rem 2.65rem;
    height: auto;
    font-size: 0.98rem;
    color: var(--ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.input-icon .form-control:focus {
    outline: none;
    border-color: var(--latte);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(176, 137, 104, 0.16);
}
.input-icon .form-control::placeholder { color: #bcb2a8; }

.toggle-pass {
    position: absolute;
    right: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    transition: color 0.18s ease, background 0.18s ease;
}
.toggle-pass:hover { color: var(--coffee); background: var(--latte-soft); }
.toggle-pass.is-on { color: var(--coffee); }

/* ---------- Button (override Bootstrap defaults) ---------- */
.btn {
    display: inline-block;
    border: 0;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}
.btn:focus,
.btn.focus {
    outline: 0;
    box-shadow: none;
}
.btn-primary,
.btn-primary.btn-block {
    width: 100%;
    background-color: var(--coffee);
    border-color: var(--coffee);
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.78rem 1rem;
    margin-top: 6px;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled):active:focus {
    background-color: var(--coffee-dark);
    border-color: var(--coffee-dark);
    color: #fff;
    box-shadow: 0 12px 24px rgba(111, 78, 55, 0.3);
}
.btn-primary:active { transform: translateY(1px); }

.auth-footer {
    margin-top: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}
.auth-footer a { color: var(--coffee); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* alert */
.alert {
    border: 0;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger);
    background: #fbeeea;
    color: #a8472f;
    padding: 0.7rem 0.9rem;
    margin-bottom: 18px;
    font-size: 0.9rem;
    position: relative;
}
.alert .close {
    position: absolute;
    right: 8px; top: 4px;
    background: transparent; border: 0;
    font-size: 1.2rem; line-height: 1;
    color: inherit; opacity: 0.6; cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .auth-card {
        grid-template-columns: 1fr;
        min-height: 0;
        max-width: 420px;
        margin: 0 auto;
    }
    .auth-brand { display: none; }
    .auth-mobile-logo { display: block; }
    .auth-form { padding: 34px 26px; }
    .auth-form-inner { max-width: 100%; }
}
