:root {
    --cream: #F5E6D0;
    --warm-white: #FFFDF9;
    --gold: #C8873A;
    --gold-light: #E8A85A;
    --dark: #1A1208;
    --muted: #7A6E62;
    --card-bg: #FFFFFF;
    --shadow: 0 4px 24px rgba(26,18,8,0.08);
    --radius: 16px;
    --error: #C0392B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--cream);
    font-family: 'DM Sans', sans-serif;
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── HEADER ── */
header {
    background: var(--warm-white);
    border-bottom: 1px solid rgba(200,135,58,0.15);
    padding: 18px 48px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(26,18,8,0.05);
    position: relative;
}

.logo-wrap {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.logo-wrap img { width: 100%; height: 100%; object-fit: contain; }

.brand-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.brand-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    white-space: nowrap;
}

.brand-text p {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 300;
}

/* ── MAIN ── */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

/* ── LOGIN CARD ── */
.login-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(200,135,58,0.08);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    max-width: 700px;
    width: 100%;
}

.card-photo {
    position: relative;
    min-height: 340px;
    overflow: hidden;
}

.card-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.card-photo-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E8D5B5 0%, #C8A87A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-photo-fallback span {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #7B4F2E;
    text-align: center;
    padding: 20px;
    line-height: 1.6;
}

.card-form {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.card-form h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
}

/* ── LOGIN TABS ── */
.login-tabs {
    display: flex;
    background: var(--cream);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 9px 12px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.login-tab.active {
    background: var(--card-bg);
    color: var(--dark);
    box-shadow: 0 2px 8px rgba(26,18,8,0.08);
}

.login-tab:hover:not(.active) {
    color: var(--dark);
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: var(--error);
    font-size: 0.8rem;
    padding: 10px 14px;
    border-radius: 8px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
}

.input-wrap { position: relative; }

.input-wrap input {
    width: 100%;
    padding: 10px 38px 10px 14px;
    border: 1.5px solid #E8D5B5;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--dark);
    background: var(--warm-white);
    outline: none;
    transition: border-color 0.2s;
}

.input-wrap input:focus { border-color: var(--gold); }

.input-wrap svg {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.btn-login {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 50px;
    background: var(--gold);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(200,135,58,0.35);
    margin-top: 4px;
}

.btn-login:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET (≤700px)
══════════════════════════════════════════ */
@media (max-width: 700px) {
    header {
        padding: 14px 16px;
        gap: 12px;
    }

    .brand-text {
        position: static;
        transform: none;
        text-align: left;
    }

    .brand-text h1 {
        font-size: 0.95rem;
        white-space: normal;
        line-height: 1.3;
    }

    .brand-text p {
        font-size: 0.75rem;
    }

    .logo-wrap {
        width: 38px;
        height: 38px;
    }

    main {
        padding: 24px 16px;
        align-items: flex-start;
    }

    .login-card {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .card-photo {
        min-height: 160px;
        max-height: 200px;
    }

    .card-form {
        padding: 28px 24px 32px;
        gap: 16px;
    }

    .card-form h2 {
        font-size: 1.3rem;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤400px)
══════════════════════════════════════════ */
@media (max-width: 400px) {
    .brand-text h1 {
        font-size: 0.85rem;
    }

    .brand-text p {
        font-size: 0.7rem;
    }

    .card-form {
        padding: 24px 18px 28px;
    }

    .login-tab {
        font-size: 0.75rem;
        padding: 8px 6px;
    }
}