/* ================================================================ tokens */
:root {
  --bg: #f5f6fb;
  --bg-soft: #eef0f8;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --border: #e3e6f0;
  --text: #171a2c;
  --text-2: #4a5070;
  --muted: #7c8299;
  --accent: #6d5dfc;
  --accent-2: #22c1a4;
  --accent-soft: #ecebff;
  --accent-text: #5847f0;
  --ok: #16a37f;
  --ok-soft: #dff6ee;
  --bad: #e5484d;
  --bad-soft: #fde7e8;
  --warn: #d98b06;
  --warn-soft: #fdf1d8;
  --info: #3b82f6;
  --info-soft: #e1ecfe;
  --gold: #c58a00;
  --gold-soft: #fff3cc;
  --shadow: 0 1px 2px rgba(20, 24, 50, .05), 0 6px 20px rgba(20, 24, 50, .06);
  --shadow-lg: 0 20px 60px rgba(20, 24, 50, .22);
  --radius: 14px;
  --radius-sm: 9px;
  --side-w: 248px;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1020;
  --bg-soft: #14172b;
  --surface: #171a2f;
  --surface-2: #1d2039;
  --border: #2a2e4c;
  --text: #eceefb;
  --text-2: #b8bcd8;
  --muted: #8a8fb0;
  --accent: #8577ff;
  --accent-soft: #272552;
  --accent-text: #a89fff;
  --ok: #2ccf9f;
  --ok-soft: #123a33;
  --bad: #ff6b70;
  --bad-soft: #42202a;
  --warn: #f5b13b;
  --warn-soft: #3d3020;
  --info: #66a3ff;
  --info-soft: #1d2d4d;
  --gold: #ffcc4d;
  --gold-soft: #3d3418;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ================================================================ base */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 750; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; font-weight: 650; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 10px; }
p { margin: 0 0 6px; }
a { color: var(--accent-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
kbd {
  font: 600 11px ui-monospace, Consolas, monospace; padding: 2px 6px; border-radius: 6px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted);
}
kbd.on-primary { background: rgba(255, 255, 255, .18); border-color: transparent; color: #fff; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.block { display: block; }
.grow { flex: 1; min-width: 0; }
.strike { text-decoration: line-through; }
.neg { color: var(--bad); }
.plus { color: var(--ok); }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.small-pad { padding: 10px; }

/* ================================================================ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
  border-radius: 10px; border: 1px solid transparent; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .08s, box-shadow .15s, background .15s, opacity .15s; user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(109, 93, 252, .35); }
.btn.primary:hover { box-shadow: 0 6px 20px rgba(109, 93, 252, .45); }
.btn.ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger-ghost { background: transparent; border-color: var(--bad-soft); color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-soft); }
.btn.ok-ghost { background: var(--ok-soft); color: var(--ok); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; display: flex; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn.ghost.loading::after { border-color: var(--border); border-top-color: var(--accent); }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.link { font-size: 13px; font-weight: 600; }

/* ================================================================ formulários */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); outline: none; transition: border .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pw { position: relative; }
.pw .icon-btn { position: absolute; right: 3px; top: 3px; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.row-input { display: flex; gap: 6px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: -4px; }
.strength i { height: 4px; border-radius: 4px; background: var(--border); transition: background .2s; }
.strength i.on.s1 { background: var(--bad); }
.strength i.on.s2 { background: var(--warn); }
.strength i.on.s3, .strength i.on.s4 { background: var(--ok); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 38px; height: 22px; border-radius: 22px; background: var(--border); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

.seg { display: flex; background: var(--bg-soft); padding: 4px; border-radius: 11px; gap: 4px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 7px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ================================================================ login */
.boot { height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth.single { grid-template-columns: 1fr; }
.auth-hero {
  background: radial-gradient(1200px 500px at -10% -10%, rgba(255, 255, 255, .18), transparent), var(--grad);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px;
}
.auth-hero h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; }
.auth-hero p { font-size: 1.1rem; opacity: .9; max-width: 460px; }
.auth-points { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.auth-points .ic { background: rgba(255, 255, 255, .2); padding: 6px; width: 30px; height: 30px; border-radius: 9px; }
.auth-panel { display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); padding: 32px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.auth-card h2 { font-size: 1.6rem; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; }
.brand .ic { width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: var(--grad); color: #fff; }
.brand.big { font-size: 1.4rem; }
.brand.big .ic { background: rgba(255, 255, 255, .22); width: 36px; height: 36px; }

/* ================================================================ casca */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px;
}
.side-head { display: flex; gap: 10px; align-items: center; padding: 6px 8px 16px; }
.org-avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.org-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.org-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-badge { align-self: flex-start; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 20px; background: var(--bg-soft); color: var(--text-2); }
.plan-profissional { background: var(--info-soft); color: var(--info); }
.plan-premium { background: linear-gradient(135deg, #ffe08a, #ffb84d); color: #5a3a00; }
.plan-admin { background: var(--accent-soft); color: var(--accent-text); }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; transition: background .12s, color .12s; }
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.nav a.active .ic { stroke-width: 2.3; }
.side-foot { border-top: 1px solid var(--border); padding-top: 12px; display: flex; align-items: center; gap: 4px; }
.user-chip { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; color: var(--text); }
.user-chip:hover, .user-chip.active { background: var(--bg-soft); }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--muted); font-size: 12px; }
.side-actions { display: flex; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 750; font-size: 12.5px; flex: none; vertical-align: middle; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 54px; height: 54px; font-size: 18px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; background: var(--grad); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px);
}
.search-trigger {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; color: var(--muted); cursor: pointer; text-align: left;
}
.search-trigger span { flex: 1; }
.search-trigger:hover { border-color: var(--accent); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }
.view { padding: 8px 28px 48px; max-width: 1360px; width: 100%; }
.page { animation: fadein .22s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.only-mobile { display: none; }

.skeleton { display: grid; gap: 14px; padding-top: 10px; }
.skeleton i { display: block; height: 90px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton i:first-child { height: 40px; width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ================================================================ página */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 20px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13px; color: var(--muted); margin-top: 6px; }
.back:hover { color: var(--text); }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 10px 0 22px; flex-wrap: wrap; }
.hello h1 { font-size: 1.8rem; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card + .card, .card + .grid-2, .grid-2 + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2.wide-left { grid-template-columns: 1.6fr 1fr; }
.grid-2.wide-right { grid-template-columns: 1fr 1.8fr; }
.grid-dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.span-2 { grid-column: span 2; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis.mini { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis.six { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi strong { font-size: 1.55rem; font-weight: 780; letter-spacing: -.02em; }
.kpi strong.sm { font-size: 1.05rem; }
.kpis.mini .kpi strong { font-size: 1.15rem; }
.kpi-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi-label .ic { width: 15px; height: 15px; }
.kpi-foot { font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kpi.accent { background: var(--grad); color: #fff; border-color: transparent; }
.kpi.accent .kpi-label, .kpi.accent .kpi-foot, .kpi.accent small { color: rgba(255, 255, 255, .85); }
.kpi.accent .delta { background: rgba(255, 255, 255, .2); color: #fff; }
.kpi.good strong { color: var(--ok); }
.kpi.badk strong { color: var(--bad); }
.kpi.streak.hot { border-color: #ffb36b; }
.kpi.streak.hot::after { content: ""; position: absolute; inset: auto -20px -40px auto; width: 120px; height: 120px; background: radial-gradient(circle, rgba(255, 140, 50, .25), transparent 70%); }
.kpi.streak.hot .kpi-label .ic { color: #ff7a1a; animation: flicker 1.4s infinite; }
@keyframes flicker { 50% { transform: scale(1.15) rotate(-6deg); } }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; padding: 1px 7px; border-radius: 20px; font-size: 12px; background: var(--bg-soft); }
.delta .ic { width: 12px; height: 12px; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 650; background: var(--bg-soft); color: var(--text-2); white-space: nowrap; }
.badge .ic { width: 13px; height: 13px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.pill { font: 700 12px ui-monospace, Consolas, monospace; padding: 3px 8px; border-radius: 7px; background: var(--bg-soft); color: var(--text-2); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: 13px; }
.tag .ic { width: 14px; height: 14px; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty > .ic { width: 48px; height: 48px; padding: 12px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 6px; }
.empty .btn { margin-top: 10px; }
.empty.small { padding: 24px; color: var(--muted); }
.notice { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.notice.bad { background: var(--bad-soft); color: var(--bad); }

/* listas */
.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list.compact li { padding: 7px 0; }
.list .grow { display: flex; flex-direction: column; }
.list small { font-size: 12px; }
.row-link { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--text); padding: 2px 6px; margin: 0 -6px; border-radius: 8px; }
.row-link:hover { background: var(--bg-soft); }
.alert-card { border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); }
.alert-card .card-head .ic { color: var(--warn); }
.ranking { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ranking li { display: flex; align-items: center; gap: 10px; }
.ranking .grow { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.medal { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-soft); font-weight: 800; font-size: 12px; flex: none; color: var(--muted); }
.medal.m1 { background: linear-gradient(135deg, #ffe08a, #f5b400); color: #5a3a00; }
.medal.m2 { background: linear-gradient(135deg, #eef1f6, #b9c0cc); color: #3a3f4a; }
.medal.m3 { background: linear-gradient(135deg, #ffd2a8, #d98b4b); color: #4d2600; }

/* metas */
.goal-body { display: flex; align-items: center; gap: 16px; }
.goal-body p { margin: 0 0 6px; }
.ring-track { fill: none; stroke: var(--bg-soft); stroke-width: 12; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.ring.done .ring-fill { stroke: var(--ok); }
.ring-value { font-size: 24px; font-weight: 800; fill: var(--text); }
.ring-label { font-size: 11px; fill: var(--muted); }
.progress { width: 100%; height: 8px; display: block; }
.progress.thin { height: 5px; }
.progress .track { fill: var(--bg-soft); }
.progress .fill { fill: var(--accent); transition: width .6s ease; }
.progress.done .fill { fill: var(--ok); }
.goal-hero { display: flex; align-items: center; gap: 28px; padding: 26px; }
.goal-hero h2 { font-size: 1.8rem; margin-bottom: 8px; }
.goal-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.goal-list li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.goal-list li:last-child { border-bottom: 0; }
.goal-list .grow { display: flex; flex-direction: column; gap: 6px; }
.goal-line { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 0 0 18px; }
.podium-col { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 130px; }
.podium-col span:not(.avatar) { font-size: 13px; color: var(--muted); font-weight: 600; }
.podium-bar { width: 100%; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: #fff; margin-top: 6px; }
.p1 .podium-bar { height: 110px; background: linear-gradient(180deg, #ffd34d, #e6a100); }
.p2 .podium-bar { height: 80px; background: linear-gradient(180deg, #cdd3dd, #9aa3b2); }
.p3 .podium-bar { height: 60px; background: linear-gradient(180deg, #f0b07a, #c8743a); }
.p1 .avatar { box-shadow: 0 0 0 3px #ffd34d; }
.month-input { width: auto !important; }

/* ================================================================ tabelas */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select { width: auto; min-width: 160px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; display: block; }
.search .ic { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search input { padding-left: 38px !important; }
.search.big { max-width: none; }
.search.big input { height: 46px; font-size: 15px; }
.search.big .ic { top: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.chip .ic { width: 14px; height: 14px; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.date-range { display: flex; align-items: center; gap: 6px; }
.date-range input { width: 150px !important; }
.summary-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
.summary-line strong { color: var(--text); }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; border: 0; border-radius: 0; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.card .table th { background: transparent; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table.clickable tbody tr { cursor: pointer; transition: background .1s; }
.table.clickable tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.inactive { opacity: .55; }
.table td.actions { white-space: nowrap; text-align: right; }
.table.items { margin-top: 16px; }
.table.bars td { padding: 9px 6px; }
.table.bars .grow-cell { width: 60%; font-weight: 600; }
.table.bars .progress { margin-top: 5px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 6px 0 14px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--accent-text); border-bottom-color: var(--accent); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 4px 0 12px; }
.info-grid div { display: flex; flex-direction: column; gap: 2px; }
.info-grid span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.notes { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; color: var(--text-2); }
.totals { margin-left: auto; max-width: 300px; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 1.25rem; font-weight: 800; border-top: 1px solid var(--border); padding-top: 8px; }

/* histórico */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.tl-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--border); color: var(--muted); flex: none; z-index: 1; }
.tl-icon .ic { width: 15px; height: 15px; }
.tl-icon.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tl-icon.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tl-icon.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.tl-icon.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tl-body { flex: 1; min-width: 0; padding-top: 5px; }
.tl-body p { margin: 0 0 2px; }
details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent-text); margin-top: 4px; }
.diff { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.diff th, .diff td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.diff th { font-size: 11.5px; color: var(--muted); text-transform: uppercase; }
.diff td:first-child { font-weight: 600; white-space: nowrap; }
.diff .was { color: var(--bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.diff .now { color: var(--ok); }

/* gráficos */
.chart { width: 100%; height: 180px; display: block; overflow: visible; }
.chart text { font-size: 11px; fill: var(--muted); }
.chart .fill-a { fill: var(--accent); }
.chart .fill-ok { fill: var(--ok); }
.chart .fill-bad { fill: var(--bad); opacity: .85; }
.chart .bar rect:hover, .chart g rect:hover { opacity: .75; }
.chart.area { height: 200px; }
.stop-a { stop-color: var(--accent); stop-opacity: .35; }
.stop-b { stop-color: var(--accent); stop-opacity: 0; }
.area-fill { fill: url(#ga); }
.area-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.dot:hover { fill: var(--accent); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.lg-ok { background: var(--ok); }
.lg-bad { background: var(--bad); }
[class^="dot-"] { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-receber { background: var(--ok); }
.dot-pagar { background: var(--bad); }

/* ================================================================ modal / painel lateral */
.layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.layer-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 30, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.layer.open .layer-backdrop { opacity: 1; }
.modal, .drawer { position: relative; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100vh - 40px); width: 100%; max-width: 520px; border: 1px solid var(--border); }
.modal { transform: translateY(12px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
.modal.wide { max-width: 760px; }
.layer.open .modal { transform: none; opacity: 1; }
.layer-side { place-items: stretch end; padding: 0; }
.drawer { height: 100vh; max-height: none; border-radius: 0; max-width: 520px; transform: translateX(30px); opacity: 0; transition: transform .22s, opacity .22s; }
.drawer.wide { max-width: 1040px; }
.layer.open .drawer { transform: none; opacity: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.modal-body { padding: 8px 20px 20px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.drawer .modal-foot { border-radius: 0; }
.secret-box { display: flex; flex-direction: column; gap: 12px; }
.secret-row { display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); border: 1px dashed var(--border); padding: 10px 12px; border-radius: 10px; }
.secret-row span { font-size: 12px; color: var(--muted); font-weight: 600; }
.secret-row code { font-size: 15px; user-select: all; }
.secret-row code.big { font-size: 22px; letter-spacing: .08em; color: var(--accent-text); font-weight: 700; }

/* PDV */
.pos { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; height: 100%; }
.pos-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pos-right { display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); padding: 14px; border-radius: 16px; min-width: 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; max-height: 58vh; overflow-y: auto; padding: 2px; }
.product-tile { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; transition: transform .1s, border .1s, box-shadow .1s; }
.product-tile:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(109, 93, 252, .15); transform: translateY(-1px); }
.product-tile strong { font-size: 13.5px; line-height: 1.25; }
.product-tile span { font-weight: 750; color: var(--accent-text); }
.product-tile small { font-size: 11.5px; }
.product-tile small.bad { color: var(--bad); }
.product-tile.out { opacity: .6; }
.product-tile.bump { animation: bump .25s; }
@keyframes bump { 50% { transform: scale(.95); background: var(--accent-soft); } }
.cart { display: flex; flex-direction: column; gap: 6px; max-height: 32vh; overflow-y: auto; }
.cart-empty { text-align: center; color: var(--muted); padding: 20px; border: 2px dashed var(--border); border-radius: 12px; }
.cart-empty .ic { width: 28px; height: 28px; }
.cart-item { display: grid; grid-template-columns: 1fr auto 86px 90px auto; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); padding: 7px 8px 7px 12px; border-radius: 11px; animation: fadein .18s; }
.ci-name { min-width: 0; font-size: 13.5px; }
.ci-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-name input, .ci-price { height: 32px !important; font-size: 13px; padding: 0 8px !important; }
.ci-price { text-align: right; }
.ci-price.ro { text-align: right; color: var(--muted); font-size: 13px; }
.ci-total { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.stepper button { width: 28px; height: 30px; border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; color: var(--text-2); }
.stepper button:hover { background: var(--accent-soft); color: var(--accent-text); }
.stepper .ic { width: 14px; height: 14px; }
.stepper input { width: 42px !important; height: 30px !important; border: 0 !important; border-radius: 0 !important; text-align: center; padding: 0 !important; box-shadow: none !important; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-total { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border); }
.pos-total div { display: flex; justify-content: space-between; color: var(--text-2); }
.pos-total .grand { color: var(--text); font-size: 1.1rem; align-items: baseline; }
.pos-total .grand strong { font-size: 2rem; font-weight: 850; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* paleta */
.palette-wrap { position: fixed; inset: 0; z-index: 200; background: rgba(10, 12, 30, .4); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fadein .12s; }
.palette { width: min(600px, calc(100vw - 24px)); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-bottom: 1px solid var(--border); }
.palette-input input { border: 0 !important; box-shadow: none !important; height: 50px !important; font-size: 16px; padding: 0 !important; background: transparent !important; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--text-2); }
.palette-list li span { flex: 1; }
.palette-list li.sel { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.palette-list li.none { cursor: default; color: var(--muted); }
.palette footer { padding: 9px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* toasts */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--surface); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; max-width: 420px; transform: translateY(16px); opacity: 0; transition: transform .25s, opacity .25s; }
.toast.show { transform: none; opacity: 1; }
.toast .ic { flex: none; }
.toast-ok .ic { color: var(--ok); }
.toast-err { background: var(--bad); color: #fff; }
.toast-info .ic { color: var(--warn); }

/* confete */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation-name: fall; animation-timing-function: cubic-bezier(.2, .6, .4, 1); animation-fill-mode: forwards; }
.confetti .c1 { background: #6d5dfc; }
.confetti .c2 { background: #22c1a4; }
.confetti .c3 { background: #ffcc4d; }
.confetti .c4 { background: #ff6b8b; }
.confetti .c5 { background: #4dabff; }
@keyframes fall { to { top: 105vh; transform: rotate(720deg) translateX(60px); opacity: .8; } }

/* equipe e admin */
.usage { max-width: 380px; margin: -10px 0 18px; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.role-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.role-card p { margin: 6px 0 0; }
.role-pick { display: grid; gap: 8px; }
.role-pick label, .plan-card { display: block; cursor: pointer; }
.role-pick input, .plan-card input { position: absolute; opacity: 0; }
.role-pick span, .plan-card span { display: flex; flex-direction: column; gap: 2px; border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 14px; transition: border .12s, background .12s; }
.role-pick small, .plan-card small { color: var(--muted); font-size: 12.5px; }
.role-pick input:checked + span, .plan-card input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.role-pick input:focus-visible + span, .plan-card input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.settings-card { margin-top: 16px; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { max-width: 340px; flex: 1; }
.profile { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.profile h2 { margin-bottom: 2px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.feature-switch { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); }
.feature-switch:hover { border-color: var(--accent); }
.feature-switch.locked { opacity: .7; cursor: default; }
.feature-switch input { position: absolute; opacity: 0; }
.fs-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border); flex: none; margin-top: 1px; display: grid; place-items: center; transition: background .12s, border .12s; }
.feature-switch input:checked + .fs-box { background: var(--accent); border-color: var(--accent); }
.feature-switch input:checked + .fs-box::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.feature-switch input:focus-visible + .fs-box { box-shadow: 0 0 0 3px var(--accent-soft); }
.feature-switch span:last-child { display: flex; flex-direction: column; }
.feature-switch small { color: var(--muted); font-size: 12px; }
.custom-features summary { margin-bottom: 10px; }
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.company-card { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; color: var(--text); box-shadow: var(--shadow); transition: transform .12s, border .12s; }
.company-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.company-card.suspensa { opacity: .65; }
.cc-head { display: flex; gap: 12px; align-items: center; }
.cc-head div { display: flex; flex-direction: column; min-width: 0; }
.cc-meta { display: flex; gap: 6px; }
.cc-foot { display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 10px; }
.cc-foot span { display: inline-flex; gap: 4px; align-items: center; }
.cc-foot .ic { width: 13px; height: 13px; }

/* ================================================================ responsivo */
@media (max-width: 1100px) {
  .grid-dash { grid-template-columns: 1fr 1fr; }
  .pos { grid-template-columns: 1fr; }
  .product-grid { max-height: 30vh; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px; }
  .auth-hero h1 { font-size: 1.9rem; }
  .auth-points { display: none; }
  .sidebar { position: fixed; z-index: 50; left: 0; transform: translateX(-100%); transition: transform .22s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .only-mobile { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .topbar .btn span, .topbar kbd, .search-trigger kbd { display: none; }
  .view { padding: 4px 16px 40px; }
  .grid-2, .grid-2.wide-left, .grid-2.wide-right, .grid-dash { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .two, .plan-cards { grid-template-columns: 1fr; }
  .kpis.mini { grid-template-columns: 1fr 1fr 1fr; }
  .goal-hero { flex-direction: column; text-align: center; }
  .cart-item { grid-template-columns: 1fr auto; }
  .cart-item .ci-price, .cart-item .ci-total { grid-column: auto; }
  .layer { padding: 10px; }
  .drawer { max-width: 100% !important; }
  .table th, .table td { padding: 10px; }
  #toasts { left: 12px; right: 12px; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* administrador dentro de uma empresa */
.acting-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 28px; flex-wrap: wrap;
  background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  font-size: 13.5px;
}
.acting-bar span { flex: 1; min-width: 220px; color: var(--text); }
.acting-bar .btn { background: var(--warn); color: #fff; }
@media (max-width: 860px) { .acting-bar { padding: 10px 16px; } }

/* configurações e venda rápida */
.plan-cards.two-cols { grid-template-columns: 1fr 1fr; }
.plan-card small { line-height: 1.45; }
.field.narrow { max-width: 360px; }
.big-money input { height: 64px !important; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.quick-sale .pay-chips { gap: 8px; }
@media (max-width: 860px) { .plan-cards.two-cols { grid-template-columns: 1fr; } }

/* Mercado Livre */
.notice.info { background: var(--info-soft); color: var(--info); }
.ml-connect { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 24px; }
.ml-connect p { max-width: 520px; }
.ml-logo .ic { width: 56px; height: 56px; padding: 14px; border-radius: 18px; background: #ffe600; color: #2d3277; }
.auth-points.dark { text-align: left; color: var(--text-2); margin: 6px 0 10px; }
.auth-points.dark .ic { background: var(--accent-soft); color: var(--accent-text); }

/* ================================================================ delivery */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; min-height: 240px; }
.kcol header { display: flex; justify-content: space-between; align-items: center; }
.kcol > .tiny { margin: 2px 0 8px; }
.k-novo { border-top: 3px solid var(--info); }
.k-preparo { border-top: 3px solid var(--warn); }
.k-pronto { border-top: 3px solid var(--accent); }
.k-saiu { border-top: 3px solid #c026d3; }
.k-entregue { border-top: 3px solid var(--ok); }
.kcards { display: flex; flex-direction: column; gap: 8px; }
.kempty { text-align: center; color: var(--muted); padding: 18px 0; }
.kcard { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 12px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; box-shadow: var(--shadow); animation: fadein .2s; }
.kcard:hover { border-color: var(--accent); }
.kcard.ok { border-left-color: var(--ok); }
.kcard.warn { border-left-color: var(--warn); }
.kcard.late { border-left-color: var(--bad); }
.kcard.late .kc-age { color: var(--bad); font-weight: 700; }
.kc-top { display: flex; align-items: center; gap: 6px; }
.kc-age { margin-left: auto; font-size: 12px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; }
.kc-age .ic { width: 13px; height: 13px; }
.kc-name { font-size: 14px; }
.kc-items { font-size: 12.5px; color: var(--text-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.kc-meta span { display: inline-flex; gap: 4px; align-items: center; }
.kc-meta .ic { width: 14px; height: 14px; }
.kc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.kc-actions .btn { flex: 1; }
.ch-whatsapp { background: #dcfce7; color: #15803d; }
.ch-telefone { background: var(--info-soft); color: var(--info); }
.ch-balcao { background: var(--warn-soft); color: var(--warn); }
:root[data-theme="dark"] .ch-whatsapp { background: #123a2a; color: #4ade80; }
.order-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.of-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mini-map { height: 220px; border-radius: 12px; border: 1px solid var(--border); margin-top: 8px; z-index: 0; }
.qty-in { width: 70px !important; flex: none; }
.price-in { width: 110px !important; flex: none; }
.cart-item.compact { grid-template-columns: 1fr auto 90px auto; }
.routes-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.map-card { position: sticky; top: 70px; }
.route-map { height: 520px; border-radius: 12px; z-index: 0; }
.route-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.route-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.stops { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.stops li { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stops li.done { opacity: .55; }
.stops li .btn { margin-left: auto; }
.map-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.map-pin span { line-height: 1; }
.map-pin.store span { background: #111827; }
.map-pin.dest span { background: var(--bad); }
.map-pin.moving span { background: #c026d3; }
.map-pin.r1 span { background: #16a37f; } .map-pin.r2 span { background: #e5484d; } .map-pin.r3 span { background: #d98b06; }
.map-pin.r4 span { background: #3b82f6; } .map-pin.r5 span { background: #c026d3; } .map-pin.r6 span { background: #0891b2; }
.leaflet-container { font: inherit; background: var(--bg-soft); }
@media (max-width: 1100px) { .routes-grid, .order-form { grid-template-columns: 1fr; } .map-card { position: static; } .route-map { height: 360px; } }
.map-pin b { transform: rotate(45deg); display: block; }
