:root {
  --bg: #05070d;
  --bg2: #0a0f1f;
  --panel: rgba(15, 21, 40, 0.62);
  --panel-solid: #0d1326;
  --line: rgba(140, 160, 255, 0.12);
  --line-strong: rgba(140, 160, 255, 0.24);
  --text: #e8edff;
  --muted: #8a93b5;
  --dim: #5d6585;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --pink: #e879f9;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --grad: linear-gradient(120deg, var(--cyan), var(--violet) 55%, var(--pink));
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Space Grotesk', var(--font);
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { overflow-x: hidden; }
body {
  background: radial-gradient(1200px 800px at 85% -10%, #1a1240 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 110%, #06283a 0%, transparent 55%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(139, 92, 246, .45); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.muted { color: var(--muted); }
.grad-text { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.cursor-glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .13), rgba(34, 211, 238, .05) 40%, transparent 70%);
  pointer-events: none; z-index: 1; transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0); transition: opacity .4s;
}
@media (hover: none) { .cursor-glow { display: none; } }
#root { position: relative; z-index: 2; min-height: 100%; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; }
.boot-logo { width: 70px; height: 70px; border-radius: 20px; background: url(/icons/icon-192.png) center/cover; animation: pulse 1.4s var(--ease) infinite; }
.boot-text { font: 600 11px var(--mono); letter-spacing: .5em; color: var(--muted); }
@keyframes pulse { 50% { transform: scale(.9); filter: brightness(1.5) drop-shadow(0 0 24px var(--violet)); } }

/* ---------- animações de entrada ---------- */
.rise { opacity: 0; animation: rise .75s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 55ms + 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.page-enter { animation: page .5s var(--ease); }
@keyframes page { from { opacity: 0; transform: translateY(10px); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 38px 34px 30px; position: relative; overflow: hidden; }
.login-card::after {
  content: ''; position: absolute; left: 0; right: 0; height: 120px; top: -120px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .08), transparent); animation: scan 4.5s linear infinite;
}
@keyframes scan { to { top: 110%; } }
.orbit { width: 96px; height: 96px; margin: 0 auto 22px; position: relative; }
.orbit img { width: 72px; height: 72px; position: absolute; inset: 12px; border-radius: 20px; box-shadow: 0 0 40px rgba(139, 92, 246, .45); }
.orbit span { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(34, 211, 238, .35); animation: spin 14s linear infinite; }
.orbit span::before { content: ''; position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.orbit span:nth-child(2) { inset: -12px; border-color: rgba(232, 121, 249, .22); animation-duration: 22s; animation-direction: reverse; }
.orbit span:nth-child(2)::before { background: var(--pink); box-shadow: 0 0 12px var(--pink); }
@keyframes spin { to { transform: rotate(360deg); } }
.login h1 { text-align: center; font-size: 28px; }
.login .sub { text-align: center; color: var(--muted); margin: 6px 0 26px; min-height: 1.5em; }
.typing::after { content: '▍'; color: var(--cyan); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.login form { display: grid; gap: 14px; }
.login .foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--dim); }

/* ---------- casca ---------- */
.shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 14, 30, .75), rgba(8, 10, 22, .55)); backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 0 22px rgba(139, 92, 246, .4); }
.brand b { font: 700 17px var(--display); display: block; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 12px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); position: relative;
  transition: color .25s, background .25s, transform .25s var(--ease); font-weight: 500;
}
.nav a:hover { color: var(--text); background: rgba(140, 160, 255, .06); transform: translateX(3px); }
.nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(34, 211, 238, .14), rgba(139, 92, 246, .08)); }
.nav a.on::before {
  content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
  box-shadow: 0 0 14px var(--cyan); animation: grow .45s var(--spring);
}
@keyframes grow { from { transform: scaleY(0); } }
.nav a.on svg { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(34, 211, 238, .7)); }
.nav .sep { height: 1px; background: var(--line); margin: 12px 8px; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font: 700 14px var(--display); background: var(--grad); color: #0a0e1d; flex: none; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 60px; }
.top { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.top .search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; cursor: text;
  border: 1px solid var(--line); background: rgba(12, 17, 34, .6); color: var(--dim); transition: border-color .25s, box-shadow .25s;
}
.top .search:hover { border-color: var(--line-strong); box-shadow: 0 0 0 4px rgba(34, 211, 238, .06); }
.top .search kbd { margin-left: auto; }
kbd { white-space: nowrap; font: 500 11px var(--mono); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); background: rgba(255, 255, 255, .03); }
.top .spacer { flex: 1; }
.tabbar { display: none; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; }
.head p { margin: 6px 0 0; color: var(--muted); }
.eyebrow { font: 600 11px var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--cyan); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- cartões ---------- */
.card {
  position: relative; border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); isolation: isolate;
}
.card.glow::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, .55), rgba(139, 92, 246, .25) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.card.glow::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, .09), transparent 45%); opacity: 0; transition: opacity .35s;
}
.card.glow:hover::before, .card.glow:hover::after { opacity: 1; }
.tilt { transition: transform .5s var(--ease), box-shadow .5s var(--ease); transform-style: preserve-3d; will-change: transform; }
.tilt:hover { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(140, 160, 255, .08); }
.pad { padding: 22px; }
.card h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { grid-template-columns: 1.35fr 1fr; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two { grid-template-columns: 1fr; } }

.kpi { padding: 20px 22px; overflow: hidden; }
.kpi .label { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .value { font: 700 clamp(30px, 3.2vw, 42px)/1.1 var(--display); margin-top: 10px; letter-spacing: -.03em; }
.kpi .ic { position: absolute; right: -14px; bottom: -18px; opacity: .07; }
.kpi .ic svg { width: 110px; height: 110px; stroke-width: 1.2; }
.kpi .bar { height: 3px; border-radius: 3px; margin-top: 16px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.kpi .bar i { display: block; height: 100%; width: var(--w, 0); background: var(--c, var(--grad)); border-radius: inherit; transition: width 1.4s var(--ease); box-shadow: 0 0 10px var(--c, var(--cyan)); }

.tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile { padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; min-height: 128px; }
.tile .ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent);
  transition: transform .5s var(--spring), box-shadow .4s;
}
.tile:hover .ico { transform: translateZ(30px) rotate(-8deg) scale(1.08); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 55%, transparent), inset 0 0 0 1px var(--c); }
.tile .n { font: 700 28px/1 var(--display); margin-top: auto; }
.tile .t { color: var(--muted); font-size: 13px; line-height: 1.3; }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); transition: background .2s, padding .3s var(--ease); border-radius: 10px; cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(140, 160, 255, .05); padding-left: 12px; }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.row .grow small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.dot-ico svg { width: 18px; height: 18px; }

.hbar { display: grid; gap: 14px; }
.hbar .it { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; cursor: pointer; }
.hbar .it span { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .it b { font: 600 14px var(--mono); }
.hbar .track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.hbar .track i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width 1.3s var(--ease); box-shadow: 0 0 12px rgba(34, 211, 238, .5); }

.feed { display: grid; gap: 2px; }
.feed .ev { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.feed .ev::before { content: ''; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.feed .ev small { display: block; color: var(--dim); font-size: 12px; }

/* ---------- botões ---------- */
.btn {
  --b: rgba(255, 255, 255, .04);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 18px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--b); font-weight: 600; font-size: 14px; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .3s; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: rgba(140, 160, 255, .45); background: rgba(255, 255, 255, .07); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { border: 0; color: #060914; background: var(--grad); background-size: 160% 100%; box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .8), 0 0 0 1px rgba(255, 255, 255, .1) inset; }
.btn.primary:hover { background-position: 100% 0; box-shadow: 0 14px 40px -10px rgba(34, 211, 238, .8); }
.btn.primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60%; left: -80%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 3.8s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -80%; } 100% { left: 130%; } }
.btn.danger { color: var(--danger); border-color: rgba(251, 113, 133, .35); }
.btn.danger:hover { background: rgba(251, 113, 133, .1); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { padding: 9px; }
.btn.block { width: 100%; }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255, 255, 255, .45); animation: ripple .65s ease-out; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ---------- formulários ---------- */
.field { display: grid; gap: 7px; position: relative; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.field > span .req { color: var(--pink); }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(6, 9, 20, .55);
  outline: none; transition: border-color .25s, box-shadow .25s, background .25s;
}
textarea.input { resize: vertical; min-height: 84px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select.input option { background: var(--panel-solid); }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .12), 0 0 24px -6px rgba(34, 211, 238, .5); background: rgba(6, 9, 20, .8); }
.input.suggested { color: #b9c3ff; border-style: dashed; border-color: rgba(139, 92, 246, .55); }
.tag-sug { font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--violet); padding: 2px 7px; border-radius: 6px; background: rgba(139, 92, 246, .14); animation: rise .4s var(--ease); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; cursor: pointer; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .025);
  color: var(--muted); transition: all .2s var(--ease); user-select: none;
}
.chip:hover { color: var(--text); border-color: var(--cyan); transform: translateY(-1px); }
.chip.on { color: #061018; background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 18px -4px var(--cyan); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 16px; align-items: start; }
.form-grid .full { grid-column: 1 / -1; }
.err { color: var(--danger); font-size: 13.5px; min-height: 1.2em; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--muted); }
.check input { accent-color: var(--cyan); width: 17px; height: 17px; }

.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.type-pick button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 16px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02); transition: all .3s var(--ease); font-size: 13.5px; font-weight: 500;
}
.type-pick button:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); transform: translateY(-3px); }
.type-pick button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); box-shadow: 0 0 0 1px var(--c), 0 16px 40px -18px var(--c); }
.type-pick .dot-ico { transition: transform .4s var(--spring); }
.type-pick button.on .dot-ico, .type-pick button:hover .dot-ico { transform: scale(1.12) rotate(-6deg); }

.steps { display: flex; align-items: center; gap: 10px; color: var(--dim); font: 600 12px var(--mono); letter-spacing: .1em; margin-bottom: 14px; }
.steps b { color: var(--cyan); }

/* ---------- tabela ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 180px; padding: 10px 14px; }
.toolbar .q { flex: 1; min-width: 220px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 14px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .2s; }
.tbl tbody tr:hover { background: rgba(140, 160, 255, .05); }
.tbl tbody tr.sel { background: rgba(34, 211, 238, .07); }
.tbl .cat { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.tbl .det { color: var(--muted); max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pat { font: 500 13px var(--mono); color: var(--cyan); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.s-em_uso { --c: var(--ok); } .s-reserva { --c: var(--cyan); } .s-manutencao { --c: var(--warn); } .s-baixado { --c: var(--dim); }
.bulk {
  position: sticky; bottom: calc(16px + var(--safe-b)); z-index: 5; margin-top: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-radius: 16px; background: rgba(13, 19, 38, .92); border: 1px solid var(--cyan); box-shadow: 0 20px 50px -20px #000, 0 0 30px -10px var(--cyan); animation: rise .4s var(--ease);
}
.bulk .input { width: auto; min-width: 200px; padding: 8px 12px; }

.cards-m { display: none; }

/* ---------- locais ---------- */
.locs { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.loc { padding: 20px; cursor: pointer; display: flex; flex-direction: column; gap: 14px; min-height: 170px; }
.loc .kind { font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.loc h3 { font-size: 19px; }
.loc .icons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.loc .icons span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; font: 600 12px var(--mono); color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.loc .icons svg { width: 14px; height: 14px; }
.loc .total { position: absolute; right: 18px; top: 16px; font: 700 34px/1 var(--display); opacity: .14; transition: opacity .4s, transform .5s var(--spring); }
.loc:hover .total { opacity: .5; transform: translateZ(20px) scale(1.1); }
.loc.add { align-items: center; justify-content: center; color: var(--muted); border-style: dashed; text-align: center; }
.loc.add:hover { color: var(--cyan); border-color: var(--cyan); }
.loc.add svg { width: 30px; height: 30px; transition: transform .5s var(--spring); }
.loc.add:hover svg { transform: rotate(90deg) scale(1.15); }
.group { margin-top: 26px; }
.group h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }

/* ---------- gaveta / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(3, 5, 12, .6); backdrop-filter: blur(6px); animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100%); z-index: 51; overflow-y: auto; padding: 26px 26px calc(30px + var(--safe-b));
  background: linear-gradient(180deg, #0d1328, #090d1c); border-left: 1px solid var(--line-strong); box-shadow: -40px 0 80px -20px #000;
  animation: slide .45s var(--ease);
}
@keyframes slide { from { transform: translateX(100%); } }
.drawer.out { animation: slideOut .3s var(--ease) forwards; }
@keyframes slideOut { to { transform: translateX(100%); } }
.overlay.out { animation: fade .3s reverse forwards; }
.drawer .x { position: absolute; right: 18px; top: 18px; }
.modal {
  position: fixed; z-index: 52; left: 50%; top: 50%; width: min(460px, calc(100% - 32px)); transform: translate(-50%, -50%);
  padding: 26px; border-radius: 22px; background: #0d1328; border: 1px solid var(--line-strong); box-shadow: 0 40px 100px -20px #000; animation: pop .4s var(--spring);
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); } }
.modal h3 { font-size: 19px; margin-bottom: 8px; }
.modal p { color: var(--muted); margin: 0 0 20px; }
.modal .actions { justify-content: flex-end; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.timeline { display: grid; gap: 0; margin-top: 8px; }
.timeline .ev { position: relative; padding: 0 0 16px 22px; font-size: 13.5px; }
.timeline .ev::before { content: ''; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.timeline .ev::after { content: ''; position: absolute; left: 6.5px; top: 18px; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline .ev:last-child::after { display: none; }
.timeline small { color: var(--dim); display: block; }
.secret { font: 600 18px var(--mono); padding: 14px; border-radius: 12px; text-align: center; background: rgba(34, 211, 238, .08); border: 1px dashed var(--cyan); color: var(--cyan); user-select: all; margin-bottom: 18px; }

/* ---------- palette ---------- */
.palette { position: fixed; z-index: 60; left: 50%; top: 12vh; width: min(640px, calc(100% - 24px)); transform: translateX(-50%); border-radius: 20px; overflow: hidden; background: #0c1226; border: 1px solid var(--line-strong); box-shadow: 0 40px 120px -20px #000, 0 0 60px -20px var(--violet); animation: drop .35s var(--spring); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -16px) scale(.97); } }
.palette input { width: 100%; padding: 20px 22px; border: 0; outline: none; background: transparent; font-size: 17px; border-bottom: 1px solid var(--line); }
.palette .res { max-height: 52vh; overflow-y: auto; padding: 8px; }
.palette .row { padding: 10px 12px; }
.palette .row.act { background: rgba(34, 211, 238, .09); }
.palette .hint { padding: 10px 16px; color: var(--dim); font-size: 12px; border-top: 1px solid var(--line); display: flex; gap: 16px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 80; right: 20px; bottom: calc(20px + var(--safe-b)); display: grid; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 14px; min-width: 260px; max-width: 420px; font-size: 14px;
  background: rgba(13, 19, 38, .95); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px -20px #000; animation: toastIn .5s var(--spring); position: relative; overflow: hidden;
}
.toast::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; background: var(--c, var(--cyan)); animation: life 4s linear forwards; }
@keyframes life { from { width: 100%; } to { width: 0; } }
.toast.ok { --c: var(--ok); } .toast.bad { --c: var(--danger); }
.toast svg { color: var(--c, var(--cyan)); }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--violet); margin-bottom: 12px; stroke-width: 1.3; filter: drop-shadow(0 0 14px rgba(139, 92, 246, .6)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- instalar ---------- */
.install-hero { padding: 34px; overflow: hidden; display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; }
.install-hero .phone {
  justify-self: center; width: 210px; height: 400px; border-radius: 36px; padding: 12px; position: relative;
  background: linear-gradient(160deg, #1b2346, #0a0e1f); border: 1px solid var(--line-strong); box-shadow: 0 40px 80px -30px #000, 0 0 60px -20px var(--violet);
  animation: float 6s ease-in-out infinite;
}
.install-hero .phone .scr { height: 100%; border-radius: 26px; background: radial-gradient(circle at 50% 30%, #231a52, #070a16 70%); display: grid; place-content: center; justify-items: center; gap: 14px; }
.install-hero .phone img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 0 40px rgba(139, 92, 246, .6); animation: pulse 3s var(--ease) infinite; }
.how { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.how ol { margin: 10px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }
.how ol b { color: var(--text); }

.fields-edit { display: grid; gap: 10px; }
.fe { display: grid; grid-template-columns: 1.2fr 140px 1.6fr auto auto; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); animation: rise .4s var(--ease); }
.fe .input { padding: 9px 12px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 10px; border: 2px solid transparent; background: var(--c); cursor: pointer; transition: transform .3s var(--spring); }
.swatches button.on { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 16px var(--c); }
.icon-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-pick button { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; cursor: pointer; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--muted); transition: all .25s; }
.icon-pick button.on { color: var(--c); border-color: var(--c); box-shadow: 0 0 14px -4px var(--c); }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .top .spacer { display: none; }
  .toolbar .input, .toolbar .q { width: 100%; min-width: 0; flex: 1 1 100%; }
  .side { display: none; }
  .main { padding: 18px 14px calc(96px + var(--safe-b)); }
  .top { margin-bottom: 18px; }
  .top .search kbd { display: none; }
  .tabbar {
    display: flex; position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); padding: 6px; border-radius: 22px;
    background: rgba(11, 16, 34, .88); backdrop-filter: blur(20px); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px -10px #000;
  }
  .tabbar a { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 16px; color: var(--dim); font-size: 10.5px; font-weight: 600; transition: all .3s var(--ease); }
  .tabbar a.on { color: var(--text); background: rgba(34, 211, 238, .1); }
  .tabbar a.on svg { color: var(--cyan); filter: drop-shadow(0 0 6px var(--cyan)); transform: translateY(-1px) scale(1.08); }
  .tabbar a svg { transition: transform .4s var(--spring); }
  .tabbar a.fab { color: #060914; }
  .tabbar a.fab span { width: 46px; height: 46px; margin-top: -24px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 10px 30px -6px var(--violet); }
  .tbl-wrap { display: none; }
  .cards-m { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cards-m .card { padding: 14px; display: flex; gap: 12px; align-items: center; }
  .cards-m .card.sel { border-color: var(--cyan); }
  .install-hero { grid-template-columns: 1fr; padding: 24px; }
  .install-hero .phone { display: none; }
  .fe { grid-template-columns: 1fr 1fr; }
  .fe .opts { grid-column: 1 / -1; }
  .kv { grid-template-columns: 120px 1fr; }
  #toasts { left: 12px; right: 12px; bottom: calc(96px + var(--safe-b)); }
  .toast { min-width: 0; max-width: none; }
  .drawer { padding: 22px 18px calc(30px + var(--safe-b)); }
}
@media (max-width: 520px) { .kpi { padding: 16px; } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .head .actions { width: 100%; } .head .actions .btn { flex: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rise { opacity: 1; }
}
