  /* ── SIDEBAR GLASS ── */
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 230px;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: width .3s ease, transform .3s ease;
    overflow-y: auto;
    overflow-x: hidden;
  }
  html.light .sidebar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--surface);
    border-right-color: var(--border);
  }
  .sidebar-logo {
    padding: 20px 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  html.light .sidebar-logo { border-bottom-color: var(--border); }
  .sidebar-logo-icon {
    width: 36px; height: 36px;
    background: var(--gradient-gold);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(245,200,66,0.25);
    flex-shrink: 0;
  }
  html.light .sidebar-logo-icon { box-shadow: 0 2px 8px rgba(180,83,9,0.15); }
  .sidebar-logo-text {
    font-size: 15px; font-weight: 800; color: var(--c6yellow);
  }
  .sidebar-logo-sub {
    font-size: 9px; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1.5px;
  }
  .sidebar-section-label {
    padding: 18px 20px 6px;
    font-size: 9px; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 2px; font-weight: 600;
  }
  .sidebar-nav { padding: 0 12px; }
  .sidebar-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px; font-weight: 500;
    cursor: pointer;
    margin-bottom: 2px;
    border: 1px solid transparent;
    transition: all .2s;
  }
  .sidebar-item:hover { color: var(--text); background: rgba(255,255,255,0.03); }
  html.light .sidebar-item:hover { background: rgba(15,23,42,0.04); }
  .sidebar-item.active {
    background: linear-gradient(135deg, rgba(245,200,66,0.1), rgba(212,160,23,0.05));
    border-color: var(--border-glow);
    color: var(--c6yellow);
    font-weight: 600;
    box-shadow: var(--glow-yellow);
  }
  html.light .sidebar-item.active {
    background: rgba(180,83,9,0.06);
    box-shadow: none;
  }
  .sidebar-item-icon { font-size: 15px; flex-shrink: 0; }
  .sidebar-footer {
    margin-top: auto;
    padding: 8px 12px 12px;
  }
  .sidebar-theme-toggle {
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 8px;
  }
  .sidebar-user {
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex; align-items: center; gap: 10px;
  }
  html.light .sidebar-user { border-top-color: var(--border); }
  .sidebar-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #2a2a2a, #333);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: #aaa; font-weight: 700;
    border: 1px solid #333;
    flex-shrink: 0;
  }
  html.light .sidebar-avatar {
    background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
    border-color: #CBD5E1;
    color: #4B5E78;
  }
  .sidebar-user-name { font-size: 11px; color: var(--text); font-weight: 600; }
  .sidebar-user-role { font-size: 9px; color: var(--text-dim); }
  .sidebar-settings {
    font-size: 13px; cursor: pointer; margin-left: auto;
    opacity: 0.5; transition: opacity .2s;
  }
  .sidebar-settings:hover { opacity: 1; }
  .settings-item {
    padding: 12px 16px; cursor: pointer; font-size: 13px;
    display: flex; align-items: center; gap: 10px;
    transition: background .15s; color: var(--text);
  }
  .settings-item:hover { background: rgba(255,255,255,0.06); }
  html.light .settings-item:hover { background: rgba(15,23,42,0.05); }

  /* ── SNAPSHOT CARD ── */
  .sidebar-snapshot-card {
    margin: 0 12px 10px;
    background: linear-gradient(135deg, rgba(245,200,66,0.12), rgba(212,160,23,0.06));
    border: 1px solid rgba(245,200,66,0.3);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all .2s;
  }
  .sidebar-snapshot-card:hover {
    background: linear-gradient(135deg, rgba(245,200,66,0.2), rgba(212,160,23,0.1));
    border-color: rgba(245,200,66,0.5);
    transform: translateY(-1px);
  }
  html.light .sidebar-snapshot-card {
    background: rgba(180,83,9,0.06);
    border-color: rgba(180,83,9,0.25);
  }
  html.light .sidebar-snapshot-card:hover {
    background: rgba(180,83,9,0.1);
    border-color: rgba(180,83,9,0.4);
  }
  .sidebar-snapshot-label {
    font-size: 8px; font-weight: 700; letter-spacing: 1.5px;
    color: var(--c6yellow); text-transform: uppercase; margin-bottom: 4px;
  }
  .sidebar-snapshot-date {
    font-size: 18px; font-weight: 800; color: var(--text);
    line-height: 1.1; margin-bottom: 3px;
  }
  .sidebar-snapshot-hint {
    font-size: 9px; color: var(--text-dim);
  }
  /* Collapsed sidebar (≤1200px): mostra só o ícone */
  @media (max-width: 1200px) {
    .sidebar-snapshot-card { padding: 10px; text-align: center; margin: 0 4px 8px; }
    .sidebar-snapshot-label, .sidebar-snapshot-hint { display: none; }
    .sidebar-snapshot-date { font-size: 13px; }
  }

  /* ── APP LAYOUT WITH SIDEBAR ── */
  #app {
    display: none;
  }
  #app.app-active {
    display: flex !important;
    min-height: 100vh;
    width: 100%;
    min-width: 0;
    overflow-x: visible;
  }
  .app-content {
    flex: 1;
    margin-left: 230px;
    width: calc(100% - 230px);
    max-width: calc(100% - 230px);
    min-width: 0;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: visible;
  }

  /* ── BENTO GRID BASE ── */
  .bento-grid {
    display: grid;
    gap: 14px;
    min-width: 0;
  }
  .bento-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .bento-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .bento-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .bento-span-2 { grid-column: span 2; }
  .bento-span-3 { grid-column: span 3; }
  .bento-span-4 { grid-column: span 4; }
  .bento-row-2 { grid-row: span 2; }

  /* ── BENTO CARD ── */
  .bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color .2s;
    min-width: 0;
  }
  .bento-card:hover { border-color: var(--border-glow); }
  .bento-card.hero {
    background: var(--gradient-hero);
    border-color: var(--border-glow);
    position: relative;
    overflow: hidden;
  }
  .bento-card.hero::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(245,200,66,0.1), transparent);
    border-radius: 50%;
    pointer-events: none;
  }
  html.light .bento-card.hero { background: var(--gradient-hero); }
  html.light .bento-card.hero::after { display: none; }

  /* ── PAGE HEADER (contextual) ── */
  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
  }
  .page-header > * { min-width: 0; }
  .page-header h1 {
    font-size: 22px; font-weight: 800; color: var(--text); margin: 0;
    overflow-wrap: anywhere;
  }
  .page-header .subtitle {
    font-size: 12px; color: var(--text-muted); margin: 4px 0 0;
    overflow-wrap: anywhere;
  }
  .page-header-actions {
    display: flex; gap: 8px; align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
  }
  .page-header-actions > * { max-width: 100%; }

  /* ── PILL BUTTON ── */
  .pill {
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: all .2s;
  }
  .pill:hover { border-color: var(--border-glow); color: var(--text); }
  .pill.active {
    background: rgba(245,200,66,0.08);
    border-color: var(--border-glow);
    color: var(--c6yellow);
  }
  .pill.primary {
    background: var(--gradient-gold);
    border-color: transparent;
    color: #000;
  }

  /* ── TABLE PREMIUM ── */
  .table-premium { width: 100%; border-collapse: collapse; font-size: 12px; }
  .table-premium thead th {
    padding: 10px;
    color: var(--text-dim);
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .table-premium tbody tr { transition: background .15s; }
  .table-premium tbody tr:hover { background: rgba(255,255,255,0.02); }
  html.light .table-premium tbody tr:hover { background: rgba(15,23,42,0.03); }
  .table-premium tbody td {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    color: var(--text);
  }
  html.light .table-premium tbody td { border-bottom-color: rgba(15,23,42,0.05); }

  /* ── BADGE PREMIUM ── */
  .badge-premium {
    font-size: 10px; font-weight: 700;
    border-radius: var(--radius-xs);
    padding: 2px 8px;
    display: inline-block;
  }

  /* ── HAMBURGER (mobile) ── */
  .sidebar-hamburger {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 300;
    width: 40px; height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    align-items: center; justify-content: center;
    font-size: 20px;
    cursor: pointer;
    color: var(--text);
  }

  /* ── Dialog customizada ── */
.dialog-overlay {
  position:fixed;inset:0;background:rgba(0,0,0,0.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:9999;
  display:flex;align-items:center;justify-content:center;
  animation:fadeIn .15s ease;
}
.dialog-box {
  background:var(--surface);border:1px solid var(--border);border-radius:20px;
  padding:28px 32px;max-width:420px;width:90%;box-shadow:var(--shadow);
}
.dialog-title {
  font-size:17px;font-weight:700;margin-bottom:10px;display:flex;align-items:center;gap:8px;
}
.dialog-msg {
  color:var(--text-muted);font-size:13px;line-height:1.6;margin-bottom:20px;
}
.dialog-btns {
  display:flex;gap:10px;justify-content:flex-end;
}
.dialog-btns button {
  padding:8px 20px;border-radius:8px;border:none;font-size:13px;font-weight:600;cursor:pointer;transition:opacity .2s;
}
.dialog-btns button:hover { opacity:.85; }
.btn-cancel { background:var(--surface2);color:var(--text); }
.btn-confirm { background:var(--red);color:#fff; }
.btn-confirm-yellow { background:var(--c6yellow);color:#000; }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }
  img, svg, canvas, video,
  input, select, textarea, button {
    max-width: 100%;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    min-height: 100vh;
  }

  /* ── LOGIN ── */
  #login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 0%, #1a1500 0%, #0a0a0a 60%);
  }
  .login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: min(400px, 90vw);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }
  .login-logo {
    text-align: center;
    margin-bottom: 32px;
  }
  .login-logo .logo-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    margin: 0 auto 14px;
    display: block;
  }
  .login-logo .c6 {
    font-size: 28px;
    font-weight: 800;
    color: var(--c6yellow);
    letter-spacing: -1px;
  }
  .login-logo .sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 2px;
    text-transform: uppercase;
  }
  .field { margin-bottom: 16px; }
  .field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
  .field input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
  }
  .field input:focus { border-color: var(--c6yellow); }
  .btn-login {
    width: 100%;
    padding: 12px;
    background: var(--gradient-gold);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity .2s;
  }
  .btn-login:hover { opacity: .9; }
  .login-error { color: var(--red); font-size: 12px; margin-top: 10px; text-align: center; }

  /* ── APP SHELL ── */
  #app { display: none; }

  /* ── MAIN CONTENT ── */
  .main { padding: 24px clamp(20px, 3.5vw, 72px); width: 100%; max-width: none; min-width: 0; margin: 0 auto; }
  .page { display: none; }
  .page.active { display: block; min-width: 0; }

