:root {
  /* Superfícies — dark default */
  --bg:      #0D0D0F;
  --bg2:     #131316;
  --bg3:     #18181C;
  --bg4:     #1E1E24;

  /* Accent — vermelho Flowbix */
  --acc:     #E8323A;
  --acc2:    #FF5059;

  /* Texto */
  --text:    #F2F2F7;
  --muted2:  #8E8E9A;
  --muted:   #58585F;

  /* Bordas */
  --border:  rgba(255,255,255,0.08);
  --border2: rgba(255,80,89,0.30);

  /* Raios — mais arredondados, estilo Apple */
  --radius:    18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 999px;

  /* Sombras suaves */
  --shadow:    0 8px 32px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.30);
  --shadow-xs: 0 1px 4px rgba(0,0,0,0.20);

  /* Glass — backdrop blur */
  --glass-bg:     rgba(20,20,26,0.72);
  --glass-border: rgba(255,255,255,0.10);
  --glass-blur:   blur(20px) saturate(180%);

  /* Glass claro (para elementos accent sobre glass) */
  --glass-acc-bg: rgba(232,50,58,0.12);

  /* Glow do accent — usado em sombras de botões, active, etc. */
  --acc-glow-sm:  0 2px 12px rgba(232,50,58,0.30);
  --acc-glow-md:  0 4px 18px rgba(232,50,58,0.40);
  --acc-glow-lg:  0 4px 20px rgba(232,50,58,0.40);
  --acc-glow-ring: 0 0 8px rgba(255,80,89,0.60);
  --acc-focus:    0 0 0 3px rgba(232,50,58,0.10);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --transition: 180ms cubic-bezier(.4,0,.2,1);
}

[data-theme="light"] {
  --bg:      #F0F0F5;
  --bg2:     rgba(255,255,255,0.70);
  --bg3:     rgba(255,255,255,0.50);
  --bg4:     rgba(210,210,220,0.60);

  --acc:     #C02028;
  --acc2:    #E8323A;

  --text:    #1C1C1E;
  --muted2:  #6C6C72;
  --muted:   #AEAEB2;

  --border:  rgba(0,0,0,0.08);
  --border2: rgba(192,32,40,0.22);

  --shadow:    0 8px 32px rgba(0,0,0,0.14), 0 1px 0 rgba(255,255,255,0.90) inset;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.10);
  --shadow-xs: 0 1px 4px rgba(0,0,0,0.08);

  --glass-bg:     rgba(255,255,255,0.75);
  --glass-border: rgba(0,0,0,0.10);
  --glass-blur:   blur(24px) saturate(200%);

  --glass-acc-bg: rgba(192,32,40,0.08);

  --acc-glow-sm:  0 2px 12px rgba(192,32,40,0.20);
  --acc-glow-md:  0 4px 18px rgba(192,32,40,0.28);
  --acc-glow-lg:  0 4px 20px rgba(192,32,40,0.28);
  --acc-glow-ring: 0 0 8px rgba(192,32,40,0.40);
  --acc-focus:    0 0 0 3px rgba(192,32,40,0.12);
}

[data-theme="deepblue"] {
  --bg:      #06080F;
  --bg2:     #0A0E18;
  --bg3:     #0D1220;
  --bg4:     #111828;

  --acc:     #007ACC;
  --acc2:    #00A3FF;

  --text:    #E2F1FF;
  --muted2:  #7B92B3;
  --muted:   #3F526B;

  --border:  rgba(0,163,255,0.12);
  --border2: rgba(0,163,255,0.28);

  --shadow:    0 8px 32px rgba(0,0,0,0.50), 0 1px 0 rgba(0,163,255,0.06) inset;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-xs: 0 1px 4px rgba(0,0,0,0.25);

  --glass-bg:     rgba(8,14,28,0.75);
  --glass-border: rgba(0,163,255,0.15);
  --glass-blur:   blur(20px) saturate(180%);

  --glass-acc-bg: rgba(0,163,255,0.10);

  --acc-glow-sm:  0 2px 12px rgba(0,163,255,0.25);
  --acc-glow-md:  0 4px 18px rgba(0,163,255,0.35);
  --acc-glow-lg:  0 4px 20px rgba(0,163,255,0.35);
  --acc-glow-ring: 0 0 8px rgba(0,163,255,0.55);
  --acc-focus:    0 0 0 3px rgba(0,163,255,0.15);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  scrollbar-gutter: stable;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Fundo com gradiente — cada tema usa sua cor de destaque */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(232,50,58,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255,80,89,0.07) 0%, transparent 50%);
}

[data-theme="light"] body::before {
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(192,32,40,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(232,50,58,0.05) 0%, transparent 50%);
}

[data-theme="deepblue"] body::before {
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0,163,255,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0,122,204,0.07) 0%, transparent 50%);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a { color: var(--acc2); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--font-mono); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.app {
  display: grid;
  grid-template-columns: 92px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.main {
  padding: 28px 36px;
  width: 100%;
}

@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .main { padding: 20px 16px; }
}

/* Sidebar rail fixa */
.sidebar-rail {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  overflow: visible;
}

/* Sidebar rail fixa */
.sidebar-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: visible;
}
.hidden { display: none !important; }