/**
 * SCOP Platform — Hybrid Enterprise Theme Tokens
 *
 * Mantık: dark navigation shell + light operational workspace + white case panel
 * Kaynak: `.New_UI/` mockup’ları + SCOP hybrid enterprise theme rehberi
 *
 * Katmanlar:
 *   1. Primitive   — brand, gray, dark palette
 *   2. Semantic    — success, warning, danger, review, processing
 *   3. Surface     — sidebar, workspace, card, panel, modal
 *   4. Component   — button, badge, table, input (alias token’lar)
 *
 * Yükleme sırası (index.html): styles/tokens.css → components.css → layout.css
 */

:root {
  /* ── 1. Brand ─────────────────────────────────────────── */
  --color-brand-primary: #3b82f6;
  --color-brand-hover: #60a5fa;
  --color-brand-deep: #1d4ed8;
  --color-on-brand: #ffffff;

  /* ── 2. Dark shell (sidebar — slate-navy) ───────────────── */
  --color-app-darkest: #07070a;
  --color-sidebar: #0f172a;
  --color-sidebar-hover: #1e293b;
  --color-sidebar-active: #334155;
  --color-sidebar-border: #334155;
  --color-sidebar-start: var(--color-sidebar);
  --color-sidebar-end: var(--color-sidebar);
  --color-dark-panel: #16161f;
  --color-dark-glass: rgba(22, 22, 31, 0.85);
  --color-sidebar-section-label: #64748b;
  --color-sidebar-item-hover: var(--color-sidebar-hover);
  --color-sidebar-item-active-bg: var(--color-sidebar-active);

  /* ── 3. Light workspace ─────────────────────────────────── */
  --color-workspace: #f4f4f7;
  --color-surface: #ffffff;
  --color-surface-muted: #f9fafb;
  --color-selected-row: #eff6ff;

  /* ── 4. Text on dark ────────────────────────────────────── */
  --color-text-dark-primary: #f4f4f7;
  --color-text-dark-secondary: #c4c4cc;
  --color-text-dark-muted: #8a8a96;

  /* ── 5. Text on light ───────────────────────────────────── */
  --color-text-primary: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;

  /* ── 6. Borders ─────────────────────────────────────────── */
  --color-border-light: #e5e7eb;
  --color-border-sidebar: var(--color-sidebar-border);
  --color-border-dark: rgba(255, 255, 255, 0.06);

  /* ── 7. Semantic status (solid) ─────────────────────────── */
  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-error: #ef4444;
  --color-review: #8b5cf6;
  --color-processing: #3b82f6;

  /* ── 8. Status soft backgrounds ─────────────────────────── */
  --color-blue-soft: #eff6ff;
  --color-green-soft: #f0fdf4;
  --color-amber-soft: #fefce8;
  --color-red-soft: #fef2f2;
  --color-purple-soft: #f3e8ff;

  /* Status badge pairs (text / bg / border) */
  --badge-processing-color: #3b82f6;
  --badge-processing-bg: #eff6ff;
  --badge-processing-border: #bfdbfe;

  --badge-waiting-docs-color: #b45309;
  --badge-waiting-docs-bg: #fef3c7;
  --badge-waiting-docs-border: #fde68a;

  --badge-review-color: #7c3aed;
  --badge-review-bg: #f3e8ff;
  --badge-review-border: #ddd6fe;

  --badge-completed-color: #15803d;
  --badge-completed-bg: #dcfce7;
  --badge-completed-border: #bbf7d0;

  --badge-draft-color: #6b7280;
  --badge-draft-bg: #f3f4f6;
  --badge-draft-border: #e5e7eb;

  --badge-gtip-vergi-color: #7c3aed;
  --badge-gtip-vergi-bg: #f3e8ff;
  --badge-gtip-vergi-border: #ddd6fe;

  --badge-declaration-ready-color: #15803d;
  --badge-declaration-ready-bg: #dcfce7;
  --badge-declaration-ready-border: #bbf7d0;

  /* ── 9. Domain module accents (ileride) ─────────────────── */
  --module-belge: #3b82f6;
  --module-gtip: #8b5cf6;
  --module-operator: #06b6d4;
  --module-beyanname: #22c55e;
  --module-risk: #ef4444;

  /* ── 10. Charts ─────────────────────────────────────────── */
  --chart-1: #3b82f6;
  --chart-2: #22c55e;
  --chart-3: #eab308;
  --chart-4: #8b5cf6;

  /* ── 11. Typography ─────────────────────────────────────── */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --font-document: Arial, Helvetica, sans-serif;

  --text-xs: 11px;
  --text-sm: 12px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 28px;

  --font-size-body: var(--text-md);
  --font-size-xs: var(--text-xs);
  --font-size-sm: var(--text-sm);
  --font-size-base: var(--text-md);
  --font-size-lg: var(--text-lg);
  --font-size-xl: var(--text-2xl);

  --font-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-body: 1.45;
  --line-height-tight: 1.25;
  --line-height-document: 1.15;

  /* ── 12. Layout ─────────────────────────────────────────── */
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 72px;
  --panel-width: 520px;
  --header-height: 64px;
  --sidebar-shell-radius: 12px;

  /* Sidebar nav */
  --sidebar-nav-active-bg: #2563eb;
  --sidebar-nav-active-text: #ffffff;
  --sidebar-icon-size: 18px;
  --sidebar-subitem-indent: 2.375rem;
  --sidebar-font-nav: 13px;
  --sidebar-font-brand: 1rem;
  --sidebar-font-brand-sub: 10px;
  --sidebar-item-min-height: 36px;
  --sidebar-item-padding-y: 7px;
  --sidebar-item-padding-x: 9px;
  --sidebar-item-gap: 9px;
  --sidebar-subitem-min-height: 32px;
  --sidebar-nav-gap: 5px;
  --sidebar-nav-sub-gap: 4px;
  --sidebar-asset-icon-filter: brightness(0) invert(1);
  --sidebar-asset-icon-opacity: 0.78;
  --sidebar-asset-icon-opacity-hover: 0.95;
  --sidebar-badge-count-blue: #2563eb;
  --sidebar-badge-count-orange: #f59e0b;
  --sidebar-badge-new-green: #10b981;
  --sidebar-badge-beta-bg: rgba(37, 99, 235, 0.25);
  --sidebar-badge-beta-text: #93c5fd;
  --sidebar-badge-new-bg: rgba(16, 185, 129, 0.2);
  --sidebar-badge-new-text: #6ee7b7;

  /* ── 13. Radius ─────────────────────────────────────────── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ── 14. Shadow ─────────────────────────────────────────── */
  --shadow-card: 0 1px 2px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.04);
  --shadow-panel: -12px 0 32px rgba(17, 24, 39, 0.08);
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.45);
  --shadow-blue-glow: 0 8px 24px rgba(59, 130, 246, 0.35);
  --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.25);

  /* ── 15. Component token aliases ────────────────────────── */
  --btn-height: 36px;
  --btn-padding-x: 14px;
  --input-height: 36px;
  --table-header-height: 44px;
  --table-row-height: 48px;
  --badge-height: 24px;

  /* ── Imports workspace ──────────────────────────────────── */
  --workspace-section-gap: 1.25rem;
  --workspace-chip-bg: var(--color-surface);
  --workspace-chip-border: var(--color-border-light);
  --workspace-chip-active-bg: #eff6ff;
  --workspace-chip-active-border: #bfdbfe;
  --workspace-tab-active: var(--color-brand-primary);
  --kpi-blue: #3b82f6;
  --kpi-green: #22c55e;
  --kpi-amber: #f59e0b;
  --kpi-purple: #8b5cf6;
  --kpi-red: #ef4444;
  --kpi-cyan: #06b6d4;

  /* ── Legacy aliases (geriye dönük) ──────────────────────── */
  --surface-sidebar: var(--color-sidebar);
  --surface-main: var(--color-workspace);
  --surface-card: var(--color-surface);
  --surface-muted: var(--color-surface-muted);
  --text-primary: var(--color-text-primary);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-muted);
  --text-sidebar: var(--color-text-dark-primary);
  --text-sidebar-muted: var(--color-text-dark-muted);
  --border-default: var(--color-border-light);
  --color-brand: var(--color-brand-primary);
  --color-brand-hover: var(--color-brand-deep);
}
