:root { color-scheme: dark; --bg:#0d0d13; --side:#101017; --card:#16161e; --card2:#1d1d27; --line:rgba(255,255,255,.07); --line2:rgba(255,255,255,.13);
  --text:#f1f0f6; --muted:#9a99a8; --dim:#6b6a78; --accent:#8b7cff; --ok:#4ade80; --warn:#fbbf24; --bad:#f87171; --blue:#60a5fa; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(900px 500px at 85% -10%, rgba(139,124,255,.07), transparent 70%), var(--bg); background-attachment: fixed; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(139,124,255,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #2a2a36; border-radius: 10px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }

/* ícones */
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.ic.big { width: 34px; height: 34px; stroke-width: 1.5; color: var(--dim); display: block; margin: 0 auto 10px; }
.t-ok { --tone: var(--ok); } .t-warn { --tone: var(--warn); } .t-bad { --tone: var(--bad); } .t-blue { --tone: var(--blue); } .t-accent { --tone: var(--accent); } .t-dim { --tone: #8a8a99; }

/* estrutura */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: rgba(16,16,23,.85); backdrop-filter: blur(10px); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line2), 0 6px 18px rgba(139,124,255,.25); }
.brand b { display: block; font-size: 15px; } .brand small { color: var(--muted); font-size: 12px; display: block; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-l { font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--dim); padding: 0 12px 6px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #c9c8d6; font-weight: 600; margin-bottom: 2px; position: relative; transition: background .15s, color .15s; }
.nav a .ic { width: 17px; height: 17px; color: var(--dim); transition: color .15s; }
.nav a:hover { background: rgba(255,255,255,.04); text-decoration: none; color: #fff; } .nav a:hover .ic { color: #c9c8d6; }
.nav a.on { background: linear-gradient(90deg, rgba(139,124,255,.18), rgba(139,124,255,.05)); color: #fff; }
.nav a.on .ic { color: var(--accent); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav .n { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.side .foot { margin-top: auto; font-size: 12px; color: var(--dim); padding: 8px 4px 0; }
.fleet { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.fleet .seg { margin-top: 8px; }
.logout { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 8px; border-radius: 8px; font-weight: 600; }
.logout:hover { background: rgba(255,255,255,.04); color: #fff; text-decoration: none; }
main { padding: 28px 34px 60px; max-width: 1360px; width: 100%; }
h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.5px; } .sub { color: var(--muted); margin: 0 0 22px; }
.head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; } .head .sp { flex: 1; } .head > .btn { margin-top: 4px; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; margin-right: 4px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); } 70% { box-shadow: 0 0 0 7px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.cap::first-letter { text-transform: uppercase; }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: linear-gradient(180deg, rgba(255,255,255,.025), transparent 60%), var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 15px 13px; position: relative; overflow: hidden; min-width: 0; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--tone); opacity: .07; filter: blur(6px); }
.kpi .kh { display: flex; align-items: center; gap: 8px; }
.kpi .kh small { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ki2 { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.ki2 .ic { width: 15px; height: 15px; }
.kpi > b { font-size: 28px; letter-spacing: -1px; display: block; margin: 10px 0 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi > b .of { color: var(--dim); font-size: 18px; letter-spacing: 0; }
.kpi .ks { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .ks span { overflow: hidden; text-overflow: ellipsis; }

/* cartões */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.card h3 { margin: 0 0 14px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card h3 > .ic { color: var(--dim); width: 15px; height: 15px; }
.card h3 .r { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; }
.card + .card { margin-top: 14px; }
.company-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.company-metrics > div { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:13px 16px; }
.company-metrics small, .company-stats small { display:block; color:var(--muted); font-size:12px; }
.company-metrics b { display:block; font-size:25px; margin-top:3px; }
.company-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:14px; margin-bottom:18px; }
.company-card { display:flex; flex-direction:column; gap:13px; min-width:0; }
.company-top { display:flex; align-items:center; gap:11px; min-width:0; }
.company-icon { width:38px; height:38px; border-radius:11px; background:rgba(139,124,255,.14); color:var(--accent); display:grid; place-items:center; flex:none; }
.company-icon .ic { width:20px; height:20px; }
.company-top h2 { font-size:16px; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.company-top .grow { min-width:0; }
.company-top .grow small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.company-top .tag { align-self:flex-start; }
.company-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.company-stats > div { padding:9px; border-radius:10px; background:var(--card2); }
.company-stats b { font-size:17px; display:block; }
.company-issue { margin:0; min-height:18px; }
.company-issue .ic { color:var(--warn); }
.company-actions { display:flex; gap:7px; flex-wrap:wrap; margin-top:auto; }
.company-new { margin-top:18px; }
.company-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.company-fields label { display:flex; flex-direction:column; gap:5px; color:var(--muted); font-size:12px; font-weight:600; min-width:0; }
.company-fields input { width:100%; }
.company-new form > p { margin:13px 0; }
.company-created { border-color:rgba(74,222,128,.35); margin-bottom:18px; }
.modal.company-modal { width:570px; }
.company-modal .company-fields { margin-top:18px; }
.company-modal .company-fields > .flex { grid-column:1/-1; }
.warn-card { border-color: rgba(251,191,36,.4); background: linear-gradient(180deg, rgba(251,191,36,.06), transparent), var(--card); }
.warn-card h3, .warn-card h3 > .ic { color: var(--warn); }

/* gráfico de atividade */
.act { width: 100%; height: auto; display: block; }
.act .b { fill: var(--accent); opacity: .55; transition: opacity .15s; } .act .b.now { opacity: 1; }
.act .b0 { fill: #2a2a35; }
.act rect[data-tip]:hover { fill: rgba(255,255,255,.03); }
.act .gl { stroke: rgba(255,255,255,.06); stroke-dasharray: 3 4; } .act .axis { stroke: rgba(255,255,255,.12); }
.act .al { fill: var(--dim); font-size: 10px; font-family: inherit; }

/* barra de busca e filtros */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search input { width: 100%; padding-left: 34px !important; }
.seg-ctl { display: inline-flex; background: #101017; border: 1px solid var(--line2); border-radius: 10px; padding: 3px; }
.seg-ctl span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg-ctl span .ic { width: 14px; height: 14px; }
.seg-ctl span.on { background: var(--card2); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.toolbar.t2 { margin: 0 0 14px; } .chips.stores { flex: 1; }
.count { margin-left: auto; white-space: nowrap; }

/* cartão de aparelho */
.pcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.pc { background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 40%), var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; position: relative; display: flex; flex-direction: column; }
.pc:hover { border-color: rgba(139,124,255,.45); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.pc.offline { opacity: .6; } .pc.offline:hover { opacity: .9; }
.pc-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dev { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(139,124,255,.12); color: var(--accent); }
.pc.offline .dev { background: #22222c; color: var(--dim); }
.dev.lg { width: 52px; height: 52px; border-radius: 14px; } .dev.lg .ic { width: 24px; height: 24px; }
.pc-h .nm { flex: 1; min-width: 0; }
.pc-h .nm b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-h .nm small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-m { flex: 1; }
.pc-f { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: #cfcfe0; min-height: 34px; }
.pc-f .now { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.pc-f .now span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-f .now .ic { width: 14px; height: 14px; color: var(--dim); }
.pc.online .pc-f .now .ic { color: var(--ok); }
.tags { display: inline-flex; gap: 4px; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: #22222c; color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag .ic { width: 12px; height: 12px; stroke-width: 2.1; }
.tag.bad { color: #fecaca; background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.3); }
.tag.warn { color: #fde68a; background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.28); }
.tag.ok { color: #bbf7d0; background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.28); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; flex: none; border: 1px solid var(--line); }
.pill.s-online { color: #bbf7d0; background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.25); }
.pill.s-ausente { color: #fde68a; background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.25); }
.pill.s-offline { color: var(--muted); background: #1f1f28; }
.pill .dot { width: 6px; height: 6px; box-shadow: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.online { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .dot.ausente { background: var(--warn); } .dot.offline { background: #555; }
.meter { display: grid; grid-template-columns: 54px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 5px 0; }
.bar { height: 6px; background: #262631; border-radius: 6px; overflow: hidden; } .bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); transition: width .4s; }
.bar i.warn { background: var(--warn); } .bar i.bad { background: var(--bad); } .bar i.ok { background: var(--ok); }
.seg { display: flex; gap: 2px; border-radius: 6px; overflow: hidden; background: #262631; }
.seg i { display: block; height: 100%; min-width: 2px; }
.meter span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: #cfcfe0; }
.empty { text-align: center; color: var(--muted); padding: 34px; grid-column: 1 / -1; }
.empty b { display: block; color: var(--text); margin-bottom: 4px; } .empty p { margin: 0 0 14px; }

/* coluna da direita */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { position: relative; width: 120px; height: 120px; flex: none; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut circle[data-tip] { cursor: default; transition: stroke-width .15s; } .donut circle[data-tip]:hover { stroke-width: 13; }
.donut .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut .c b { font-size: 22px; letter-spacing: -.5px; } .donut .c small { color: var(--muted); font-size: 11px; margin-top: -2px; }
.dl { flex: 1; font-size: 12.5px; min-width: 0; }
.dl > div { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.dl i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.dl span { flex: 1; color: var(--muted); } .dl b { font-variant-numeric: tabular-nums; font-weight: 600; }
.dl .tt { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.srow { padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; } .srow:last-of-type { border: 0; }
.srow:hover b { color: var(--accent); } .srow .seg { margin-top: 7px; }
.hrow { display: flex; align-items: center; gap: 10px; padding: 8px 6px; margin: 0 -6px; border-radius: 10px; font-size: 13px; }
.hrow[data-f] { cursor: pointer; } .hrow[data-f]:hover { background: rgba(255,255,255,.035); }
.hrow .hi { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent); }
.hrow .hi .ic { width: 15px; height: 15px; }
.hrow b { font-variant-numeric: tabular-nums; } .hrow.t-ok b { color: var(--dim); font-weight: 600; } .hrow.t-ok .grow { color: var(--muted); }
.hrow .chev { color: var(--dim); width: 14px; height: 14px; }
.sb { justify-content: space-between; }

/* eventos */
.feed .e { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: flex-start; } .feed .e:last-of-type { border: 0; }
.feed .e .i, .mini { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--tone, var(--muted)); background: color-mix(in srgb, var(--tone, #8a8a99) 13%, transparent); }
.mini { width: 24px; height: 24px; border-radius: 7px; } .mini .ic { width: 13px; height: 13px; }
.feed .e .i .ic { width: 14px; height: 14px; }
.feed .e > div { min-width: 0; flex: 1; }
.feed .e small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.feed .e .w { margin-left: auto; color: var(--dim); font-size: 11.5px; white-space: nowrap; padding-left: 6px; }
.feed .e[data-pc]:hover { background: rgba(255,255,255,.025); }
.hbar { display: grid; grid-template-columns: 1fr 64px; gap: 5px 10px; align-items: center; font-size: 13px; margin: 8px 0; }
.hbar > span:first-child { display: flex; align-items: center; min-width: 0; }
.hbar .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .ki { color: var(--dim); margin-right: 7px; display: inline-flex; } .hbar .ki .ic { width: 14px; height: 14px; }
.hbar .bar { grid-column: 1 / -1; height: 5px; } .hbar span:nth-child(2) { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* botões e campos */
.btn { border: 1px solid var(--line2); background: var(--card2); border-radius: 10px; padding: 8px 13px; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; gap: 7px; align-items: center; color: var(--text); transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: #272733; text-decoration: none; } .btn:active { transform: translateY(1px); }
.btn .ic { width: 15px; height: 15px; }
.btn.primary { background: linear-gradient(180deg, #9a8dff, var(--accent)); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(139,124,255,.3); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.08); } .btn.danger:hover { background: rgba(248,113,113,.15); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; gap: 5px; } .btn.sm .ic { width: 13px; height: 13px; }
.btn.icon { padding: 6px 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; align-items: center; }
input[type=text], input[type=password], input[type=number], input[type=time], textarea, select { background: #101017; border: 1px solid var(--line2); border-radius: 10px; padding: 8px 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,124,255,.18); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { background: var(--card2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s, background .15s; }
.chip .ic { width: 13px; height: 13px; color: var(--dim); }
.chip:hover { border-color: var(--line2); }
.chip.on { background: rgba(139,124,255,.2); border-color: rgba(139,124,255,.7); color: #fff; } .chip.on .ic { color: #cfc8ff; }
.chip .x { margin-left: 2px; opacity: .6; display: inline-flex; cursor: pointer; } .chip .x:hover { opacity: 1; color: var(--bad); } .chip .x .ic { width: 12px; height: 12px; }
.chip.bad { border-color: #f87171; background: rgba(248,113,113,.14); } .chip.bad .ic { color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.info div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; } .info small { color: var(--muted); display: block; font-size: 12px; } .info b { font-size: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; } td, th { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; } th { color: var(--muted); font-weight: 600; font-size: 12px; }
tr:last-child td { border-bottom: 0; } tr[data-pc]:hover td { background: rgba(255,255,255,.02); }
td.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); } .row:last-child { border: 0; } .row .t { flex: 1; } .row .t small { display: block; color: var(--muted); font-size: 12px; }
.toggle { width: 42px; height: 24px; border-radius: 99px; background: #34343f; position: relative; cursor: pointer; border: 0; flex: none; transition: background .2s; } .toggle::after { content: ""; position: absolute; width: 20px; height: 20px; top: 2px; left: 2px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.4); } .toggle.on { background: var(--accent); } .toggle.on::after { transform: translateX(18px); }

/* página do aparelho */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.back:hover { color: #fff; text-decoration: none; }
.hero { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hero h1 { margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; } .meta .ic { width: 14px; height: 14px; color: var(--dim); }
.hero-act { display: flex; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.tile { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; min-width: 0; }
.tile .ti { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--accent); background: rgba(139,124,255,.12); }
.tile small { color: var(--muted); display: block; font-size: 12px; } .tile b { font-size: 16px; font-variant-numeric: tabular-nums; }
.mt6 { margin-top: 7px; }
.nowbar { display: flex; align-items: center; gap: 8px; font-size: 13px; background: rgba(74,222,128,.06); border: 1px solid rgba(74,222,128,.2); border-radius: 12px; padding: 9px 12px; color: #d6f5e0; }
.nowbar .ic { color: var(--ok); }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.days span { background: #1b1b24; border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; font-size: 12px; display: flex; flex-direction: column; min-width: 58px; }
.days small { color: var(--dim); font-size: 10.5px; }
.note { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); }
.step { position: relative; padding-left: 58px; }
.step .sn { position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(180deg, #9a8dff, var(--accent)); box-shadow: 0 4px 12px rgba(139,124,255,.3); }
.step h3 > .ic { display: none; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); padding: 16px; place-items: center; background: radial-gradient(800px 400px at 50% 20%, rgba(139,124,255,.25), transparent), var(--bg); }
.login .box { width: 360px; max-width: 100%; text-align: center; background: rgba(22,22,30,.7); border: 1px solid var(--line); border-radius: 22px; padding: 30px 26px; backdrop-filter: blur(12px); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 10px 30px rgba(139,124,255,.35); } .login input { width: 100%; margin: 16px 0 10px; padding: 12px 14px; }
.login .btn { width: 100%; justify-content: center; padding: 11px; }
.err { color: var(--bad); font-size: 13px; min-height: 20px; }
.chart { width: 100%; height: 150px; } .legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; } .legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.legend b { color: #cfcfe0; font-weight: 600; } .dim { color: var(--dim); }
.url { font-family: ui-monospace, Menlo, Consolas, monospace; background: #101017; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; user-select: all; word-break: break-all; font-size: 13px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #24242f; border: 1px solid var(--line2); padding: 10px 16px; border-radius: 12px; opacity: 0; transition: .25s; pointer-events: none; font-weight: 600; z-index: 9; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
#toast.show { opacity: 1; transform: translateX(-50%); }
#tip { position: fixed; z-index: 10; pointer-events: none; background: #24242f; border: 1px solid var(--line2); color: var(--text); font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: 8px; opacity: 0; transition: opacity .12s; box-shadow: 0 8px 24px rgba(0,0,0,.45); white-space: nowrap; left: 0; top: 0; }
#tip.show { opacity: 1; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mt { margin-top: 12px; } .flex { display: flex; gap: 10px; align-items: center; } .grow { flex: 1; }
.grid2 > .card + .card, .grid3 > .card + .card { margin-top: 0; }
.login form input { margin: 8px 0; } .login form input:first-child { margin-top: 16px; } .login .err { margin-bottom: 6px; }
.tabs-open { display: flex; flex-wrap: wrap; gap: 6px; } .tabs-open .chip { cursor: default; display: inline-flex; align-items: center; gap: 4px; }
p .ic { vertical-align: -3px; }

@media (max-width: 1500px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1150px) { .cols { grid-template-columns: 1fr; } .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } .side { position: static; height: auto; } .nav { display: flex; flex-wrap: wrap; gap: 4px; } .nav a.on::before { display: none; } .grid2, .grid3 { grid-template-columns: 1fr; } .kpis, .info { grid-template-columns: repeat(2, 1fr); } main { padding: 20px 16px 40px; } }
@media (max-width: 650px) { .company-metrics { grid-template-columns:repeat(2,1fr); } .company-grid { grid-template-columns:1fr; } .company-fields { grid-template-columns:1fr; } .company-top { flex-wrap:wrap; } }

/* janela (escolher loja) */
.modal-bg { position: fixed; inset: 0; z-index: 20; background: rgba(5,5,10,.6); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 420px; max-width: 100%; max-height: 85vh; overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; } .modal h2 .ic { color: var(--accent); width: 18px; height: 18px; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #101017; border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--text); transition: border-color .15s, background .15s; }
.opt:hover, .opt:focus-visible { border-color: rgba(139,124,255,.6); background: rgba(139,124,255,.08); outline: none; }
.opt.on { border-color: var(--accent); background: rgba(139,124,255,.14); }
.opt .oi { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(139,124,255,.12); color: var(--accent); flex: none; }
.opt.on .oi { color: var(--ok); background: rgba(74,222,128,.12); }
.opt small { color: var(--muted); font-weight: 500; }

.it-card { overflow-x: auto; }
.it-card input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }

/* Controles das abas de trabalho */
.workspace-view { min-width: 0; }
:is(.workspace-view, .company-modal, dialog.card) :is(input:not([type]), input:is([type=text],[type=email],[type=number],[type=password],[type=time],[type=date]), select, textarea) {
  box-sizing: border-box;
  min-height: 42px;
  max-width: 100%;
  border: 1px solid #454352;
  border-radius: 9px;
  background-color: #101017;
  color: var(--text);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}
:is(.workspace-view, .company-modal, dialog.card) :is(input, textarea)::placeholder { color: #9795a6; }
:is(.workspace-view, .company-modal, dialog.card) :is(input, select, textarea):focus-visible {
  outline: 2px solid #a599ff;
  outline-offset: 2px;
  box-shadow: none;
}
:is(.workspace-view, .company-modal, dialog.card) .company-fields { gap: 14px 20px; align-items: end; }
:is(.workspace-view, .company-modal, dialog.card) .company-fields label {
  gap: 7px; color: #d2cfdf; font-size: 13px; font-weight: 550;
}
:is(.workspace-view, .company-modal, dialog.card) .company-fields label[hidden] { display: none; }
.company-fields :is(select, textarea) { width: 100%; min-width: 0; }
.workspace-view .company-fields > button, dialog.card .company-fields > button {
  justify-self: start; grid-column: 1 / -1; min-height: 40px; padding-inline: 18px;
}
.workspace-view .card:has([data-security]) h3:not(:first-child) { margin-top: 24px; }
.workspace-view .card:has([data-security]) .company-fields { max-width: 780px; }
.it-rules > details { border-top: 1px solid var(--line2); margin-top: 20px; padding-top: 15px; }
.it-rules > details > summary { width: fit-content; cursor: pointer; color: #c4bbff; font-weight: 600; }
.workspace-view .batch-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.batch-actions button:disabled { opacity:.55; cursor:not-allowed; }
.workspace-view .it-card:has([data-it=batch]) tr:has(input:checked) { background: rgba(139,124,255,.08); }
@media (max-width:650px) {
  .workspace-view .card { min-width:0; overflow-wrap:anywhere; }
  .workspace-view .company-fields, dialog.card .company-fields { grid-template-columns:minmax(0,1fr); }
  .workspace-view .company-fields > button, dialog.card .company-fields > button { justify-self:stretch; justify-content:center; }
  :is(.workspace-view,.company-modal,dialog.card) .company-fields :is(input,select,textarea) { font-size:16px; min-height:44px; }
  .workspace-view .row:has(> input[type=text]), .workspace-view .row:has(> .url), .workspace-view .flex:has(> input) { flex-wrap:wrap; }
  .workspace-view .row:has(> input[type=text]) .t { flex-basis:100%; }
  .workspace-view .row > input[type=text] { flex:1 0 100%; }
}
@media (max-width:650px) {
  .workspace-view .card:has(> table) { overflow-x:auto; }
}

.support-chat {max-width:760px}
.support-chat [role="log"] {display:flex;flex-direction:column;gap:10px;max-height:52vh;overflow:auto;padding:4px}
.chat-bubble {align-self:flex-start;max-width:85%;padding:10px 14px;border-radius:14px 14px 14px 4px;background:#24232d;color:#faf9ff}
.chat-bubble.mine {align-self:flex-end;background:#45366d;border-radius:14px 14px 4px 14px}
.chat-bubble small {display:block;color:#d4cede;font-size:11px;margin-bottom:4px}
.chat-bubble div {white-space:pre-wrap;overflow-wrap:anywhere}
.support-chat form {display:flex;gap:12px;align-items:flex-end;margin-top:18px}
.support-chat label {display:grid;gap:6px;flex:1;min-width:0}
.support-chat textarea {width:100%;box-sizing:border-box;font:inherit;border-radius:10px;padding:10px}
.ticket-footer {margin-top:18px;padding-top:14px;border-top:1px solid var(--line2)}
.btn.ticket-finish {min-height:44px;padding-inline:16px;background:#184336;color:#c6f9df;border-color:#4c9275;justify-content:center}
.btn.ticket-finish:hover {background:#235640;border-color:#78c69f}
.btn.ticket-finish:focus-visible {outline:2px solid #9be4be;outline-offset:3px}
@media (max-width:560px){.ticket-finish {width:100%}}
.chat-thread {gap:12px}.chat-thread small {overflow-wrap:anywhere}

.pc-tools {margin:16px 0}
.pc-tool-actions,.ticket-filters {display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pc-tool-actions .btn {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;margin:0}
.ticket-filters,.ticket-head {margin:14px 0 16px}
.ticket-link {color:inherit;text-decoration:none;gap:12px}
.ticket-link .t {min-width:0;overflow-wrap:anywhere}
.ticket-link:hover b {color:var(--accent)}
.feed .e.help-alert {margin:5px 0;padding:12px;border:1px solid #5e5288;border-left:4px solid #ad97ff;border-radius:10px;background:#242032}
.feed .help-alert .i {color:#d4c7ff;background:#3e345b}
.help-alert a {display:inline-block;margin-top:5px;color:#d2c6ff;font-weight:600}
@media (max-width:560px){.pc-tool-actions .btn {flex:1 1 180px}.ticket-link {align-items:flex-start;flex-direction:column}.ticket-head {flex-wrap:wrap;gap:10px}}

.alert-nav-label {min-width:0}
.alert-nav-label small {display:block;margin-top:2px;color:var(--muted);font-size:11px;line-height:1.3;font-weight:500}
.alert-filters {margin:16px 0}
.alert-filters .chip {color:var(--text);text-decoration:none}
.alert-list-title {font-size:16px;margin:0 0 12px}
