/* ============================================================
   NRestro — Login page
   Branded to match the nrestro.com landing page
   (brand blue #3c8dbc · accent orange #f5a623 · Lexend)
   ============================================================ */
:root {
    /* NRestro brand palette (from landing page tokens) */
    --brand-50:  #eff8fc;
    --brand-100: #d7edf7;
    --brand-200: #b3dcef;
    --brand-300: #80c3e2;
    --brand-400: #52a8d2;
    --brand-500: #3c8dbc;
    --brand-600: #2f72a0;
    --brand-700: #295c81;
    --brand-800: #264e6b;
    --accent-500: #f5a623;
    --accent-400: #f9b73f;

    /* Ink (neutral) scale */
    --ink-900: #141b22;
    --ink-700: #36424f;
    --ink-500: #647281;
    --ink-200: #d4dbe2;
    --ink-100: #eaeef2;
    --ink-50:  #f6f8fa;

    /* Semantic tokens */
    --auth-bg: var(--ink-50);
    --auth-surface: #ffffff;
    --auth-border: var(--ink-100);
    --auth-text: var(--ink-900);
    --auth-muted: var(--ink-500);
    --auth-primary: var(--brand-500);
    --auth-primary-dark: var(--brand-600);
    --auth-primary-soft: var(--brand-100);
    --auth-success: #10b981;
    --auth-success-soft: #ecfdf5;
    --auth-danger: #dc2626;
    --auth-danger-soft: #fee2e2;
    --auth-shadow: 0 1px 2px rgba(20,40,60,.04), 0 18px 50px -12px rgba(20,50,80,.18);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
    margin: 0; background: var(--auth-bg); color: var(--auth-text);
    font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px; line-height: 1.45;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

/* ---------- Two-pane shell ---------- */
.auth-shell {
    height: 100vh; display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
}
@media (min-width: 992px) {
    .auth-shell { grid-template-columns: 5fr 7fr; }
}
@media (min-width: 1400px) {
    .auth-shell { grid-template-columns: 1fr 1fr; }
}

/* ---------- Brand panel ---------- */
.auth-brand {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-600) 52%, var(--brand-500) 100%);
    color: #fff;
    padding: 28px 28px;
    display: flex; flex-direction: column;
    height: 100vh;
}
/* soft brand glows + faint grid, echoing the landing-page hero */
.auth-brand::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(circle at 18% 12%, rgba(255,255,255,.16), transparent 38%),
                      radial-gradient(circle at 82% 88%, rgba(245,166,35,.22), transparent 42%);
    pointer-events: none;
}
.auth-brand::after {
    content: ""; position: absolute; inset: 0; opacity: .5;
    background-image: linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-mask-image: radial-gradient(ellipse at top, #000, transparent 72%);
            mask-image: radial-gradient(ellipse at top, #000, transparent 72%);
    pointer-events: none;
}
.brand-inner { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; width: 100%; flex: 1; display: flex; flex-direction: column; }

.brand-logo {
    display: inline-flex; align-items: center; gap: 10px;
    text-decoration: none; color: #fff;
}
.brand-logo img { height: 54px; width: auto; filter: brightness(0) invert(1); }

.brand-hero { margin: auto 0; padding: 16px 0; }
.brand-hero h1 {
    margin: 0 0 12px; font-size: 32px; line-height: 1.12;
    font-weight: 800; letter-spacing: -.02em;
}
.brand-hero p {
    margin: 0 0 24px; font-size: 15px; line-height: 1.6;
    color: rgba(255,255,255,.86);
}
.brand-features { list-style: none; padding: 0; margin: 0; }
.brand-features li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 8px 0; font-size: 14px; color: rgba(255,255,255,.92);
}
.brand-features .check {
    width: 26px; height: 26px; flex-shrink: 0;
    border-radius: 8px;
    background: var(--accent-500);
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(245,166,35,.7);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.brand-features strong { color: #fff; font-weight: 700; }

.brand-foot {
    margin-top: 20px; padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.18);
    font-size: 12px; color: rgba(255,255,255,.72);
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brand-foot a { color: rgba(255,255,255,.9); text-decoration: none; }
.brand-foot a:hover { text-decoration: underline; }

/* ---------- Form panel ---------- */
.auth-form-panel {
    display: flex; align-items: center; justify-content: center;
    padding: 24px 20px;
    background: var(--auth-bg);
    background-image: radial-gradient(circle at 100% 0%, var(--brand-50), transparent 55%);
    height: 100vh; overflow: hidden;
}
.auth-form-inner {
    width: 100%; max-width: 420px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    box-shadow: var(--auth-shadow);
    padding: 30px 30px 26px;
}
.auth-form-inner::-webkit-scrollbar { width: 6px; }
.auth-form-inner::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 999px; }

.auth-form-mobile-logo {
    display: none; text-align: center; margin-bottom: 18px;
}
.auth-form-mobile-logo img { height: 44px; }

.auth-form-header { margin-bottom: 22px; text-align: center; }
.auth-form-header h2 {
    margin: 0 0 4px; font-size: 23px; font-weight: 800; letter-spacing: -.02em;
    color: var(--ink-900);
}
.auth-form-header p { margin: 0; color: var(--auth-muted); font-size: 13px; }

.auth-alert {
    border-radius: 10px; padding: 10px 12px; font-size: 13px;
    margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px;
}
.auth-alert i { margin-top: 2px; }
.auth-alert.is-success { background: var(--auth-success-soft); color: #047857; border: 1px solid #a7f3d0; }
.auth-alert.is-error   { background: var(--auth-danger-soft);  color: #991b1b; border: 1px solid #fecaca; }
.auth-alert .close {
    margin-left: auto; opacity: .6; background: transparent;
    border: 0; color: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
.auth-alert .close:hover { opacity: 1; }

/* ---------- Fields ---------- */
.field { margin-bottom: 14px; }
.field-label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--auth-muted); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: .04em;
}
.field-control {
    position: relative; display: flex; align-items: stretch;
    border: 1px solid var(--auth-border); border-radius: 10px;
    background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field-control:focus-within {
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px rgba(60,141,188,.14);
}
.field-icon {
    flex-shrink: 0; width: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--brand-500); font-size: 14px;
    border-right: 1px solid var(--auth-border);
}
.field-control input.form-control {
    border: 0 !important; box-shadow: none !important; outline: none !important;
    background: transparent !important; color: var(--auth-text);
    height: 42px !important; padding: 0 14px 0 12px !important;
    font-size: 14px !important; flex: 1; width: 100%;
    border-radius: 0 10px 10px 0 !important;
    font-family: inherit;
}
.field-control .toggle-pwd {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; color: var(--auth-muted); border-left: 1px solid var(--auth-border);
    cursor: pointer; background: transparent; border-top: 0; border-right: 0; border-bottom: 0;
    font-size: 14px;
}
.field-control .toggle-pwd:hover { color: var(--brand-600); }
.field-control input.form-control::placeholder { color: #9aa6b2; }

/* ---------- Helper row (forgot password) ---------- */
.helper-row {
    display: flex; align-items: center; justify-content: flex-end;
    margin: -6px 2px 14px;
}
.helper-row a {
    font-size: 12px; color: var(--brand-600);
    font-weight: 600; text-decoration: none;
}
.helper-row a:hover { text-decoration: underline; }

/* ---------- Primary button ---------- */
.btn-primary-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 46px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff !important; border: 0; border-radius: 10px;
    font-size: 14px; font-weight: 700; letter-spacing: .01em;
    cursor: pointer; transition: transform .12s, box-shadow .15s, opacity .15s;
    box-shadow: 0 12px 28px -10px rgba(60,141,188,.6);
}
.btn-primary-cta:hover {
    box-shadow: 0 16px 34px -10px rgba(60,141,188,.7);
    transform: translateY(-1px);
}
.btn-primary-cta:active { transform: translateY(1px); }

/* ---------- Foot links + Google Play ---------- */
.auth-form-foot {
    text-align: center; margin-top: 16px;
    font-size: 13px; color: var(--auth-muted);
}
.auth-form-foot a {
    color: var(--brand-600); font-weight: 600;
    text-decoration: none;
}
.auth-form-foot a:hover { text-decoration: underline; }

.legal-links {
    margin-top: 12px; text-align: center;
    font-size: 12px; color: var(--auth-muted);
}
.legal-links a { color: var(--auth-muted); text-decoration: none; }
.legal-links a:hover { color: var(--brand-600); text-decoration: underline; }
.legal-links .dot { margin: 0 8px; color: var(--ink-200); }

.divider {
    display: flex; align-items: center; gap: 10px;
    margin: 18px 0 14px;
    color: var(--auth-muted); font-size: 11px;
    text-transform: uppercase; letter-spacing: .08em;
}
.divider::before, .divider::after {
    content: ""; flex: 1; height: 1px; background: var(--auth-border);
}

.play-store {
    display: flex; justify-content: center;
}
.play-store img {
    height: 44px; transition: transform .15s;
}
.play-store a:hover img { transform: translateY(-2px); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    /* Let the page scroll naturally on phones/tablets — a fixed 100vh card
       gets clipped by mobile browser toolbars, hiding the Sign in button. */
    html, body { height: auto; overflow: auto; }
    .auth-shell { height: auto; min-height: 100vh; }
    .auth-brand { display: none !important; }
    .auth-form-panel {
        padding: 16px 16px 32px;
        height: auto; min-height: 100vh;
        align-items: flex-start; overflow: visible;
    }
    .auth-form-inner {
        padding: 22px 22px 20px;
        max-height: none; overflow: visible;
    }
    .auth-form-mobile-logo { display: block; }
}
@media (max-width: 575px) {
    .auth-form-panel { padding: 10px 10px 28px; }
    .auth-form-inner {
        padding: 18px 18px 16px;
        border-radius: 12px;
    }
    .auth-form-header h2 { font-size: 20px; }
}
@media (max-height: 720px) {
    .auth-form-header { margin-bottom: 14px; }
    .field { margin-bottom: 10px; }
    .brand-hero h1 { font-size: 26px; }
    .brand-features li { padding: 5px 0; font-size: 13px; }
}
</content>
</invoke>
