/**
 * plane-brand.css v1 — Amline / TaskOps design system overlay for Plane CE
 *
 * Source tokens: gateway/dashboard_ui.py (Figma Make: سیستم مدیریت تسک)
 * Maps TaskOps palette onto Plane semantic tokens (--bg-*, --txt-*, --brand-*).
 */

/* ── Typography ─────────────────────────────────────────────────── */
:root,
:host {
  --font-body: "Vazirmatn", "Vazir", Tahoma, "Segoe UI", sans-serif;
  --amline-radius-sm: 8px;
  --amline-radius-md: 10px;
  --amline-radius-lg: 12px;
  --amline-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  --amline-shadow-dark: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html[data-plane-brand] body,
html[data-plane-brand] body *:not(code):not(pre):not(kbd):not(samp):not(.monaco-editor *):not(.material-symbols-rounded):not(.material-symbols-outlined):not(.material-symbols-sharp):not(.material-icons):not([class*="material-symbols"]):not([class*="material-icons"]) {
  font-family: var(--font-body) !important;
}

/* ── Light theme (TaskOps light) ────────────────────────────────── */
:root,
:host {
  --brand-100: #eff6ff;
  --brand-200: #dbeafe;
  --brand-300: #bfdbfe;
  --brand-400: #93c5fd;
  --brand-500: #60a5fa;
  --brand-600: #3b82f6;
  --brand-700: #2563eb;
  --brand-800: #1d4ed8;
  --brand-900: #1e40af;
  --brand-1000: #1e3a8a;
  --brand-1100: #172554;
  --brand-1200: #0f172a;
  --brand-default: #2563eb;

  --neutral-white: #ffffff;
  --neutral-100: #f8fafc;
  --neutral-200: #f1f5f9;
  --neutral-300: #e2e8f0;
  --neutral-400: #cbd5e1;
  --neutral-500: #94a3b8;
  --neutral-600: #64748b;
  --neutral-700: #475569;
  --neutral-800: #334155;
  --neutral-900: #1e293b;
  --neutral-1000: #0f172a;
  --neutral-1100: #0b1220;
  --neutral-1200: #070d19;
  --neutral-black: #070d19;

  --bg-canvas: #f1f5f9;
  --bg-surface-1: #ffffff;
  --bg-surface-2: #f8fafc;
  --bg-layer-1: #ffffff;
  --bg-layer-1-hover: #f8fafc;
  --bg-layer-1-active: #f1f5f9;
  --bg-layer-1-selected: #eff6ff;
  --bg-layer-2: #f8fafc;
  --bg-layer-2-hover: #f1f5f9;
  --bg-layer-2-active: #e2e8f0;
  --bg-layer-2-selected: #dbeafe;
  --bg-accent-primary: #2563eb;
  --bg-accent-primary-hover: #1d4ed8;
  --bg-accent-primary-active: #1e40af;
  --bg-accent-subtle: #eff6ff;
  --bg-accent-subtle-hover: #dbeafe;

  --border-subtle: #e2e8f0;
  --border-subtle-1: #cbd5e1;
  --border-strong: #94a3b8;
  --border-accent-strong: #2563eb;
  --border-accent-subtle: #93c5fd;

  --txt-primary: #0f172a;
  --txt-secondary: #334155;
  --txt-tertiary: #64748b;
  --txt-placeholder: #94a3b8;
  --txt-disabled: #cbd5e1;
  --txt-accent-primary: #2563eb;
  --txt-accent-secondary: #1d4ed8;
  --txt-link-primary: #2563eb;
  --txt-link-primary-hover: #1d4ed8;
  --txt-icon-primary: #0f172a;
  --txt-icon-secondary: #475569;
  --txt-icon-accent-primary: #2563eb;
}

/* ── Dark theme (TaskOps dark) ──────────────────────────────────── */
:is(:root, :host):where([data-theme*="dark"], [data-theme*="dark"] *) {
  --brand-100: #172554;
  --brand-200: #1e3a8a;
  --brand-300: #1e40af;
  --brand-400: #1d4ed8;
  --brand-500: #2563eb;
  --brand-600: #3b82f6;
  --brand-700: #60a5fa;
  --brand-800: #93c5fd;
  --brand-900: #bfdbfe;
  --brand-1000: #dbeafe;
  --brand-1100: #eff6ff;
  --brand-1200: #f8fafc;
  --brand-default: #3b82f6;

  --neutral-white: #f1f5f9;
  --neutral-100: #0a1020;
  --neutral-200: #0f1729;
  --neutral-300: #131c31;
  --neutral-400: #1e293b;
  --neutral-500: #273449;
  --neutral-600: #334155;
  --neutral-700: #475569;
  --neutral-800: #64748b;
  --neutral-900: #94a3b8;
  --neutral-1000: #cbd5e1;
  --neutral-1100: #e2e8f0;
  --neutral-1200: #f1f5f9;
  --neutral-black: #070d19;

  --bg-canvas: #070d19;
  --bg-surface-1: #0a1020;
  --bg-surface-2: #0f1729;
  --bg-layer-1: #0f1729;
  --bg-layer-1-hover: #131c31;
  --bg-layer-1-active: #1a2540;
  --bg-layer-1-selected: #172554;
  --bg-layer-2: #131c31;
  --bg-layer-2-hover: #1a2540;
  --bg-layer-2-active: #1e293b;
  --bg-layer-2-selected: #1e3a5f;
  --bg-accent-primary: #3b82f6;
  --bg-accent-primary-hover: #2563eb;
  --bg-accent-primary-active: #1d4ed8;
  --bg-accent-subtle: #172554;
  --bg-accent-subtle-hover: #1e3a8a;

  --border-subtle: #1e293b;
  --border-subtle-1: #273449;
  --border-strong: #334155;
  --border-accent-strong: #3b82f6;
  --border-accent-subtle: #1e40af;

  --txt-primary: #f1f5f9;
  --txt-secondary: #cbd5e1;
  --txt-tertiary: #94a3b8;
  --txt-placeholder: #64748b;
  --txt-disabled: #475569;
  --txt-accent-primary: #93c5fd;
  --txt-accent-secondary: #60a5fa;
  --txt-link-primary: #60a5fa;
  --txt-link-primary-hover: #93c5fd;
  --txt-icon-primary: #f1f5f9;
  --txt-icon-secondary: #cbd5e1;
  --txt-icon-accent-primary: #60a5fa;
}

/* ── Component polish ───────────────────────────────────────────── */
html[data-plane-brand] ::selection {
  background: rgba(37, 99, 235, 0.28);
  color: inherit;
}

html[data-plane-brand] :focus-visible {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px;
}

html[data-plane-brand] button,
html[data-plane-brand] [role="button"],
html[data-plane-brand] input:not([type="checkbox"]):not([type="radio"]),
html[data-plane-brand] select,
html[data-plane-brand] textarea,
html[data-plane-brand] [data-radix-menu-content],
html[data-plane-brand] [role="menu"],
html[data-plane-brand] [role="dialog"] {
  border-radius: var(--amline-radius-sm);
}

html[data-plane-brand] aside,
html[data-plane-brand] [data-sidebar],
html[data-plane-brand] nav[aria-label*="sidebar" i] {
  border-color: var(--border-subtle) !important;
}

html[data-plane-brand] a[href]:hover {
  color: var(--txt-link-primary-hover);
}

html[data-theme*="dark"] [data-plane-brand],
html.dark[data-plane-brand] {
  color-scheme: dark;
}

/* Kanban column cards — softer elevation */
html[data-plane-brand] [class*="kanban"] [class*="rounded"],
html[data-plane-brand] [data-block="board"] [class*="rounded"] {
  border-radius: var(--amline-radius-md) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

html[data-theme*="dark"][data-plane-brand] [class*="kanban"] [class*="rounded"],
html.dark[data-plane-brand] [class*="kanban"] [class*="rounded"] {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

/* Primary CTAs — Amline blue gradient hint */
html[data-plane-brand] button[class*="bg-accent-primary"],
html[data-plane-brand] a[class*="bg-accent-primary"] {
  background-image: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
}

html[data-plane-brand] button[class*="bg-accent-primary"]:hover,
html[data-plane-brand] a[class*="bg-accent-primary"]:hover {
  background-image: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* Scrollbars (WebKit) */
html[data-plane-brand] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
html[data-plane-brand] ::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
html[data-plane-brand] ::-webkit-scrollbar-track {
  background: transparent;
}

/* Merge «کارهای شما» into «خانه» — hide duplicate sidebar nav item.
   Home opens /{workspace}/profile/{userId} (Your-work content). */
html[data-plane-brand] aside a[href*="/profile/"]:not([data-amline-home-merged]),
html[data-plane-brand] [data-sidebar] a[href*="/profile/"]:not([data-amline-home-merged]),
html[data-plane-brand] aside [data-amline-hide-your-work="1"],
html[data-plane-brand] [data-sidebar] [data-amline-hide-your-work="1"] {
  display: none !important;
}

