/* ============================================================
   redesign-v2 — DESIGN TOKENS  (Step 1: design-system mapping)
   ------------------------------------------------------------
   Single source of truth for the new mobile-first UI.
   - Accent is NOT hardcoded: it reads var(--accent), which
     config.js applyAccent() writes per-tenant at runtime.
     Indigo (#4f46e5) is only the fallback / preview default.
   - Neutrals are fixed LIGHT (redesign-v2 is light-only).
   - No font is declared here: body Geist is inherited (see panel.html/randevu.html).
   Consumed by primitives.css and every future screen port.
   ============================================================ */

:root {
  /* ---- ACCENT (per-tenant, fed by config.js applyAccent) ---- */
  --rd-accent:        var(--accent, #c9a84c);
  --rd-accent-hover:  var(--accent-hover, #b49138);
  --rd-on-accent:     #ffffff;            /* text/icon on accent fill */

  /* accent tints follow the tenant accent via color-mix —
     replace prototype's hardcoded #eef0fe / #f4f4ff / #dcdcfb */
  --rd-accent-tint:        color-mix(in srgb, var(--rd-accent) 10%, #fff);
  --rd-accent-tint-strong: color-mix(in srgb, var(--rd-accent) 14%, #fff);
  --rd-accent-border:      color-mix(in srgb, var(--rd-accent) 25%, #fff);

  /* ---- NEUTRALS (fixed light) ---- */
  --rd-bg:            #f6f6f8;   /* page background */
  --rd-surface:       #ffffff;   /* card / sheet surface */
  --rd-surface-2:     #fafafb;   /* tinted surface, back buttons */
  --rd-border:        #ededf0;   /* default border / divider */
  --rd-border-subtle: #f4f4f5;   /* inner row dividers */
  --rd-track:         #ececf0;   /* segmented-control / toggle-off track */
  --rd-track-2:       #f1f1f4;   /* lighter inline track */
  --rd-hairline:      #e0e0e6;   /* grabber, field separators */
  --rd-switch-off:    #d4d4d8;   /* toggle off fill */
  --rd-disabled:      #c7c7d1;   /* disabled button fill */

  /* ---- TEXT RAMP ---- */
  --rd-text-1: #18181b;   /* primary */
  --rd-text-2: #52525b;   /* secondary */
  --rd-text-3: #71717a;   /* tertiary / section labels */
  --rd-text-4: #a1a1aa;   /* muted / captions */
  --rd-text-5: #c4c4cc;   /* faint / chevrons */

  /* ---- SEMANTIC + TINTS ---- */
  --rd-success:        #16a34a;
  --rd-success-tint:   #eafaf0;
  --rd-success-border: #bbf0cd;
  --rd-danger:         #dc2626;
  --rd-danger-tint:    #fdecec;
  --rd-danger-border:  #f3c0c0;
  --rd-warn:           #d97706;
  --rd-warn-tint:      #fff7ed;
  --rd-alert:          #e11d48;   /* notification dot */

  /* ---- RADIUS ---- */
  --rd-r-sm:    11px;
  --rd-r-md:    13px;
  --rd-r-lg:    16px;
  --rd-r-xl:    22px;
  --rd-r-sheet: 26px;   /* bottom-sheet top corners */
  --rd-r-pill:  999px;
  --rd-r-bar:   3px;    /* grabber, timeline bars */

  /* ---- SPACING ---- */
  --rd-gutter: 20px;    /* screen horizontal padding */
  --rd-gap:    12px;    /* default flex/grid gap */
  --rd-s-1: 4px;
  --rd-s-2: 8px;
  --rd-s-3: 10px;
  --rd-s-4: 12px;
  --rd-s-5: 16px;
  --rd-s-6: 20px;
  --rd-screen-top:    54px;   /* status-bar safe top padding */
  --rd-screen-top-lg: 62px;   /* taller header screens (Bugün/Takvim) */
  --rd-screen-bottom: 120px;  /* clears bottom-nav + FAB */

  /* ---- TYPE SCALE (sizes) ---- */
  --rd-fs-11: 11px;   /* micro caption */
  --rd-fs-12: 12px;
  --rd-fs-13: 13px;   /* labels / captions */
  --rd-fs-14: 14px;
  --rd-fs-15: 15px;   /* body / list item */
  --rd-fs-16: 16px;   /* row title */
  --rd-fs-17: 17px;
  --rd-fs-20: 20px;
  --rd-fs-22: 22px;
  --rd-fs-24: 24px;   /* page title */
  --rd-fs-26: 26px;   /* stat value */
  /* weights */
  --rd-fw-500: 500;
  --rd-fw-600: 600;
  --rd-fw-700: 700;
  /* mono — PRO badges, WhatsApp variable chips ({{...}}) */
  --rd-font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;

  /* ---- SHADOWS ---- */
  --rd-shadow-fab:   0 10px 22px -6px color-mix(in srgb, var(--rd-accent) 55%, transparent);
  --rd-shadow-card:  0 1px 2px rgba(0,0,0,.04);
  --rd-shadow-sheet: 0 -8px 30px rgba(0,0,0,.12);

  /* ---- OVERLAY ---- */
  --rd-overlay: rgba(15,15,20,.45);

  /* ---- Z-INDEX (matches prototype layering) ---- */
  --rd-z-nav:     40;
  --rd-z-booking: 45;
  --rd-z-auth:    48;   /* login / suspended full-screen */
  --rd-z-sheet:   60;   /* default bottom-sheet */
  --rd-z-sheet-hi:66;   /* PRO upsell, nested sheets */
}

/* ---- DARK THEME ---- */
.dark-theme {
  --rd-bg:            #121212;
  --rd-surface:       #1e1e1e;
  --rd-surface-2:     #2c2c2c;
  --rd-border:        #333333;
  --rd-border-subtle: #2a2a2a;
  --rd-track:         #333333;
  --rd-track-2:       #2a2a2a;
  --rd-hairline:      #444444;
  --rd-switch-off:    #555555;
  --rd-disabled:      #666666;
  
  --rd-text-1: #ffffff;
  --rd-text-2: #e0e0e0;
  --rd-text-3: #a1a1aa;
  --rd-text-4: #8a8a93;
  
  --rd-accent-tint:        color-mix(in srgb, var(--rd-accent) 20%, #000);
  --rd-accent-tint-strong: color-mix(in srgb, var(--rd-accent) 30%, #000);
  --rd-accent-border:      color-mix(in srgb, var(--rd-accent) 40%, #000);
}
