@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/painel/bc-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url("/painel/bc-700-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("/painel/bc-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap; src: url("/painel/bc-800-italic.woff2") format("woff2"); }

/* Identidade: preto profundo, verde-limão e branco. Títulos condensados em itálico, caixa alta. */
:root {
  --bg: #070807;
  --panel: #0e100d;
  --panel-2: #141712;
  --line: #1f231c;
  --line-2: #2a3026;
  --text: #f4f6f1;
  --muted: #8d9585;
  --dim: #5d6457;
  --lime: #9ad10f;
  --lime-hi: #b4ea2a;
  --lime-soft: rgb(154 209 15 / 12%);
  --lime-line: rgb(154 209 15 / 35%);
  --red: #ff5d4d;
  --red-soft: rgb(255 93 77 / 12%);
  --amber: #f5c542;
  --radius: 16px;
  --display: "Barlow Condensed", "Roboto Condensed", "sans-serif-condensed", "Avenir Next Condensed", "Bahnschrift", "Arial Narrow", sans-serif;
  --body: "Barlow", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 var(--body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}
::selection { background: var(--lime); color: #000; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-hi); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.loading { padding: 60px 20px; text-align: center; color: var(--dim); font-family: var(--display); font-style: italic; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* Tipografia de exibição */
.display, h1, h2, .stat, .brand, .kicker {
  font-family: var(--display);
  font-stretch: condensed;
  font-style: italic;
  text-transform: uppercase;
}
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; line-height: .95; margin: 0; letter-spacing: -.005em; }
h1 .lime { color: var(--lime); }
h2 { font-size: 19px; font-weight: 800; margin: 0; letter-spacing: .01em; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--muted); font-style: normal; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head .sub { margin: 2px 0 0; }

/* Estrutura */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 236px; flex: none; padding: 26px 16px; border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 24px; margin: 0 10px 30px; letter-spacing: .01em; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--lime); display: grid; place-items: center; color: #000; }
.brand .mark svg { width: 18px; height: 18px; stroke-width: 3; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; margin: 2px 0; border-radius: 12px;
  color: var(--muted); font-weight: 600; transition: background .15s, color .15s;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: #000; background: var(--lime); }
.side .foot-note { margin-top: auto; padding: 0 12px; color: var(--dim); font-size: 12px; }
.main { flex: 1; min-width: 0; padding: 34px 38px 110px; max-width: 1120px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }

.tabbar { display: none; }
@media (max-width: 760px) {
  .side { display: none; }
  .main { padding: 22px 16px 104px; }
  .tabbar {
    display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
    background: rgb(14 16 13 / 92%); backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: 18px; padding: 6px;
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; border-radius: 12px;
    font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 7px 0 6px; letter-spacing: .02em;
  }
  .tabbar a svg.i { width: 20px; height: 20px; }
  .tabbar a.on { color: #000; background: var(--lime); }
}

/* Cartões */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1000px) { .span-3 { grid-column: span 6; } .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; } .span-6 { grid-column: span 12; } }
@media (max-width: 520px) { .span-3 { grid-column: span 6; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack > * + * { margin-top: 14px; }
.kpi { display: flex; flex-direction: column; justify-content: space-between; min-height: 128px; }
.kpi .stat { font-size: 52px; font-weight: 800; line-height: .9; font-style: italic; }
.kpi .stat small { font-size: 20px; color: var(--muted); font-weight: 700; }
.kpi.accent { background: var(--lime); border-color: var(--lime); color: #000; }
.kpi.accent .kicker, .kpi.accent .sub { color: rgb(0 0 0 / 65%); }
.kpi.alert .stat { color: var(--red); }
.meter { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.meter i { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.empty { color: var(--dim); padding: 6px 0; font-size: 14px; }

/* Listas */
.list { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 4px; }
.item .body { flex: 1; min-width: 0; }
.item .title { font-weight: 600; word-wrap: break-word; }
.item.done .title { text-decoration: line-through; text-decoration-color: var(--dim); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 4px; font-size: 12.5px; color: var(--muted); align-items: center; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg.i { width: 14px; height: 14px; }
.meta .late { color: var(--red); }
.meta .today { color: var(--lime); }
.meta .warn { color: var(--amber); }
.meta .id { color: var(--dim); }
.actions { display: flex; gap: 2px; flex: none; opacity: .65; transition: opacity .15s; }
.item:hover .actions { opacity: 1; }
@media (hover: none) { .actions { opacity: 1; } }
.time { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 20px; color: var(--lime); min-width: 54px; }

.check {
  flex: none; width: 24px; height: 24px; border-radius: 8px; border: 1.8px solid var(--line-2); background: transparent;
  cursor: pointer; padding: 0; display: grid; place-items: center; color: transparent; transition: all .15s;
}
.check svg.i { width: 15px; height: 15px; stroke-width: 3; }
.check:hover { border-color: var(--lime); color: var(--lime); }
.item.done .check { background: var(--lime); border-color: var(--lime); color: #000; }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; overflow-x: auto; max-width: 100%; }
.seg button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; color: var(--muted);
  font-weight: 700; font-size: 13px; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--lime); color: #000; }
.search { flex: 1; min-width: 200px; position: relative; }
.search svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search input { padding-left: 38px !important; }
.count { font-family: var(--display); font-style: italic; text-transform: uppercase; font-weight: 700; letter-spacing: .08em; color: var(--dim); font-size: 13px; margin-bottom: 4px; }

/* Formulários */
input[type=text], input[type=tel], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--panel-2); outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.55); }
input[type=checkbox] { accent-color: var(--lime); width: 17px; height: 17px; }
textarea { min-height: 84px; resize: vertical; }
label { display: block; font-size: 12px; font-weight: 700; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
label.inline { display: flex; align-items: center; gap: 9px; font-weight: 600; margin: 12px 0; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--text); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { margin: 0; }
.days input { display: none; }
.days span {
  display: inline-block; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line-2); cursor: pointer;
  font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.days input:checked + span { background: var(--lime); color: #000; border-color: var(--lime); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2);
  background: transparent; padding: 10px 16px; border-radius: 11px; cursor: pointer; font-weight: 700; color: var(--text);
  transition: all .15s; font-size: 14px;
}
.btn:hover { border-color: var(--lime); color: var(--lime); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: #000; }
.btn.primary:hover { background: var(--lime-hi); border-color: var(--lime-hi); color: #000; }
.btn.danger:hover { border-color: var(--red); color: var(--red); }
.btn.icon { border-color: transparent; padding: 8px; border-radius: 10px; color: var(--muted); }
.btn.icon:hover { color: var(--text); background: var(--panel-2); }
.btn.icon.del:hover { color: var(--red); }
.btn.block { width: 100%; padding: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.fab { box-shadow: 0 10px 30px rgb(154 209 15 / 25%); }
@media (max-width: 760px) { .fab { position: fixed; right: 18px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 15; border-radius: 16px; padding: 14px 18px; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgb(0 0 0 / 70%); backdrop-filter: blur(4px); z-index: 40; display: grid; place-items: end center; animation: fade .15s; }
@media (min-width: 761px) { .modal-bg { place-items: center; } }
.modal {
  background: var(--panel); border: 1px solid var(--line-2); width: 100%; max-width: 540px; max-height: 92vh; overflow: auto;
  border-radius: 22px 22px 0 0; padding: 24px 22px calc(22px + env(safe-area-inset-bottom)); animation: rise .2s ease-out;
}
@media (min-width: 761px) { .modal { border-radius: 22px; } }
.modal h2 { font-size: 26px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .box { width: 100%; max-width: 420px; }
.login .brand { margin: 0 0 34px; font-size: 28px; }
.login h1 { font-size: 46px; margin-bottom: 10px; }
.login p { color: var(--muted); margin: 0 0 22px; }
.code-input { letter-spacing: .6em; text-align: center; font-size: 28px !important; font-weight: 800; font-family: var(--display); }

/* Gráfico de barras */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { display: block; width: 100%; max-width: 34px; background: var(--panel-2); border-radius: 8px; min-height: 4px; }
.bars .b.has i { background: var(--lime); }
.bars .b span { font-size: 11px; color: var(--dim); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.bars .b em { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 16px; color: var(--text); min-height: 20px; }

/* Barras horizontais (estilo ranking) */
.hbar { padding: 9px 0; }
.hbar .line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.hbar .line b { font-weight: 800; }
.hbar .line small { color: var(--dim); margin-left: 6px; }

#toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(16px); opacity: 0; pointer-events: none;
  background: var(--lime); color: #000; padding: 11px 18px; border-radius: 12px; font-weight: 700; z-index: 60;
  transition: opacity .2s, transform .2s; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--red); color: #fff; }
.more { display: flex; justify-content: center; margin-top: 14px; }
.badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: var(--lime-soft); color: var(--lime); text-transform: uppercase; letter-spacing: .06em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
code.topic { display: block; padding: 11px 13px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; word-break: break-all; font-size: 13px; margin: 0; color: var(--lime); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); margin-right: 8px; }
.status-dot.off { background: var(--dim); box-shadow: none; }

/* Master */
.bars.thin { gap: 3px; height: 120px; }
.bars.thin .b i { max-width: none; border-radius: 4px 4px 1px 1px; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 6px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.item.clickable { cursor: pointer; border-radius: 10px; transition: background .15s; }
.item.clickable:hover { background: var(--panel-2); }
.days input[type=radio] { display: none; }
