/* VisionOps CRM — dark premium */
:root {
  --bg: #05070d;
  --bg-2: #070b14;
  --panel: #0b0f1a;
  --panel-2: #111827;
  --panel-3: #151d2e;
  --border: #1c2436;
  --border-2: #243049;
  --text: #e6edf7;
  --muted: #7a8aa3;
  --muted-2: #5a6a82;
  --accent: #3b82ff;
  --accent-2: #60a5fa;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --violet: #a78bfa;
  --glow: 0 0 24px rgba(59,130,255,.35);
  --glow-cyan: 0 0 24px rgba(34,211,238,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, rgba(59,130,255,.08), transparent 60%),
              radial-gradient(800px 600px at -10% 100%, rgba(34,211,238,.06), transparent 60%),
              var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  overflow: hidden;
}

code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2f3d5c; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(180deg, rgba(11,15,26,.95), rgba(7,11,20,.95));
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px; }
.brand-mark { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(59,130,255,.5)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-weight: 800; letter-spacing: .2px; font-size: 16px; }
.brand-sub { font-size: 10.5px; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav-item {
  background: transparent; border: 0; color: var(--muted);
  text-align: left; padding: 10px 12px; border-radius: 8px;
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; transition: all .15s;
}
.nav-item span { color: var(--muted-2); width: 16px; display: inline-block; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,255,.18), rgba(34,211,238,.06));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(59,130,255,.3);
}
.nav-item.active span { color: var(--cyan); }

.sidebar-actions { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.sidebar-foot { font-size: 11px; color: var(--muted-2); padding: 8px 4px; border-top: 1px solid var(--border); }
.sidebar-foot code { color: var(--cyan); background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 10.5px; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(11,15,26,.6);
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}
.search-wrap {
  position: relative; flex: 1; min-width: 260px;
  display: flex; align-items: center;
}
.search-ic { position: absolute; left: 12px; color: var(--muted); font-size: 16px; }
.search {
  width: 100%; padding: 10px 38px 10px 36px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,255,.15); }
.search-wrap kbd {
  position: absolute; right: 10px; font-size: 11px;
  padding: 2px 6px; border-radius: 4px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
}

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters select {
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 7px 10px;
  font-size: 12.5px; cursor: pointer;
}
.filters select:focus { outline: 0; border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  border: 0; cursor: pointer; padding: 9px 14px; border-radius: 9px;
  font-weight: 600; font-size: 13px; font-family: inherit;
  transition: all .15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, #3b82ff, #2563eb);
  color: white; box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 32px rgba(59,130,255,.5); }
.btn-ghost {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--panel-3); border-color: var(--border-2); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-danger { background: rgba(248,113,113,.12); color: var(--red); border: 1px solid rgba(248,113,113,.3); }
.btn-danger:hover { background: rgba(248,113,113,.2); }

/* ---------- Views ---------- */
.view { flex: 1; overflow: auto; padding: 24px 28px; }
.view.hidden { display: none; }
.hidden { display: none !important; }

.view-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.2px; }
.view-sub { color: var(--muted); margin: 0 0 22px; font-size: 13px; }

/* ---------- Dashboard ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.metric-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  animation: rise .5s ease both;
  animation-delay: var(--d, 0s);
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: 0 8px 30px rgba(0,0,0,.4), var(--glow);
}
.metric-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 100% 0%, rgba(59,130,255,.12), transparent 50%);
  pointer-events: none;
}
.metric-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.metric-value { font-size: 30px; font-weight: 800; margin-top: 8px; letter-spacing: -.5px; }
.metric-value.accent { background: linear-gradient(135deg, var(--cyan), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Kanban ---------- */
.kanban {
  display: flex; gap: 14px;
  padding-bottom: 12px;
  overflow-x: auto;
  height: 100%;
}
.kcol {
  flex: 0 0 280px;
  display: flex; flex-direction: column;
  background: rgba(11,15,26,.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 100%;
}
.kcol-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--panel); border-radius: 12px 12px 0 0;
}
.kcol-name { font-weight: 600; font-size: 12.5px; letter-spacing: .2px; }
.kcol-count {
  background: var(--panel-3); color: var(--muted);
  padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.kcol-body { padding: 10px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kcol-body.drag-over { background: rgba(59,130,255,.06); box-shadow: inset 0 0 0 1px rgba(59,130,255,.3); border-radius: 0 0 12px 12px; }

.kcard {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: grab;
  transition: all .15s;
  position: relative;
}
.kcard:hover { border-color: rgba(59,130,255,.4); box-shadow: 0 4px 16px rgba(0,0,0,.4), var(--glow); transform: translateY(-1px); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; transform: scale(.98); }

.kcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kcard-name { font-weight: 600; font-size: 13px; }
.kcard-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kcard-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.kcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.score { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--cyan); font-weight: 600; }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.prio-dot.muito-alta { background: var(--red); box-shadow: 0 0 8px var(--red); }
.prio-dot.alta { background: var(--amber); }
.prio-dot.média { background: var(--accent-2); }
.prio-dot.baixa { background: var(--muted); }

/* ---------- Badges & Tags ---------- */
.tier-badge {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
}
.tier-1 { background: linear-gradient(135deg, rgba(34,211,238,.2), rgba(59,130,255,.2)); color: var(--cyan); border: 1px solid rgba(34,211,238,.4); box-shadow: 0 0 12px rgba(34,211,238,.2); }
.tier-2 { background: rgba(59,130,255,.15); color: var(--accent-2); border: 1px solid rgba(59,130,255,.3); }
.tier-3 { background: rgba(167,139,250,.12); color: var(--violet); border: 1px solid rgba(167,139,250,.25); }
.tier-4 { background: var(--panel-3); color: var(--muted); border: 1px solid var(--border-2); }

.tag {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  font-size: 10.5px; font-weight: 500;
  background: rgba(59,130,255,.08); color: var(--accent-2);
  border: 1px solid rgba(59,130,255,.15);
}

/* ---------- Companies table ---------- */
.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table.companies { width: 100%; border-collapse: collapse; font-size: 13px; }
table.companies th {
  text-align: left; padding: 12px 14px; font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  background: var(--panel-2); border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
}
table.companies td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
table.companies tbody tr { cursor: pointer; transition: background .15s; }
table.companies tbody tr:hover { background: var(--panel-2); }
table.companies tbody tr:last-child td { border-bottom: 0; }

/* ---------- Follow-ups ---------- */
.followups-list { display: flex; flex-direction: column; gap: 10px; }
.followup-item {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
}
.followup-item.late { border-left: 3px solid var(--red); }
.followup-item.today { border-left: 3px solid var(--amber); }
.followup-item.future { border-left: 3px solid var(--accent); }
.followup-item.done { opacity: .5; }
.followup-date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); min-width: 110px; }
.followup-text { flex: 1; }
.followup-company { font-size: 11.5px; color: var(--accent-2); }

/* ---------- Roles panel ---------- */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-width: 900px; }
.role-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; cursor: pointer; transition: all .15s;
  display: flex; align-items: center; gap: 10px;
}
.role-card:hover { border-color: rgba(59,130,255,.4); box-shadow: var(--glow); transform: translateY(-1px); }
.role-icon { width: 28px; height: 28px; border-radius: 6px; background: rgba(34,211,238,.1); color: var(--cyan); display: grid; place-items: center; font-weight: 700; }

/* ---------- Checklist ---------- */
.weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; max-width: 1000px; }
.week-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.week-name { font-size: 11.5px; color: var(--cyan); font-weight: 700; letter-spacing: .8px; text-transform: uppercase; }
.week-task { margin-top: 8px; font-size: 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-2);
  display: inline-grid; place-items: center; flex-shrink: 0; transition: all .15s;
}
.checkbox.checked { background: var(--accent); border-color: var(--accent); box-shadow: var(--glow); }
.checkbox.checked::after { content: "✓"; color: white; font-size: 12px; font-weight: 700; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,4,10,.7); backdrop-filter: blur(6px); animation: fade .2s; }
.modal-card {
  position: relative; z-index: 1;
  width: min(900px, 94vw); max-height: 92vh; overflow: hidden;
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-2);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 60px rgba(59,130,255,.15);
  display: flex; flex-direction: column;
  animation: pop .25s cubic-bezier(.2,.9,.3,1.2);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted); width: 32px; height: 32px; border-radius: 8px;
  cursor: pointer; font-size: 14px;
}
.modal-close:hover { color: var(--text); border-color: var(--border-2); }
#modal-body { overflow-y: auto; padding: 0; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.m-head { padding: 22px 26px 16px; border-bottom: 1px solid var(--border); }
.m-title { font-size: 20px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 10px; }
.m-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

.m-tabs { display: flex; gap: 2px; padding: 0 22px; border-bottom: 1px solid var(--border); background: var(--panel); }
.m-tab {
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  padding: 12px 14px; font-size: 13px; font-weight: 500; font-family: inherit;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.m-tab:hover { color: var(--text); }
.m-tab.active { color: var(--text); border-bottom-color: var(--accent); }

.m-body { padding: 22px 26px; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.field input, .field select, .field textarea {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 11px; font-size: 13px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,255,.12);
}
.field textarea { min-height: 100px; resize: vertical; }

.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pick {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
  padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all .15s;
}
.tag-pick.on { background: rgba(59,130,255,.15); color: var(--accent-2); border-color: rgba(59,130,255,.4); }

.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Outbound */
.ob-channel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.ob-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ob-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.ob-actions { display: flex; gap: 6px; }

/* Contacts */
.contacts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.contact-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px;
}
.contact-name { font-weight: 600; }
.contact-role { color: var(--cyan); font-size: 12px; }
.contact-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* History */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { display: flex; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.history-date { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11.5px; min-width: 100px; }

.decisor-check { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 14px; }
.decisor-check label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 6px; border-radius: 6px; }
.decisor-check label:hover { background: var(--panel-2); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--border-2);
  padding: 12px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5), var(--glow);
  z-index: 200; animation: toast-in .25s;
}
.toast.hidden { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.empty {
  text-align: center; padding: 60px 20px; color: var(--muted);
  border: 1px dashed var(--border-2); border-radius: 14px;
}
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* ---------- Mobile menu button + backdrop ---------- */
.mobile-menu-btn {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 90;
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--border-2);
  cursor: pointer; padding: 0;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.mobile-menu-btn span {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
body.nav-open .mobile-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .mobile-menu-btn span:nth-child(2) { opacity: 0; }
body.nav-open .mobile-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-backdrop {
  display: none; position: fixed; inset: 0; z-index: 80;
  background: rgba(2,4,10,.6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
body.nav-open .mobile-backdrop { opacity: 1; pointer-events: auto; }

/* ---------- Tablet (≤ 980px) ---------- */
@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .main { height: 100vh; }
  .mobile-menu-btn { display: flex; }
  .mobile-backdrop { display: block; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; z-index: 85;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,.0,.2,1);
    box-shadow: 12px 0 40px rgba(0,0,0,.5);
    padding-top: 68px;
  }
  body.nav-open .sidebar { transform: translateX(0); }

  .topbar { padding: 12px 14px 12px 70px; gap: 8px; }
  .topbar .btn-primary { padding: 10px 12px; font-size: 12.5px; }
  .search-wrap { order: 3; flex: 1 1 100%; min-width: 0; }
  .search-wrap kbd { display: none; }
  .filters { order: 4; flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .filters select, .filters button { flex-shrink: 0; }

  .view { padding: 18px 14px; }
  .view-title { font-size: 19px; }

  .metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-value { font-size: 24px; }

  .kanban { gap: 10px; }
  .kcol { flex: 0 0 250px; }
}

/* ---------- Mobile (≤ 640px) ---------- */
@media (max-width: 640px) {
  .topbar { padding: 12px 12px 10px 66px; }
  .view { padding: 16px 12px 90px; }
  .metrics { grid-template-columns: 1fr 1fr; }

  /* Empresas vira lista de cards */
  .table-wrap { background: transparent; border: 0; border-radius: 0; }
  table.companies thead { display: none; }
  table.companies, table.companies tbody, table.companies tr, table.companies td { display: block; width: 100%; }
  table.companies tr {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 10px; padding: 14px; cursor: pointer;
  }
  table.companies td { padding: 4px 0; border: 0; font-size: 13px; }
  table.companies td:first-child { font-size: 15px; margin-bottom: 6px; }
  table.companies td:not(:first-child)::before {
    content: attr(data-label) ": ";
    color: var(--muted); font-size: 11px; text-transform: uppercase;
    letter-spacing: .5px; font-weight: 600; margin-right: 6px;
  }

  /* Modal vira fullscreen */
  .modal-card {
    width: 100vw; max-height: 100vh; height: 100vh;
    border-radius: 0; border: 0;
  }
  .modal-close { top: 10px; right: 10px; }
  .m-head { padding: 18px 18px 14px; padding-right: 56px; }
  .m-title { font-size: 17px; }
  .m-tabs { padding: 0 10px; overflow-x: auto; flex-wrap: nowrap; }
  .m-tab { flex-shrink: 0; padding: 12px 10px; font-size: 12.5px; }
  .m-body { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Bottom nav (sidebar comum continua via hamburger; aqui apenas ajustes finos) */
  .roles-grid { grid-template-columns: 1fr; }
  .weeks { grid-template-columns: 1fr; }

  /* Touch targets maiores */
  .btn { padding: 11px 14px; font-size: 13.5px; }
  .btn-sm { padding: 8px 12px; }
  .nav-item { padding: 12px 14px; font-size: 14px; }
  .field input, .field select, .field textarea { padding: 11px 12px; font-size: 14px; }
  .search { padding: 12px 14px 12px 38px; font-size: 14px; }

  /* Kanban — colunas mais estreitas e cards maiores */
  .kcol { flex: 0 0 84vw; max-width: 320px; }
  .kanban { padding-bottom: 20px; }

  /* Toast acima de qualquer bottom nav */
  .toast { bottom: 76px; left: 12px; right: 12px; transform: none; text-align: center; }
  @keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

  /* Follow-ups */
  .followup-item { flex-wrap: wrap; gap: 8px; }
  .followup-date { min-width: auto; font-size: 11.5px; }
  .followup-item .btn { margin-left: auto; }
}

/* ---------- Bottom nav (very small screens) ---------- */
@media (max-width: 640px) {
  .bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    display: flex; justify-content: space-around;
    background: rgba(11,15,26,.95); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav button {
    background: transparent; border: 0; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 8px; font-size: 10px; font-weight: 600;
    cursor: pointer; flex: 1; border-radius: 8px;
    font-family: inherit;
  }
  .bottom-nav button span { font-size: 16px; line-height: 1; }
  .bottom-nav button.active { color: var(--cyan); }
  .bottom-nav button.active span { filter: drop-shadow(0 0 6px var(--cyan)); }
}
@media (min-width: 641px) { .bottom-nav { display: none; } }
