/* ==========================================================================
   ROZIA — Staff Login  (split: brand photo panel + white form card)
   Fonts: Playfair Display + Inter.
   ========================================================================== */


:root {
    --rz-burgundy: #A32B52;
    --rz-burgundy-dark: #83203F;
    --rz-burgundy-light: #C43E68;
    --rz-charcoal: #2A1A20;
    --rz-ink: #241017;
    --rz-muted: #8a7a80;
    --rz-line: rgba(36, 16, 23, 0.12);
    --rz-cream: #f7eff0;
    --rz-ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* Left-panel photo. Swap this per project for reuse. */
    --brand-photo: url('../images/login-bg.png');
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html, body { height: 100%; }

.login-body {
    font-family: 'Inter', sans-serif;
    color: var(--rz-ink);
    min-height: 100vh;
    display: flex;
}

/* ===================== LEFT — BRAND PANEL ===================== */
.brand-panel {
    flex: 1 1 66%;
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: clamp(40px, 4.5vw, 70px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    background-color: var(--rz-charcoal);
    background-image:
        linear-gradient(110deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.26) 50%, rgba(0, 0, 0, 0.16) 100%),
        url('../images/login-bg.png');
    background-size: cover;
    background-position: center;
}

/* crisp white text over the bright photo */
.brand-top, .brand-mid, .brand-foot { text-shadow: 0 2px 16px rgba(16, 7, 10, 0.42); }

.brand-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 18px; }
.brand-wordmark { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 30px; letter-spacing: 7px; color: #fff; }
.brand-top .divider { width: 1px; height: 34px; background: rgba(255, 255, 255, 0.30); }
.brand-top .sub { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255, 255, 255, 0.82); line-height: 1.6; font-weight: 500; }

.brand-mid { position: relative; z-index: 2; max-width: 680px; }
.eyebrow-row { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; color: rgba(255, 255, 255, 0.9); padding: 9px 18px; border: 1px solid rgba(255, 255, 255, 0.30); border-radius: 999px; }
.eyebrow-row .line { height: 1px; width: 42px; background: rgba(255, 255, 255, 0.35); }
.brand-mid h2 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: clamp(2.4rem, 3.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.5px; }
.brand-mid h2 em { font-style: italic; color: #eaa9bc; }
.brand-mid p { margin-top: 22px; font-size: 15px; line-height: 1.75; color: rgba(255, 255, 255, 0.72); max-width: 440px; }

.brand-features { display: flex; align-items: center; gap: 22px; margin-top: 42px; flex-wrap: nowrap; }
.feat { display: flex; align-items: center; gap: 12px; }
.feat + .feat { padding-left: 22px; border-left: 1px solid rgba(255, 255, 255, 0.16); }
.feat-t, .feat-s { white-space: nowrap; }
.feat-ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.32); display: flex; align-items: center; justify-content: center; }
.feat-ic svg { width: 18px; height: 18px; }
.feat-t { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.2; }
.feat-s { font-size: 11.5px; color: rgba(255, 255, 255, 0.6); margin-top: 3px; }

.brand-foot { position: relative; z-index: 2; font-size: 12px; color: rgba(255, 255, 255, 0.52); letter-spacing: 0.3px; }

/* ===================== RIGHT — FORM PANEL ===================== */
.form-panel {
    flex: 0 0 34%;
    position: relative;
    overflow: hidden;
    background: radial-gradient(130% 100% at 100% 0%, #faf3e9 0%, #f4ece0 46%, #ece0cf 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 3vw, 48px);
}
/* faint warm-gold accents to echo the lobby photo */
.form-panel::before, .form-panel::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.form-panel::before { width: 260px; height: 260px; top: -70px; right: -70px; background: radial-gradient(circle, rgba(201, 166, 120, 0.16) 0%, transparent 70%); }
.form-panel::after { width: 320px; height: 320px; bottom: -90px; left: -90px; background: radial-gradient(circle, rgba(201, 166, 120, 0.11) 0%, transparent 70%); }

.form-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 412px;
    background: linear-gradient(180deg, #fffefb 0%, #fdf8f0 100%);
    border: 1px solid rgba(201, 166, 120, 0.28);
    border-radius: 28px;
    padding: clamp(34px, 3vw, 48px);
    box-shadow: 0 44px 80px -34px rgba(70, 45, 20, 0.32), 0 14px 34px -20px rgba(70, 45, 20, 0.18);
    animation: rz-rise 0.75s var(--rz-ease) both;
}
@keyframes rz-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.form-brand { margin-bottom: 26px; }
.form-brand .wm { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 27px; letter-spacing: 5px; color: var(--rz-burgundy); }
.form-brand .sub { display: block; font-size: 8.5px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--rz-burgundy); opacity: 0.72; margin-top: 5px; font-weight: 600; }

.form-head { margin-bottom: 26px; }
.form-head h1 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 35px; letter-spacing: -0.5px; color: var(--rz-ink); }
.form-head h1 em { font-style: italic; color: var(--rz-burgundy); }
.form-head p { margin-top: 8px; font-size: 13.5px; color: var(--rz-muted); }

/* ---- Errors ---- */
.login-alert {
    display: flex; align-items: center; gap: 9px;
    background: rgba(163, 43, 82, 0.08); border: 1px solid rgba(163, 43, 82, 0.22);
    color: var(--rz-burgundy-dark); font-size: 13px; font-weight: 500;
    padding: 11px 14px; border-radius: 12px; margin-bottom: 20px;
}
.login-alert svg { flex: 0 0 auto; width: 16px; height: 16px; }

/* ---- Fields ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--rz-muted); margin-bottom: 8px; }
.field-input { position: relative; display: flex; align-items: center; }
.field-input .icon { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--rz-burgundy); pointer-events: none; opacity: 0.85; }
.field-input input {
    width: 100%; font-family: 'Inter', sans-serif; font-size: 15px; color: var(--rz-ink);
    background: #fdf9f2; border: 1.5px solid rgba(120, 90, 50, 0.16); border-radius: 14px;
    padding: 15px 16px 15px 46px; outline: none;
    transition: border-color 0.25s var(--rz-ease), box-shadow 0.25s var(--rz-ease), background 0.25s;
}
.field-input input::placeholder { color: #b3a892; }
.field-input input:hover { border-color: rgba(163, 43, 82, 0.35); }
.field-input input:focus { border-color: var(--rz-burgundy); background: #fffefb; box-shadow: 0 0 0 4px rgba(163, 43, 82, 0.12); }
.field-input:focus-within .icon { opacity: 1; }

.pw-toggle { position: absolute; right: 12px; background: none; border: none; cursor: pointer; color: var(--rz-muted); display: flex; padding: 6px; border-radius: 8px; transition: color 0.2s, background 0.2s; }
.pw-toggle:hover { color: var(--rz-burgundy); background: rgba(163, 43, 82, 0.08); }
.pw-toggle svg { width: 18px; height: 18px; }

/* ---- Submit ---- */
.btn-signin {
    position: relative; overflow: hidden;
    width: 100%; margin-top: 10px; border: none; cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    color: #fff; padding: 17px; border-radius: 14px;
    background: linear-gradient(135deg, var(--rz-burgundy-light) 0%, var(--rz-burgundy) 45%, var(--rz-burgundy-dark) 100%);
    box-shadow: 0 14px 28px -10px rgba(163, 43, 82, 0.6);
    transition: transform 0.2s var(--rz-ease), box-shadow 0.25s var(--rz-ease), filter 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-signin > * { position: relative; z-index: 1; }
.btn-signin::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(120deg, transparent 32%, rgba(255, 255, 255, 0.28) 50%, transparent 68%);
    transform: translateX(-130%);
    transition: transform 0.7s var(--rz-ease);
}
.btn-signin:hover::before { transform: translateX(130%); }
.btn-signin:hover { transform: translateY(-2px); box-shadow: 0 22px 36px -12px rgba(163, 43, 82, 0.66); filter: brightness(1.05); }
.btn-signin:active { transform: translateY(0); }
.btn-signin svg { width: 17px; height: 17px; }

/* ---- OR divider + help ---- */
.or-div { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: var(--rz-muted); font-size: 11px; letter-spacing: 2px; font-weight: 600; }
.or-div::before, .or-div::after { content: ""; flex: 1; height: 1px; background: var(--rz-line); }
.form-help { text-align: center; font-size: 13px; color: var(--rz-muted); }
.form-help a { color: var(--rz-burgundy); font-weight: 600; text-decoration: none; }
.form-help a:hover { text-decoration: underline; }

/* Powered-by, just below the card */
.login-powered {
    z-index: 1;
    margin-top: 42px;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 11.5px; letter-spacing: 0.3px; color: var(--rz-muted);
}
.login-powered span { font-weight: 500; }
.login-powered img { height: 20px; width: auto; object-fit: contain; opacity: 0.9; }

/* ===================== RESPONSIVE ===================== */
/* Tablet: keep side-by-side, tighten proportions */
@media (max-width: 1024px) and (min-width: 769px) {
    .brand-panel { flex: 1 1 50%; padding: 36px 32px; }
    .form-panel  { flex: 0 0 50%; padding: 28px 24px; }
    .brand-mid h2 { font-size: 2rem; }
    .brand-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; align-items: start; }
    .feat + .feat { padding-left: 0; border-left: none; }
    .feat-ic { width: 36px; height: 36px; }
    .feat-t { font-size: 13px; }
    .feat-s { font-size: 11px; }
    .form-inner { max-width: 100%; padding: 30px 28px; }
}

/* Mobile: stack vertically — brand becomes a compact header */
@media (max-width: 768px) {
    .login-body { flex-direction: column; min-height: 100vh; }

    /* Brand panel: compact photo strip at the top */
    .brand-panel {
        flex: none;
        height: 200px;
        padding: 24px 20px;
        gap: 0;
        justify-content: flex-start;
    }
    .brand-mid { display: none; }
    .brand-features { display: none; }
    .brand-foot { display: none; }

    /* Form panel: fills the rest, scrollable */
    .form-panel {
        flex: 1;
        justify-content: flex-start;
        padding: 28px 20px 32px;
        overflow-y: auto;
    }
    .form-inner {
        max-width: 480px;
        width: 100%;
        padding: 28px 24px;
        border-radius: 20px;
    }
    .form-head h1 { font-size: 28px; }
    .form-brand .wm { font-size: 22px; }

    .login-powered { margin-top: 24px; }
}

/* Tablet landscape: side-by-side but compact — short height (~810px on a 10.2" iPad)
   so reduce all spacing. Capped at max-width 1200px so it covers iPads in landscape
   (iPad 10.2" = 1080px wide, iPad Air/Pro 11" = 1180/1194px) while laptops/desktops
   (1280px+, e.g. 1366x768) keep the full desktop layout. */
@media (orientation: landscape) and (max-height: 900px) and (min-width: 600px) and (max-width: 1200px) {
    .login-body { min-height: 100vh; }
    .brand-panel { flex: 1 1 52%; padding: 18px 24px; gap: 8px; justify-content: space-between; }
    .form-panel  { flex: 0 0 48%; padding: 12px 16px; }
    .brand-wordmark { font-size: 22px; letter-spacing: 5px; }
    .brand-top .sub { font-size: 9px; }
    .eyebrow-row { margin-bottom: 12px; }
    .brand-mid h2 { font-size: 1.5rem; }
    .brand-mid p { font-size: 12.5px; margin-top: 8px; }
    /* Switch back to single-row flex so features don't take two rows in short height */
    .brand-features { display: flex; flex-wrap: nowrap; gap: 10px; margin-top: 12px; align-items: center; }
    .feat + .feat { padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.16); }
    .feat-ic { width: 28px; height: 28px; }
    .feat-ic svg { width: 13px; height: 13px; }
    .feat-t { font-size: 11.5px; }
    .feat-s { font-size: 10px; }
    .brand-foot { font-size: 11px; }
    .form-inner { max-width: 100%; padding: 18px 20px; border-radius: 18px; }
    .form-brand { margin-bottom: 14px; }
    .form-brand .wm { font-size: 22px; }
    .form-head { margin-bottom: 14px; }
    .form-head h1 { font-size: 24px; }
    .form-head p { font-size: 12.5px; }
    .field { margin-bottom: 12px; }
    .field label { font-size: 10px; margin-bottom: 6px; }
    .field-input input { padding: 11px 16px 11px 42px; font-size: 14px; }
    .btn-signin { padding: 13px; margin-top: 6px; font-size: 12.5px; }
    .login-powered { margin-top: 14px; }
}

@media (max-width: 480px) {
    .brand-panel { height: 160px; }
    .brand-wordmark { font-size: 22px; letter-spacing: 5px; }
    .form-inner { padding: 24px 20px; border-radius: 18px; }
    .form-head h1 { font-size: 26px; }
    .field-input input { padding: 13px 16px 13px 44px; font-size: 14px; }
    .btn-signin { font-size: 12.5px; padding: 15px; }
}
