/* =========================================================
   Gelomar MS — tema "gelo" com glassmorphism
   ========================================================= */
:root {
  --bg: #050b18;
  --bg-2: #0a1428;
  --txt: #e8f2ff;
  --txt-2: #b4c6e0;
  --muted: #7b90b0;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .08);
  --glass-3: rgba(255, 255, 255, .12);
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --blue: #3b82f6;
  --indigo: #6366f1;
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --pink: #f472b6;
  --grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 55%, #6366f1 100%);
  --grad-soft: linear-gradient(135deg, rgba(34, 211, 238, .18), rgba(99, 102, 241, .18));
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  --blur: blur(22px) saturate(150%);
  --sidebar: 264px;
  font-synthesis: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(34, 211, 238, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .2); }

/* ---------- fundo animado ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 800px at 80% -10%, #0e2a4d 0%, transparent 60%), radial-gradient(900px 700px at -10% 110%, #1a1450 0%, transparent 60%), var(--bg); }
.bg-blobs span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: float 22s ease-in-out infinite; }
.bg-blobs span:nth-child(1) { width: 520px; height: 520px; background: #0891b2; top: -120px; left: 18%; }
.bg-blobs span:nth-child(2) { width: 460px; height: 460px; background: #4f46e5; bottom: -160px; right: 6%; animation-delay: -8s; }
.bg-blobs span:nth-child(3) { width: 340px; height: 340px; background: #0ea5e9; top: 40%; left: -80px; opacity: .35; animation-delay: -14s; }
.bg-blobs::after { content: ''; position: absolute; inset: 0; opacity: .05;
  background-image: radial-gradient(rgba(255, 255, 255, .8) 1px, transparent 1px); background-size: 28px 28px; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(60px, 40px) scale(1.08); } 66% { transform: translate(-40px, 30px) scale(.95); } }

/* ---------- vidro ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--shadow); }
.glass-2 { background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.card { background: var(--glass); border: 1px solid var(--line); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), transparent 40%); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; position: relative; }
.card-h h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card-h h3 svg { width: 18px; height: 18px; color: var(--cyan); }
.card-h p { color: var(--muted); font-size: 12.5px; }
.card.hover { transition: transform .25s, border-color .25s, background .25s; }
.card.hover:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--glass-2); }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; top: 14px; bottom: 14px; left: 14px; width: var(--sidebar); border-radius: 24px; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 10px; z-index: 50; transition: transform .3s; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.logo { width: 42px; height: 42px; border-radius: 14px; background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(34, 211, 238, .6), inset 0 1px 0 rgba(255, 255, 255, .4); flex: none; }
.logo svg { width: 24px; height: 24px; color: #fff; }
.brand b { font-size: 18px; letter-spacing: -.02em; display: block; }
.brand small { color: var(--muted); font-size: 12px; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 12px 12px 4px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--txt-2); font-weight: 600; font-size: 13.5px;
  transition: background .2s, color .2s; position: relative; margin: 1px 0; }
.nav a svg { width: 18px; height: 18px; opacity: .85; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: var(--txt); }
.nav a.active { background: var(--grad-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .25); }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--grad); }
.nav a.active svg { color: var(--cyan); opacity: 1; }
.nav .count { margin-left: auto; background: var(--amber); color: #1a1200; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 1px 8px; }
.nav .live { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 1.8s infinite; }
.side-card { margin-top: auto; border-radius: 18px; padding: 14px; font-size: 12.5px; }
.side-card b { display: block; margin-bottom: 4px; }
.side-card p { color: var(--muted); margin-bottom: 10px; }
.side-links { display: grid; gap: 6px; }

.main { flex: 1; margin-left: calc(var(--sidebar) + 28px); padding: 14px 18px 40px 0; min-width: 0; }
.topbar { position: sticky; top: 14px; z-index: 40; border-radius: 20px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.page-title { min-width: 0; }
.page-title h1 { font-size: 19px; letter-spacing: -.02em; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title p { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; width: 280px; }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { background: none; border: 0; outline: 0; width: 100%; font-size: 13px; }
.live-pill { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--green); background: rgba(52, 211, 153, .1);
  border: 1px solid rgba(52, 211, 153, .25); padding: 7px 12px; border-radius: 99px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s infinite; box-shadow: 0 0 0 0 currentColor; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  position: relative; transition: background .2s, transform .15s; flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 18px; height: 18px; }
.badge-dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10.5px;
  font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--bg-2); }
.badge-dot:empty { display: none; }
.user { display: flex; align-items: center; gap: 10px; padding-left: 6px; }
.user b { font-size: 13px; display: block; }
.user small { color: var(--muted); font-size: 11.5px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; flex: none;
  background: var(--grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.avatar.lg { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }
.avatar.sm { width: 30px; height: 30px; border-radius: 10px; font-size: 11px; }
.only-mobile { display: none; }

.view { animation: in .35s ease; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- grids ---------- */
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.g-5 { grid-template-columns: repeat(5, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-21 { grid-template-columns: 2fr 1fr; }
.g-12 { grid-template-columns: 1fr 2fr; }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mb { margin-bottom: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- KPI ---------- */
.kpi { padding: 18px 18px 16px; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; position: relative; }
.kpi .k-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent);
  color: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); }
.kpi .k-ic svg { width: 20px; height: 20px; }
.kpi .k-lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; position: relative; }
.kpi .k-val { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 6px; position: relative; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--muted); position: relative; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi::after { content: ''; position: absolute; width: 140px; height: 140px; right: -50px; top: -50px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); pointer-events: none; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.delta.up { color: var(--green); background: rgba(52, 211, 153, .12); }
.delta.down { color: var(--red); background: rgba(248, 113, 113, .12); }
.delta svg { width: 12px; height: 12px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 13px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); transition: background .2s, transform .15s, box-shadow .2s, opacity .2s; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -8px rgba(34, 211, 238, .7), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.1); box-shadow: 0 10px 30px -8px rgba(34, 211, 238, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-wa { background: linear-gradient(135deg, #25d366, #128c7e); border-color: transparent; color: #fff; box-shadow: 0 8px 22px -8px rgba(37, 211, 102, .7); }
.btn-wa:hover { background: linear-gradient(135deg, #25d366, #128c7e); filter: brightness(1.1); }
.btn-danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); color: #fecaca; }
.btn-success { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .35); color: #a7f3d0; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 10px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-xs { padding: 5px 8px; font-size: 11.5px; border-radius: 8px; gap: 5px; }
.btn-xs svg { width: 13px; height: 13px; }
.btn-lg { padding: 14px 20px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- chips / badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  color: var(--c, var(--txt-2)); background: color-mix(in srgb, var(--c, #94a3b8) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c, #94a3b8) 28%, transparent); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge svg { width: 12px; height: 12px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--txt-2); background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 8px; white-space: nowrap; font-weight: 600; }
.tag svg { width: 12px; height: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 8px 14px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-weight: 600; font-size: 12.5px;
  transition: all .2s; display: inline-flex; align-items: center; gap: 6px; color: var(--txt-2); }
.chip svg { width: 14px; height: 14px; }
.chip:hover { background: rgba(255, 255, 255, .09); color: var(--txt); }
.chip.on { background: var(--grad-soft); border-color: rgba(34, 211, 238, .45); color: #fff; box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
.seg { display: inline-flex; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .2s; }
.seg button.on { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px -20px; position: relative; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 20px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(255, 255, 255, .035); }
tbody tr.click { cursor: pointer; }
tr:last-child td { border-bottom: 0; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user b { display: block; font-size: 13px; white-space: nowrap; }
.cell-user small { color: var(--muted); font-size: 11.5px; }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }
.empty svg { width: 34px; height: 34px; opacity: .5; margin-bottom: 8px; }

/* ---------- formulários ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--txt-2); }
.input, .select, .textarea { width: 100%; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 13px; outline: 0;
  transition: border-color .2s, box-shadow .2s, background .2s; font-size: 13.5px; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(34, 211, 238, .6); box-shadow: 0 0 0 4px rgba(34, 211, 238, .12); background: rgba(255, 255, 255, .07); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237b90b0' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.select option { background: #0f1b33; }
.textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: rgba(255, 255, 255, .12); border-radius: 99px; transition: .25s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--grad); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(2, 6, 16, .6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 24px; animation: pop .28s cubic-bezier(.2, .9, .3, 1.2);
  background: rgba(16, 28, 52, .78); border: 1px solid var(--line-2); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%); box-shadow: 0 30px 80px -10px rgba(0, 0, 0, .7); }
.modal.lg { width: min(860px, 100%); }
.modal.xl { width: min(1080px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h2 { font-size: 17px; letter-spacing: -.01em; }
.modal-h p { color: var(--muted); font-size: 12.5px; }
.modal-b { padding: 20px 22px; overflow-y: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

/* ---------- toasts ---------- */
#toasts { position: fixed; top: 20px; right: 20px; z-index: 300; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: rgba(16, 28, 52, .85); border: 1px solid var(--line-2);
  backdrop-filter: blur(24px); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); animation: tin .4s cubic-bezier(.2, .9, .3, 1.2); }
.toast.out { animation: tout .3s forwards; }
@keyframes tin { from { opacity: 0; transform: translateX(40px); } }
@keyframes tout { to { opacity: 0; transform: translateX(40px); } }
.toast .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.toast .t-ic svg { width: 18px; height: 18px; }
.toast b { display: block; font-size: 13.5px; }
.toast p { color: var(--txt-2); font-size: 12.5px; }

/* ---------- notificações ---------- */
.bell-panel { position: fixed; top: 86px; right: 24px; width: 360px; max-height: 70vh; overflow-y: auto; border-radius: 20px; z-index: 120; padding: 8px;
  background: rgba(16, 28, 52, .85); animation: pop .25s; }
.bell-panel.hidden { display: none; }
.bell-item { display: flex; gap: 12px; padding: 12px; border-radius: 14px; }
.bell-item:hover { background: rgba(255, 255, 255, .05); }
.bell-item.unread { background: rgba(34, 211, 238, .06); }
.bell-item .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.bell-item .t-ic svg { width: 16px; height: 16px; }
.bell-item b { font-size: 13px; display: block; }
.bell-item p { font-size: 12px; color: var(--txt-2); }
.bell-item small { font-size: 11px; color: var(--muted); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(225px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kcol { border-radius: 20px; padding: 12px; min-height: 420px; transition: background .2s, box-shadow .2s; }
.kcol.over { background: rgba(34, 211, 238, .08); box-shadow: inset 0 0 0 2px rgba(34, 211, 238, .4); }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-weight: 800; font-size: 13px; }
.kcol-h i.bar { width: 10px; height: 10px; border-radius: 4px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.kcol-h .n { margin-left: auto; font-size: 11.5px; background: rgba(255, 255, 255, .08); padding: 2px 9px; border-radius: 99px; color: var(--txt-2); }
.kcard { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; cursor: grab;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; position: relative; }
.kcard:hover { transform: translateY(-2px); border-color: var(--line-2); background: rgba(255, 255, 255, .09); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
.kcard.dragging { opacity: .4; }
.kcard.fresh { animation: glow 2s ease 3; }
@keyframes glow { 50% { box-shadow: 0 0 0 3px rgba(251, 191, 36, .5), 0 0 30px rgba(251, 191, 36, .3); } }
.kcard .kc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kcard .kc-id { font-weight: 800; font-size: 13px; }
.kcard .kc-time { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.kcard .kc-cli { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.kcard .kc-items { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.kcard .kc-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kcard .kc-total { margin-left: auto; font-weight: 800; font-size: 14px; }
.kcard .kc-act { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ---------- mapa / pinos ---------- */
.map { width: 100%; height: 100%; border-radius: 18px; overflow: hidden; background: #0b1220; }
.leaflet-container { background: #0b1220 !important; font-family: inherit !important; }
.leaflet-control-attribution { background: rgba(5, 11, 24, .6) !important; color: #6b7c99 !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: #8aa0bf !important; }
.leaflet-control-zoom a { background: rgba(16, 28, 52, .85) !important; color: #fff !important; border-color: var(--line) !important; backdrop-filter: blur(10px); }
.leaflet-bar { border: 1px solid var(--line) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-popup-content-wrapper { background: rgba(16, 28, 52, .9) !important; color: var(--txt) !important; border-radius: 14px !important; border: 1px solid var(--line-2); backdrop-filter: blur(20px); }
.leaflet-popup-tip { background: rgba(16, 28, 52, .9) !important; }
.leaflet-popup-content { margin: 12px 14px !important; font-size: 12.5px; line-height: 1.5; }
.leaflet-popup-content b { font-size: 13px; }
.drv-pin { width: 44px; height: 44px; position: relative; }
.drv-pin .ring { position: absolute; inset: -8px; border-radius: 50%; background: var(--c); opacity: .25; animation: ring 2s infinite; }
@keyframes ring { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.5); opacity: 0; } }
.drv-pin .core { position: absolute; inset: 0; border-radius: 50%; background: var(--c); border: 3px solid #fff; display: grid; place-items: center; font-weight: 800;
  color: #06101f; font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5), 0 0 24px var(--c); }
.drv-pin .tag-n { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); background: rgba(5, 11, 24, .85); border: 1px solid var(--line-2); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.drv-pin.idle .ring { display: none; }
.drv-pin.idle .core { opacity: .85; }
.fab-pin { width: 48px; height: 48px; border-radius: 16px; background: var(--grad); border: 3px solid #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5), 0 0 30px rgba(34, 211, 238, .6); }
.fab-pin svg { width: 24px; height: 24px; color: #fff; }
.stop-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: rgba(10, 18, 34, .9); border: 2.5px solid var(--c);
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.stop-pin span { transform: rotate(45deg); font-weight: 800; font-size: 12px; color: #fff; }
.stop-pin.done { background: var(--c); }
.stop-pin.done span { color: #06101f; }
.cli-pin { width: 14px; height: 14px; border-radius: 50%; background: var(--c, #fbbf24); border: 2px solid #fff; box-shadow: 0 0 12px var(--c, #fbbf24); }

/* ---------- rastreamento ---------- */
.track { display: grid; grid-template-columns: 1fr 380px; gap: 18px; height: calc(100vh - 120px); min-height: 560px; }
.track .map-card { padding: 0; position: relative; }
.track .map-card .map { border-radius: var(--radius); }
.map-overlay { position: absolute; z-index: 500; top: 14px; left: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.map-overlay .pill { padding: 8px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 8px;
  background: rgba(10, 18, 34, .75); border: 1px solid var(--line-2); backdrop-filter: blur(16px); }
.map-overlay .pill svg { width: 15px; height: 15px; color: var(--cyan); }
.track-side { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding-right: 4px; }
.track-side > * { flex: none; }
.drv-card { padding: 16px; cursor: pointer; }
.drv-card.sel { border-color: rgba(34, 211, 238, .5); box-shadow: var(--shadow), 0 0 0 3px rgba(34, 211, 238, .12); }
.drv-head { display: flex; align-items: center; gap: 12px; position: relative; }
.drv-head .avatar { background: var(--c); color: #06101f; }
.drv-head b { display: block; font-size: 14px; }
.drv-head small { color: var(--muted); font-size: 12px; }
.prog { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; margin: 12px 0 8px; position: relative; }
.prog > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 50%, #fff)); transition: width 1s linear; box-shadow: 0 0 12px var(--c); }
.drv-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; }
.drv-meta div { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; }
.drv-meta small { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.drv-meta b { font-size: 13px; font-variant-numeric: tabular-nums; }
.next-stop { margin-top: 10px; font-size: 12.5px; color: var(--txt-2); display: flex; gap: 8px; align-items: center; position: relative; }
.next-stop svg { width: 15px; height: 15px; color: var(--c); flex: none; }

/* ---------- feed / timeline ---------- */
.feed { display: grid; gap: 4px; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
.feed-item:hover { background: rgba(255, 255, 255, .04); }
.feed-item .t-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); flex: none; }
.feed-item .t-ic svg { width: 16px; height: 16px; }
.feed-item b { font-size: 13px; }
.feed-item p { color: var(--muted); font-size: 12px; }
.tl { position: relative; padding-left: 26px; display: grid; gap: 14px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); border-radius: 2px; }
.tl-i { position: relative; }
.tl-i::before { content: ''; position: absolute; left: -23px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent); }
.tl-i b { font-size: 13px; }
.tl-i small { color: var(--muted); margin-left: 6px; }

/* ---------- rotas ---------- */
.stops { display: grid; gap: 8px; }
.stop { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.stop .n { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 12.5px; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); flex: none; }
.stop.done .n { background: var(--c); color: #06101f; }
.stop .info { flex: 1; min-width: 0; }
.stop .info b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop .info small { color: var(--muted); font-size: 11.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop .acts { display: flex; gap: 4px; flex: none; }

/* ---------- produtos ---------- */
.prod-card { display: flex; flex-direction: column; gap: 12px; }
.prod-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 40%, transparent), color-mix(in srgb, var(--c) 10%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 30px -10px var(--c); }
.prod-ic svg { width: 26px; height: 26px; color: #fff; }
.price { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }

/* ---------- venda rápida ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pitem { border-radius: 16px; padding: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: all .2s; user-select: none; }
.pitem.on { border-color: rgba(34, 211, 238, .55); background: rgba(34, 211, 238, .08); box-shadow: 0 0 0 3px rgba(34, 211, 238, .08); }
.pitem b { font-size: 12.5px; display: block; line-height: 1.3; min-height: 32px; }
.pitem small { color: var(--muted); }
.qty { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 6px; }
.qty button { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 16px; font-weight: 800; }
.qty button:hover { background: rgba(255, 255, 255, .15); }
.qty span { font-weight: 800; font-size: 15px; min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.total-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 16px; background: var(--grad-soft); border: 1px solid rgba(34, 211, 238, .3); }
.total-bar b { font-size: 24px; letter-spacing: -.02em; }
.timer { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--cyan); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.timer svg { width: 13px; height: 13px; }

/* ---------- importação ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 12.5px; }
.step i { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); font-style: normal; font-size: 12px; }
.step.on { color: #fff; border-color: rgba(34, 211, 238, .4); background: var(--grad-soft); }
.step.on i { background: var(--grad); }
.step.ok i { background: var(--green); color: #06101f; }
.drop { border: 2px dashed var(--line-2); border-radius: 20px; padding: 40px 20px; text-align: center; transition: all .2s; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--cyan); background: rgba(34, 211, 238, .06); }
.drop svg { width: 44px; height: 44px; color: var(--cyan); margin-bottom: 10px; }
.tipo-card { cursor: pointer; text-align: left; }
.tipo-card.on { border-color: rgba(34, 211, 238, .55); background: rgba(34, 211, 238, .08); box-shadow: var(--shadow), 0 0 0 3px rgba(34, 211, 238, .1); }
.row-ok td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.row-dup td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.row-err td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ---------- whatsapp ---------- */
.chat { background: rgba(5, 11, 24, .5); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; max-height: 620px; overflow-y: auto;
  background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 18px 18px; }
.bubble { align-self: flex-end; max-width: 86%; background: linear-gradient(135deg, rgba(18, 140, 126, .55), rgba(7, 94, 84, .55)); border: 1px solid rgba(37, 211, 102, .25);
  border-radius: 16px 16px 4px 16px; padding: 10px 12px; font-size: 13px; line-height: 1.45; animation: in .3s; }
.bubble .to { font-size: 11px; font-weight: 800; color: #86efac; margin-bottom: 3px; display: flex; justify-content: space-between; gap: 10px; }
.bubble .meta { font-size: 10.5px; color: rgba(255, 255, 255, .6); text-align: right; margin-top: 4px; }
.bubble .meta .ck { color: #60a5fa; font-weight: 800; }
.tpl { border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.qr { background: #fff; padding: 12px; border-radius: 16px; display: inline-block; }
.qr img, .qr canvas { display: block; }

/* ---------- login ---------- */
.login { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; transition: opacity .5s, transform .5s; }
.login.hide { opacity: 0; pointer-events: none; transform: scale(1.03); }
.login-card { width: min(420px, 100%); border-radius: 28px; padding: 34px 30px; text-align: center; }
.login-card .logo { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px; }
.login-card .logo svg { width: 34px; height: 34px; }
.login-card h1 { font-size: 26px; letter-spacing: -.03em; }
.login-card p { color: var(--muted); margin: 6px 0 24px; }
.login-card .field { text-align: left; margin-bottom: 14px; }
.flakes { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.flakes i { position: absolute; top: -20px; color: rgba(186, 230, 253, .5); font-style: normal; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }

/* ---------- misc ---------- */
.hero { padding: 24px; display: flex; align-items: center; gap: 20px; }
.hero h2 { font-size: 24px; letter-spacing: -.03em; }
.hero p { color: var(--txt-2); }
.hero .hero-art { margin-left: auto; position: relative; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); position: relative; }
.list-row:last-child { border-bottom: 0; }
.rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: rgba(255, 255, 255, .06); color: var(--txt-2); flex: none; }
.rank.r1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3b2500; }
.rank.r2 { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #1e293b; }
.rank.r3 { background: linear-gradient(135deg, #fdba74, #c2410c); color: #2a1000; }
.bar-mini { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-top: 5px; }
.bar-mini i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; color: var(--txt-2); position: relative; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.info-grid > div { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.info-grid small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 2px; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.section-t { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin: 4px 0 10px; }
.pulse-new { animation: glow 2s ease 3; }
.perm { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); font-size: 12.5px; }
.perm > div { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.perm > div:nth-child(5n+1) { text-align: left; color: var(--txt-2); }
.perm .h { color: var(--muted); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.ok-ic { color: var(--green); }
.no-ic { color: rgba(255, 255, 255, .2); }

/* ---------- responsivo ---------- */
@media (max-width: 1400px) {
  .g-5 { grid-template-columns: repeat(3, 1fr); }
  .search { width: 200px; }
}
@media (max-width: 1180px) {
  .g-4, .g-5 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(2, 1fr); }
  .g-21, .g-12 { grid-template-columns: 1fr; }
  .track { grid-template-columns: 1fr; height: auto; }
  .track .map-card { height: 520px; }
  .user div { display: none; }
}
@media (max-width: 920px) {
  .sidebar { transform: translateX(calc(-100% - 30px)); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding: 10px 16px 40px; }
  .only-mobile { display: grid; }
  .topbar .search { display: none; }
  .page-title { flex: 1; }
  .topbar { top: 10px; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 45; }
}
@media (max-width: 640px) {
  .g-4, .g-5, .g-3, .g-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .live-pill { display: none; }
  .kpi .k-val { font-size: 22px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero .hero-art { display: none; }
  .modal-b, .modal-h, .modal-f { padding-left: 16px; padding-right: 16px; }
  .bell-panel { right: 16px; left: 16px; width: auto; }
  .info-grid { grid-template-columns: 1fr; }
  .perm { font-size: 11px; }

  /* app no celular */
  .g-4, .g-5 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid { gap: 12px; }
  .mb { margin-bottom: 12px; }
  .card { padding: 16px; border-radius: 18px; }
  .table-wrap { margin: 0 -16px -16px; }
  th, td { padding: 10px 14px; }
  .kpi { padding: 14px; }
  .kpi .k-top { margin-bottom: 8px; }
  .kpi .k-ic { width: 32px; height: 32px; border-radius: 10px; }
  .kpi .k-ic svg { width: 16px; height: 16px; }
  .kpi .k-lbl { font-size: 11.5px; line-height: 1.25; }
  .kpi .k-val { font-size: 18px; margin: 0 0 4px; }
  .kpi .k-sub { font-size: 11px; }
  .kpi .k-sub .delta { font-size: 10.5px; }
  .topbar { padding: 10px 12px; gap: 10px; border-radius: 18px; margin-bottom: 14px; }
  .page-title { flex: 1; }
  .page-title h1 { font-size: 17px; }
  .user { display: none; }
  .hero { padding: 18px; gap: 6px; }
  .hero h2 { font-size: 21px; }
  .hero .row .btn { flex: 1 1 auto; }
  .chart-box { height: 220px; }
  .kanban { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 10px; scroll-padding: 16px; }
  .kcol { scroll-snap-align: start; min-height: 300px; }
  .track .map-card { height: 380px; }
  .card .search { width: 100% !important; }
  .row > .input, .row > .select { width: 100% !important; }
  .modal-back { padding: 0; align-items: end; }
  .modal { width: 100% !important; max-height: 92vh; border-radius: 24px 24px 0 0; animation: sheet .3s cubic-bezier(.2, .9, .3, 1); }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
  .pgrid { grid-template-columns: 1fr 1fr; }
  #toasts { top: auto; bottom: 96px; right: 12px; left: 12px; width: auto; }
}

/* ---------- barra de navegação inferior (celular) ---------- */
.bottom-nav { display: none; }
@media (max-width: 920px) {
  .main { padding-bottom: 110px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    border-radius: 22px; padding: 6px; background: rgba(12, 22, 42, .82); }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 3px; padding: 7px 2px; border-radius: 14px; font-size: 10.5px; font-weight: 700; color: var(--muted); position: relative; transition: all .2s; }
  .bottom-nav svg { width: 21px; height: 21px; }
  .bottom-nav .on { color: #fff; background: var(--grad-soft); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .3); }
  .bottom-nav .on svg { color: var(--cyan); }
  .bottom-nav .bn-count { position: absolute; top: 2px; right: calc(50% - 20px); background: var(--amber); color: #1a1200; font-size: 10px; font-weight: 800; border-radius: 99px; padding: 0 6px; line-height: 16px; }
}
