/* ProjetoAuditor — tema escuro */
:root {
  --bg: #383b43;
  --bg-2: #33353d;
  --sidebar: #25242b;
  --topbar: #2c2d34;
  --panel: #2a2a31;
  --panel-2: #303139;
  --panel-head: #26252b;
  --row: #45464f;
  --row-alt: #3e3f47;
  --row-hover: #50515b;
  --line: #4a4b55;
  --text: #f2f3f5;
  --text-2: #c4c6cc;
  --muted: #9a9ca5;
  --lime: #4169e1;
  --lime-2: #5b7fe8;
  --lime-dark: #3a5fd0;
  --lime-bg: #1e2a52;
  --blue: #1486ce;
  --green: #70b43f;
  --orange: #ff7a00;
  --orange-2: #ff5a1f;
  --yellow: #ffc93e;
  --red: #e5432f;
  --white-card: #d8dfe4;
  --modal-bg: #ffffff;
  --modal-section: #f2f3f5;
  --modal-text: #2a2b30;
  --radius: 8px;
  --sidebar-w: 200px;
  --topbar-h: 42px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lime); }
svg.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Topbar (cronômetro) ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--topbar); display: flex; align-items: center; gap: 16px;
  padding: 0 14px; z-index: 30; border-bottom: 1px solid #24252b;
}
.topbar .info-btn { background: none; border: 0; color: var(--muted); padding: 4px; display: flex; }
.seg { display: flex; background: #1f2026; border-radius: 6px; padding: 2px; }
.seg button { background: none; border: 0; color: var(--text-2); padding: 4px 12px; border-radius: 5px; font-size: 13px; }
.seg button.on { background: #4a4d55; color: #fff; }
.topbar .divider { width: 1px; height: 24px; background: #4a4b55; margin: 0 10px; }
.timer-display { font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; letter-spacing: .5px; min-width: 104px; color: #d9dadf; }
.timer-display.running { color: var(--lime); }
.timer-btn { display: flex; align-items: center; gap: 6px; background: #3a3b43; border: 0; color: var(--text-2); padding: 5px 10px; border-radius: 5px; font-size: 13px; }
.timer-btn:hover { background: #474852; }
.timer-act { font-size: 12px; color: var(--muted); max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-act b { color: var(--lime); font-weight: 600; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w);
  background: var(--sidebar); display: flex; flex-direction: column; z-index: 20;
  transition: width .2s;
}
.brand { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 0 14px; font-weight: 700; font-size: 18px; color: #fff; }
.brand .logo { width: 26px; height: 26px; }
.avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-bottom: 14px; }
.avatar { width: 62px; height: 62px; border-radius: 50%; background: #fff; border: 4px solid var(--lime); color: #444; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; }
.avatar-name { font-weight: 600; font-size: 15px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 2px 0; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; }
.nav a:hover { background: #2f2e37; color: #fff; }
.nav a.on { background: #3d4247; color: #fff; font-weight: 600; }
.nav .badge-new { background: var(--lime); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; margin-left: 2px; }
.nav .sep { height: 1px; background: #34333c; margin: 8px 10px; }
.sidebar .logout { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--text-2); font-size: 14px; border-top: 1px solid #2f2e37; }
.collapse-btn { position: absolute; right: -11px; bottom: 74px; width: 22px; height: 22px; border-radius: 50%; background: #2f3038; border: 0; color: var(--lime); display: flex; align-items: center; justify-content: center; }
body.collapsed { --sidebar-w: 64px; }
body.collapsed .nav a span, body.collapsed .avatar-name, body.collapsed .brand span, body.collapsed .logout span { display: none; }
body.collapsed .avatar { width: 40px; height: 40px; border-width: 3px; font-size: 12px; }
body.collapsed .collapse-btn svg { transform: rotate(180deg); }

/* ---------- Main ---------- */
.main { margin-left: var(--sidebar-w); padding: calc(var(--topbar-h) + 22px) 22px 40px; min-height: 100vh; transition: margin .2s; }
.page-head { margin-bottom: 18px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.page-head h1 svg.ic { width: 24px; height: 24px; color: var(--lime); }
.page-head p { margin: 0; color: var(--text-2); font-size: 15px; }
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; }

.panel { background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--panel-head); font-weight: 600; font-size: 15px; }
.panel-h .t { display: flex; align-items: center; gap: 8px; }
.panel-b { padding: 14px 16px; }
.panel-sub { color: var(--text-2); font-size: 12.5px; margin: -4px 0 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mt { margin-top: 14px; }
.mt2 { margin-top: 22px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.info-i { display: inline-flex; color: var(--muted); cursor: help; }
.info-i svg.ic { width: 14px; height: 14px; }

/* ---------- Stat cards ---------- */
.stats { display: flex; gap: 6px; flex-wrap: wrap; }
.stat { position: relative; width: 246px; height: 92px; border-radius: 6px; padding: 10px 12px; color: #fff; overflow: hidden; }
.stat .l { font-size: 13px; font-weight: 600; }
.stat .v { font-size: 30px; font-weight: 700; margin-top: 6px; letter-spacing: -.5px; }
.stat .i { position: absolute; right: 10px; bottom: 10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; }
.stat .i svg.ic { width: 13px; height: 13px; }
.stat.blue { background: linear-gradient(135deg, #1574c4, #3aa6e8); }
.stat.green { background: linear-gradient(135deg, #5aa531, #93c94a); }
.stat.orange { background: linear-gradient(135deg, #ff5a00, #ff9a1f); }
.stat.yellow { background: linear-gradient(135deg, #ffb21e, #ffd65e); }
.stats.vertical { flex-direction: column; }
.stats.vertical .stat { width: 210px; height: 88px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid #44464e; margin-bottom: 16px; }
.tabs button { background: none; border: 0; padding: 10px 2px; color: var(--muted); font-size: 15px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; gap: 6px; }
.tabs button.on { color: var(--lime); border-color: var(--lime); }
.tabs.plain { border: 0; margin-bottom: 10px; }
.tabs.plain button.on { color: #fff; border-color: var(--lime); }
.subtabs { display: flex; align-items: center; gap: 6px; }
.subtabs button { background: none; border: 0; padding: 6px 8px; border-radius: 6px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.subtabs button.on { background: #2b2c33; color: #fff; }
.minitabs { display: flex; gap: 14px; margin-bottom: 10px; }
.minitabs button { background: none; border: 0; padding: 2px 0; color: var(--muted); font-size: 12px; border-bottom: 1px solid transparent; }
.minitabs button.on { color: #fff; border-color: var(--lime); }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0 3px; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: #fff; padding: 8px 10px; white-space: nowrap; cursor: default; }
.tbl th.sort { cursor: pointer; }
.tbl th .car { font-size: 9px; color: var(--text-2); margin-left: 4px; }
.tbl td { padding: 7px 10px; background: var(--row-alt); white-space: nowrap; }
.tbl tr:nth-child(odd) td { background: var(--row); }
.tbl td:first-child { border-radius: 6px 0 0 6px; }
.tbl td:last-child { border-radius: 0 6px 6px 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--row-hover); }
.tbl tr.total td { background: #23242b !important; font-weight: 700; font-size: 14px; padding: 12px 10px; }
.tbl .ell { max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.tbl .num { text-align: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #a7aab0; }
.dot.ok { background: var(--lime-dark); box-shadow: 0 0 0 2px #1c2b5c; }
.dot.ign { background: var(--orange); }
.stars { color: var(--lime); letter-spacing: 1px; font-size: 14px; white-space: nowrap; }
.stars .off { color: #5a5b63; }
.grau { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.grau i { width: 3px; background: #5a5b63; border-radius: 1px; }
.grau i.on { background: var(--orange); }

/* ---------- Form controls ---------- */
.sel { position: relative; }
select.dd, .dd { background: var(--bg-2); border: 0; border-bottom: 1px solid #5b5d66; color: #fff; padding: 7px 26px 7px 8px; font-size: 13px; font-weight: 600; border-radius: 4px 4px 0 0; appearance: none; -webkit-appearance: none; min-width: 150px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.inp { background: #2c2d34; border: 1px solid #4a4b55; color: #fff; border-radius: 6px; padding: 8px 10px; width: 100%; }
.inp:focus { outline: none; border-color: var(--lime); }
textarea.inp { min-height: 90px; resize: vertical; }
label.f { display: block; font-size: 12px; color: var(--text-2); margin: 10px 0 4px; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 6px; padding: 8px 14px; font-weight: 600; font-size: 13px; background: #4a4c55; color: #fff; }
.btn:hover { filter: brightness(1.1); }
.btn.lime { background: var(--lime); color: #ffffff; }
.btn.green { background: #6ab612; color: #fff; }
.btn.orange { background: #ff6a13; color: #fff; }
.btn.ghost { background: transparent; border: 1px solid #5b5d66; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.danger { background: #b8321f; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.search { position: relative; max-width: 346px; }
.search input { width: 100%; background: var(--bg-2); border: 0; border-radius: 6px; padding: 9px 36px 9px 10px; color: #fff; }
.search svg.ic { position: absolute; right: 10px; top: 9px; color: #ddd; }

/* ---------- Badges ---------- */
.bdg { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.bdg.atraso { background: #ffd8b5; color: #c54b00; }
.bdg.emdia { background: #e3e3e6; color: #555; }
.bdg.antec { background: #d3e8c1; color: #3a6b13; }
.bdg.lime { background: #c9d6ff; color: #1c3a8a; }
.bdg.gray { background: #b5b7bc; color: #333; }
.bdg.orange { background: #ff6a13; color: #fff; }
.bdg.blue { background: #2f86c7; color: #fff; }
.bdg.nivel { background: #c9d6ff; color: #1c3a8a; }
.tipo-Teoria { background: #6ab612; color: #fff; }
.tipo-Questões { background: #ff6a13; color: #fff; }
.tipo-Revisão { background: #2f86c7; color: #fff; }
.tipo-Mapeamento { background: #8a8d96; color: #fff; }
.tipo-Lei { background: #9b59d0; color: #fff; }
.tipo-Reforço { background: #e5432f; color: #fff; }
.tipo-Teste { background: #0f8f9e; color: #fff; }

/* ---------- Meta (home) ---------- */
.meta-top { display: grid; grid-template-columns: 1fr 126px; gap: 10px; }
.meta-card { background: var(--panel-head); border-radius: var(--radius); overflow: hidden; }
.meta-card .panel-h { background: transparent; }
.meta-card .body { background: var(--white-card); color: #333; margin: 0 14px; border-radius: 6px; padding: 10px 12px 12px; }
.meta-wrap { background: var(--panel-head); border-radius: var(--radius); padding-bottom: 12px; }
.meta-tag { display: inline-block; border: 1px solid #5b5d66; border-radius: 4px; padding: 1px 6px; font-size: 13px; font-weight: 600; color: #333; background: #eef1f3; }
.prog { position: relative; height: 12px; background: #4d4d56; border-radius: 8px; margin: 6px 0 10px; }
.prog > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--lime); border-radius: 8px; }
.prog .rocket { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 36px; height: 20px; }
.meta-card .meta-line { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.next-meta { border: 1px solid var(--lime); border-radius: var(--radius); background: var(--panel-head); padding: 10px 8px; text-align: center; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.next-meta .h { display: flex; justify-content: space-between; width: 100%; font-weight: 600; font-size: 13px; }
.next-meta .lock { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--lime); color: var(--lime); display: flex; align-items: center; justify-content: center; }
.next-meta .lock.open { background: var(--lime); color: #fff; }
.next-meta .tag2 { border: 1px solid #6b6d76; border-radius: 4px; padding: 1px 6px; font-weight: 600; }
.meta-stats-wrap { background: var(--panel-head); border-radius: 0 0 var(--radius) var(--radius); padding: 10px 6px 14px; }

/* ---------- Arquivo ---------- */
.metas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; max-height: 300px; overflow-y: auto; padding-right: 8px; }
.mcard { background: #42464b; border-radius: 6px; padding: 10px 12px 4px; cursor: pointer; border: 1px solid transparent; }
.mcard:hover { background: #4a4e54; }
.mcard.on { border-color: var(--lime); }
.mcard .h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; }
.mcard .a { font-size: 12.5px; margin-top: 8px; font-weight: 600; }
.mcard .cnt { display: flex; gap: 6px; align-items: center; font-size: 12.5px; margin-top: 2px; padding-left: 18px; }
.mcard .cnt .dot { width: 8px; height: 8px; }
.mcard .d { text-align: center; font-size: 12.5px; font-weight: 600; margin: 8px 0 4px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.mcard .chev { text-align: center; color: #ccc; border-top: 1px solid #4f545a; padding-top: 2px; }
.infobar { display: grid; grid-template-columns: repeat(3, 1fr); background: #e6e8ec; color: #333; border-radius: 8px; margin: 16px 0 10px; }
.infobar > div { display: flex; align-items: center; gap: 12px; padding: 14px 20px; font-size: 14px; }
.infobar > div + div { border-left: 1px solid #c8cbd0; }
.infobar svg.ic { width: 26px; height: 26px; color: #9a9da3; stroke-width: 1.5; }

/* ---------- Jornada ---------- */
.cal-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.cal-stats > div { background: #2f3037; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; }
.cal-stats b { display: block; font-size: 14px; margin-top: 2px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .h { text-align: center; font-size: 12.5px; padding: 4px 0; }
.cal .d { height: 22px; display: flex; align-items: center; justify-content: center; background: #44464e; font-size: 12px; font-weight: 700; border-radius: 2px; }
.cal .d.out { background: transparent; color: #7a7c84; font-weight: 400; }
.cal .d.leve { background: #1a2a5e; }
.cal .d.forte { background: #2f4fb8; }
.cal .d.extremo { background: #6a8cf0; }
.cal .d.fut { border: 1px dashed #6a6c74; background: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.mgrid { display: grid; grid-template-columns: repeat(19, 1fr); gap: 4px; }
.mgrid > div { aspect-ratio: 1.15; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #1a1a1a; border-radius: 2px; background: #3d3f46; }
.mgrid > div.vazio { background: #3a3c43; }
.tree { font-size: 13px; padding: 4px 6px 10px; }
.tree .node { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.tree .tg { width: 16px; height: 16px; border-radius: 3px; background: #4a4c55; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 11px; cursor: pointer; flex: none; }
.tree .kids { margin-left: 18px; border-left: 1px dashed #4a4c55; padding-left: 10px; }
.tree .done { color: var(--lime); }
.prog-bar { height: 14px; background: #4d4e57; border-radius: 3px; overflow: hidden; }
.prog-bar > i { display: block; height: 100%; background: #2f86c7; font-style: normal; font-size: 10px; font-weight: 700; padding-left: 6px; line-height: 14px; }
.prog-big { height: 14px; background: #4d4e57; border-radius: 3px; overflow: hidden; }
.prog-big > i { display: block; height: 100%; background: linear-gradient(90deg, #2a4bb5, var(--lime)); }

/* ---------- Modal (atividade) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10,10,14,.6); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--modal-bg); color: var(--modal-text); width: min(1300px, 100%); height: min(650px, 92vh); border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal.full { width: 100%; height: 100%; }
.modal-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #eceef1; }
.modal-h .disc { font-weight: 600; font-size: 14px; padding-right: 10px; border-right: 1px solid #ccc; white-space: nowrap; }
.modal-h .tit { font-size: 14px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-h .acts { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ibtn { width: 32px; height: 30px; border: 0; border-radius: 4px; background: transparent; color: #555; display: flex; align-items: center; justify-content: center; }
.ibtn.box { background: #d4d6da; color: #fff; }
.ibtn.box.on { background: #8e9196; }
.ibtn:disabled { opacity: .5; cursor: default; }
.ibtn.fav.on { color: #e5432f; }
.ibtn.fav.on svg { fill: #e5432f; }
.modal-b { flex: 1; overflow-y: auto; padding: 4px 16px 14px; }
.sec { margin-top: 10px; }
.sec-h { display: flex; align-items: center; gap: 8px; background: var(--modal-section); border-radius: 4px; padding: 8px 10px; font-size: 13.5px; cursor: pointer; user-select: none; }
.sec-h .chev { margin-left: auto; transition: transform .15s; }
.sec.open .sec-h .chev { transform: rotate(180deg); }
.sec-b { display: none; padding: 12px 10px 4px; font-size: 13.5px; line-height: 1.55; }
.sec.open .sec-b { display: block; }
.cmd p { margin: 0 0 12px; }
.cmd .hl { background: #fde9d5; font-weight: 700; padding: 1px 2px; }
.cmd ul { margin: 0 0 12px; padding-left: 26px; }
.cmd li { margin: 2px 0; }
.cmd ul ul { list-style: circle; }
.q-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.q-box { border: 1px solid #dfe1e5; border-radius: 4px; padding: 6px 10px; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.q-box b { font-weight: 700; }
.q-box.grow { flex: 1; min-width: 260px; }
.btn-q { background: var(--lime); color: #fff; border: 0; border-radius: 4px; padding: 8px 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.modal-f { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid #eceef1; }
.foot-box { border: 1px solid #dfe1e5; border-radius: 4px; padding: 6px 10px; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.foot-btn { border: 1px solid #dfe1e5; background: #f6f7f9; border-radius: 4px; padding: 6px 12px; font-size: 13px; display: flex; gap: 6px; align-items: center; color: #555; }
.modal-f .right { margin-left: auto; display: flex; gap: 8px; }
.st-pend { background: #a9abb0; color: #fff; }
.st-ok { background: #c9d6ff; color: #1c3a8a; }
.st-ign { background: #ffd8b5; color: #c54b00; }
.modal .inp { background: #fff; border-color: #d4d6db; color: #222; }
.modal label.f { color: #555; }
.modal .muted { color: #888; }
.mat-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e3e5e8; border-radius: 4px; margin-bottom: 6px; }

/* Bizu */
.bizu { font-size: 14px; line-height: 1.6; }
.bizu h1, .bizu h2, .bizu h3 { font-size: 16px; text-decoration: underline; margin: 6px 0 10px; }
.bizu b, .bizu strong { font-weight: 700; }
.bizu .az, .bizu .blue { color: #2b5fa8; }
.bizu .vm, .bizu .red { color: #d64528; }
.bizu ul { padding-left: 24px; }
.bizu .pill { display: inline-block; border: 1.5px solid #555; border-radius: 16px; padding: 3px 14px; margin: 3px 0; }
.bizu .pill.lime { background: var(--lime); border-color: var(--lime); color: #fff; font-weight: 700; }
.bizu .pill.orange { background: #ff6a13; border-color: #ff6a13; color: #fff; font-weight: 700; }
.bizu .pill.dark { background: #333; border-color: #333; color: #fff; font-weight: 700; }
.bizu-edit { border: 1px dashed #c8cbd0; border-radius: 4px; padding: 10px; min-height: 160px; outline: none; }
.bizu-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.bizu-toolbar button { border: 1px solid #d4d6db; background: #fff; border-radius: 4px; padding: 3px 8px; font-size: 12px; }

/* Fixação ativa (flashcards) */
.fx { background: #2a2b31; border-radius: 4px; padding: 14px; color: #eee; }
.fx-steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.fx-steps i { width: 18px; height: 18px; border-radius: 3px; background: #3c3d44; display: flex; align-items: center; justify-content: center; font-size: 10px; font-style: normal; }
.fx-steps i.ok { background: var(--lime); color: #fff; }
.fx-steps i.no { background: #ff6a13; color: #fff; }
.fx-steps i.cur { background: var(--lime); color: #fff; box-shadow: 0 0 0 2px #2a2b31, 0 0 0 3px var(--lime); }
.fx-card { max-width: 440px; margin: 0 auto; background: #2f3036; border: 1px solid #3c3d44; border-radius: 6px; padding: 16px; text-align: center; }
.fx-card .q { font-size: 14px; font-weight: 600; }
.fx-card .resp-l { font-size: 11px; letter-spacing: .5px; color: #aaa; margin-top: 14px; border-top: 1px solid #3c3d44; padding-top: 12px; }
.fx-card .a { font-size: 12.5px; color: #ccc; margin-top: 4px; }
.fx-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.fx-btns button { border-radius: 4px; padding: 8px; font-weight: 600; font-size: 13px; }
.fx-no { background: #3a2a24; border: 1px solid #ff6a13; color: #ff6a13; }
.fx-yes { background: #4169e1; border: 1px solid #4169e1; color: #fff; }
.fx-arena { width: 100%; margin-top: 12px; background: transparent; border: 1px dashed #55565e; color: #aaa; padding: 7px; border-radius: 4px; font-size: 12.5px; }
.fx-show { background: #45464e; border: 0; color: #fff; padding: 8px 18px; border-radius: 4px; margin-top: 14px; font-weight: 600; }

/* ---------- Arena / generic cards ---------- */
.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.fc { background: var(--panel-2); border-radius: 6px; padding: 12px; font-size: 13px; }
.fc .q { font-weight: 600; margin-bottom: 6px; }
.fc .a { color: var(--text-2); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 14px; }
.empty .btn { margin-top: 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1f2026; color: #fff; padding: 10px 18px; border-radius: 8px; border-left: 4px solid var(--lime); z-index: 90; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }

/* ---------- Dark modal (forms) ---------- */
.dmodal { background: #2a2b31; color: var(--text); width: min(640px, 100%); max-height: 92vh; border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; }
.dmodal .modal-h { border-color: #3a3b42; }
.dmodal .modal-h .t { font-weight: 700; font-size: 16px; }
.dmodal .modal-b { padding: 10px 18px 16px; }
.dmodal .modal-f { border-color: #3a3b42; justify-content: flex-end; }
.dmodal .ibtn { color: #ccc; }
.err-grid { display: grid; grid-template-columns: 1fr 90px; gap: 6px 10px; align-items: center; font-size: 13px; }
.opt-row { display: flex; gap: 6px; flex-wrap: wrap; }
.opt-row button { background: #3a3b42; border: 1px solid #4a4b55; color: #ddd; border-radius: 6px; padding: 6px 12px; font-size: 13px; }
.opt-row button.on { background: var(--lime); color: #fff; border-color: var(--lime); font-weight: 600; }

.chart { width: 100%; height: 260px; }
.chart.tall { height: 320px; }

@media (max-width: 900px) {
  :root { --sidebar-w: 64px; }
  .nav a span, .avatar-name, .brand span, .logout span { display: none; }
  .avatar { width: 40px; height: 40px; border-width: 3px; font-size: 12px; }
  .main { padding: calc(var(--topbar-h) + 14px) 12px 30px; }
  .grid2, .cal-wrap { grid-template-columns: 1fr; }
  .meta-top { grid-template-columns: 1fr; }
  .stat { width: calc(50% - 3px); }
  .timer-act, .topbar .divider { display: none; }
  .infobar { grid-template-columns: 1fr; }
  .infobar > div + div { border-left: 0; border-top: 1px solid #c8cbd0; }
  .tbl-wrap { overflow-x: auto; }
  .mgrid { grid-template-columns: repeat(10, 1fr); }
  .collapse-btn { display: none; }
  html, body { overflow-x: hidden; }
  .mob-bar { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; }
  .mob-bar .dd { flex: 1; min-width: 0; }
  #verPlano, .sidebar .small.muted, .sidebar .logout { display: none !important; }
  .sidebar .avatar-wrap { padding-bottom: 6px; }
  .main { padding-left: 10px; padding-right: 10px; }
  .page-head-row { flex-wrap: wrap; gap: 10px; }
  /* atividades em cartões */
  .tbl-ativ thead { display: none; }
  .tbl-ativ, .tbl-ativ tbody { display: block; }
  .tbl-ativ tr { display: grid; grid-template-columns: 18px 24px 1fr auto; gap: 2px 8px; align-items: center; background: var(--row); border-radius: 8px; padding: 9px 10px; margin-bottom: 6px; }
  .tbl-ativ tr:nth-child(odd) td, .tbl-ativ td { background: transparent !important; padding: 0; border-radius: 0 !important; white-space: normal; }
  .tbl-ativ td:nth-child(3) { grid-column: 3; font-weight: 600; font-size: 12.5px; }
  .tbl-ativ td:nth-child(4) { grid-column: 4; grid-row: 1; font-size: 11.5px; color: var(--text-2); text-align: right; }
  .tbl-ativ td:nth-child(5) { grid-column: 2 / 5; max-width: none; font-size: 13px; }
  .tbl-ativ td:nth-child(6) { grid-column: 2 / 3; display: none; }
  .tbl-ativ td:nth-child(7), .tbl-ativ td:nth-child(8) { grid-row: 3; font-size: 11.5px; color: var(--text-2); }
  .tbl-ativ td:nth-child(7) { grid-column: 2 / 4; }
  .tbl-ativ td:nth-child(8) { grid-column: 4; text-align: right; }
  .tbl-ativ td.num { text-align: left; color: var(--muted); font-size: 11.5px; }
  .tbl-ativ td.ell { overflow: visible; }
  .next-meta { flex-direction: row; flex-wrap: wrap; justify-content: center; text-align: left; }
  .next-meta .h { width: 100%; }
  .meta-card .meta-line { flex-wrap: wrap; gap: 4px; }
  .modal { height: 100%; width: 100%; border-radius: 0; }
  .overlay { padding: 0; }
  .filters .dd { min-width: 0; flex: 1 1 140px; }
  .topbar { gap: 8px; padding: 0 8px; }
  .topbar .info-btn { display: none; }
  .seg button { padding: 4px 8px; font-size: 12px; }
  .timer-display { font-size: 16px; min-width: 76px; }
  .stat { height: 78px; }
  .stat .v { font-size: 22px; }
  .stat .l { font-size: 12px; }
  .stat .i { display: none; }
  .page-head h1 { font-size: 21px; }
  .modal-h .tit { display: none; }
  .modal-f { flex-wrap: wrap; }
}

/* ---------- Login ---------- */
body.sem-shell .topbar, body.sem-shell .sidebar { display: none; }
body.sem-shell .main { margin-left: 0; padding: 0; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-box { width: min(380px, 100%); background: var(--panel); border-radius: 12px; padding: 26px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
@media (min-width: 901px) { .mob-bar { display: none; } }
