/* ==========================================================================
   EliteDuka admin — design tokens (single source of truth)
   --------------------------------------------------------------------------
   RULE: tokens are named by ROLE, never by colour. Use --color-primary, not
   a colour name. To re-brand, change the VALUES in this file only;
   no other file should need to change.

   Load this file FIRST (before admin.css / tailadmin-theme.css / pos.css).
   Admin uses EliteDuka branding only — never a merchant's storefront colour.
   Brand colour is used sparingly: primary buttons, active nav, links, focus
   rings, selected tabs, chart accents. Everything else stays neutral.
   ========================================================================== */

:root {
  /* ---- Brand / action ------------------------------------------------- */
  --color-primary:            #168A4E;   /* brand green — white text 4.85:1 (AA) */
  --color-primary-hover:      #0F6E3E;   /* white text 6.9:1; also the pressed/active-text shade */
  --color-primary-soft:       #E3F4EB;   /* tinted bg: active nav, selected tab, badges */
  --color-primary-soft-border:#BFE3CE;   /* border that sits on --color-primary-soft */
  --color-on-primary:         #FFFFFF;   /* text/icon on a --color-primary fill */
  --color-focus-ring:         rgba(22,138,78, 0.20);

  /* ---- Surfaces ------------------------------------------------------- */
  --color-bg:                 #F9FAFB;   /* page / workspace background */
  --color-surface:            #FFFFFF;   /* cards, sidebar, topbar, modals, inputs */
  --color-surface-muted:      #F3F4F6;   /* table heads, segmented-control track, hover wells */
  --color-bg-inverse:         #0F172A;   /* dark backdrops (login gate, dark toasts) */
  --color-overlay:            rgba(17, 24, 39, 0.50);

  /* ---- Borders -------------------------------------------------------- */
  --color-border:             #E5E7EB;   /* cards, dividers, table rules */
  --color-border-soft:        #F3F4F6;   /* hairlines inside a card */
  --color-border-strong:      #D1D5DB;   /* form-control borders */

  /* ---- Text ----------------------------------------------------------- */
  --color-text:               #111827;   /* headings, primary copy */
  --color-text-secondary:     #374151;   /* body copy that should sit a step back */
  --color-text-muted:         #6B7280;   /* labels, captions, helper text */
  --color-text-placeholder:   #9CA3AF;   /* placeholders, disabled — not for real copy */
  --color-text-on-tint:      #4B5563;   /* secondary text sitting on --color-surface-muted / --color-border-soft fills (7:1 on white, 6.9:1 on tint) */
  --color-link:               var(--color-primary);

  /* ---- Status ---------------------------------------------------------
     solid = icon/dot/fill · soft = tinted bg · text = copy on soft bg ·
     border = outline on soft bg                                         */
  --color-success:            #12B76A;
  --color-success-soft:       #ECFDF3;
  --color-success-text:       #027A48;
  --color-success-border:     #ABEFC6;

  --color-danger:             #F04438;
  --color-danger-soft:        #FEF3F2;
  --color-danger-text:        #B42318;
  --color-danger-border:      #FDA29B;

  --color-warning:            #F79009;
  --color-warning-soft:       #FFFAEB;
  --color-warning-text:       #B54708;
  --color-warning-border:     #FEDF89;

  --color-info:               #6B7280;   /* neutral on purpose: a blue info badge would look like a primary action */
  --color-info-soft:          #F3F4F6;
  --color-info-text:          #374151;
  --color-info-border:        #D1D5DB;

  /* ---- Premium accent (upgrade / subscription flourish ONLY) ---------- */
  --color-premium:            #C99700;
  --color-premium-hover:      #A67C00;

  /* ---- Charts --------------------------------------------------------- */
  --color-chart-1:            var(--color-primary);
  --color-chart-2:            #7BD3A1;   /* secondary series */
  --color-chart-3:            #0BA5EC;   /* sky; was var(--color-info) before info went neutral */
  --color-chart-neutral:      #D1D5DB;   /* "other" slices, inactive map regions */
  --color-chart-grid:         #EEF0F4;

  /* ---- Shell: sidebar (deep-green brand, light text; desktop uses the grey Shopify shell, so this fill shows on mobile) --------------------------
     Re-check contrast if you change the fill: light text must stay >= 4.5:1 on --color-sidebar-bg.
     Hover = solid --color-primary (white text 4.85:1). Active = pale-blue pill
     with --color-primary-hover text, same active treatment as the old white sidebar. */
  --color-sidebar-bg:           #0B3B32;
  --color-sidebar-text:         #E3F4EC;
  --color-sidebar-text-strong:  #FFFFFF;
  --color-sidebar-icon:         #A9D3BF;
  --color-sidebar-heading:      #8FC3AB;
  --color-sidebar-hover-bg:     var(--color-primary);
  --color-sidebar-active-bg:    var(--color-primary-soft);
  --color-sidebar-active-text:  var(--color-primary-hover);
  --color-sidebar-border:       #082B2B;
  --color-sidebar-user-bg:      #082B2B;
  --color-sidebar-danger-hover: #FFE4E1;   /* logout hover text/icon (4.5:1 on hover bg) */
  --color-sidebar-logo-bg:      #FFFFFF;   /* circle behind the store logo */

  /* ---- Corner radius (ONE shared value for POS + Admin) ----------------
     --pc-radius is the radius the POS has always used (pos.css) — it is the
     source value and is NOT changed here, only moved into this file so it is
     defined in exactly one place.
     --radius-control is the semantic token every rectangular / square
     surface uses: cards, KPI cards, buttons, inputs, selects, tables,
     dropdowns, modals, popovers, tabs, empty states, square icon tiles,
     product/image thumbs. Write `border-radius: var(--radius-control)`;
     never a literal px value.
     Keep literal 50% / 999px ONLY for genuinely round things (avatars, dots,
     circular icon buttons, switch tracks). -------------------------------- */
  --pc-radius:       3px;
  --radius-control:  var(--pc-radius);
  /* Legacy size aliases — all resolve to the same value so nothing can drift.
     Do not use in new code; use --radius-control. */
  --radius-sm:       var(--radius-control);
  --radius-md:       var(--radius-control);
  --radius-lg:       var(--radius-control);

  /* ---- Neutral status (idle / unknown states) ------------------------- */
  --color-neutral:            var(--color-text-secondary);
  --color-neutral-soft:       var(--color-surface-muted);
}

/* ---- Mobile dashboard (<=860px) — Claude-reference layout (MOBILE-DASH-1) ----
   Role-named like everything else here. MOBILE-DASH-2: the mobile radii now resolve to the
   shared EliteDuka corner token (--radius-control) so mobile and desktop can never drift. */
:root {
  --color-primary-deep:   #0B3B32;   /* dark end of the hero gradient (primary -> deep) */
  --radius-card-mobile:   var(--radius-control);   /* mobile content cards, quick tiles */
  --radius-hero-mobile:   var(--radius-control);   /* bottom corners of the revenue hero */
  --shadow-card-mobile:   0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
}
