/* ==========================================================================
   iSix — Legacy token adapter

   The auth and admin pages predate the shared design system and were each
   written against their own variable vocabulary (--text, --danger, --radius,
   --shadow-md, --accent-ink ...). This file aliases every one of those names
   onto the tokens in tokens.css, so those pages inherit the unified,
   AAA-verified palette and both themes without their rules being rewritten.

   Load order: tokens.css -> base.css -> compat.css -> <page>.css

   New pages should use the tokens directly and NOT rely on this file.
   ========================================================================== */

:root {
  /* ---- Text ---- */
  --text:        var(--ink);
  --text-muted:  var(--muted);
  --text-subtle: var(--muted-2);

  /* ---- Surfaces ---- */
  --surface-hover: var(--surface-2);

  /* ---- Accent ----
     The pages that load this file (auth, admin, taka) do NOT load
     components.css, so nothing else would define --accent for them. Without
     this declaration every `background: var(--accent)` is invalid at
     computed-value time and buttons render transparent.

     On pages that DO load components.css, its `body { --accent: ... }` and
     `.theme-sale/.theme-purchase` rules still win for the body subtree, so
     the per-report-family accent is unaffected. */
  --accent:       var(--accent-purchase);
  --accent-ink:   var(--accent);
  --accent-hover: var(--accent);
  --accent-text:  var(--on-accent);

  /* ---- Status ----
     paid/success -> the receivables green, due/warning -> amber,
     danger/overdue -> red. Each pairs with its soft tint at >=7:1.
     Note: --paid-soft, --due-soft and --overdue-soft are defined in
     tokens.css and are NOT re-declared here — a self-referential custom
     property is invalid at computed-value time and would blank the token. */
  --paid:              var(--accent-sale);
  --success:           var(--accent-sale);
  --success-soft:      var(--paid-soft);

  --due:               var(--accent-due);
  --warning:           var(--accent-due);
  --warning-soft:      var(--due-soft);

  --danger:            var(--accent-overdue);
  --danger-soft:       var(--overdue-soft);
  --due-strong:        var(--accent-overdue);
  --due-strong-soft:   var(--overdue-soft);

  /* ---- Shape ---- */
  --radius: var(--radius-md);

  /* ---- Elevation ---- */
  --shadow-xs: var(--elevation-1);
  --shadow-sm: var(--elevation-1);
  --shadow-md: var(--elevation-2);
  --shadow-lg: var(--elevation-3);

  /* ---- Decorative dot grid on the auth backdrops ---- */
  --dot:         var(--border-strong);
  --dot-opacity: .5;
}

[data-theme="dark"] {
  --dot-opacity: .35;
}
