/* ============================================================
   NRestro — Restaurant registration 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: 24px 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-logo span { font-weight: 700; font-size: 18px; letter-spacing: .02em; }

.brand-hero { margin: auto 0; padding: 16px 0; }
.brand-hero h1 {
    margin: 0 0 10px; font-size: 28px; line-height: 1.14;
    font-weight: 800; letter-spacing: -.02em;
}
.brand-hero p {
    margin: 0 0 18px; font-size: 14px; line-height: 1.55;
    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: 6px 0; font-size: 13px; 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: 16px 16px;
    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: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    box-shadow: var(--auth-shadow);
    padding: 22px 24px 18px;
}
/* Slim scrollbar in case the form must scroll on very short viewports */
.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: 16px;
}
.auth-form-mobile-logo img { height: 44px; }
@media (max-width: 991px) {
    .auth-form-mobile-logo { display: block; }
}

.auth-form-header { margin-bottom: 14px; }
.auth-form-header h2 {
    margin: 0 0 2px; font-size: 21px; font-weight: 800; letter-spacing: -.02em;
    color: var(--ink-900);
}
.auth-form-header p { margin: 0; color: var(--auth-muted); font-size: 12px; }

.auth-alert {
    border-radius: 10px; padding: 10px 12px; font-size: 13px;
    margin-bottom: 12px;
}
.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:empty { display: none; }

/* ---------- Fields ---------- */
.field { margin-bottom: 10px; min-width: 0; }
.field-label {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--auth-muted); margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: .04em;
}
.field-control {
    position: relative; display: flex; align-items: stretch;
    border: 1px solid var(--auth-border); border-radius: 9px;
    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: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--brand-500); font-size: 13px;
    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: 38px !important; padding: 0 12px 0 10px !important;
    font-size: 13px !important; flex: 1; width: 100%; min-width: 0;
    border-radius: 0 9px 9px 0 !important;
    font-family: inherit;
}
.field-control input.form-control::placeholder { color: #9aa6b2; }
.field-control input.form-control:disabled { background: var(--ink-50) !important; }

/* Show/hide password toggle (sits flush on the right of the field) */
.field-toggle {
    flex-shrink: 0; width: 40px; padding: 0;
    border: 0; border-left: 1px solid var(--auth-border);
    background: transparent; color: var(--auth-muted);
    font-size: 13px; cursor: pointer;
    border-radius: 0 9px 9px 0;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
.field-toggle:hover { color: var(--brand-600); background: var(--brand-50); }
.field-toggle:focus-visible { outline: 2px solid var(--brand-400); outline-offset: -2px; }
/* When a toggle is present, the input shouldn't round its right corners */
.field-control input.form-control:not(:last-child) { border-radius: 0 !important; }

.field-help { font-size: 11px; color: var(--auth-muted); margin: 4px 2px 0; }
.field-error {
    display: block; color: var(--auth-danger); font-size: 11px;
    margin: 4px 2px 0; min-height: 0;
}
.field-error:empty { display: none; }

/* Two-column row for paired fields (e.g. password + confirm) */
.field-row {
    display: grid; gap: 10px;
    grid-template-columns: 1fr;
    margin-bottom: 10px;
}
@media (min-width: 576px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .field-row > .field { margin-bottom: 0; }
}

/* Password strength checklist (kept structure-compatible with existing JS show/hide) */
.password-rules {
    margin: 6px 0 0; padding: 8px 10px;
    background: #fff7f7; border: 1px solid #fecaca; border-radius: 8px;
}
.password-rules p { color: var(--auth-danger); font-size: 11px; margin: 0 0 4px; font-weight: 600; }
.password-rules ul { list-style: none; padding: 0; margin: 0; font-size: 11px; }
.password-rules li {
    color: var(--auth-danger); padding: 1px 0;
    display: flex; align-items: center; gap: 6px;
}
.password-rules li::before {
    content: "\f00d"; font-family: FontAwesome; font-size: 10px;
    width: 14px; text-align: center;
}
.passwordError.hidden { display: none !important; }
.passwordError.show { display: block; }

/* ---------- Terms & checkbox ---------- */
.terms-row {
    display: flex; align-items: center; gap: 8px;
    background: var(--brand-50); border: 1px solid var(--brand-100);
    border-radius: 9px; padding: 8px 10px;
    margin: 10px 0 6px;
}
.terms-row input[type=checkbox] {
    margin: 0; width: 16px; height: 16px;
    accent-color: var(--brand-500); cursor: pointer; flex-shrink: 0;
}
.terms-row label { margin: 0; font-size: 12px; color: var(--auth-text); cursor: pointer; line-height: 1.35; }
.terms-link {
    color: var(--brand-600); font-weight: 600; cursor: pointer; margin-left: 4px;
}
.terms-link:hover { color: var(--brand-700); text-decoration: underline; }

/* iCheck override: hide the custom widget on inputs we don't want it on (the checkbox uses the native one styled above) */
.terms-row .icheckbox_square-blue { display: none !important; }

/* reCAPTCHA spacing */
.captcha-row { margin: 6px 0 10px; display: flex; justify-content: flex-start; transform-origin: top left; }
.captcha-row .g-recaptcha > div { max-width: 100%; }
/* Optional: shrink reCAPTCHA slightly on short viewports so the button stays visible */
@media (max-height: 760px) {
    .captcha-row { transform: scale(.9); margin-bottom: 4px; }
}

/* ---------- Primary button ---------- */
.btn-primary-cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 42px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff !important; border: 0; border-radius: 9px;
    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); }

/* ---------- Footer links under form ---------- */
.auth-form-foot {
    text-align: center; margin-top: 10px;
    font-size: 12px; 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; }
.auth-form-foot .dot { margin: 0 8px; color: var(--ink-200); }

/* ---------- Terms modal polish ---------- */
#termsModal .modal-content {
    border: 0; border-radius: 16px; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(20,40,60,.35);
}
#termsModal .modal-header {
    padding: 14px 18px; border-bottom: 1px solid var(--auth-border);
    background: var(--brand-50);
}
#termsModal .modal-title { font-size: 16px; font-weight: 700; color: var(--brand-700); }
#termsModal .modal-body {
    padding: 16px 18px; font-size: 13px; color: var(--auth-text);
    max-height: 60vh; overflow-y: auto;
}
#termsModal .modal-body ol { padding-left: 20px; }
#termsModal .modal-body ol > li { margin-bottom: 10px; }
#termsModal .modal-footer {
    padding: 12px 18px; border-top: 1px solid var(--auth-border);
    background: var(--ink-50);
}
#termsModal .mr-btn-primary {
    background: var(--brand-500) !important; color: #fff !important;
    border: 1px solid var(--brand-500) !important;
    border-radius: 8px !important; padding: 8px 16px !important;
    font-weight: 600 !important;
}
#termsModal .mr-btn-primary i { margin-right: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    /* Hide the brand panel entirely on phones/tablets so the form gets the full viewport.
       Let the page scroll naturally — a fixed 100vh card gets clipped by mobile browser
       toolbars, hiding the Create-account button. */
    html, body { height: auto; overflow: auto; }
    .auth-shell { grid-template-columns: 1fr !important; height: auto; min-height: 100vh; }
    .auth-brand { display: none !important; }
    .auth-form-panel {
        padding: 12px 12px 32px;
        height: auto; min-height: 100vh;
        align-items: flex-start; overflow: visible;
    }
    .auth-form-inner {
        padding: 16px 18px 14px;
        max-height: none; overflow: visible;
        max-width: 540px;
    }
}
@media (max-width: 575px) {
    .auth-form-panel { padding: 8px 8px 28px; }
    .auth-form-inner {
        padding: 14px 14px 12px;
        border-radius: 12px;
    }
    .auth-form-header h2 { font-size: 19px; }
}
/* Short viewports — pack tighter so we don't trigger the internal scroll */
@media (max-height: 720px) {
    .auth-form-header { margin-bottom: 10px; }
    .field { margin-bottom: 8px; }
    .field-row { margin-bottom: 8px; }
    .terms-row { padding: 6px 10px; margin: 8px 0 4px; }
    .btn-primary-cta { height: 40px; }
}
</content>
