/* =====================================================================
   CRM Telecom — Design System v2 (premium SaaS)
   Inspirado em: Linear · Stripe Dashboard · Attio · HubSpot
   ===================================================================== */

:root, [data-theme="light"] {
  /* Paleta neutra (slate) */
  --c-bg:        #f7f8fb;
  --c-surface:   #ffffff;
  --c-surface-2: #f1f3f8;
  --c-border:    #e6e8ef;
  --c-border-2:  #d6dae4;
  --c-text:      #0f172a;
  --c-text-2:    #475569;
  --c-text-3:    #64748b;
  --c-muted:     #94a3b8;

  /* Accent */
  --c-primary:    #4f46e5;
  --c-primary-2:  #6366f1;
  --c-primary-50: #eef2ff;
  --c-primary-rgb: 79, 70, 229;

  /* Sidebar */
  --c-sb:        #0b1220;
  --c-sb-2:      #131c30;
  --c-sb-text:   #c7d0e0;
  --c-sb-muted:  #6b7793;
  --c-sb-active: #4f46e5;

  /* Status */
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger:  #ef4444;
  --c-info:    #0ea5e9;

  /* Score */
  --c-quente:   #16a34a;
  --c-morna:    #f59e0b;
  --c-fria:     #0ea5e9;
  --c-em-risco: #ef4444;
  --c-critica:  #7f1d1d;

  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Escala (4px base) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* Raios */
  --r-sm: 6px;  --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;

  /* Sombras */
  --sh-xs: 0 1px 2px rgba(15,23,42,.05);
  --sh-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --sh-md: 0 4px 8px -2px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.05);
  --sh-lg: 0 12px 24px -8px rgba(15,23,42,.12), 0 6px 12px -6px rgba(15,23,42,.08);
  --sh-focus: 0 0 0 3px rgba(var(--c-primary-rgb), .18);

  /* Transições */
  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t-base: 200ms cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --c-bg:        #0a0e18;
  --c-surface:   #131826;
  --c-surface-2: #1a2032;
  --c-border:    #232a3f;
  --c-border-2:  #2d3654;
  --c-text:      #e6e8ef;
  --c-text-2:    #aab2c5;
  --c-text-3:    #8a92a8;
  --c-muted:     #5a6280;
  --c-primary-50:#1e1b4b;
}

/* ============= Reset/baseline ============= */
html, body { height: 100%; }
body {
  background: var(--c-bg); color: var(--c-text);
  font-family: var(--font-sans);
  font-feature-settings: "cv02","cv03","cv04","cv11";
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-2); text-decoration: underline; }
hr { border-color: var(--c-border); }
::selection { background: var(--c-primary-50); color: var(--c-primary); }

/* ============= Shell ============= */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app-shell.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.app-main { min-width: 0; display: flex; flex-direction: column; overflow-x: hidden; }
.app-content { min-width: 0; overflow-x: auto; }

/* ============= Sidebar ============= */
.sidebar {
  background: linear-gradient(180deg, var(--c-sb) 0%, var(--c-sb-2) 100%);
  color: var(--c-sb-text);
  position: sticky; top: 0; height: 100vh; overflow: hidden auto;
  display: flex; flex-direction: column;
  padding: 16px 12px 24px;
  border-right: 1px solid rgba(255,255,255,.04);
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.07); border-radius: 3px; }

.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 18px; border-bottom: 1px solid rgba(255,255,255,.05);
  margin-bottom: 12px; font-weight: 700; color: #fff; font-size: 16px;
  letter-spacing: -.01em;
}
.sb-brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}
.sb-brand .name { white-space: nowrap; overflow: hidden; }
.app-shell.collapsed .sb-brand .name { display: none; }

.sb-search {
  margin-bottom: 12px; position: relative;
}
.sb-search input {
  width: 100%; background: rgba(255,255,255,.04); color: #fff;
  border: 1px solid rgba(255,255,255,.06); border-radius: var(--r-md);
  padding: 8px 10px 8px 32px; font-size: 13px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.sb-search input::placeholder { color: var(--c-sb-muted); }
.sb-search input:focus { outline: none; background: rgba(255,255,255,.07); border-color: rgba(99,102,241,.6); }
.sb-search::before {
  content: "🔍"; position: absolute; left: 10px; top: 7px; opacity: .6; font-size: 12px;
}
.app-shell.collapsed .sb-search { display: none; }

.sb-section {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--c-sb-muted); padding: 14px 14px 6px; font-weight: 600;
}
.app-shell.collapsed .sb-section { padding: 12px 0 4px; text-align: center; font-size: 9px; }

.sb-link {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; margin: 1px 0;
  border-radius: var(--r-md);
  color: var(--c-sb-text); font-weight: 500; font-size: 13.5px;
  transition: background var(--t-fast), color var(--t-fast);
  text-decoration: none; position: relative;
}
.sb-link:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.sb-link.active {
  background: linear-gradient(90deg, rgba(79,70,229,.18) 0%, rgba(79,70,229,0) 100%);
  color: #fff;
}
.sb-link.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--c-sb-active); border-radius: 0 3px 3px 0;
}
.sb-link .ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; stroke: currentColor; fill: none; stroke-width: 2; }
.sb-link.active .ico { opacity: 1; }
.sb-link .label { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-link .badge {
  font-size: 10px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--c-danger);
  color: #fff !important; font-weight: 600; line-height: 1.4;
}
.app-shell.collapsed .sb-link .label,
.app-shell.collapsed .sb-link .badge { display: none; }
.app-shell.collapsed .sb-link { justify-content: center; padding: 10px; }

.sb-collapse-btn {
  margin-top: auto; align-self: flex-end; background: transparent;
  border: 1px solid rgba(255,255,255,.08); color: var(--c-sb-muted);
  width: 28px; height: 28px; border-radius: var(--r-md); cursor: pointer;
  font-size: 12px; transition: all var(--t-fast);
}
.sb-collapse-btn:hover { background: rgba(255,255,255,.06); color: #fff; }

/* ============= Topbar ============= */
.topbar {
  background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; height: 60px;
}
.menu-toggle {
  display: none;
  width: 38px; height: 38px; border-radius: var(--r-md);
  border: 1px solid var(--c-border); background: var(--c-surface);
  cursor: pointer; font-size: 18px;
}

.tb-search {
  flex: 1; max-width: 480px; position: relative;
}
.tb-search input {
  width: 100%; padding: 9px 14px 9px 36px;
  border: 1px solid var(--c-border); background: var(--c-surface-2);
  border-radius: var(--r-md); font-size: 13px; color: var(--c-text);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.tb-search input:focus {
  outline: none; border-color: var(--c-primary); background: var(--c-surface);
  box-shadow: var(--sh-focus);
}
.tb-search::before {
  content: "🔍"; position: absolute; left: 12px; top: 9px; opacity: .55; font-size: 13px;
}
.tb-kbd {
  position: absolute; right: 8px; top: 7px; font-size: 11px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 5px; padding: 2px 6px; color: var(--c-text-3); pointer-events: none;
}

.tb-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tb-icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: var(--r-md);
  border: 1px solid transparent; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--c-text-2);
  transition: all var(--t-fast); font-size: 18px;
}
.tb-icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.tb-icon-btn .count {
  position: absolute; top: 2px; right: 2px;
  background: var(--c-danger); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: var(--r-pill); padding: 1px 5px; min-width: 16px; text-align: center;
  border: 2px solid var(--c-surface); line-height: 1.1;
}

.tb-user {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px;
  border-radius: var(--r-md); cursor: pointer; transition: background var(--t-fast);
}
.tb-user:hover { background: var(--c-surface-2); }
.tb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px;
}
.tb-user .info { line-height: 1.2; }
.tb-user .name { font-weight: 600; font-size: 13px; color: var(--c-text); }
.tb-user .role { font-size: 11px; color: var(--c-text-3); text-transform: uppercase; }

/* ============= Content ============= */
.app-content { padding: 24px 28px 80px; max-width: 100%; }
.page-header {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 0 0 20px;
}
.page-header h1 {
  font-size: 22px; font-weight: 700; margin: 0;
  letter-spacing: -.01em; color: var(--c-text);
}
.page-header .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ============= Botões ============= */
.btn {
  font-weight: 500; border-radius: var(--r-md);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-2); border-color: var(--c-primary-2); }
.btn-outline-primary { color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline-primary:hover { background: var(--c-primary); border-color: var(--c-primary); }

/* ============= Cards ============= */
.card-soft {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: box-shadow var(--t-base);
}
.card-soft:hover { box-shadow: var(--sh-sm); }
.card-soft .card-body { padding: 20px; }
.card-soft h6 { font-weight: 600; color: var(--c-text); letter-spacing: -.005em; }

/* ============= KPIs ============= */
.kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
  transition: all var(--t-base);
}
.kpi:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); border-color: var(--c-border-2); }
.kpi .label {
  font-size: 11px; color: var(--c-text-3); text-transform: uppercase;
  letter-spacing: .04em; font-weight: 600;
}
.kpi .value {
  font-size: 22px; font-weight: 700; color: var(--c-text);
  letter-spacing: -.02em; line-height: 1.2;
}
.kpi .delta { font-size: 11.5px; font-weight: 500; }
.kpi .delta.up   { color: var(--c-success); }
.kpi .delta.down { color: var(--c-danger); }

/* ============= Badges ============= */
.badge { font-weight: 500; padding: 3px 8px; border-radius: var(--r-pill); font-size: 11.5px; }
.badge.text-bg-primary    { background:#e0e7ff!important; color:#3730a3!important; }
.badge.text-bg-success    { background:#d1fae5!important; color:#065f46!important; }
.badge.text-bg-warning    { background:#fef3c7!important; color:#92400e!important; }
.badge.text-bg-danger     { background:#fee2e2!important; color:#991b1b!important; }
.badge.text-bg-info       { background:#dbeafe!important; color:#1e40af!important; }
.badge.text-bg-secondary  { background:#e5e7eb!important; color:#374151!important; }
.badge.text-bg-dark       { background:#0f172a!important; color:#fff!important; }

/* ============= Tables ============= */
table.table {
  background: var(--c-surface);
  border-radius: var(--r-lg); overflow: hidden;
  margin-bottom: 0; font-size: 13.5px;
}
.table thead th {
  background: var(--c-surface-2);
  font-weight: 600; font-size: 11.5px; color: var(--c-text-3);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 10px 14px; border-bottom: 1px solid var(--c-border); border-top: 0;
}
.table tbody td {
  vertical-align: middle; padding: 12px 14px;
  border-color: var(--c-border); color: var(--c-text);
}
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--c-surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ============= Forms ============= */
.form-label {
  font-weight: 500; font-size: 12.5px; color: var(--c-text-2);
  letter-spacing: .01em; margin-bottom: 6px;
}
.form-control, .form-select {
  font-size: 14px; border-radius: var(--r-md);
  border-color: var(--c-border); padding: 8px 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-control:focus, .form-select:focus {
  border-color: var(--c-primary); box-shadow: var(--sh-focus);
}
.form-control:disabled { background: var(--c-surface-2); }
.form-text { font-size: 12px; color: var(--c-text-3); }

/* ============= Score pills ============= */
.score-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.4; border: 1px solid;
}
.score-pill.quente   { background: #ecfdf5; border-color:#bbf7d0; color: #15803d; }
.score-pill.morna    { background: #fffbeb; border-color:#fde68a; color: #b45309; }
.score-pill.fria     { background: #f0f9ff; border-color:#bae6fd; color: #0369a1; }
.score-pill.em_risco { background: #fef2f2; border-color:#fecaca; color: #b91c1c; }
.score-pill.critica  { background: #1c1917; border-color:#3f3f46; color: #fca5a5; }

/* ============= Kanban ============= */
.kanban-board {
  display: flex; gap: 14px; overflow-x: auto;
  padding-bottom: 12px; scroll-snap-type: x mandatory;
}
.kanban-col {
  background: var(--c-surface-2); border-radius: var(--r-lg);
  min-width: 300px; max-width: 300px;
  padding: 12px; display: flex; flex-direction: column;
  scroll-snap-align: start; border: 1px solid var(--c-border);
}
.kanban-col.over { background: var(--c-primary-50); border-color: var(--c-primary); }
.kanban-col h6 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--c-text-2); display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; font-weight: 600;
}
.kanban-col h6 .stage-dot { width: 8px; height: 8px; border-radius: 50%; }
.kanban-col h6 .count {
  margin-left: auto; background: var(--c-surface); border: 1px solid var(--c-border);
  padding: 2px 8px; font-size: 11px; border-radius: var(--r-pill);
  color: var(--c-text-3); font-weight: 600;
}
.kanban-card {
  background: var(--c-surface); border-radius: var(--r-md);
  padding: 12px 12px 10px 16px; border: 1px solid var(--c-border);
  margin-bottom: 8px; cursor: grab;
  box-shadow: var(--sh-xs);
  transition: all var(--t-fast);
  position: relative; overflow: hidden;
}
.kanban-card:hover {
  box-shadow: var(--sh-md); transform: translateY(-2px);
  border-color: var(--c-border-2);
}
.kanban-card.dragging { opacity: .4; cursor: grabbing; }
.kanban-card .title { font-weight: 600; font-size: 13.5px; line-height: 1.35; color: var(--c-text); }
.kanban-card .client { color: var(--c-text-3); font-size: 12px; margin-top: 2px; }
.kanban-card .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.kanban-card .value { font-weight: 700; color: var(--c-success); font-size: 13px; }
.kanban-card .footer {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--c-border);
  font-size: 11px; color: var(--c-text-3);
}
.kanban-card .footer .avatar {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 700;
}
.kanban-card .stripe {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.kanban-card.sla-ok      .stripe { background: var(--c-success); }
.kanban-card.sla-risco   .stripe { background: var(--c-warning); }
.kanban-card.sla-vencido .stripe { background: var(--c-danger); }
.kanban-card.sla-pausado .stripe { background: var(--c-muted); }

/* ============= Timeline ============= */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: var(--c-border);
}
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-item::before {
  content: ""; position: absolute; left: -22px; top: 5px;
  width: 12px; height: 12px; background: var(--c-surface);
  border: 2px solid var(--c-primary); border-radius: 50%;
  box-shadow: 0 0 0 3px var(--c-surface);
}
.timeline-item .ti-time {
  font-size: 11px; color: var(--c-text-3);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.timeline-item .ti-text { font-size: 13.5px; color: var(--c-text); margin-top: 2px; }

/* ============= Auth ============= */
.auth-shell {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(99,102,241,.20) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(124,58,237,.16) 0%, transparent 40%),
    linear-gradient(135deg, #0a0e18 0%, #131826 60%, #1a2032 100%);
}
.auth-card {
  width: 420px; max-width: 92vw;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.auth-card h1 { font-size: 22px; font-weight: 700; }
.auth-card .brand-dot { width: 10px; height: 10px; background: var(--c-primary); border-radius: 50%; }

/* ============= Skeleton ============= */
@keyframes shimmer { 0%{background-position:-400px 0} 100%{background-position:400px 0} }
.skeleton {
  background: linear-gradient(90deg, var(--c-surface-2) 0%, var(--c-border) 50%, var(--c-surface-2) 100%);
  background-size: 800px 100%; animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-md); display: inline-block; min-height: 14px;
}

/* ============= Toast ============= */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast-msg {
  background: var(--c-surface); color: var(--c-text);
  border: 1px solid var(--c-border); border-left: 4px solid var(--c-primary);
  border-radius: var(--r-md); padding: 12px 16px;
  box-shadow: var(--sh-lg); font-size: 13.5px; min-width: 280px; max-width: 400px;
  animation: toast-in .25s ease-out;
  pointer-events: auto;
}
.toast-msg.success { border-left-color: var(--c-success); }
.toast-msg.warning { border-left-color: var(--c-warning); }
.toast-msg.danger  { border-left-color: var(--c-danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px) } }
.toast-msg.exit { animation: toast-out .2s forwards; }

/* ============= Command Palette ============= */
.cmd-palette-bg {
  position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 9000;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 12vh; backdrop-filter: blur(4px);
}
.cmd-palette-bg.open { display: flex; }
.cmd-palette {
  background: var(--c-surface); width: 580px; max-width: 92vw;
  border-radius: var(--r-xl); box-shadow: 0 30px 80px rgba(0,0,0,.45);
  overflow: hidden; animation: toast-in .15s;
}
.cmd-palette input {
  width: 100%; border: 0; outline: 0;
  padding: 18px 20px; font-size: 16px; color: var(--c-text);
  border-bottom: 1px solid var(--c-border); background: transparent;
}
.cmd-list { max-height: 360px; overflow: auto; padding: 8px 0; }
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer; transition: background var(--t-fast);
  font-size: 14px; color: var(--c-text);
}
.cmd-item:hover, .cmd-item.active { background: var(--c-primary-50); color: var(--c-primary); }
.cmd-item .ico { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; }
.cmd-item.active .ico { opacity: 1; }
.cmd-item .grp {
  margin-left: auto; font-size: 11px; color: var(--c-text-3);
  background: var(--c-surface-2); padding: 2px 8px; border-radius: var(--r-pill);
}

/* ============= Mobile ============= */
@media (max-width: 992px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 1050;
    transform: translateX(-100%); transition: transform var(--t-base);
    box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  .sidebar.open { transform: translateX(0); }
  body.menu-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 1040; cursor: pointer;
  }
  .topbar { padding: 10px 14px; gap: 8px; }
  .menu-toggle { display: grid; place-items: center; }
  .tb-search { max-width: 100%; }
  .tb-user .info, .tb-kbd { display: none; }
  .app-content { padding: 16px 14px 96px; }
  .page-header h1 { font-size: 18px; }
  .row.g-2 > [class*="col-"], .row.g-3 > [class*="col-"] { margin-bottom: 8px; }
  .table thead th { position: static; }
  .kanban-col { min-width: 270px; max-width: 270px; }

  .mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    display: flex; background: var(--c-surface); border-top: 1px solid var(--c-border);
    box-shadow: 0 -4px 12px rgba(0,0,0,.05);
    padding: 6px 8px env(safe-area-inset-bottom, 6px);
  }
  .mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 6px; font-size: 10px; color: var(--c-text-3); text-decoration: none;
    transition: color var(--t-fast); gap: 2px;
  }
  .mobile-bottom-nav a.active { color: var(--c-primary); font-weight: 600; }
  .mobile-bottom-nav a .ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }
}
@media (min-width: 993px) {
  .mobile-bottom-nav { display: none; }
}

.text-muted { color: var(--c-text-3) !important; }
.text-soft  { color: var(--c-text-2); }

/* IA Resumo card */
.ai-summary {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: var(--r-lg); padding: 16px 18px;
  position: relative;
}
.ai-summary .ai-badge {
  position: absolute; top: -10px; left: 16px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--r-pill);
  text-transform: uppercase; letter-spacing: .06em;
}
.ai-summary h6 { color: var(--c-primary); font-weight: 700; margin-top: 4px; }
.ai-summary p { color: var(--c-text-2); font-size: 13.5px; line-height: 1.5; margin-bottom: 0; }
