/* ============================================================
   DevAdy — shared design tokens + primitive components.
   Used by both the public landing page and the admin shell.
   ============================================================ */

:root {
    /* Monochrome "Geist" palette — Next.js / Vercel look. Near-black
       base, pure-white text, grayscale UI. Color is reserved for the
       signature brand gradient (--grad-brand) and a couple of
       semantic states (success/danger). Shared by landing, admin, and
       the invoice screen chrome. The printable invoice .page is the
       only deliberate exception (see invoice/print.css.php). */
    --bg:        #000000;
    --bg-2:      #0a0a0a;
    --surface:   #0a0a0a;
    --surface-2: #141414;
    --border:    rgba(255,255,255,0.10);
    --border-2:  rgba(255,255,255,0.16);
    --hairline:  rgba(255,255,255,0.06);
    --hairline-2:rgba(255,255,255,0.12);
    --shadow-px: rgba(0,0,0,0.60);
    --text:      #ffffff;
    --text-dim:  #a1a1a1;
    --muted:     #6e6e6e;
    --accent:    #ededed;   /* near-white — interactive/links on dark */
    --accent-hi: #ffffff;   /* pure white, hovers */
    --accent-2:  #ededed;   /* was amber — neutralized to grayscale */
    --accent-3:  #4ade80;   /* green, success/availability (kept) */
    --danger:    #f87171;   /* red, error (kept) */
    --warn:      #f5a623;   /* amber, warning (kept, semantic only) */

    /* The one splash of color — Vercel-style gradient. Used sparingly:
       hero heading, favicon, the occasional accent bar. Never as a
       fill behind text you need to read. */
    --grad-brand: linear-gradient(110deg, #4d8cff 0%, #a45cff 50%, #ff5c8a 100%);

    --mono:    'Geist Mono', 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    --sans:    'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sans-ar: 'Cairo', 'Geist', 'Inter', -apple-system, sans-serif;
    --font-display: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Vercel-style crisp geometric radii — small, not pill-heavy. */
    --radius:    6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Minimal, near-flat elevation. Vercel leans on hairline borders,
       not shadow, for separation. */
    --shadow-card:       0 1px 2px rgba(0,0,0,0.60);
    --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.50);
    --shadow-inset:      inset 0 1px 0 rgba(255,255,255,0.04);
    --shadow-glow:       0 0 80px rgba(255,255,255,0.06);

    /* Legacy alias — anything that still references --accent-bright
       maps to the interactive near-white. */
    --accent-bright: var(--accent);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    font-size: 16px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--sans-ar); }
::selection { background: rgba(255,255,255,0.22); color: #fff; }

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hi); }

.mono { font-family: var(--mono); }
.ltr-force { direction: ltr; unicode-bidi: isolate; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; font-family: inherit;
    text-decoration: none; border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s, filter .12s, background .12s, border-color .12s, opacity .12s;
}
/* Vercel primary: solid white fill, black label. No color glow. */
.btn.primary {
    background: var(--accent-hi);
    color: #000;
    border-color: var(--accent-hi);
}
.btn.primary:hover {
    background: #000;
    color: #fff;
    border-color: var(--border-2);
}
.btn.primary:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn.ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--hairline-2); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--muted); }
.btn.danger { background: var(--danger); color: #000; border-color: var(--danger); }
.btn.danger:hover { filter: brightness(1.1); color: #000; }
.btn.lg { padding: 11px 22px; font-size: 15px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
html[dir="rtl"] .btn svg { transform: scaleX(-1); }

/* === Chips === */
.chip {
    font-family: var(--mono); font-size: 11px;
    padding: 3px 9px; background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--muted); direction: ltr;
}

.label-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-2);
    border-radius: 999px;
    font-size: 11px; color: var(--text-dim);
    letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
    font-family: var(--mono);
}
html[lang="ar"] .label-chip { font-family: var(--sans-ar); letter-spacing: 0; text-transform: none; }

/* Amber badge variant — CertiLife-style highlight / emphasis badge.
   Use for section eyebrows and "featured / new / attention" chips.
   Blue stays the default badge; amber is the sparing highlight. */
.label-chip.amber, .chip.amber {
    background: rgba(255,255,255,0.10);
    border-color: var(--hairline-2);
    color: var(--text);
}

/* === Form inputs === */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=search], input[type=tel], select, textarea {
    width: 100%;
    background: rgba(10,14,26,0.55);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 14px; border-radius: 8px;
    font-family: inherit; font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent-hi);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.14);
}
textarea { min-height: 120px; resize: vertical; }
label {
    display: block; margin-top: 14px; margin-bottom: 6px;
    color: var(--muted); font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--mono);
}
html[lang="ar"] label { font-family: var(--sans-ar); letter-spacing: 0; text-transform: none; font-size: 13px; }

/* === Cards / surfaces === */
.surface {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.surface-2 {
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
}

/* === Alerts === */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.alert.ok    { background: rgba(52,211,153,0.10);  border: 1px solid rgba(52,211,153,0.30);  color: #6ee7b7; }
.alert.err   { background: rgba(252,87,100,0.10); border: 1px solid rgba(252,87,100,0.30); color: #fda4af; }
.alert.info  { background: rgba(255,255,255,0.06); border: 1px solid var(--border-2); color: var(--text-dim); }
.alert.warn  { background: rgba(245,158,11,0.10);  border: 1px solid rgba(245,158,11,0.30);  color: #fcd34d; }

/* === Status pills === */
.status {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; font-family: var(--mono);
}
.status.draft { background: rgba(255,255,255,0.08); color: var(--muted); }
.status.sent  { background: rgba(255,255,255,0.12); color: var(--text); }
.status.paid  { background: rgba(74,222,128,0.14);  color: var(--accent-3); }
.status.void  { background: rgba(248,113,113,0.14); color: var(--danger); }
/* Contract lifecycle states (reuse the same visual language) */
.status.active     { background: rgba(255,255,255,0.12); color: var(--text); }
.status.completed  { background: rgba(74,222,128,0.14); color: var(--accent-3); }
.status.terminated { background: rgba(245,166,35,0.14); color: var(--warn); }

/* === Brand mark sizing tweak for nav contexts === */
.brand-mark { line-height: 1; }
