/* ==========================================================================
   TEMAS
   Seis paletas selecionáveis em Configurações. Trocar o atributo data-theme
   reconfigura interface e gráficos de uma vez — os gráficos leem estes
   mesmos tokens.

   Todo texto foi medido: mínimo de 4,5:1 sobre a superfície em que aparece.
   ========================================================================== */

/* --- Cápsulas · índigo com roxo (padrão) --------------------------------- */
:root,
[data-theme="capsulas"] {
  color-scheme: dark;

  --bg-canvas: #0f1020;
  --bg-sidebar: #141530;
  --bg-surface: #191a30;
  --bg-surface-raised: #1f2039;
  --bg-surface-hover: #23243f;
  --bg-inset: #14152a;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: #2a2b45;
  --border-strong: #3a3b5c;

  --text-primary: #efeaff;
  --text-secondary: #b9b7d4;
  --text-muted: #8b8bab;
  --text-inverse: #1a1035;

  --accent: #a78bfa;
  --accent-hover: #b9a3ff;
  --accent-soft: rgba(167, 139, 250, 0.16);
  --accent-border: rgba(167, 139, 250, 0.42);

  --positive: #4ade80;
  --positive-soft: rgba(74, 222, 128, 0.15);
  --attention: #fbbf5c;
  --attention-soft: rgba(251, 191, 92, 0.15);
  --critical: #ff8ba0;
  --critical-soft: rgba(255, 139, 160, 0.15);
  --neutral: #9a9bbd;
  --neutral-soft: rgba(154, 155, 189, 0.15);

  --series-1: #a78bfa; --series-2: #4ade80; --series-3: #fbbf5c; --series-4: #60c8ff;
  --series-5: #f0abfc; --series-6: #ff8ba0; --series-7: #5eead4; --series-8: #9a9bbd;

  --shadow-sm: none;
  --shadow-md: 0 6px 22px rgba(6, 6, 20, 0.45);
  --shadow-lg: 0 16px 44px rgba(6, 6, 20, 0.6);
  --shadow-focus: 0 0 0 3px rgba(167, 139, 250, 0.4);
  --highlight-top: none;
}

/* --- Grafite · neutro com verde-água ------------------------------------- */
[data-theme="grafite"] {
  color-scheme: dark;

  --bg-canvas: #121417;
  --bg-sidebar: #16181c;
  --bg-surface: #1b1d21;
  --bg-surface-raised: #22252a;
  --bg-surface-hover: #272b31;
  --bg-inset: #16181c;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: #2d3138;
  --border-strong: #3d424a;

  --text-primary: #eef0f2;
  --text-secondary: #b3b8bf;
  --text-muted: #8b9199;
  --text-inverse: #101214;

  --accent: #5eead4;
  --accent-hover: #7df3e0;
  --accent-soft: rgba(94, 234, 212, 0.14);
  --accent-border: rgba(94, 234, 212, 0.38);

  --positive: #6ee7a8;
  --positive-soft: rgba(110, 231, 168, 0.14);
  --attention: #f8c471;
  --attention-soft: rgba(248, 196, 113, 0.14);
  --critical: #ff9494;
  --critical-soft: rgba(255, 148, 148, 0.14);
  --neutral: #9aa1aa;
  --neutral-soft: rgba(154, 161, 170, 0.14);

  --series-1: #5eead4; --series-2: #6ee7a8; --series-3: #f8c471; --series-4: #8ab4f8;
  --series-5: #c9a6f2; --series-6: #ff9494; --series-7: #7dd3fc; --series-8: #9aa1aa;

  --shadow-sm: none;
  --shadow-md: 0 6px 22px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.6);
  --shadow-focus: 0 0 0 3px rgba(94, 234, 212, 0.35);
  --highlight-top: none;
}

/* --- Oceano · azul profundo com ciano ------------------------------------ */
[data-theme="oceano"] {
  color-scheme: dark;

  --bg-canvas: #0a1622;
  --bg-sidebar: #0d1b28;
  --bg-surface: #10202e;
  --bg-surface-raised: #16293a;
  --bg-surface-hover: #1b3145;
  --bg-inset: #0d1b28;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: #1e3a52;
  --border-strong: #2c4d68;

  --text-primary: #e6f2fa;
  --text-secondary: #a8c4d8;
  --text-muted: #8aa5ba;
  --text-inverse: #071119;

  --accent: #4cc9f0;
  --accent-hover: #6fd8f7;
  --accent-soft: rgba(76, 201, 240, 0.14);
  --accent-border: rgba(76, 201, 240, 0.4);

  --positive: #5fe0a8;
  --positive-soft: rgba(95, 224, 168, 0.14);
  --attention: #ffc46b;
  --attention-soft: rgba(255, 196, 107, 0.14);
  --critical: #ff8fa3;
  --critical-soft: rgba(255, 143, 163, 0.14);
  --neutral: #93aec2;
  --neutral-soft: rgba(147, 174, 194, 0.14);

  --series-1: #4cc9f0; --series-2: #5fe0a8; --series-3: #ffc46b; --series-4: #9d8df1;
  --series-5: #7ae1d8; --series-6: #ff8fa3; --series-7: #a5d8ff; --series-8: #93aec2;

  --shadow-sm: none;
  --shadow-md: 0 6px 22px rgba(2, 10, 18, 0.5);
  --shadow-lg: 0 16px 44px rgba(2, 10, 18, 0.65);
  --shadow-focus: 0 0 0 3px rgba(76, 201, 240, 0.35);
  --highlight-top: none;
}

/* --- Âmbar · escuro quente ------------------------------------------------ */
[data-theme="ambar"] {
  color-scheme: dark;

  --bg-canvas: #12100c;
  --bg-sidebar: #16130f;
  --bg-surface: #1a1712;
  --bg-surface-raised: #221e18;
  --bg-surface-hover: #2a251d;
  --bg-inset: #16130f;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: #322c23;
  --border-strong: #453d31;

  --text-primary: #f5efe6;
  --text-secondary: #c9bfae;
  --text-muted: #a0968a;
  --text-inverse: #14110c;

  --accent: #e0a458;
  --accent-hover: #eeb670;
  --accent-soft: rgba(224, 164, 88, 0.14);
  --accent-border: rgba(224, 164, 88, 0.4);

  --positive: #8fd694;
  --positive-soft: rgba(143, 214, 148, 0.14);
  --attention: #f2c14e;
  --attention-soft: rgba(242, 193, 78, 0.14);
  --critical: #f08d7f;
  --critical-soft: rgba(240, 141, 127, 0.14);
  --neutral: #ab9f90;
  --neutral-soft: rgba(171, 159, 144, 0.14);

  --series-1: #e0a458; --series-2: #8fd694; --series-3: #f2c14e; --series-4: #c9a0dc;
  --series-5: #7fc4c0; --series-6: #f08d7f; --series-7: #d9bb8a; --series-8: #ab9f90;

  --shadow-sm: none;
  --shadow-md: 0 6px 22px rgba(8, 6, 4, 0.5);
  --shadow-lg: 0 16px 44px rgba(8, 6, 4, 0.65);
  --shadow-focus: 0 0 0 3px rgba(224, 164, 88, 0.35);
  --highlight-top: none;
}

/* --- Claro · lavanda ------------------------------------------------------ */
[data-theme="claro"] {
  color-scheme: light;

  --bg-canvas: #f6f5fb;
  --bg-sidebar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-raised: #ffffff;
  --bg-surface-hover: #f1eefb;
  --bg-inset: #f4f2fc;

  --border-subtle: rgba(30, 20, 70, 0.07);
  --border-default: rgba(30, 20, 70, 0.13);
  --border-strong: rgba(30, 20, 70, 0.22);

  --text-primary: #1c1638;
  --text-secondary: #4e4770;
  --text-muted: #6b6590;
  --text-inverse: #ffffff;

  --accent: #6d43d8;
  --accent-hover: #5b34c0;
  --accent-soft: rgba(109, 67, 216, 0.1);
  --accent-border: rgba(109, 67, 216, 0.3);

  --positive: #10794a;
  --positive-soft: rgba(16, 121, 74, 0.1);
  --attention: #a75a09;
  --attention-soft: rgba(167, 90, 9, 0.1);
  --critical: #c02348;
  --critical-soft: rgba(192, 35, 72, 0.1);
  --neutral: #625d80;
  --neutral-soft: rgba(98, 93, 128, 0.1);

  --series-1: #6d43d8; --series-2: #10794a; --series-3: #a75a09; --series-4: #1667a8;
  --series-5: #a3288f; --series-6: #c02348; --series-7: #0f7168; --series-8: #625d80;

  --shadow-sm: 0 1px 2px rgba(30, 20, 70, 0.05);
  --shadow-md: 0 6px 20px rgba(30, 20, 70, 0.08);
  --shadow-lg: 0 16px 40px rgba(30, 20, 70, 0.12);
  --shadow-focus: 0 0 0 3px rgba(109, 67, 216, 0.28);
  --highlight-top: none;
}

/* --- Papel · claro quente ------------------------------------------------- */
[data-theme="papel"] {
  color-scheme: light;

  --bg-canvas: #f5f3ec;
  --bg-sidebar: #fdfcf8;
  --bg-surface: #fdfcf8;
  --bg-surface-raised: #ffffff;
  --bg-surface-hover: #f0ede2;
  --bg-inset: #f2efe6;

  --border-subtle: rgba(40, 35, 20, 0.08);
  --border-default: rgba(40, 35, 20, 0.14);
  --border-strong: rgba(40, 35, 20, 0.24);

  --text-primary: #1f1d18;
  --text-secondary: #4f4a3f;
  --text-muted: #6b6558;
  --text-inverse: #fdfcf8;

  --accent: #1f6f4a;
  --accent-hover: #175a3b;
  --accent-soft: rgba(31, 111, 74, 0.1);
  --accent-border: rgba(31, 111, 74, 0.3);

  --positive: #2c7a3f;
  --positive-soft: rgba(44, 122, 63, 0.1);
  --attention: #9a5a12;
  --attention-soft: rgba(154, 90, 18, 0.1);
  --critical: #b32b2b;
  --critical-soft: rgba(179, 43, 43, 0.1);
  --neutral: #6b6558;
  --neutral-soft: rgba(107, 101, 88, 0.1);

  --series-1: #1f6f4a; --series-2: #2c7a3f; --series-3: #9a5a12; --series-4: #1b5e8c;
  --series-5: #8a3a7a; --series-6: #b32b2b; --series-7: #55707a; --series-8: #6b6558;

  --shadow-sm: 0 1px 2px rgba(40, 35, 20, 0.05);
  --shadow-md: 0 6px 20px rgba(40, 35, 20, 0.08);
  --shadow-lg: 0 16px 40px rgba(40, 35, 20, 0.12);
  --shadow-focus: 0 0 0 3px rgba(31, 111, 74, 0.25);
  --highlight-top: none;
}
