/* ============================================================
   Aproject — Color tokens
   Warm "oat paper" light theme (Claude-inspired), terracotta
   accent. Per-product accents (Chat / Pilot / Team), semantic
   status hues, and surface scales for sidebar vs. canvas.
   Base values first, then semantic aliases. Dark theme scoped
   to [data-theme="dark"] / .dark.
   ============================================================ */

:root {
  /* ---------- base neutral / paper scale ---------- */
  --paper:        #faf9f6;   /* app canvas — warm oat */
  --ink:          #29261f;   /* primary text */
  --white:        #ffffff;

  --oat-50:       #faf9f6;
  --oat-100:      #f4f2ec;   /* sidebar surface */
  --oat-150:      #f1efe9;   /* secondary / muted fill */
  --oat-200:      #ece9e1;   /* accent fill */
  --oat-300:      #e7e3d9;   /* border */
  --oat-400:      #ddd8cb;   /* border-strong */
  --oat-500:      #8c8576;   /* sidebar muted text */
  --oat-600:      #807a6e;   /* muted text */
  --oat-700:      #3a362e;   /* sidebar text */
  --oat-900:      #29261f;   /* ink */

  /* ---------- terracotta (primary brand) ---------- */
  --terracotta-400: #d9683a;
  --terracotta-500: #c75a2a;
  --terracotta-600: #bd4b1e;  /* primary */
  --terracotta-700: #a83f17;  /* primary hover */
  --terracotta-tint: rgba(189, 75, 30, 0.10);  /* selection / focus glow */

  /* ---------- product accents ---------- */
  --accent-chat:    #4c6ef5;  /* Чат — indigo chip */
  --accent-pilot:   #7c3aed;  /* Пилот — violet */
  --accent-pilot-fg:#6d28d9;
  --accent-pilot-tint: rgba(124, 58, 237, 0.10);
  --accent-team:    #2f6fed;  /* Команда — blue */
  --accent-team-fg: #2563d6;
  --accent-team-tint: rgba(47, 111, 237, 0.10);

  /* product launcher chip fills */
  --chip-chat:  #4c6ef5;
  --chip-pilot: #bd4b1e;
  --chip-team:  #2f6f4f;

  /* ---------- semantic status hues ---------- */
  --success:      #2f8a5b;   /* «В работе» / done */
  --success-tint: rgba(47, 111, 79, 0.12);
  --warning:      #c08a1e;   /* «На паузе» / thinking */
  --warning-tint: rgba(192, 138, 30, 0.15);
  --danger:       #c0392b;   /* destructive / blocked */
  --danger-tint:  rgba(192, 57, 43, 0.12);
  --info:         #3f5fd6;   /* «Проектирование» */
  --info-tint:    rgba(76, 110, 245, 0.13);
  --unread:       #ec7a2c;   /* unread chat dot */

  /* ---------- brand mark ---------- */
  --brand-logo-bg:  #000000;   /* disc fill (inverts on dark) */
  --brand-logo-eye: #ffffff;   /* eye fill */

  /* ============ SEMANTIC ALIASES ============ */
  --radius: 0.625rem;

  --background:            var(--paper);
  --foreground:            var(--ink);
  --card:                  var(--white);
  --card-foreground:       var(--ink);
  --popover:               var(--white);
  --popover-foreground:    var(--ink);

  --primary:               var(--terracotta-600);
  --primary-hover:         var(--terracotta-700);
  --primary-foreground:    #ffffff;

  --secondary:             var(--oat-150);
  --secondary-foreground:  var(--oat-700);
  --muted:                 var(--oat-150);
  --muted-foreground:      var(--oat-600);
  --accent:                var(--oat-200);
  --accent-foreground:     var(--ink);

  --destructive:           var(--danger);
  --border:                var(--oat-300);
  --border-strong:         var(--oat-400);
  --input:                 var(--oat-300);
  --ring:                  var(--terracotta-600);

  /* sidebar surface (warmer than canvas) */
  --sidebar:               var(--oat-100);
  --sidebar-foreground:    var(--oat-700);
  --sidebar-muted:         var(--oat-500);
  --sidebar-border:        #e5e1d6;
  --sidebar-item-hover:    #e9e5db;
  --sidebar-item-active:   #e2ddcf;
  --sidebar-accent-tint:   var(--terracotta-tint);

  color-scheme: light;
}

/* ============================================================
   Dark theme — warm charcoal, brighter terracotta
   ============================================================ */
[data-theme="dark"],
.dark {
  --background:            #1f1e1b;
  --foreground:            #ece9e2;
  --card:                  #262521;
  --card-foreground:       #ece9e2;
  --popover:               #2b2925;
  --popover-foreground:    #ece9e2;

  --primary:               #d9683a;
  --primary-hover:         #e0764b;
  --primary-foreground:    #1a120c;

  --secondary:             #302e29;
  --secondary-foreground:  #d8d4ca;
  --muted:                 #2b2925;
  --muted-foreground:      #948e80;
  --accent:                #34322c;
  --accent-foreground:     #ece9e2;

  --destructive:           #e5705f;
  --border:                #38352e;
  --border-strong:         #46423a;
  --input:                 #38352e;
  --ring:                  #d9683a;

  --sidebar:               #1a1916;
  --sidebar-foreground:    #cfcbc1;
  --sidebar-muted:         #837d70;
  --sidebar-border:        #302e28;
  --sidebar-item-hover:    #2a2823;
  --sidebar-item-active:   #34322b;
  --sidebar-accent-tint:   rgba(217, 104, 58, 0.16);

  --accent-pilot:    #a78bfa;
  --accent-pilot-fg: #c4b5fd;
  --accent-pilot-tint: rgba(167, 139, 250, 0.16);
  --accent-team:     #6c9bff;
  --accent-team-fg:  #9bbcff;
  --accent-team-tint: rgba(108, 155, 255, 0.16);

  --brand-logo-bg:  #ffffff;
  --brand-logo-eye: #1a1916;

  color-scheme: dark;
}
