/* ============================================
   zadcell — Design System v1
   Brand: purple → teal gradient, dark indigo surfaces
   ============================================ */

:root {
  /* Brand */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;  /* primary */
  --brand-600: #5558e3;
  --brand-700: #4546c4;

  /* Accent (teal) */
  --accent-300: #67e8f9;
  --accent-400: #22d3ee;
  --accent-500: #06b6d4;
  --accent-600: #0891b2;

  /* Surface (dark mode) */
  --surface-0: #08091c;   /* deepest bg */
  --surface-1: #0f1130;   /* main bg */
  --surface-2: #161a3e;   /* card */
  --surface-3: #1f234e;   /* elevated/hover */
  --surface-4: #2a2f5e;   /* active */

  /* Border */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-brand:  rgba(99, 102, 241, 0.45);

  /* Text */
  --text-strong: #ffffff;
  --text-primary: #f0f1ff;
  --text-secondary: #a7abd0;
  --text-muted: #6e729a;
  --text-on-brand: #ffffff;

  /* Status */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-border: rgba(16, 185, 129, 0.35);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --warning-border: rgba(245, 158, 11, 0.35);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.35);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.14);
  --info-border: rgba(59, 130, 246, 0.35);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(99,102,241,0.18) 0%, rgba(6,182,212,0.18) 100%);
  --gradient-surface: linear-gradient(180deg, #0f1130 0%, #08091c 100%);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 0 4px rgba(99, 102, 241, 0.18);
  --shadow-glow-accent: 0 0 0 4px rgba(6, 182, 212, 0.18);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;

  /* Typography */
  --font-sans: 'Tajawal', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 17px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 30px;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  /* Legacy aliases (preserve compatibility with existing CSS) */
  --bg-primary: var(--surface-1);
  --bg-secondary: var(--surface-2);
  --bg-card: rgba(30, 35, 78, 0.55);
  --border: var(--border-default);
  --accent: var(--brand-500);
  --accent-glow: rgba(99, 102, 241, 0.30);
  --kirkuk: #fbbf24;
}

/* ===== Brand mark helper ===== */
.zc-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.zc-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.30);
  flex-shrink: 0;
}
.zc-brand-mark img,
.zc-brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.zc-brand-name {
  font-size: var(--font-size-xl);
  font-weight: 800;
  letter-spacing: 0.3px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.zc-brand-tag {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== Subtle background pattern for app shell ===== */
.zc-shell-bg {
  background:
    radial-gradient(900px 600px at 92% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(6, 182, 212, 0.10), transparent 60%),
    var(--surface-1);
  min-height: 100vh;
}

/* ===== Focus ring (accessibility) ===== */
.zc-focus-ring:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--shadow-glow);
  border-color: var(--brand-500) !important;
}

/* ===== Scrollbar polish ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* ===== Selection color ===== */
::selection {
  background: rgba(99, 102, 241, 0.45);
  color: white;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
