/* ─────────────────────────────────────────────────────────────────────────────
   The sign-in page (views/login.ejs) in the brand identity of 2026-12-02.
   Always on: the owner chose no design switch for this page (2026-12-02), and the
   palette below is for this page only; the app keeps design.md. Sources: the owner's two brand sheets
   (attached_assets «١» logo usage, «٢» colours + type) and design.md for sizes —
   the colour sheet says its palette is the newer one.

     #101010 black · core      logo, headings, main buttons
     #FFFFFF white             the default surface
     #F7F6F2 ivory             quiet secondary surfaces (the brand panel, filled fields)
     #737373 grey              secondary text and details
     #F46A32 orange · accent   small touches only (3–5 %): one short line, the focus glow;
                               never a large area, a main button or small low-contrast text
   Type: Thmanyah Sans 400 / 500 / 600 (never 700), Inter for Latin and numbers.

   views/login.ejs links this file after ds3.css (fonts, tokens) and always sets
   html.ds3 ds3-page ds3-login; the rules keep that scope so nothing else picks them up.
   Restyle only: same controls, words and order.

   1  Surface and type
   2  The brand panel (logo lockup + the three numbers)
   3  The form (heading, fields, links, buttons, divider, error)
   4  The sign-up confirmation window
   5  Phones
   ───────────────────────────────────────────────────────────────────────────── */

/* ── 1. Surface and type ─────────────────────────────────────────────────── */
html.ds3-page.ds3-login {
    --lg-ink: #101010;
    --lg-ink-hover: #2B2B2B;
    --lg-paper: #FFFFFF;
    --lg-ivory: #F7F6F2;
    --lg-ivory-deep: #EFEDE7;
    --lg-grey: #737373;
    --lg-placeholder: #A3A3A3;
    --lg-line: #E8E6E1;
    --lg-line-strong: #D9D6CF;
    --lg-accent: #F46A32;
    --lg-focus: 0 0 0 3px rgba(244, 106, 50, 0.30);
    --lg-font: "Thmanyah Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --lg-font-latin: "Inter", "Thmanyah Sans", ui-sans-serif, system-ui, sans-serif;
}
html.ds3-page.ds3-login body {
    background: var(--lg-paper);
    color: var(--lg-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* The page's own sheet sets one face on every element; this one wins on specificity. */
html.ds3-page.ds3-login * { font-family: var(--lg-font); }

/* ── 2. The brand panel ──────────────────────────────────────────────────── */
html.ds3-page.ds3-login .identity-panel {
    background: var(--lg-ivory);
    border-inline-end: 1px solid var(--lg-line);
}
html.ds3-page.ds3-login .identity-panel::before { display: none; }

/* Logo lockup, as on the brand sheets: the «سهل» wordmark, «SAHAL AI» spaced out
   beneath it, and the one orange touch of the page. */
html.ds3-page.ds3-login .ds-login-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
html.ds3-page.ds3-login .ds-login-brand img {
    height: 56px;
    width: auto;
    margin: 0;
    opacity: 1;
}
html.ds3-page.ds3-login .ds-login-tag {
    direction: ltr;
    font-family: var(--lg-font-latin);
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.32em;
    padding-inline-start: 0.32em; /* balances the tracking after the last letter */
    color: var(--lg-grey);
}
html.ds3-page.ds3-login .ds-login-accent {
    display: block;
    width: 32px;
    height: 2px;
    margin-top: 6px;
    border-radius: 2px;
    background: var(--lg-accent);
}

html.ds3-page.ds3-login .stat-number {
    font-family: var(--lg-font-latin);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--lg-ink);
    font-feature-settings: 'tnum';
}
html.ds3-page.ds3-login .stat-label {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    letter-spacing: 0;
    color: var(--lg-grey);
}

/* ── 3. The form ─────────────────────────────────────────────────────────── */
html.ds3-page.ds3-login .heading-1 {
    font-size: 26px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--lg-ink);
}
html.ds3-page.ds3-login .heading-1 span { font-family: var(--lg-font-latin); }

html.ds3-page.ds3-login .field-label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    letter-spacing: 0;
    color: var(--lg-ink);
}

/* Filled fields (design.md 6.2) in the brand's ivory. */
html.ds3-page.ds3-login .input-field {
    height: 44px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--lg-ivory);
    box-shadow: none;
    font-size: 14px;
    font-weight: 400;
    color: var(--lg-ink);
}
html.ds3-page.ds3-login .input-field:hover { border-color: var(--lg-line-strong); }
html.ds3-page.ds3-login .input-field:focus {
    outline: none;
    background: var(--lg-paper);
    border-color: var(--lg-ink);
    box-shadow: 0 0 0 3px rgba(16, 16, 16, 0.08);
}
html.ds3-page.ds3-login .input-field::placeholder { color: var(--lg-placeholder); }
html.ds3-page.ds3-login #password,
html.ds3-page.ds3-login #password-mobile { padding-inline-end: 48px; }

html.ds3-page.ds3-login .password-toggle {
    border-radius: 8px;
    color: var(--lg-grey);
}
html.ds3-page.ds3-login .password-toggle:hover {
    background: var(--lg-ivory-deep);
    color: var(--lg-ink);
}

html.ds3-page.ds3-login .checkbox-custom {
    border-color: var(--lg-line-strong);
    accent-color: var(--lg-ink);
}

/* Links: ink, underlined — the sheet keeps orange away from small text. */
html.ds3-page.ds3-login .link-orange {
    color: var(--lg-ink);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(16, 16, 16, 0.25);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}
html.ds3-page.ds3-login .link-orange:hover {
    color: var(--lg-ink);
    text-decoration-color: var(--lg-ink);
}

/* The main button: black (the sheet's core colour for main actions). */
html.ds3-page.ds3-login .orange-button {
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--lg-ink);
    color: var(--lg-paper);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}
html.ds3-page.ds3-login .orange-button:hover { background: var(--lg-ink-hover); }
html.ds3-page.ds3-login .orange-button:active { background: #000000; }
html.ds3-page.ds3-login .orange-button:disabled { opacity: 0.5; }

html.ds3-page.ds3-login .google-btn {
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--lg-line);
    border-radius: 10px;
    background: var(--lg-paper);
    color: var(--lg-ink);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}
html.ds3-page.ds3-login .google-btn:hover {
    background: var(--lg-ivory);
    border-color: var(--lg-line-strong);
}
html.ds3-page.ds3-login .google-btn:active { background: var(--lg-ivory-deep); }

html.ds3-page.ds3-login .orange-button:focus-visible,
html.ds3-page.ds3-login .google-btn:focus-visible,
html.ds3-page.ds3-login .link-orange:focus-visible,
html.ds3-page.ds3-login .password-toggle:focus-visible,
html.ds3-page.ds3-login .sa-btn-primary:focus-visible,
html.ds3-page.ds3-login .sa-btn-secondary:focus-visible {
    outline: none;
    box-shadow: var(--lg-focus);
}

html.ds3-page.ds3-login .divider-or {
    margin: 20px 0;
    font-size: 13px;
    color: var(--lg-grey);
}
html.ds3-page.ds3-login .divider-or::before,
html.ds3-page.ds3-login .divider-or::after {
    height: 1px;
    background: var(--lg-line);
}

/* The two quiet lines under the buttons carry inline colours: ink-grey of the sheet. */
html.ds3-page.ds3-login .form-card .text-center.mt-8 p {
    color: var(--lg-grey) !important;
    font-size: 14px !important;
}
html.ds3-page.ds3-login label[for="googleRememberMe"],
html.ds3-page.ds3-login label[for="googleRememberMeMobile"] { color: var(--lg-grey) !important; }
html.ds3-page.ds3-login label[for="rememberMe"],
html.ds3-page.ds3-login label[for="rememberMeMobile"] { color: var(--lg-ink) !important; }

html.ds3-page.ds3-login .error-box {
    margin-bottom: 24px;
    padding: 12px 14px;
    border: 1px solid #F3C7C3;
    border-radius: 10px;
    background: #FEF4F3;
    color: #B42318;
    font-size: 14px;
}
html.ds3-page.ds3-login .error-box .font-semibold { font-weight: 500; }

/* ── 4. The sign-up confirmation window (design.md 6.7) ──────────────────── */
html.ds3-page.ds3-login .sa-modal-overlay {
    background: rgba(16, 16, 16, 0.35);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
html.ds3-page.ds3-login .sa-modal-card {
    padding: 32px 24px 24px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.06), 0 24px 48px rgba(16, 16, 16, 0.14);
}
html.ds3-page.ds3-login .sa-modal-icon {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 12px;
    background: var(--lg-ivory);
    color: var(--lg-ink);
}
html.ds3-page.ds3-login .sa-modal-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 0;
    color: var(--lg-ink);
}
html.ds3-page.ds3-login .sa-modal-text {
    font-size: 14px;
    line-height: 22.75px;
    color: var(--lg-grey);
}
html.ds3-page.ds3-login .sa-modal-text strong {
    font-weight: 500;
    color: var(--lg-ink);
}
html.ds3-page.ds3-login .sa-btn-primary {
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--lg-ink);
    box-shadow: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}
html.ds3-page.ds3-login .sa-btn-primary:hover {
    background: var(--lg-ink-hover);
    box-shadow: none;
}
html.ds3-page.ds3-login .sa-btn-secondary {
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--lg-line);
    border-radius: 10px;
    color: var(--lg-ink);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}
html.ds3-page.ds3-login .sa-btn-secondary:hover {
    background: var(--lg-ivory);
    border-color: var(--lg-line-strong);
}

/* ── 5. Phones ───────────────────────────────────────────────────────────── */
html.ds3-page.ds3-login .ds-login-brand-sm img { height: 44px; margin-bottom: 0; }
@media (max-width: 767px) {
    html.ds3-page.ds3-login .ds-login-brand-sm { margin-bottom: 8px; }
    html.ds3-page.ds3-login .input-field { height: 48px; font-size: 16px; }
    html.ds3-page.ds3-login .orange-button,
    html.ds3-page.ds3-login .google-btn,
    html.ds3-page.ds3-login .sa-btn-primary,
    html.ds3-page.ds3-login .sa-btn-secondary { height: 50px; }
    html.ds3-page.ds3-login #password-mobile { padding-inline-end: 52px; }
}
