* { box-sizing: border-box; margin: 0; padding: 0; }
  ::-webkit-scrollbar { width: 6px; height: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }
  html { scrollbar-color: rgba(255,255,255,0.08) transparent; }

  :root {
    --bg-gradient: radial-gradient(ellipse at 20% 15%, #0d1f3c 0%, #070d1a 55%, #040911 100%);
    --bg-color: #040911;
    --card-bg: #0c1830;
    --inner-bg: #0a1425;
    --card-border: rgba(255,255,255,0.06);
    --inner-border: rgba(255,255,255,0.05);
    --text-main: #ffffff;
    --text-secondary: rgba(255,255,255,0.3);
    --text-dim: rgba(255,255,255,0.18);
    --tab-active-bg: #162644;
    --tab-bg: rgba(0,0,0,0.25);
    --pipe-bg: #0a1425;
    --pipe-border: rgba(255,255,255,0.05);
    --fin-divider: rgba(255,255,255,0.04);
  }

  body.light-theme {
    --bg-gradient: radial-gradient(ellipse at 20% 15%, #ffffff 0%, #f4f6fa 55%, #eef1f6 100%);
    --bg-color: #f4f6fa;
    --card-bg: #ffffff;
    --inner-bg: #f8f9fc;
    --card-border: rgba(0,0,0,0.06);
    --inner-border: rgba(0,0,0,0.05);
    --text-main: #1f2937;
    --text-secondary: rgba(0,0,0,0.6);
    --text-dim: rgba(0,0,0,0.4);
    --tab-active-bg: #ffffff;
    --tab-bg: rgba(0,0,0,0.08);
    --pipe-bg: #f8f9fc;
    --pipe-border: rgba(0,0,0,0.06);
    --fin-divider: rgba(0,0,0,0.05);
  }
  
  /* Ajustes específicos pro Light Theme que não usam variáveis (sombras e backgrounds hardcoded nas classes) */
  body.light-theme .primo-balance-tag { background: rgba(0,0,0,0.06); color: rgba(0,0,0,0.6); }
  body.light-theme .primo-bar-bg { background: rgba(0,0,0,0.06); }
  body.light-theme .primo-limite span { color: rgba(0,0,0,0.8); }
  body.light-theme .colab-entry-date { background: rgba(0,0,0,0.06); }
  body.light-theme .colab-textarea { background: rgba(0,0,0,0.03); }
  body.light-theme .nav-btn.active, body.light-theme .nav-btn.active-purple { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
  body.light-theme .kpi-card.kpi-profit .kpi-value { text-shadow: none; color: #00b075; }
  body.light-theme .cont-num.green { text-shadow: none; color: #00b075; }
  body.light-theme .live-dot-inline { box-shadow: none; }
  body.light-theme .header-btn { background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.08); color: rgba(0,0,0,0.5); }
  body.light-theme .header-btn:hover { background: rgba(0,0,0,0.08); color: rgba(0,0,0,0.8); }
  body.light-theme .chat-msg.assistant .chat-bubble { background: rgba(127,119,221,0.1); border-color: rgba(127,119,221,0.2); color: #1f2937; }
  body.light-theme .chat-msg.user .chat-bubble { background: rgba(0,214,143,0.15); border-color: rgba(0,214,143,0.25); color: #1f2937; }
  body.light-theme .c-green, body.light-theme .bg-green { color: #00a870; }
  body.light-theme .colab-entry.today .colab-entry-date { color: #00a870; background: rgba(0,214,143,0.15); }
  body.light-theme .dash-brand .subtitle { text-shadow: none; color: #00a870; }
  body.light-theme .pipe-step-count { color: rgba(0,0,0,0.8); }



  body {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    background: var(--bg-gradient);
    background-color: var(--bg-color);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-main);
    transition: background 0.4s, color 0.4s;
  }

  #stars-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

  .dash {
    position: relative; z-index: 1;
    min-height: 100vh; padding: 40px 24px 32px;
    max-width: 1600px; margin: 0 auto;
  }

  /* HEADER */
  .dash-header {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 0 18px; margin-bottom: 16px; position: relative;
  }
  .header-btns {
    position: absolute; right: 0; top: 10px;
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  }
  .header-btns-icons { display: flex; gap: 8px; align-items: center; }
  .dash-brand { text-align: center; }
  .dash-brand img.logo { height: 50px; width: auto; display: block; margin: 0 auto 12px; }
  .dash-brand .subtitle {
    font-size: 16px; font-weight: 700; color: #00d68f;
    letter-spacing: 0.22em; text-transform: uppercase;
    text-shadow: 0 0 14px rgba(0,214,143,0.55), 0 0 32px rgba(0,214,143,0.25);
    display: flex; align-items: center; justify-content: center; gap: 10px;
  }
  .live-dot-inline {
    width: 10px; height: 10px; border-radius: 50%; background: #00d68f;
    box-shadow: 0 0 8px rgba(0,214,143,0.6), 0 0 20px rgba(0,214,143,0.3);
    animation: pulse-dot 2s infinite; display: inline-block; flex-shrink: 0;
  }
  .live-indicator {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: rgba(255,255,255,0.35);
    letter-spacing: 0.1em; text-transform: uppercase; margin-top: 8px;
  }
  .live-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #00d68f;
    box-shadow: 0 0 8px rgba(0,214,143,0.6); animation: pulse-dot 2s infinite;
  }
  @keyframes pulse-dot {
    0%,100% { box-shadow: 0 0 0 0 rgba(0,214,143,0.5); }
    50% { box-shadow: 0 0 0 8px rgba(0,214,143,0); }
  }
  .header-date {
    font-size: 11px; color: rgba(255,255,255,0.25); margin-top: 4px; text-align: center;
  }

  /* TABS */
  .tabs {
    display: flex; gap: 3px; margin-bottom: 10px;
    background: var(--tab-bg); border-radius: 8px; padding: 3px; width: fit-content;
  }
  .tab {
    font-size: 11px; font-weight: 500; padding: 4px 11px; border-radius: 6px;
    border: none; background: transparent; color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s; font-family: inherit;
  }
  .tab.active {
    background: var(--tab-active-bg); color: var(--text-main);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  }
  .tab:hover:not(.active) { color: var(--text-main); }

  /* CARD */
  .card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 12px; padding: 14px 16px; transition: background 0.4s, border-color 0.4s;
  }
  .card-label {
    font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 8px;
  }
  .inner-card {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 12px; padding: 16px 18px; transition: background 0.4s;
  }

  /* ZONA 1A: META + CAIXA */
  .zona1 { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-bottom: 10px; }
  .meta-valor { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--text-main); margin-bottom: 3px; }
  .meta-goal-line { font-size: 12px; color: rgba(255,255,255,0.3); margin-bottom: 10px; }
  .meta-pct { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
  .progress-bar-bg { height: 5px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
  .progress-bar-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease, background 0.3s; }
  .caixa-val { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; color: var(--text-main); line-height: 1; margin-bottom: 4px; }
  .caixa-sub { font-size: 11px; color: rgba(255,255,255,0.25); letter-spacing: 0.06em; text-transform: uppercase; }

  /* ZONA 1B: LUCRO + FAT */
  .zona1b { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
  .block-valor { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--text-main); margin-bottom: 4px; }
  .margem-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
  .margem-badge.positive { color: #00d68f; }
  .margem-badge.negative { color: #E24B4A; }
  .comp-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 99px; margin-top: 4px;
  }
  .comp-up { background: rgba(0,214,143,0.12); color: #00d68f; }
  .comp-down { background: rgba(226,75,74,0.12); color: #E24B4A; }

  /* ZONA 2: PIPELINE */
  .zona2 { margin-bottom: 10px; }
  .pipeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .pipeline-total { font-size: 11px; color: rgba(255,255,255,0.25); }
  .pipeline-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .pipe-step {
    background: var(--pipe-bg); border: 1px solid var(--pipe-border);
    border-radius: 10px; padding: 12px 10px; text-align: center;
  }
  .pipe-step.step-blue { border-color: rgba(55,138,221,0.25); background: rgba(55,138,221,0.07); }
  .pipe-step.step-green { border-color: rgba(0,214,143,0.25); background: rgba(0,214,143,0.07); }
  .pipe-step.step-amber { border-color: rgba(239,159,39,0.25); background: rgba(239,159,39,0.07); }
  .pipe-step-name { font-size: 10px; color: var(--text-secondary); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
  .pipe-step.step-blue .pipe-step-name { color: #378ADD; }
  .pipe-step.step-green .pipe-step-name { color: #00d68f; }
  .pipe-step.step-amber .pipe-step-name { color: #EF9F27; }
  .pipe-step-count { font-size: 28px; font-weight: 700; color: rgba(255,255,255,0.6); line-height: 1; letter-spacing: -0.03em; }
  .pipe-step.step-blue .pipe-step-count { color: #378ADD; }
  .pipe-step.step-green .pipe-step-count { color: #00d68f; }
  .pipe-step.step-amber .pipe-step-count { color: #EF9F27; }
  .pipe-step-label { font-size: 10px; color: var(--text-dim); margin-top: 4px; }

  /* ZONA 3 */
  .zona3 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

  /* PRIMO RISK STORES */
  .primo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .primo-store {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  }
  .primo-store.over-limit { background: rgba(0,214,143,0.07); border-color: rgba(0,214,143,0.35); box-shadow: 0 0 18px rgba(0,214,143,0.1); }
  .over-limit-tag { font-size: 10px; font-weight: 700; color: #00d68f; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(0,214,143,0.12); padding: 2px 8px; border-radius: 99px; width: fit-content; }
  .primo-store-header { display: flex; align-items: center; justify-content: space-between; }
  .primo-store-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
  .primo-balance-tag { font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }
  .primo-score-row { display: flex; align-items: center; justify-content: space-between; }
  .primo-score-pct { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
  .primo-score-badge { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
  .primo-bar-bg { height: 5px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
  .primo-bar-fill { height: 100%; border-radius: 99px; }
  .primo-limite { font-size: 11px; color: rgba(255,255,255,0.25); line-height: 1.6; }
  .primo-limite span { color: rgba(255,255,255,0.55); font-weight: 600; }

  /* CONTINGENCIA */
  .cont-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
  .cont-item {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
  }
  .cont-item-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 3px; }
  .cont-item-sub { font-size: 11px; color: var(--text-dim); }
  .cont-num { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
  .cont-num.green { color: #00d68f; text-shadow: 0 0 20px rgba(0,214,143,0.3); }
  .cont-num.white { color: var(--text-main); }

  /* FINANCE */
  .fin-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
  .fin-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 12px; background: var(--inner-bg); border: 1px solid var(--inner-border); border-radius: 10px;
  }
  .fin-row-label { font-size: 11px; color: var(--text-secondary); letter-spacing: 0.05em; }
  .fin-row-val { font-size: 16px; font-weight: 700; }
  .fin-row-val.green { color: #00d68f; }
  .fin-row-val.red { color: #E24B4A; }
  .fin-row-val.white { color: var(--text-main); }
  .fin-divider { height: 1px; background: var(--fin-divider); margin: 2px 0; }

  /* BLOCO COPIAR */
  .bloco-section { margin-bottom: 10px; }
  .bloco-card {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 12px; padding: 16px 18px; position: relative;
  }
  .bloco-card pre {
    font-family: 'DM Sans', monospace; font-size: 12px; color: rgba(255,255,255,0.7);
    white-space: pre-wrap; line-height: 1.7; margin: 0;
  }
  .btn-copy {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,214,143,0.12); border: 1px solid rgba(0,214,143,0.3);
    color: #00d68f; padding: 6px 14px; border-radius: 8px;
    font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: all 0.15s;
  }
  .btn-copy:hover { background: rgba(0,214,143,0.2); }
  .btn-copy.copied { background: rgba(0,214,143,0.3); }

  /* BREAKDOWN TABLE */
  .breakdown-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
  .breakdown-card {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 12px; padding: 14px 16px;
  }
  .breakdown-card.negative { border-color: rgba(226,75,74,0.25); background: rgba(226,75,74,0.07); }
  .breakdown-card.inactive { border-color: rgba(255,255,255,0.04); background: rgba(255,255,255,0.02); opacity: 0.5; }
  .breakdown-card.positive { border-color: rgba(0,214,143,0.25); background: rgba(0,214,143,0.07); }
  .breakdown-name { font-size: 14px; font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
  .breakdown-sub { font-size: 10px; color: var(--text-secondary); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
  .breakdown-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; }
  .breakdown-row .lbl { color: var(--text-secondary); }
  .breakdown-row .val { font-weight: 600; color: var(--text-main); }
  .breakdown-row .val.green { color: #00d68f; }
  .breakdown-row .val.red { color: #E24B4A; }
  .breakdown-status { margin-top: 8px; font-size: 12px; font-weight: 600; }

  /* FOOTER */
  .dash-footer { text-align: center; margin-top: 24px; padding: 16px 0 8px; border-top: 1px solid rgba(255,255,255,0.05); }
  .dash-footer p { font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.5); line-height: 1.6; }
  .dash-footer p span { color: rgba(255,255,255,0.9); }

  /* BOTOES HEADER */
  .header-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px; padding: 8px 10px; color: rgba(255,255,255,0.4);
    cursor: pointer; display: flex; align-items: center; transition: all 0.2s; font-size: 16px;
  }
  .header-btn:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); }
  .header-btn.spinning svg { animation: spin 0.8s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .header-btn.active { background: rgba(226,75,74,0.12); border-color: rgba(226,75,74,0.3); color: #E24B4A; }

  /* CORES */
  .c-green { color: #00d68f; }
  .c-amber { color: #EF9F27; }
  .c-red { color: #E24B4A; }
  .bg-green { background: rgba(0,214,143,0.15); color: #00d68f; }
  .bg-amber { background: rgba(239,159,39,0.15); color: #EF9F27; }
  .bg-orange { background: rgba(224,124,58,0.15); color: #E07C3A; }
  .bg-red { background: rgba(226,75,74,0.15); color: #E24B4A; }

  /* BLUR */
  .blur-numbers .meta-valor, .blur-numbers .meta-goal-line, .blur-numbers .meta-pct,
  .blur-numbers .caixa-val, .blur-numbers .block-valor, .blur-numbers .margem-badge,
  .blur-numbers .comp-badge, .blur-numbers .primo-score-pct, .blur-numbers .primo-limite,
  .blur-numbers .cont-num, .blur-numbers .fin-row-val, .blur-numbers .pipe-step-count,
  .blur-numbers .breakdown-row .val, .blur-numbers .breakdown-status,
  .blur-numbers .bloco-card pre,
  .blur-numbers .colab-entry-stat,
  .blur-numbers .colab-entry-ads-row .val,
  .blur-numbers .colab-entry-row .val,
  .blur-numbers .colab-entry-list,
  .blur-numbers .colab-table-row .td-summary,
  .blur-numbers .colab-expand-content { filter: blur(8px); user-select: none; }

  /* COLABORADORES */
  .colab-tabs {
    display: flex; gap: 3px; margin-bottom: 14px;
    background: var(--tab-bg); border-radius: 8px; padding: 3px; width: fit-content;
  }
  .colab-tab {
    font-size: 11px; font-weight: 500; padding: 4px 11px; border-radius: 6px;
    border: none; background: transparent; color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .colab-tab.active {
    background: var(--tab-active-bg); color: var(--text-main);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  }
  .colab-tab:hover:not(.active) { color: var(--text-main); }
  .colab-tab .colab-dot {
    width: 6px; height: 6px; border-radius: 50%; display: inline-block;
    flex-shrink: 0;
  }
  .colab-dot.empty-dot { background: rgba(255,255,255,0.15); }
  .colab-dot.done-dot { background: #00d68f; box-shadow: 0 0 6px rgba(0,214,143,0.4); }
  .colab-page { display: none; }
  .colab-page.visible { display: block; animation: fadeIn 0.3s ease; }

  /* TOOLBAR */
  .colab-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
    padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .colab-toolbar-left { display: flex; flex-direction: column; gap: 2px; }
  .colab-name-big {
    font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-secondary);
  }
  .colab-desc-line { font-size: 13px; font-weight: 700; color: var(--text-main); }
  .colab-toolbar-right { display: flex; gap: 8px; align-items: center; }
  .btn-cadastrar {
    background: none; border: 1px solid rgba(0,214,143,0.3);
    color: #00d68f; padding: 6px 16px; border-radius: 8px;
    font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s;
  }
  .btn-cadastrar:hover { background: rgba(0,214,143,0.1); border-color: rgba(0,214,143,0.5); }
  .colab-pagination {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--inner-border);
  }
  .colab-pagination-btns { display: flex; gap: 4px; }
  .colab-page-btn {
    background: rgba(255,255,255,0.04); border: 1px solid var(--inner-border);
    color: var(--text-secondary); padding: 5px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s;
  }
  .colab-page-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }
  .colab-page-btn.active { background: rgba(255,255,255,0.1); color: var(--text-main); border-color: rgba(255,255,255,0.2); }
  .colab-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
  .colab-page-info { font-size: 11px; color: var(--text-dim); }
  .colab-perpage {
    padding: 6px 10px; border-radius: 8px;
    background: none; border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary); font-family: 'DM Sans', sans-serif; font-size: 11px;
    outline: none; cursor: pointer; transition: all 0.15s;
  }
  .colab-perpage:hover { border-color: rgba(255,255,255,0.2); color: var(--text-main); }
  .colab-perpage option { background: #0a1425; color: var(--text-main); }

  /* FORM */
  .colab-form {
    background: var(--inner-bg); border: 1px solid rgba(0,214,143,0.15);
    border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; display: none;
  }
  .colab-form.open { display: block; animation: fadeIn 0.3s ease; }
  .colab-form-title {
    font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
    color: #00d68f; margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,214,143,0.1);
  }
  .colab-form-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
  }
  .colab-form-grid .colab-form-field.full-width { grid-column: 1 / -1; }
  .colab-form-field { margin-bottom: 4px; }
  .colab-field-label {
    font-size: 9px; color: var(--text-dim); letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 4px; margin-top: 6px;
  }
  .colab-field-label .req { color: #E24B4A; }
  .colab-field-label .opt { color: var(--text-dim); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 9px; }
  .colab-textarea {
    width: 100%; min-height: 60px; padding: 8px 12px; border-radius: 8px;
    background: rgba(0,0,0,0.25); border: 1px solid var(--inner-border);
    color: var(--text-main); font-family: 'DM Sans', sans-serif; font-size: 12px;
    resize: vertical; outline: none; transition: border-color 0.2s;
  }
  .colab-textarea:focus { border-color: rgba(0,214,143,0.4); }
  .colab-field-counter {
    font-size: 11px; font-weight: 700; color: #00d68f; min-height: 16px;
    margin-top: 2px; font-family: 'DM Sans', sans-serif;
  }
  .colab-textarea::placeholder { color: var(--text-dim); }
  .colab-form-btns { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; }
  .btn-save {
    background: rgba(0,214,143,0.12); border: 1px solid rgba(0,214,143,0.3);
    color: #00d68f; padding: 7px 22px; border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s;
  }
  .btn-save:hover { background: rgba(0,214,143,0.2); }
  .btn-cancel {
    background: rgba(255,255,255,0.04); border: 1px solid var(--inner-border);
    color: var(--text-secondary); padding: 7px 18px; border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s;
  }
  .btn-cancel:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }

  /* Gaderna ads grid 2 cols */
  .colab-form-ads-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px;
  }
  .colab-form-ads-grid .colab-form-field { margin-bottom: 4px; }

  /* TIMELINE */
  .colab-timeline { display: flex; flex-direction: column; gap: 0; }
  .colab-entry {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 12px; padding: 16px 18px; position: relative;
    transition: border-color 0.3s;
  }
  .colab-entry.today { border-color: rgba(0,214,143,0.25); background: rgba(0,214,143,0.03); }
  .colab-entry.has-data { border-color: rgba(0,214,143,0.15); }
  .colab-entry-header {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none;
    padding-bottom: 0;
  }
  .colab-entry-header:hover .colab-entry-date { opacity: 0.8; }
  .colab-entry-toggle {
    font-size: 10px; color: var(--text-dim); transition: transform 0.2s;
    display: inline-block;
  }
  .colab-entry-summary {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; flex: 1; margin: 0 20px;
    overflow: hidden;
  }
  .colab-summary-tag {
    font-size: 13px; color: var(--text-secondary); white-space: nowrap;
  }
  .colab-summary-tag strong {
    color: #00d68f; font-weight: 700; font-size: 16px;
  }
  .colab-summary-tag.amber strong { color: #EF9F27; }
  .colab-summary-tag.blue strong { color: #378ADD; }
  .colab-summary-tag.red strong { color: #E24B4A; }
  .colab-entry.open .colab-entry-toggle { transform: rotate(90deg); }
  .colab-entry-content {
    display: none; margin-top: 12px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
  }
  .colab-entry.open .colab-entry-content { display: block; animation: fadeIn 0.2s ease; }
  .colab-entry-date {
    font-size: 11px; font-weight: 700; color: var(--text-main);
    background: rgba(255,255,255,0.06); padding: 3px 10px; border-radius: 6px;
  }
  .colab-entry.today .colab-entry-date { background: rgba(0,214,143,0.12); color: #00d68f; }
  .colab-entry-time { font-size: 10px; color: var(--text-dim); }
  .colab-entry-body {
    font-size: 12px; color: rgba(255,255,255,0.7); line-height: 1.7;
    white-space: pre-wrap; font-family: 'DM Sans', sans-serif;
  }

  /* Entry fields layout */
  .colab-entry-fields { display: flex; flex-direction: column; gap: 8px; }
  .colab-entry-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 4px 0; font-size: 12px;
  }
  .colab-entry-row + .colab-entry-row { border-top: 1px solid rgba(255,255,255,0.03); }
  .colab-entry-row .lbl {
    font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-secondary); flex-shrink: 0;
  }
  .colab-entry-row .val { font-weight: 600; color: rgba(255,255,255,0.8); text-align: right; }

  /* Stat highlight (big number like pipe-step-count) */
  .colab-entry-stat {
    font-size: 28px; font-weight: 700; color: #00d68f;
    line-height: 1; letter-spacing: -0.03em;
    text-shadow: 0 0 20px rgba(0,214,143,0.15);
  }

  /* List compact monospace */
  .colab-entry-list {
    font-family: 'DM Sans', monospace; font-size: 11px; line-height: 1.6;
    color: rgba(255,255,255,0.5); white-space: pre-wrap;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.03);
    border-radius: 8px; padding: 8px 12px; margin-top: 4px;
    max-height: 120px; overflow-y: auto;
  }

  /* Ads grid for Gaderna display */
  .colab-entry-ads-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px;
  }
  .colab-entry-ads-block {
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px; padding: 10px 12px;
  }
  .colab-entry-ads-title {
    font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-secondary); margin-bottom: 6px; font-weight: 600;
  }
  .colab-entry-ads-row {
    display: flex; justify-content: space-between; padding: 2px 0; font-size: 11px;
  }
  .colab-entry-ads-row .lbl { color: var(--text-dim); }
  .colab-entry-ads-row .val { font-weight: 600; color: rgba(255,255,255,0.7); }

  .colab-entry-meta {
    margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.04);
    display: flex; gap: 16px; flex-wrap: wrap;
  }
  .colab-entry-tag {
    font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-dim); line-height: 1.6;
  }
  .colab-entry-tag span { color: rgba(255,255,255,0.5); font-weight: 500; text-transform: none; letter-spacing: 0; }
  .colab-entry-tag.has-content span { color: rgba(255,255,255,0.7); }
  .btn-edit-entry {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-dim); font-size: 10px; letter-spacing: 0.04em;
    cursor: pointer; font-family: inherit; padding: 3px 10px; border-radius: 6px; transition: all 0.15s;
  }
  .btn-edit-entry:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }
  .btn-delete-entry {
    background: none; border: none; color: var(--text-dim);
    font-size: 13px; cursor: pointer; padding: 2px 4px; transition: all 0.15s;
    line-height: 1;
  }
  .btn-delete-entry:hover { color: #E24B4A; }
  .btn-confirm-delete {
    background: rgba(226,75,74,0.15); border: 1px solid rgba(226,75,74,0.4); color: #E24B4A;
    font-size: 11px; font-weight: 600; cursor: pointer; padding: 4px 12px; border-radius: 6px;
    font-family: inherit; transition: all 0.15s; animation: fadeIn 0.2s ease;
  }
  .btn-confirm-delete:hover { background: rgba(226,75,74,0.25); }
  .btn-cancel-delete {
    background: none; border: 1px solid var(--inner-border); color: var(--text-dim);
    font-size: 11px; font-weight: 600; cursor: pointer; padding: 4px 12px; border-radius: 6px;
    font-family: inherit; transition: all 0.15s;
  }
  .btn-cancel-delete:hover { color: var(--text-main); }
  .colab-empty {
    text-align: center; padding: 40px 20px; color: var(--text-dim); font-size: 13px;
  }

  /* Section divider inside card */
  .colab-entry-divider {
    height: 1px; background: rgba(255,255,255,0.04); margin: 8px 0;
  }

  /* RELATORIOS SECTION HEADER (igual Usuarios) */
  .colab-section-header {
    display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px;
  }
  .colab-section-header-left { display: flex; flex-direction: column; gap: 2px; }
  .colab-section-title { font-size: 18px; font-weight: 700; color: var(--text-main); }
  .colab-section-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

  /* COLAB TABLE */
  .colab-table { width: 100%; border-collapse: collapse; }
  .colab-table thead th {
    font-size: 10px; font-weight: 600; color: var(--text-dim);
    letter-spacing: 0.08em; text-transform: uppercase; text-align: left;
    padding: 8px 12px; border-bottom: 1px solid var(--inner-border);
  }
  .colab-table thead th:last-child { text-align: right; }
  .colab-table-row {
    border-bottom: 1px solid rgba(255,255,255,0.03); transition: background 0.15s; cursor: pointer;
  }
  .colab-table-row:hover { background: rgba(255,255,255,0.02); }
  .colab-table-row.today { border-left: 2px solid #00d68f; background: rgba(0,214,143,0.04); }
  .colab-table-row td { padding: 12px; font-size: 13px; color: var(--text-main); vertical-align: middle; }
  .colab-table-row .td-date { white-space: nowrap; width: 1%; }
  .colab-table-row .td-date .date-badge {
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px;
    background: rgba(255,255,255,0.06); color: var(--text-main); display: inline-block;
  }
  .colab-table-row.today .td-date .date-badge { background: rgba(0,214,143,0.12); color: #00d68f; }
  .colab-table-row .td-summary {
    display: flex; align-items: center; justify-content: center; gap: 24px;
  }
  .colab-table-row .td-summary .colab-summary-tag {
    font-size: 12px; padding: 4px 12px; background: rgba(255,255,255,0.03);
    border-radius: 6px; border: 1px solid rgba(255,255,255,0.04);
  }
  .colab-table-row.today .td-summary .colab-summary-tag {
    background: rgba(0,214,143,0.06); border-color: rgba(0,214,143,0.15);
  }
  .colab-table-row .td-summary .colab-summary-tag strong { font-size: 14px; }
  .colab-table-row .td-actions { white-space: nowrap; text-align: right; width: 1%; }
  .colab-table-row .td-actions .colab-tbl-btn {
    background: none; border: none; color: var(--text-dim); cursor: pointer;
    padding: 4px 6px; transition: color 0.15s; vertical-align: middle;
  }
  .colab-table-row .td-actions .colab-tbl-btn:hover { color: var(--text-main); }
  .colab-table-row .td-actions .colab-tbl-btn.del:hover { color: #E24B4A; }
  .colab-table-row .td-actions .colab-tbl-btn.expand-btn { transition: transform 0.2s, color 0.15s; display: inline-block; }
  .colab-table-row.open .td-actions .colab-tbl-btn.expand-btn { transform: rotate(90deg); }
  .colab-expand-row { display: none; }
  .colab-expand-row.open { display: table-row; }
  .colab-expand-row td {
    padding: 0 12px 16px 12px;
  }
  .colab-expand-content {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 8px; padding: 14px 16px; animation: fadeIn 0.2s ease;
  }

  /* Updated colab toolbar */
  .colab-toolbar-new {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
    padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .colab-toolbar-new .colab-name-big {
    font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-main); margin-bottom: 2px;
  }
  .colab-toolbar-new .colab-desc-line {
    font-size: 12px; font-weight: 500; color: var(--text-secondary);
  }

  /* ANALISE IA */
  .analise-section { margin-bottom: 10px; }
  .btn-analise {
    width: 100%; padding: 16px; border-radius: 12px; border: 1px solid rgba(127,119,221,0.3);
    background: rgba(127,119,221,0.08); color: #AFA9EC; font-size: 15px; font-weight: 700;
    font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    letter-spacing: 0.02em;
  }
  .btn-analise:hover { background: rgba(127,119,221,0.15); border-color: rgba(127,119,221,0.5); }
  .btn-analise:disabled { opacity: 0.5; cursor: not-allowed; }
  .analise-result {
    margin-top: 10px; background: var(--inner-bg); border: 1px solid rgba(127,119,221,0.2);
    border-radius: 12px; padding: 18px 20px; position: relative; display: none;
  }
  .analise-result.visible { display: block; animation: fadeIn 0.4s ease; }
  @keyframes fadeIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }
  .analise-result pre {
    font-family: 'DM Sans', monospace; font-size: 12px; color: rgba(255,255,255,0.7);
    white-space: pre-wrap; line-height: 1.8; margin: 0;
  }
  .analise-result .btn-copy-analise {
    position: absolute; top: 12px; right: 12px;
    background: rgba(127,119,221,0.12); border: 1px solid rgba(127,119,221,0.3);
    color: #AFA9EC; padding: 6px 14px; border-radius: 8px;
    font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s;
  }
  .analise-result .btn-copy-analise:hover { background: rgba(127,119,221,0.2); }

  /* CONFIG */
  .config-item {
    padding: 14px 16px; background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 10px; margin-bottom: 8px; transition: border-color 0.2s;
  }
  .config-item:hover { border-color: rgba(255,255,255,0.1); }
  .config-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
  .config-info { flex: 1; }
  .config-name { font-size: 14px; font-weight: 700; color: var(--text-main); }
  .config-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
  .config-status {
    font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 6px;
    letter-spacing: 0.04em;
    background: rgba(255,255,255,0.04); color: var(--text-dim);
  }
  .config-status.connected { background: rgba(0,214,143,0.12); color: #00d68f; }
  .config-status.pending { background: rgba(239,159,39,0.12); color: #EF9F27; }
  .config-status.error { background: rgba(226,75,74,0.12); color: #E24B4A; }
  .config-fields { display: flex; flex-direction: column; gap: 4px; }
  .config-field-row { display: flex; gap: 8px; }
  .config-field { flex: 1; }
  .config-divider { height: 1px; background: var(--inner-border); }
  .config-fields .colab-field-label { margin-top: 0; margin-bottom: 2px; }
  .config-fields .colab-textarea { font-size: 11px; padding: 6px 10px; }

  @media (max-width: 768px) {
    .config-field-row { flex-direction: column; }
  }

  /* CHAT */
  .chat-msg {
    display: flex; gap: 10px; align-items: flex-start; max-width: 85%;
    animation: fadeIn 0.3s ease;
  }
  .chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
  .chat-avatar {
    width: 32px; height: 32px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
    flex-shrink: 0;
  }
  .chat-msg.assistant .chat-avatar { background: rgba(127,119,221,0.2); color: #AFA9EC; }
  .chat-msg.user .chat-avatar { background: rgba(0,214,143,0.2); color: #00d68f; }
  .chat-bubble {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 12px; padding: 10px 14px; font-size: 13px;
    line-height: 1.6; color: rgba(255,255,255,0.8); white-space: pre-wrap;
  }
  .chat-msg.user .chat-bubble {
    background: rgba(0,214,143,0.08); border-color: rgba(0,214,143,0.15);
  }
  .chat-msg.assistant .chat-bubble {
    background: rgba(127,119,221,0.06); border-color: rgba(127,119,221,0.12);
  }
  .chat-typing {
    display: flex; gap: 4px; padding: 12px 14px; align-items: center;
  }
  .chat-typing-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #AFA9EC;
    animation: chatDot 1.2s infinite;
  }
  .chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
  .chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }
  @keyframes chatDot { 0%,100%{opacity:0.3} 50%{opacity:1} }
  .chat-quick-btn {
    background: rgba(127,119,221,0.08); border: 1px solid rgba(127,119,221,0.2);
    color: #AFA9EC; padding: 5px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all 0.15s; white-space: nowrap;
  }
  .chat-quick-btn:hover { background: rgba(127,119,221,0.15); border-color: rgba(127,119,221,0.4); }

  /* NAV SECOES */
  .nav-sections {
    display: flex; justify-content: center; gap: 3px; margin-bottom: 20px;
    background: var(--tab-bg); border-radius: 8px; padding: 3px; width: fit-content;
    margin-left: auto; margin-right: auto;
  }
  .nav-btn {
    padding: 6px 18px; border-radius: 6px; border: none;
    background: transparent; color: var(--text-secondary); font-size: 12px;
    font-weight: 500; font-family: inherit; cursor: pointer; transition: all 0.15s;
    letter-spacing: 0.02em;
  }
  .nav-btn:hover { color: var(--text-main); }
  .nav-btn.active, .nav-btn.active-purple {
    background: var(--tab-active-bg); color: var(--text-main);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  }

  .section-page { display: none; }
  .section-page.visible { display: block; animation: fadeIn 0.3s ease; }

  /* KPI ROW */
  .kpi-row {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px;
  }
  .kpi-card {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 10px; padding: 14px 16px;
  }
  .kpi-label {
    font-size: 10px; font-weight: 600; color: var(--text-dim);
    letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px;
  }
  .kpi-value {
    font-size: 24px; font-weight: 700; color: var(--text-main); line-height: 1;
  }
  .kpi-value.kpi-amber { color: #EF9F27; }
  .kpi-value.kpi-green { color: #00d68f; }
  .kpi-value.kpi-red { color: #E24B4A; }
  .kpi-card.kpi-profit { border-color: rgba(0,214,143,0.25); background: rgba(0,214,143,0.07); }
  .kpi-card.kpi-profit .kpi-value { color: #00d68f; text-shadow: 0 0 20px rgba(0,214,143,0.3); }
  .kpi-card.kpi-profit .kpi-label { color: #00d68f; }
  .kpi-card.kpi-loss { border-color: rgba(226,75,74,0.25); background: rgba(226,75,74,0.07); }
  .kpi-card.kpi-loss .kpi-value { color: #E24B4A; }
  .kpi-card.kpi-loss .kpi-label { color: #E24B4A; }
  .kpi-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

  .meta-bar-section {
    background: var(--inner-bg); border: 1px solid var(--inner-border);
    border-radius: 10px; padding: 12px 16px; margin-bottom: 0;
  }

  /* Ops table highlight */
  .ops-row-positive { background: rgba(0,214,143,0.03); }
  .ops-row-negative { }
  .ops-row-inactive { opacity: 0.5; }
  .ops-lucro-pos { color: #00d68f; font-weight: 700; }
  .ops-lucro-neg { color: #E24B4A; font-weight: 700; }

  /* ZC table */
  .zc-status-badge {
    font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 4px;
  }

  /* TABLE SCROLL WRAPPER */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* RESPONSIVE */

  /* iPad Landscape */
  @media (min-width: 768px) and (max-width: 1200px) {
    .dash { padding: 30px 20px 32px; }
    .kpi-value { font-size: 20px; }
    .kpi-card { padding: 12px 14px; }
  }

  /* Tablet / Small desktop */
  @media (max-width: 768px) {
    .dash { padding: 20px 12px 24px; }
    .dash-header { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
    .header-btns { position: static; flex-direction: row; align-items: center; gap: 6px; }
    .header-btns-icons { gap: 6px; }
    .header-user-name { font-size: 11px; }
    .dash-brand img.logo { height: 35px; }
    .dash-brand .subtitle { font-size: 14px; }
    .live-dot-inline { width: 8px; height: 8px; }

    .nav-sections { overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; }
    .nav-btn { font-size: 11px; padding: 6px 14px; white-space: nowrap; flex-shrink: 0; }

    .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .kpi-value { font-size: 18px; }
    .kpi-card { padding: 10px 12px; }
    .kpi-label { font-size: 9px; }

    .zona1 { grid-template-columns: 1fr; }
    .zona1b { grid-template-columns: 1fr; }
    .zona3 { grid-template-columns: 1fr; }
    .meta-valor { font-size: 24px; }
    .block-valor { font-size: 20px; }

    .users-header { flex-direction: column; gap: 8px; }
    .tabs { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
    .tab { white-space: nowrap; flex-shrink: 0; }

    /* Meta + Caixa stack */
    .meta-caixa-row { grid-template-columns: 1fr !important; }
    .meta-bar-section { min-width: 0 !important; }

    /* Pipeline + Cont + Finance: 1 coluna */
    .dashboard-bottom-grid { grid-template-columns: 1fr !important; }

    /* Tables scroll horizontal */
    .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .users-table { min-width: 600px; }

    /* Pipeline */
    .pipeline-grid { grid-template-columns: repeat(6, minmax(70px, 1fr)); overflow-x: auto; gap: 6px; }
    .pipe-step { padding: 8px 6px; }
    .pipe-step-count { font-size: 20px; }
    .pipe-step-name { font-size: 9px; }

    .cont-item { padding: 8px 10px; }
    .cont-num { font-size: 24px; }
    .fin-row { padding: 6px 10px; }

    /* Zero Charge cards */
    .primo-grid { grid-template-columns: repeat(2, 1fr); }

    /* Chat */
    .chat-quick-btn { font-size: 10px; padding: 4px 10px; }

    /* Modal */
    .modal-card { padding: 20px; width: 95%; }

    /* Login */
    .login-card { padding: 24px; width: 90%; }

    /* Breakdown grid */
    .breakdown-grid { grid-template-columns: 1fr; }

    /* Colab */
    .colab-toolbar-new { flex-direction: column; gap: 8px; }
  }

  /* Mobile */
  @media (max-width: 480px) {
    .dash { padding: 14px 8px 20px; }
    .dash-brand img.logo { height: 28px; }
    .dash-brand .subtitle { font-size: 12px; }
    .header-btn { padding: 6px 8px; }

    .kpi-value { font-size: 16px; }
    .kpi-card { padding: 8px 10px; }
    .kpi-label { font-size: 8px; margin-bottom: 4px; }

    .primo-grid { grid-template-columns: 1fr; }

    .nav-btn { font-size: 10px; padding: 5px 10px; }

    .modal-card { padding: 16px; }
    .perm-row { padding: 8px 10px; }
    .perm-row-label { font-size: 12px; }

    .users-title { font-size: 16px; }
    .colab-section-title { font-size: 16px; }
  }

  /* LOGIN SCREEN */
  .login-screen {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; background: var(--bg-gradient);
    background-color: var(--bg-color);
  }
  .login-screen.hidden { display: none; }
  .login-card {
    background: var(--card-bg); border: 1px solid var(--card-border);
    border-radius: 12px; padding: 32px; width: 380px; max-width: 90%;
    position: relative; z-index: 101;
  }
  .login-card img.logo { height: 50px; width: auto; display: block; margin: 0 auto 12px; }
  .login-subtitle {
    font-size: 16px; font-weight: 700; color: #00d68f;
    letter-spacing: 0.22em; text-transform: uppercase;
    text-shadow: 0 0 14px rgba(0,214,143,0.55), 0 0 32px rgba(0,214,143,0.25);
    text-align: center; margin-bottom: 28px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
  }
  .login-field { margin-bottom: 14px; }
  .login-field label {
    font-size: 10px; color: var(--text-secondary); letter-spacing: 0.1em;
    text-transform: uppercase; display: block; margin-bottom: 6px;
  }
  .login-field input {
    width: 100%; padding: 10px 14px; border-radius: 8px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--inner-border);
    color: var(--text-main); font-family: 'DM Sans', sans-serif; font-size: 13px;
    outline: none; transition: border-color 0.2s;
  }
  .login-field input:focus { border-color: rgba(0,214,143,0.4); }
  .login-field input::placeholder { color: var(--text-dim); }
  .login-btn {
    width: 100%; padding: 12px; border-radius: 8px; border: none;
    background: #00d68f; color: #040911; font-size: 14px; font-weight: 700;
    font-family: 'DM Sans', sans-serif; cursor: pointer; transition: all 0.2s;
    letter-spacing: 0.04em; margin-top: 6px;
  }
  .login-btn:hover { background: #00e89d; }
  .login-error {
    color: #E24B4A; font-size: 12px; text-align: center;
    margin-top: 10px; min-height: 18px;
  }

  /* USER MANAGEMENT */
  .users-section { margin-bottom: 16px; }
  .users-header {
    display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px;
  }
  .users-title { font-size: 18px; font-weight: 700; color: var(--text-main); }
  .users-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
  .users-search {
    display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
    background: var(--inner-bg); border: 1px solid var(--inner-border); border-radius: 8px;
    padding: 8px 12px; max-width: 360px;
  }
  .users-search svg { color: var(--text-dim); flex-shrink: 0; }
  .users-search input {
    background: none; border: none; outline: none; color: var(--text-main);
    font-family: 'DM Sans', sans-serif; font-size: 13px; width: 100%;
  }
  .users-search input::placeholder { color: var(--text-dim); }

  .users-table { width: 100%; border-collapse: collapse; }
  .users-table thead th {
    font-size: 10px; font-weight: 600; color: var(--text-dim);
    letter-spacing: 0.08em; text-transform: uppercase; text-align: left;
    padding: 8px 12px; border-bottom: 1px solid var(--inner-border);
  }
  .users-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.03); transition: background 0.15s;
  }
  .users-table tbody tr:hover { background: rgba(255,255,255,0.02); }
  .users-table td { padding: 12px; font-size: 13px; color: var(--text-main); }
  .users-table .td-name { font-weight: 600; }
  .users-table .td-username { color: var(--text-secondary); }

  .user-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 6px;
  }
  .user-badge.admin { background: rgba(0,214,143,0.12); color: #00d68f; }
  .user-badge.colaborador { background: rgba(55,138,221,0.12); color: #378ADD; }
  .user-status { color: var(--text-secondary); font-size: 12px; }
  .user-date { color: var(--text-dim); font-size: 12px; }
  .user-actions { display: flex; gap: 8px; align-items: center; }
  .user-action-btn {
    background: none; border: none; color: var(--text-dim); cursor: pointer;
    padding: 4px; transition: color 0.15s;
  }
  .user-action-btn:hover { color: var(--text-main); }
  .user-action-btn.del:hover { color: #E24B4A; }

  /* Modal overlay */
  .modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
  }
  .modal-overlay.open { display: flex; }
  .modal-card {
    background: #0c1830; border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px; padding: 28px; width: 520px; max-width: 92%;
    max-height: 85vh; overflow-y: auto; position: relative;
    color: var(--text-main);
  }
  .modal-card::-webkit-scrollbar { width: 6px; }
  .modal-card::-webkit-scrollbar-track { background: transparent; }
  .modal-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
  .modal-card::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
  .modal-card input, .modal-card select {
    background: #0a1425 !important; border: 1px solid rgba(255,255,255,0.08) !important;
    color: #fff !important; border-radius: 8px; padding: 8px 12px;
    font-family: 'DM Sans', sans-serif; font-size: 13px; outline: none; width: 100%;
  }
  .modal-card input::placeholder { color: rgba(255,255,255,0.25) !important; }
  .modal-card input:focus, .modal-card select:focus { border-color: rgba(0,214,143,0.4) !important; }
  .modal-card select option { background: #0a1425; color: var(--text-main); }
  .modal-card .colab-field-label { color: rgba(255,255,255,0.35); }
  .modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; color: var(--text-secondary);
    font-size: 20px; cursor: pointer; padding: 4px;
  }
  .modal-close:hover { color: var(--text-main); }
  .modal-title { font-size: 18px; font-weight: 700; color: var(--text-main); }
  .modal-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 4px; margin-bottom: 20px; }
  .modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-bottom: 16px; }
  .modal-form-grid .full-width { grid-column: 1 / -1; }

  /* Perm groups */
  .perm-group { margin-bottom: 16px; }
  .perm-group-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--inner-border);
  }
  .perm-group-left { display: flex; align-items: center; gap: 8px; }
  .perm-group-icon { font-size: 14px; color: var(--text-secondary); }
  .perm-group-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
  .perm-group-count {
    font-size: 10px; font-weight: 600; color: var(--text-dim);
    background: rgba(255,255,255,0.06); padding: 2px 8px; border-radius: 10px;
  }
  .perm-group-actions { display: flex; gap: 12px; }
  .perm-group-actions button {
    font-size: 11px; color: var(--text-secondary); background: none; border: none;
    cursor: pointer; font-family: inherit; transition: color 0.15s;
  }
  .perm-group-actions button:hover { color: var(--text-main); }

  /* Perm rows */
  .perm-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: #0a1425; border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; margin-bottom: 4px;
  }
  .perm-row.active { border-color: rgba(0,214,143,0.2); background: rgba(0,214,143,0.04); }
  .perm-row-label { font-size: 13px; color: rgba(255,255,255,0.8); }

  /* Toggle switch */
  .toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
  .toggle-switch input { opacity: 0; width: 0; height: 0; }
  .toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: rgba(255,255,255,0.12); border-radius: 24px; transition: 0.3s;
  }
  .toggle-slider:before {
    content: ''; position: absolute; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background: rgba(255,255,255,0.5);
    border-radius: 50%; transition: 0.3s;
  }
  input:checked + .toggle-slider { background: #00d68f; }
  input:checked + .toggle-slider:before { transform: translateX(20px); background: #fff; }

  .modal-form-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
  .btn-modal-create {
    background: rgba(0,214,143,0.12); border: 1px solid rgba(0,214,143,0.3);
    color: #00d68f; padding: 9px 28px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s;
  }
  .btn-modal-create:hover { background: rgba(0,214,143,0.2); }
  .btn-modal-cancel {
    background: rgba(255,255,255,0.04); border: 1px solid var(--inner-border);
    color: var(--text-secondary); padding: 9px 22px; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s;
  }
  .btn-modal-cancel:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }

  /* HEADER USER INFO */
  .header-user-info {
    display: flex; align-items: center; gap: 8px;
  }
  .header-user-name {
    font-size: 11px; color: rgba(255,255,255,0.4); font-weight: 500;
    max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }