/* /admin2/assets/css/login.css — "The Reading Room" sign-in.
   A quiet postcard pinned to a sheet of warm paper. */

@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500&family=Geist:wght@300;400;500;600;700&display=swap');

:root {
    --paper:        #FFFFFF;
    --paper-warm:   #F4F4F4;
    --paper-deep:   #E6E6E6;
    --paper-bright: #FFFFFF;
    --ink-0:        #1A1A1A;
    --ink-1:        #3F3F3F;
    --ink-2:        #6B6B6B;
    --ink-3:        #A0A0A0;
    --rule:         #E4E4E0;
    --rule-soft:    #EEEEEA;
    --rule-strong:  #C8C8C2;
    --terra:        #B8553A;
    --terra-deep:   #8E3F2A;
    --terra-soft:   #E8C5B2;
    --terra-glow:   rgba(184, 85, 58, 0.18);
    --sage:         #6B8265;
    --sage-deep:    #4F6248;
    --clay:         #9E4A2E;

    --serif: 'Geist', -apple-system, system-ui, sans-serif;
    --sans:  'Geist', -apple-system, system-ui, sans-serif;
    --mono:  'Geist Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0; height: 100%;
    background: var(--paper);
    color: var(--ink-0);
    font-family: var(--sans);
    font-feature-settings: "ss01", "cv01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-page {
    position: relative;
    min-height: 100dvh;
    overflow: hidden;
    display: grid;
    place-items: center;
}

/* Replace the SaaS orbs with paper grain + subtle decorative motif */
.bg-orb { display: none; }
.bg-grid { display: none; }

.login-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    padding: 24px;
}

/* ───────────────────── editorial card ───────────────────── */
.login-card {
    position: relative;
    padding: 56px 44px 36px;
    border-radius: 18px;
    background: var(--paper-bright);
    border: 1px solid var(--rule-strong);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.55) inset,
        0 36px 80px -32px rgba(27, 24, 20, 0.32),
        0 14px 32px -22px rgba(27, 24, 20, 0.18);
    overflow: hidden;
    animation: card-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.login-card::before { display: none; }
.login-card::after {
    /* hairline rule decoration top-left */
    content: '';
    position: absolute;
    top: 22px; left: 22px;
    width: 28px; height: 1px;
    background: var(--terra);
}
.login-card > * { position: relative; }
@keyframes card-in {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card__head {
    text-align: left;
    margin-bottom: 32px;
}
.login-mark {
    width: auto; height: auto;
    margin: 0 0 16px;
    display: inline-flex;
    align-items: center; gap: 10px;
    background: transparent;
    color: var(--terra);
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}
.login-mark::after {
    content: 'Sahara Studio';
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    color: var(--ink-1);
    letter-spacing: -0.01em;
}
.login-mark svg { width: 16px; height: 16px; color: var(--terra); }

.login-card__title {
    margin: 0;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink-0);
}
.login-card__title em { font-style: normal; color: var(--terra); font-weight: 600; }
.login-card__subtitle {
    margin: 12px 0 0;
    font: 500 10.5px/1 var(--sans);
    color: var(--ink-2);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* ───────────────────── alert ───────────────────── */
.login-alert {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 6px;
    background: rgba(184, 85, 58, 0.07);
    border: 0;
    border-left: 3px solid var(--terra);
    color: var(--clay);
    font: 400 13.5px/1.4 var(--sans);
    text-align: left;
}

/* ───────────────────── form ───────────────────── */
.login-form { display: grid; gap: 22px; }

.login-field { display: block; position: relative; }
.login-field__label {
    display: block;
    font: 500 10.5px/1 var(--sans);
    color: var(--terra);
    margin-bottom: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.login-field__input {
    width: 100%;
    padding: 12px 0;
    font: 400 17px/1.4 var(--sans);
    font-family: var(--sans);
    color: var(--ink-0);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--rule-strong);
    border-radius: 0;
    outline: none;
    transition: border-color 0.18s ease;
}
.login-field__input::placeholder {
    color: var(--ink-3);
}
.login-field__input:hover { border-color: var(--ink-3); }
.login-field__input:focus { border-color: var(--terra); }
.login-field__input:-webkit-autofill {
    -webkit-text-fill-color: var(--ink-0);
    -webkit-box-shadow: 0 0 0px 1000px var(--paper-bright) inset;
    caret-color: var(--ink-0);
}

.login-field__pw { position: relative; display: block; }
.login-field__pw .login-field__input { padding-right: 44px; }
.login-field__toggle {
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    background: transparent;
    color: var(--ink-2);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    display: grid; place-items: center;
    transition: color 0.15s ease, background 0.15s ease;
}
.login-field__toggle:hover { color: var(--terra); background: var(--paper-warm); }

/* ───────────────────── submit ───────────────────── */
.login-submit {
    margin-top: 14px;
    width: 100%;
    padding: 16px 18px;
    font: 500 14px/1 var(--sans);
    letter-spacing: 0.05em;
    color: var(--paper);
    background: var(--ink-0);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background 0.15s ease, transform 0.12s ease, color 0.15s ease;
    box-shadow: 0 14px 32px -14px rgba(27, 24, 20, 0.4);
}
.login-submit:hover { background: var(--terra); }
.login-submit:active { transform: translateY(1px); }
.login-submit:focus-visible { outline: 2px solid var(--terra); outline-offset: 4px; }
.login-submit svg { transition: transform 0.18s ease; }
.login-submit:hover svg { transform: translateX(3px); }

.login-card__foot {
    margin-top: 28px;
    text-align: left;
    font: 400 12px/1.5 var(--sans);
    color: var(--ink-3);
    letter-spacing: 0;
    text-transform: none;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 10px;
}
.login-card__foot::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 999px;
    background: var(--sage);
    flex-shrink: 0;
}

/* ───────────────────── small screens ───────────────────── */
@media (max-width: 460px) {
    .login-card { padding: 40px 28px 28px; }
    .login-card__title { font-size: 26px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .login-card { animation: none; }
}
