@font-face { font-family: "Inter"; font-weight: 400 500; font-display: swap; src: url(/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600 700; font-display: swap; src: url(/fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800 900; font-display: swap; src: url(/fonts/inter-latin-800-normal.woff2) format("woff2"); }
/* Neon Gestão — tema escuro com laranja neon (e tema claro opcional) */
:root {
  --bg: #070b16; --bg2: #0b1120; --panel: #0f1628; --panel2: #141c32; --line: #1e2944; --line2: #2a375a;
  --text: #e7ecf7; --muted: #8b97b4; --dim: #5d6987;
  --orange: #ff6a00; --orange2: #ff9d2e; --glow: rgba(255, 106, 0, .35);
  --green: #22c55e; --red: #ef4444; --yellow: #f59e0b; --blue: #38bdf8; --purple: #a78bfa;
  --radius: 14px; --radius-sm: 10px; --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --side: 248px; --top: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
[data-tema="claro"] {
  --bg: #f4f6fb; --bg2: #eef1f8; --panel: #ffffff; --panel2: #f6f8fc; --line: #e3e8f2; --line2: #d3dbea;
  --text: #121a2e; --muted: #5b6684; --dim: #8d97b1; --glow: rgba(255, 106, 0, .22); --shadow: 0 10px 30px rgba(20, 30, 60, .08);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--orange2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--glow); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid var(--bg); }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--bg2), var(--bg)); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand img { height: 34px; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .4px; margin-top: -2px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px 20px; }
.nav h6 { margin: 16px 10px 6px; font-size: 11px; letter-spacing: 1.2px; color: var(--dim); text-transform: uppercase; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; position: relative; transition: background .15s, color .15s; }
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.on { background: linear-gradient(90deg, rgba(255, 106, 0, .16), rgba(255, 106, 0, .03)); color: var(--text); }
.nav a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.nav a.on svg { color: var(--orange2); }
.nav .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.side-foot { padding: 12px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; cursor: pointer; }
.me:hover { background: var(--panel); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #111; background: linear-gradient(135deg, var(--orange), var(--orange2)); flex: none; }
.me b { display: block; font-size: 13.5px; } .me span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 26px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .mobile-logo { display: none; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); padding: 0 14px 0 40px; outline: none; transition: border .15s, box-shadow .15s; }
.search input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--glow); }
.search > svg { position: absolute; left: 12px; top: 11px; color: var(--dim); }
.search kbd { position: absolute; right: 10px; top: 10px; font-size: 11px; color: var(--dim); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
.search-results { position: absolute; top: 46px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--line); }
.search-results a:hover, .search-results a.sel { background: var(--panel2); }
.search-results small { color: var(--muted); }
.top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--panel); color: var(--text); border-color: var(--line); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.content { padding: 26px; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ---------- Tipografia / cabeçalho de página ---------- */
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.3px; line-height: 1.2; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--text); }
h2.sec { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .gap-s { gap: 6px; }
.stack > * + * { margin-top: 14px; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .08s, background .15s, border .15s, box-shadow .15s; user-select: none; }
.btn:hover { background: var(--panel2); border-color: var(--dim); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--orange), var(--orange2)); color: #160a00; border: 0; box-shadow: 0 6px 22px var(--glow); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 8px 28px var(--glow); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel); color: var(--text); }
.btn.danger { color: #ff8a8a; border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .08); }
.btn.danger:hover { background: rgba(239, 68, 68, .16); }
.btn.success { color: #7ff0a8; border-color: rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .1); }
.btn.wa { background: #1faa59; color: #fff; border: 0; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; }
.btn.icon { width: 40px; padding: 0; } .btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cartões ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.pad0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { margin: 0; font-size: 15px; } .card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }

.kpi { position: relative; overflow: hidden; display: block; color: inherit; transition: transform .15s, border-color .15s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--line2); }
.kpi .lbl { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.kpi .val { font-size: 30px; font-weight: 800; letter-spacing: -.8px; margin-top: 6px; line-height: 1.1; }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--orange)) 16%, transparent); color: var(--c, var(--orange)); }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--orange)) 18%, transparent), transparent 70%); pointer-events: none; }
.kpi.hot .val { color: var(--orange2); text-shadow: 0 0 22px var(--glow); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 20px; background: color-mix(in srgb, var(--c, var(--muted)) 14%, transparent); color: color-mix(in srgb, var(--c, var(--muted)) 85%, var(--text)); white-space: nowrap; border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 25%, transparent); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); box-shadow: 0 0 8px var(--c, transparent); }
.badge.plain::before { display: none; } .badge.plain { padding: 3px 10px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; display: inline-block; }
.pulse.off { background: var(--dim); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line2); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); } .chip.on { background: rgba(255, 106, 0, .14); border-color: rgba(255, 106, 0, .5); color: var(--orange2); }

/* ---------- Tabelas ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .search { max-width: 340px; }
.toolbar .search input { height: 36px; }
.toolbar .search > svg { top: 9px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; background: var(--panel); position: sticky; top: 0; }
.tbl th:hover { color: var(--text); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl tbody tr { cursor: pointer; transition: background .1s; }
.tbl tbody tr:hover { background: var(--panel2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .first { font-weight: 600; color: var(--text); }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pager .btn { margin-left: 4px; }
.cards-list { display: none; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { color: var(--dim); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- Listas simples ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); color: inherit; }
.li:last-child { border-bottom: 0; }
a.li:hover { background: var(--panel2); }
.li .t { font-weight: 600; } .li .s { font-size: 12.5px; color: var(--muted); }
.li .grow { min-width: 0; } .li .grow > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Formulários ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form .full { grid-column: 1 / -1; }
.form-sec { margin-bottom: 18px; }
.form-sec > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin: 0 0 12px; font-weight: 700; }
.field label { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field label .req { color: var(--orange); }
.field .help { font-size: 12px; color: var(--dim); margin-top: 5px; }
.input, .field input:not([type=checkbox]):not([type=file]):not([type=color]), .field select, .field textarea {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); padding: 0 13px; outline: none; transition: border .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 96px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--glow); }
.field input[readonly] { color: var(--muted); background: var(--panel2); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b97b4' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field.err input, .field.err select, .field.err textarea { border-color: var(--red); }
.toggle { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; user-select: none; }
.switch { width: 42px; height: 24px; border-radius: 20px; background: var(--line2); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch.on { background: var(--orange); box-shadow: 0 0 14px var(--glow); } .switch.on::after { transform: translateX(18px); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg button.on { border-color: var(--c, var(--orange)); color: var(--text); background: color-mix(in srgb, var(--c, var(--orange)) 14%, transparent); }
.seg button .d { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--orange)); }
.rel { position: relative; }
.rel .opts { position: absolute; z-index: 40; top: 48px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); max-height: 280px; overflow-y: auto; }
.rel .opts div { padding: 10px 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.rel .opts div:hover, .rel .opts div.sel { background: var(--panel2); }
.rel .clear { position: absolute; right: 8px; top: 8px; }
.upload { border: 1.5px dashed var(--line2); border-radius: 14px; padding: 16px; text-align: center; color: var(--muted); cursor: pointer; transition: border .15s, background .15s; background: var(--bg2); }
.upload:hover, .upload.drag { border-color: var(--orange); background: rgba(255, 106, 0, .05); }
.file-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); }
.file-chip .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.progress { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange2)); box-shadow: 0 0 12px var(--glow); transition: width .2s; }
.savebar { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 10px; align-items: center; padding: 12px 0; margin-top: 8px; background: linear-gradient(0deg, var(--bg) 70%, transparent); }

/* ---------- Abas ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; padding: 11px 14px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--orange); }
.tabs .n { font-size: 11.5px; background: var(--panel2); border: 1px solid var(--line2); padding: 0 7px; border-radius: 10px; }

/* ---------- Ficha (detalhe) ---------- */
.hero { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(120% 140% at 100% 0%, rgba(255, 106, 0, .14), transparent 55%), var(--panel); margin-bottom: 18px; flex-wrap: wrap; }
.hero .big-avatar { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #160a00; background: linear-gradient(135deg, var(--orange), var(--orange2)); box-shadow: 0 10px 30px var(--glow); flex: none; }
.hero h1 { margin: 0; font-size: 24px; } .hero .meta { color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; font-size: 13.5px; }
.hero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.mini-stats .card { padding: 14px 16px; } .mini-stats .v { font-size: 20px; font-weight: 800; } .mini-stats .l { font-size: 12.5px; color: var(--muted); }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; padding-bottom: 16px; }
.tl::before { content: ""; position: absolute; left: -20px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--orange); }
.tl .when { font-size: 12px; color: var(--dim); }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.col-head { padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.col-head b { font-size: 14px; } .col-head .sum { margin-left: auto; font-size: 12px; color: var(--muted); }
.col-body { padding: 10px; overflow-y: auto; flex: 1; min-height: 80px; display: flex; flex-direction: column; gap: 10px; }
.col.over { border-color: var(--orange); box-shadow: 0 0 0 3px var(--glow) inset; }
.kcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: grab; transition: transform .1s, border-color .15s, box-shadow .15s; }
.kcard:hover { border-color: var(--line2); box-shadow: var(--shadow); }
.kcard.dragging { opacity: .5; transform: rotate(2deg); }
.kcard .t { font-weight: 700; } .kcard .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kcard .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; }

/* ---------- Modal / Toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(3, 6, 14, .66); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s; }
.modal.wide { max-width: 860px; } .modal.xwide { max-width: 1100px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.modal-head h3 { margin: 0; font-size: 17px; } .modal-head .x { margin-left: auto; }
.modal-body { padding: 20px; } .modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow); min-width: 260px; max-width: 420px; animation: pop .2s; }
.toast.ok svg { color: var(--green); } .toast.err svg { color: var(--red); } .toast.err { border-color: rgba(239, 68, 68, .4); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: radial-gradient(80% 80% at 30% 30%, rgba(255, 106, 0, .35), transparent 60%), radial-gradient(60% 60% at 80% 80%, rgba(56, 120, 255, .25), transparent 60%), #05080f; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; }
.login-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 40% 40%, #000, transparent 75%); }
.login-art img { width: 260px; position: relative; filter: drop-shadow(0 10px 40px rgba(255, 106, 0, .45)); }
.login-art h2 { position: relative; font-size: 38px; line-height: 1.15; margin: 26px 0 10px; letter-spacing: -.8px; max-width: 520px; color: #fff; }
.login-art p { position: relative; color: #9aa6c4; max-width: 460px; margin: 0; }
.login-art .orb { position: absolute; border-radius: 50%; filter: blur(2px); animation: float 9s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-24px) translateX(12px); } }
.login-form { display: grid; place-items: center; padding: 32px; }
.login-form .box { width: 100%; max-width: 380px; }
.login-form h1 { font-size: 28px; margin: 0 0 6px; } .login-form p { color: var(--muted); margin: 0 0 26px; }

/* ---------- Diversos ---------- */
.skeleton { background: linear-gradient(90deg, var(--panel2), var(--line), var(--panel2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.code { background: #04070e; border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: #cfe3ff; white-space: pre; position: relative; }
[data-tema="claro"] .code { background: #0d1324; }
.code .copy { position: absolute; right: 8px; top: 8px; }
.token-box { background: rgba(255, 106, 0, .08); border: 1px solid rgba(255, 106, 0, .35); border-radius: 14px; padding: 14px; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(56, 189, 248, .08); border: 1px solid rgba(56, 189, 248, .25); color: var(--text); font-size: 14px; }
.callout.warn { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .3); }
.callout.ok { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .3); }
.callout svg { flex: none; margin-top: 2px; }
.chart-box { position: relative; height: 260px; }
.folder { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: inherit; }
.folder:hover, .folder.on { border-color: rgba(255, 106, 0, .5); background: rgba(255, 106, 0, .06); }
.folder .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 106, 0, .14); color: var(--orange2); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.thumb { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); cursor: pointer; transition: transform .12s, border-color .12s; }
.thumb:hover { transform: translateY(-2px); border-color: var(--line2); }
.thumb .pv { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--bg2); color: var(--dim); overflow: hidden; }
.thumb .pv img { width: 100%; height: 100%; object-fit: cover; }
.thumb .nm { padding: 10px 12px; font-size: 13px; } .thumb .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 800; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cal .dh { padding: 8px; font-size: 12px; color: var(--dim); text-transform: uppercase; font-weight: 700; background: var(--panel); border-bottom: 1px solid var(--line); text-align: center; }
.cal .day { min-height: 116px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: var(--bg2); opacity: .6; } .cal .day.today { box-shadow: inset 0 0 0 2px var(--orange); }
.cal .num { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.cal .ev { display: block; font-size: 12px; padding: 4px 6px; border-radius: 7px; margin-bottom: 4px; background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 3px solid var(--c); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.provider { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.provider:last-child { border-bottom: 0; }
.provider .ord { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line2); font-weight: 800; font-size: 13px; color: var(--muted); flex: none; }
.provider.ready .ord { background: rgba(34, 197, 94, .15); border-color: rgba(34, 197, 94, .4); color: var(--green); }
.preview-post { background: #fff; color: #111; border-radius: 14px; overflow: hidden; max-width: 380px; box-shadow: var(--shadow); }
.preview-post .ph { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: 13.5px; }
.preview-post .ph img { width: 30px; height: 30px; border-radius: 50%; background: #111; object-fit: contain; }
.preview-post .im { aspect-ratio: 1; background: #eee; display: grid; place-items: center; color: #999; }
.preview-post .im img { width: 100%; height: 100%; object-fit: cover; }
.preview-post .tx { padding: 10px 12px 14px; font-size: 13.5px; white-space: pre-line; max-height: 240px; overflow-y: auto; }
.model-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.model-pick button { border: 1px solid var(--line2); background: var(--bg2); border-radius: 12px; padding: 10px; text-align: left; cursor: pointer; color: var(--text); }
.model-pick button.on { border-color: var(--orange); box-shadow: 0 0 0 3px var(--glow); }
.model-pick b { display: block; font-size: 13px; } .model-pick span { font-size: 11.5px; color: var(--muted); }

/* ---------- Navegação mobile ---------- */
.bottom-nav { display: none; }
.fab { display: none; }
.drawer-bg { display: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 86vw; max-width: 320px; transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .drawer-bg.open { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px); }
  .top { padding: 0 12px; gap: 8px; }
  .top .mobile-logo { display: block; height: 28px; }
  .search.collapsed { display: none; }
  .content { padding: 16px 14px 110px; }
  .g2, .g3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .form { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .tbl-wrap.has-cards { display: none; }
  .cards-list { display: flex; flex-direction: column; }
  .citem { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); color: inherit; }
  .citem:active { background: var(--panel2); }
  .citem .l1 { display: flex; align-items: center; gap: 8px; } .citem .l1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .citem .l2 { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--muted); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--dim); background: none; border: 0; padding: 6px 0; cursor: pointer; position: relative; }
  .bottom-nav .on { color: var(--orange2); } .bottom-nav .on svg { filter: drop-shadow(0 0 8px var(--glow)); }
  .bottom-nav .count { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 10px; }
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 41; width: 58px; height: 58px; border-radius: 18px; border: 0; color: #160a00; background: linear-gradient(135deg, var(--orange), var(--orange2)); box-shadow: 0 10px 30px var(--glow); cursor: pointer; }
  .toasts { bottom: calc(150px + env(safe-area-inset-bottom)); right: 12px; left: 12px; }
  .toast { max-width: none; }
  .overlay { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 22px 22px 0 0; max-width: none !important; animation: up .22s ease; }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 34vh; padding: 28px; }
  .login-art h2 { font-size: 26px; } .login-art img { width: 180px; }
  .hero { padding: 16px; } .hero .actions { margin-left: 0; width: 100%; } .hero .actions .btn { flex: 1; }
  .kanban { grid-auto-columns: 86vw; scroll-snap-type: x mandatory; } .col { scroll-snap-align: start; max-height: none; }
  .savebar { bottom: calc(66px + env(safe-area-inset-bottom)); }
  .cal .day { min-height: 70px; padding: 4px; } .cal .ev { font-size: 10.5px; padding: 2px 4px; }
}
@media (max-width: 560px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi .val { font-size: 24px; } .kpi { padding: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 980px) { .hide-m { display: none !important; } }
@media (min-width: 981px) { .show-m { display: none !important; } }
details summary::-webkit-details-marker { color: var(--orange2); }
code { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; }
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: #070b16; z-index: 999; }
#boot img { width: 180px; animation: bootp 1.4s ease-in-out infinite; filter: drop-shadow(0 0 30px rgba(255,106,0,.5)); }
@keyframes bootp { 50% { opacity: .55; transform: scale(.97); } }
@media (max-width: 980px) {
  .toolbar .search { flex: 1 1 100%; max-width: none; order: -1; }
  .toolbar > span.muted { margin-right: auto; }
  .hero .meta { gap: 8px; }
}
