:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #18202b;
  --muted: #8a93a3;
  --faint: #b6bdc9;
  --line: #e8ecf0;
  --danger: #e11d48;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
/* sem barras de rolagem visíveis */
* { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* barra horizontal fixa do quadro; os demais scrollbars continuam discretos */
#board-scrollbar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
  height: 17px; padding: 0 12px; overflow-x: auto; overflow-y: hidden;
  background: color-mix(in srgb, var(--bg) 92%, #fff);
  border-top: 1px solid rgba(214, 221, 229, .85);
  scrollbar-width: thin; -ms-overflow-style: auto;
}
#board-scrollbar::-webkit-scrollbar { display: block; width: auto; height: 10px; }
#board-scrollbar::-webkit-scrollbar-track { background: transparent; }
#board-scrollbar::-webkit-scrollbar-thumb { background: #aeb8c5; border: 2px solid transparent; border-radius: 8px; background-clip: padding-box; }
#board-scrollbar:hover::-webkit-scrollbar-thumb { background: #7d8a9b; border: 2px solid transparent; background-clip: padding-box; }
#board-scrollbar-content { height: 1px; min-width: 100%; pointer-events: none; }

.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- ícones / botões minimalistas ---------- */
.ibtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; color: var(--muted);
  transition: background .12s, color .12s; flex: none; text-decoration: none;
}
.ibtn:hover { background: #eceff3; color: var(--ink); }
.ui-icon { display: block; flex: none; }
.ibtn:focus-visible, .file-name:focus-visible, .direction-hint:focus-visible { outline: 2px solid var(--acc, #0f766e); outline-offset: 2px; }
.ibtn.danger:hover { background: #fdeef2; color: var(--danger); }
.ibtn.accent:hover { color: var(--acc, var(--ink)); background: color-mix(in srgb, var(--acc, #333) 10%, transparent); }
.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 9px; padding: 7px 14px; font-weight: 600; font-size: 13.5px;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #f2f4f7; border-color: #d8dee5; }
.btn.primary { background: var(--acc, #0f766e); border-color: transparent; color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--acc, #0f766e) 85%, #000); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: #fdeef2; border-color: #f3c5d1; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }

/* ---------- auth ---------- */
#auth-screen {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  background: #fbfcfd; padding: 20px;
}
.auth-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 30px; width: 100%; max-width: 380px; text-align: center;
}
.auth-logo { font-size: 34px; }
.auth-card h1 { font-size: 22px; letter-spacing: -.02em; margin-top: 6px; }
.auth-sub { color: var(--muted); margin: 4px 0 20px; font-size: 13.5px; }
.auth-online {
  display: inline-flex; align-items: center; gap: 6px; margin: -8px 0 15px; padding: 5px 9px;
  border: 1px solid #d8ece3; border-radius: 999px; background: #f5fbf7; color: #26734b;
  font-size: 11px; font-weight: 700;
}
.auth-online i { width: 6px; height: 6px; border-radius: 50%; background: #22a05a; box-shadow: 0 0 0 3px rgba(34,160,90,.12); }
.tabs { display: flex; gap: 2px; background: #f0f2f5; border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.tab { flex: 1; padding: 8px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.auth-form { display: flex; flex-direction: column; gap: 9px; }
.auth-form input, .modal input, .modal textarea, .modal select {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; outline: none; width: 100%;
  transition: border-color .12s, box-shadow .12s; background: var(--card);
}
.auth-form input:focus, .modal input:focus, .modal textarea:focus, .modal select:focus {
  border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}
.form-msg { font-size: 12.5px; color: var(--muted); min-height: 1em; }
.form-msg.error { color: var(--danger); }
.form-msg.success { color: var(--ok); }

/* ---------- topbar ---------- */
#topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tb-left { display: flex; align-items: center; gap: 9px; }
.logo { font-size: 21px; }
.tb-title { display: flex; flex-direction: column; line-height: 1.2; }
.tb-title strong { font-size: 15px; letter-spacing: -.01em; }
.tb-title span { font-size: 11.5px; color: var(--muted); }
.next-exam {
  font-size: 12.5px; font-weight: 600; color: #0f766e;
  background: rgba(15,118,110,.08); padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.next-exam.today { color: var(--danger); background: rgba(225,29,72,.08); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tb-user { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; margin-left: 8px; }
.tb-user .ibtn { font-size: 12px; width: auto; padding: 0 8px; }
.notification-btn { position: relative; }
.notification-badge {
  position: absolute; top: -2px; right: -1px; min-width: 14px; height: 14px; padding: 0 3px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  background: #e11d48; color: #fff; font-size: 8.5px; line-height: 1; font-weight: 800;
  border: 2px solid #fff;
}
.notification-badge[hidden] { display: none !important; }

/* armazenamento minimalista */
.storage { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.storage-track { width: 90px; height: 4px; border-radius: 2px; background: #e8ecf0; overflow: hidden; }
.storage-fill { height: 100%; background: #0f766e; border-radius: 2px; }
.storage-fill.warn { background: var(--warn); }
.storage-fill.crit { background: var(--danger); }
.community-online { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.community-online i { width: 6px; height: 6px; border-radius: 50%; background: #22a05a; box-shadow: 0 0 0 3px rgba(34,160,90,.12); }

/* contribuição diária */
.contrib-chip {
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.contrib-chip.ok { background: #e9f7ee; color: var(--ok); }
.contrib-chip.missing { background: #fdf3e0; color: var(--warn); cursor: help; }
.contrib-chip:empty { display: none; }

/* chip de horas de acesso */
#access-chip-wrap:has(> .access-chip:empty) { display: none; }
.access-chip {
  border: 0; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 5px 11px;
  display: inline-flex; align-items: center; gap: 7px; min-width: 132px;
  white-space: nowrap; cursor: pointer; transition: transform .1s;
}
.access-label { line-height: 1; }
.access-meter {
  display: block; width: 42px; height: 5px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, currentColor 18%, transparent);
}
.access-meter > span { display: block; height: 100%; border-radius: inherit; background: currentColor; transition: width .25s ease; }
.access-meter.infinite > span { width: 100%; opacity: .68; background: repeating-linear-gradient(115deg, currentColor 0 6px, transparent 6px 10px); }
.access-chip:active { transform: scale(.96); }
.access-chip.ok { background: #e9f7ee; color: var(--ok); }
.access-chip.low { background: #fdf3e0; color: var(--warn); }
.access-chip.crit { background: #fdeef2; color: var(--danger); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* popover de recompensas */
.access-pop {
  position: fixed; top: 54px; right: 16px; z-index: 80; width: 250px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 32px rgba(16,24,40,.14); padding: 12px 14px;
}
.pop-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.pop-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.pop-row b { color: var(--ok); font-variant-numeric: tabular-nums; }
.pop-status { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; font-size: 12.5px; color: var(--muted); }
.pop-status b { color: var(--ink); }
.pop-tour { display: block; margin-top: 9px; padding-top: 8px; width: 100%; border-top: 1px solid var(--line); color: var(--acc, #0f766e); font-size: 11.5px; font-weight: 700; text-align: left; }
.pop-tour:hover { color: var(--ink); }

/* toasts */
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #1d2530; color: #f2f5f8; font-size: 13.5px; border-radius: 12px;
  padding: 11px 18px; box-shadow: 0 8px 28px rgba(0,0,0,.3); text-align: center;
  animation: toast-in .28s cubic-bezier(.2,.9,.3,1.2); max-width: min(420px, 90vw);
}
.toast b { color: #7ee2a8; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .35s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.95); } to { opacity: 1; transform: none; } }

/* onboarding */
.onboard { text-align: center; padding: 4px 2px; }
.ob-logo { font-size: 40px; margin-bottom: 4px; }
.onboard h3 { font-size: 18px; }
.onboard p { color: var(--muted); font-size: 13.5px; margin: 8px 0 16px; }
.onboard p b { color: var(--ink); }
.ob-kicker { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin: 2px 0 4px; }
.ob-tour-copy { min-height: 56px; }
.ob-dots { display: flex; justify-content: center; gap: 5px; margin: 4px 0 2px; }
.ob-dots i { width: 6px; height: 6px; border-radius: 50%; background: #d6dde4; }
.ob-dots i.on { background: var(--acc, #0f766e); width: 17px; border-radius: 999px; }
.access-community-note { margin-top: -3px !important; font-size: 11.5px !important; }
.ob-rewards {
  background: #f7f9fa; border: 1px solid var(--line); border-radius: 12px;
  padding: 6px 12px; margin-bottom: 16px;
}
.ob-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font-size: 14px; }
.ob-row + .ob-row { border-top: 1px solid #eef1f4; }
.ob-ic { font-size: 18px; }
.ob-label { flex: 1; text-align: left; font-weight: 600; }
.ob-h { font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; }
.ob-btn { width: 100%; padding: 11px; font-size: 14.5px; }

/* likes */
.like-btn { gap: 3px; font-size: 12px; }
.like-btn.on { color: var(--danger); }
.like-btn .lk-n { font-size: 10.5px; font-weight: 700; }

/* admin: horas e vitalício */
.u-hours { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.u-hours.vit { color: var(--ok); }
.u-hours.low { color: var(--danger); }
.u-presence { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--faint); font-size: 10.5px; line-height: 1.2; }
.u-presence i { width: 6px; height: 6px; border-radius: 50%; background: #c3cad3; flex: none; }
.u-presence.online { color: var(--ok); font-weight: 700; }
.u-presence.online i { background: #22a05a; box-shadow: 0 0 0 3px rgba(34,160,90,.12); }
.life-btn { border: 1px solid var(--line); color: var(--faint); font-weight: 800; }
.life-btn.on { background: #e9f7ee; border-color: #b7e4c7; color: var(--ok); }

/* recompensa no upload */
.reward-line {
  background: #e9f7ee; border: 1px solid #c8ead4; color: #14683b;
  border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600; margin-top: 4px;
}
.reward-line:empty { display: none; }
.upload-policy { color: var(--muted); font-size: 11.5px; line-height: 1.5; margin-top: -2px; }

/* dropzone do explorador de arquivos */
.dropzone {
  border: 2px dashed #cfd8e0; border-radius: 12px; padding: 22px 16px; text-align: center;
  cursor: pointer; transition: border-color .12s, background .12s; margin-bottom: 10px;
}
.dropzone:hover, .dropzone.over { border-color: var(--acc); background: rgba(15,118,110,.04); }
.dz-ic { font-size: 26px; margin-bottom: 4px; }
.dz-txt { font-size: 13px; color: var(--muted); line-height: 1.5; }
.dz-txt b { color: var(--ink); }
.dz-sub { font-size: 11.5px; color: var(--faint); }

/* lista inteligente de arquivos selecionados */
.sf-row {
  display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 7px 8px;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: #fbfcfd;
}
.sf-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sf-ic { font-size: 15px; flex: none; }
.sf-name {
  flex: 1; min-width: 0; border: 1px solid transparent; background: transparent;
  border-radius: 7px; padding: 5px 8px; font-size: 13px; font-weight: 600; outline: none;
}
.sf-name:not(input) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-name:hover { border-color: var(--line); }
.sf-name:focus { border-color: var(--acc); background: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc, #0f766e) 12%, transparent); }
.sf-meta { font-size: 10.5px; color: var(--faint); text-align: right; flex: none; line-height: 1.35; font-variant-numeric: tabular-nums; }
.sf-meta b { color: var(--ok); font-size: 11px; }
.sf-deck-row { gap: 4px; }
.sf-deck-files {
  margin: 0 0 1px 23px; color: var(--faint); font-size: 10.5px; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sf-sale { display: flex; align-items: center; gap: 7px; padding: 5px 0 1px 23px; border-top: 1px solid #eef1f4; color: var(--muted); font-size: 11px; }
.sf-sale-choice { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sf-sale-choice input { width: 13px; height: 13px; accent-color: var(--acc, #0f766e); }
.sf-price { width: 64px !important; padding: 5px 7px !important; font-size: 11px !important; }
.sf-price:disabled { opacity: .42; background: #f0f2f5; }
.sf-sale-suffix { margin-left: -5px; }
.summary-sell-intro { display: flex; gap: 10px; margin: -2px 0 12px; padding: 11px 12px; border: 1px solid #d9d5ff; border-radius: 12px; background: radial-gradient(circle at 100% 0%, rgba(124,58,237,.12), transparent 48%), linear-gradient(135deg, #faf9ff, #f5fbfa); color: #4b5563; }
.summary-sell-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: none; border-radius: 9px; background: #ece9ff; color: #6d58d9; font-size: 16px; }
.summary-sell-intro b { display: block; color: #36324d; font-size: 12.5px; margin-bottom: 3px; }
.summary-sell-intro p { font-size: 11.5px; line-height: 1.45; }
.sale-edit-btn { color: #6d58d9; }
.sale-editor { max-width: 390px; }
.sale-editor > .summary-sell-icon { margin-bottom: 8px; }
.sale-editor h3 { margin-bottom: 5px; }
.sale-editor-copy { color: var(--muted); font-size: 12px; line-height: 1.45; margin-bottom: 12px; }
.sale-options { display: grid; gap: 7px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; }
.sale-options label { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.sale-options input { width: 14px; height: 14px; accent-color: var(--acc, #0f766e); }
.sale-price-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.sale-price-label input { width: 100px; padding: 7px 9px; }

/* badge de pendências no botão admin */
#btn-admin { position: relative; }
.badge {
  position: absolute; top: -4px; right: -5px; min-width: 16px; height: 16px;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; padding: 0 4px;
}
.modo-section {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); margin: 12px 0 2px;
}
.modo-section.pend { color: var(--warn); }
.modal-title-row { display: flex; align-items: center; gap: 6px; }
.modal-title-row h3 { flex: 1; }
.admin-live { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.admin-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.admin-refresh { width: 28px; height: 28px; color: var(--muted); font-size: 17px; }
.admin-refresh:hover { color: var(--acc); background: color-mix(in srgb, var(--acc) 9%, transparent); }

/* ---------- board ---------- */
#board {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px 48px;
  overflow-x: auto; min-height: calc(100dvh - 55px);
}
.column {
  --acc: #0f766e;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--acc);
  border-radius: var(--radius); width: 390px; min-width: 390px;
  max-height: calc(100dvh - 92px); display: flex; flex-direction: column;
  transition: box-shadow .15s, border-color .15s;
}
.column.next { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--acc) 45%, transparent), 0 6px 20px rgba(16,24,40,.06); }
.column.drag-over { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 35%, transparent); }
.column.dragging { opacity: .45; }
.past-group { display: flex; align-items: flex-start; gap: 12px; flex: none; }
.past-columns { display: none; align-items: flex-start; gap: 12px; }
.past-group.expanded .past-columns { display: flex; }
.past-controls { width: 188px; min-width: 188px; height: 74px; display: flex; align-items: flex-start; justify-content: flex-end; padding-top: 4px; }
.past-toggle {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid #d7dee7; border-radius: 999px;
  padding: 6px 10px; color: #667387; background: rgba(255,255,255,.94); font-size: 11px; font-weight: 700;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(16,24,40,.06); transition: color .12s, border-color .12s, background .12s;
}
.past-toggle:hover { color: var(--acc, #0f766e); border-color: color-mix(in srgb, #0f766e 32%, #d7dee7); background: #fff; }
.past-toggle .ui-icon { width: 13px; height: 13px; transform: rotate(180deg); }
.past-group.expanded .past-toggle .ui-icon { transform: rotate(0deg); }

.col-head { padding: 13px 14px 11px; border-bottom: 1px solid var(--line); cursor: grab; }
.col-head:active { cursor: grabbing; }
.col-head-top { display: flex; align-items: center; gap: 8px; }
.exam-date-badge {
  background: var(--acc); color: #fff; border-radius: 7px; padding: 3px 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.exam-date-badge.past { background: #aeb6c2; }
.countdown { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.countdown.d-soon { color: var(--danger); }
.countdown.d-next { color: var(--acc); }
.col-title-row { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.col-title { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.download-all-btn {
  display: inline-flex; align-items: center; gap: 4px; flex: none; border: 1px solid color-mix(in srgb, var(--acc) 28%, var(--line));
  border-radius: 7px; padding: 4px 7px; background: color-mix(in srgb, var(--acc) 5%, #fff); color: var(--acc);
  font-size: 10px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .12s, border-color .12s;
}
.download-all-btn .ui-icon { width: 13px; height: 13px; }
.download-all-btn:hover, .download-all-btn.loading { background: color-mix(in srgb, var(--acc) 12%, #fff); border-color: var(--acc); }
.download-all-btn:disabled { opacity: .7; cursor: wait; }
.exam-delete-btn { width: 28px; height: 28px; color: #aeb7c4; }
.exam-delete-btn:hover { color: var(--danger); background: #fdeef2; }
.col-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.col-progress { margin-top: 9px; }
.progress-track { height: 4px; border-radius: 2px; background: #e8ecf0; overflow: hidden; }
.progress-fill { height: 100%; background: var(--acc); border-radius: 2px; transition: width .3s; }
.progress-label { font-size: 11px; color: var(--faint); margin-top: 4px; font-weight: 500; }
.upload-progress-modal { min-width: min(420px, 82vw); }
.upload-progress-modal h3 { margin-bottom: 8px; }
.upload-progress-modal .progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e9edf3;
  box-shadow: inset 0 1px 2px rgba(30, 42, 65, .08);
}
.upload-progress-modal .progress-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #4f46e5);
  box-shadow: 0 0 10px rgba(79, 70, 229, .24);
  transition: width .2s ease-out;
}
.upload-progress-modal .progress-label {
  margin-top: 8px;
  color: var(--acc);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.direction-box {
  border-left: 3px solid var(--acc); background: color-mix(in srgb, var(--acc) 5%, #fff);
  border-radius: 0 8px 8px 0; padding: 8px 11px; margin-top: 10px; font-size: 12.5px; color: #47505e;
}
.direction-title { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.direction-box b { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--acc); }
.direction-copy { line-height: 1.45; }
.direction-edit {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  padding: 0; border: 0; border-radius: 5px; background: transparent; color: #8994a5; cursor: pointer;
  opacity: .75; transition: background .12s, color .12s, opacity .12s;
}
.direction-edit .ui-icon { width: 12px; height: 12px; }
.direction-edit:hover { opacity: 1; color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.direction-hint {
  display: inline-flex; align-items: center; gap: 5px; color: var(--muted);
  padding: 5px 7px; margin-top: 7px; font-size: 11px; border-radius: 7px;
}
.direction-hint:hover { background: #f4f6f8; color: var(--acc); }
.direction-hint .ui-icon { width: 13px; height: 13px; }
.direction-hint b { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #b3bac4; margin-bottom: 2px; }
.empty-hint { font-size: 11.5px; color: var(--faint); padding: 3px 4px; line-height: 1.4; }
.empty-hint b { color: #8a93a3; font-weight: 600; }
.col-tools { display: flex; gap: 2px; margin-top: 8px; margin-left: -4px; }

.col-body { overflow-y: auto; padding: 10px 11px 13px; flex: 1; display: flex; flex-direction: column; }
.materials-shell { display: flex; flex-direction: column; gap: 10px; }
.materials-toolbar { display: flex; align-items: center; justify-content: flex-start; min-height: 27px; }
.materials-add {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #d8e0e7;
  border-radius: 7px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.materials-add .ui-icon { width: 13px; height: 13px; }
.materials-add:hover { border-color: #aeb9c5; color: var(--ink); background: #f8fafb; }
.materials-block { display: flex; flex-direction: column; gap: 4px; }
.materials-block-head { display: flex; align-items: center; gap: 6px; padding: 3px 3px 4px; color: var(--ink); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid #e6ebef; }
.materials-block-head small { color: var(--faint); font-size: 10px; font-weight: 700; }
.materials-files { display: flex; flex-direction: column; gap: 4px; }
.materials-empty { color: var(--faint); font-size: 11.5px; padding: 9px 3px; text-align: center; border: 1px dashed #d6dee7; border-radius: 8px; }
.materials-summary .materials-block-head, .materials-transcript .materials-block-head, .materials-slide .materials-block-head { color: var(--ink); }
.materials-block.file-drop-ready { position:relative; outline:2px dashed color-mix(in srgb,var(--acc) 58%,#b8c5ce); outline-offset:2px; border-radius:10px; filter:saturate(1.06); }
.materials-block.file-drop-ready .materials-block-head { box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 9%,transparent); }
.section-label {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: #687386; margin: 13px 2px 7px; padding-top: 11px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px;
}
.col-body > .section-label:first-child { margin-top: 2px; padding-top: 0; border-top: 0; }
.section-label:first-child { margin-top: 0; }
.section-label .sl-count { color: var(--muted); font-weight: 600; }
.section-label .ibtn { width: 22px; height: 22px; font-size: 13px; border-radius: 6px; }
.section-label .ibtn:hover { color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.section-label .spacer { flex: 1; }

/* ---------- aulas ---------- */
.lesson {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--lesson-accent, #dfe4ea);
  border-radius: 8px; margin-bottom: 5px; transition: border-color .12s, box-shadow .12s;
}
.lesson:hover { border-color: #d0d7de; box-shadow: 0 1px 4px rgba(16,24,40,.05); }
.lesson.lesson-tone-0 { --lesson-accent: #0f9f8f; }
.lesson.lesson-tone-1 { --lesson-accent: #6956d8; }
.lesson.lesson-tone-2 { --lesson-accent: #e59b17; }
.lesson.lesson-tone-3 { --lesson-accent: #df5c72; }
.lesson.lesson-tone-4 { --lesson-accent: #2c83c7; }
.lesson.lesson-tone-5 { --lesson-accent: #a455c7; }
.lesson.lesson-tone-6 { --lesson-accent: #359b58; }
.lesson.lesson-tone-7 { --lesson-accent: #df6d2b; }
.lesson.partial, .lesson.complete { border-left-color: var(--lesson-accent); }
.lesson.open { border-color: color-mix(in srgb, var(--lesson-accent) 30%, var(--line)); border-left-color: var(--lesson-accent); }
.lesson.drop-file { border-color: var(--acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 35%, transparent); }
.lesson.dragging { opacity: .4; }

/* ícone de categoria clicável */
.ic-cat {
  border: 0; background: none; font-size: 15px; width: 24px; height: 24px;
  cursor: pointer; padding: 2px; border-radius: 6px; flex: none;
  transition: background .1s;
}
.ic-cat:hover { background: #eceff3; transform: scale(1.1); }

/* lista contínua de arquivos na ordem de adição */
.lesson-files { display: flex; flex-direction: column; gap: 3px; }
.lesson-files.drop-in { outline: 2px dashed color-mix(in srgb, var(--acc) 40%, transparent); outline-offset: 2px; border-radius: 8px; }
.lesson.drop-before { box-shadow: 0 -2px 0 0 var(--acc); }
.lesson.drop-after { box-shadow: 0 2px 0 0 var(--acc); }
.lessons-wrap.drop-in { outline: 2px dashed color-mix(in srgb, var(--acc) 40%, transparent); outline-offset: 2px; border-radius: 10px; }

.lesson-head {
  display: flex; align-items: flex-start; gap: 7px; min-height: 38px; padding: 8px 9px; cursor: pointer; user-select: none;
}
/* ações laterais da aula — aparecem no hover, sempre visíveis no toque */
.head-acts {
  display: inline-flex; align-items: center; gap: 1px; flex: none;
  opacity: 0; transition: opacity .12s;
}
.lesson-head:hover .head-acts, .lesson.open .head-acts { opacity: 1; }
@media (hover: none) { .head-acts { opacity: 1; } }
.grip {
  color: #c6cdd6; font-size: 12px; letter-spacing: -2px; cursor: grab;
  user-select: none; padding: 0 1px; flex: none; transition: color .12s;
}
.grip:hover { color: var(--acc); }
.pencil { width: 24px; height: 24px; font-size: 12px; flex: none; opacity: .55; }
.pencil:hover { opacity: 1; }
.lesson-date { font-size: 10.5px; font-weight: 700; color: var(--acc); white-space: nowrap; letter-spacing: .02em; }
.lesson-name {
  flex: 1; min-width: 0; color: var(--lesson-accent, #0f766e); font-size: 13.5px; line-height: 17px; font-weight: 700;
  overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere;
}
.lesson-arrow { color: var(--faint); font-size: 10px; transition: transform .18s; }
.lesson-arrow .ui-icon { width: 13px; height: 13px; }
.lesson-head > .lesson-arrow { margin-top: 2px; }
.lesson.open .lesson-arrow { transform: rotate(90deg); color: var(--muted); }

.checks { display: flex; gap: 10px; padding: 0 11px 9px; }
.check { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.check.on { color: var(--ok); }
.check.off { color: #d5dae1; text-decoration: none; }

.lesson-detail { border-top: 1px solid var(--line); padding: 5px 7px 6px; }
.lesson:not(.open) .lesson-detail { display: none; }
.drive-line {
  display: inline-flex; align-items: center; gap: 5px; margin: 4px 0 2px;
  color: var(--acc); font-size: 12px; font-weight: 600; text-decoration: none;
  padding: 3px 8px; border-radius: 7px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drive-line:hover { background: color-mix(in srgb, var(--acc) 8%, transparent); }

/* barra de ações da aula — uma linha, rótulos claros */
.lesson-bar {
  display: flex; align-items: center; gap: 1px;
  border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 5px;
}
.lesson-bar .grow { flex: 1; }
.lb-btn {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  padding: 5px 9px; border-radius: 7px; transition: background .1s, color .1s;
}
.lb-btn:hover { background: #f0f2f5; color: var(--ink); }
.lb-btn.danger:hover { background: #fdeef2; color: var(--danger); }

.add-lesson-row {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 5px;
  margin: 5px 0 2px; padding: 7px 8px; border: 1px dashed #cbd6e1; border-radius: 7px;
  background: transparent; color: var(--acc); font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.add-lesson-row .ui-icon { width: 13px; height: 13px; }
.add-lesson-row:hover { background: color-mix(in srgb, var(--acc) 7%, transparent); border-color: var(--acc); }

/* lista de arquivos: barras uniformes e compactas */
.file-card {
  margin: 0; min-width: 0; cursor: grab;
}
.file-card:active { cursor: grabbing; }
.file-card.dragging { opacity: .4; }
.file-card.drop-before { box-shadow: 0 -2px 0 0 var(--acc); }
.file-card.drop-after { box-shadow: 0 2px 0 0 var(--acc); }
.file-card:hover .file-row { border-color: #d3dbe5; background: #fafbfc; }
.file-row {
  display: flex; align-items: flex-start; gap: 7px; min-height: 39px; padding: 7px 8px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; transition: border-color .1s, background .1s;
}
.file-ic { display: inline-flex; justify-content: center; width: 20px; color: #718096; flex: none; margin-top: 1px; }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; }
.file-name { display: block; font-size: 13px; line-height: 17px; font-weight: 700; overflow-wrap: anywhere; cursor: pointer; color: inherit; text-decoration: none; }
.file-name.locked { cursor: default; }
.file-name:hover { color: var(--acc); }
.file-name.locked:hover { color: inherit; }
.file-bottom { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; min-height: 26px; }
.file-meta { display: block; flex: 1; min-width: 0; font-size: 10px; line-height: 12px; color: var(--faint); font-weight: 500; text-align: right; white-space: normal; overflow-wrap: anywhere; }
.file-acts { display: flex; gap: 1px; align-self: center; flex: none; opacity: .65; transition: opacity .12s; }
.file-row:hover .file-acts, .file-card:hover .file-acts, .lesson-detail:hover .file-acts { opacity: 1; }
@media (hover: none) { .file-acts { opacity: 1; } }
.file-acts .ibtn { width: 26px; height: 26px; font-size: 12.5px; border-radius: 7px; }
.like-btn { color: #9aa4b2; }
.like-btn:hover, .like-btn.on { color: #e11d48; }
.like-btn.on .ui-icon { fill: currentColor; }
.access-download-slot { display: inline-flex; align-items: center; min-width: 0; }
.access-download-group { display: inline-flex; align-items: center; height: 26px; overflow: hidden; border: 1px solid #dfe7e9; border-radius: 8px; background: #fbfcfd; white-space: nowrap; }
.access-status, .purchase-btn { display: inline-flex; align-items: center; justify-content: center; height: 24px; min-width: 0; padding: 0 8px; border: 0; border-right: 1px solid #e4ebed; border-radius: 0; white-space: nowrap; }
.access-status { font-size: 10px; font-weight: 800; }
.access-free { color: #0f766e; background: #f3fbf8; }
.purchase-btn { color: #5d4fd0; background: #faf9ff; cursor: pointer; }
.purchase-btn:hover { color: #5140bf; background: #f1efff; }
.purchase-price { font-size: 10px; font-weight: 800; letter-spacing: -.02em; }
.access-download-group .download-action { display: inline-flex; align-items: center; justify-content: center; gap: 2px; height: 24px; min-width: 31px; padding: 0 6px; border: 0; border-radius: 0; color: var(--muted); background: transparent; }
.access-download-group .download-action:hover { color: var(--ink); background: #f0f3f5; }
.access-download-group .download-action-locked { color: #aab4bf; cursor: default; }
.access-download-group .download-action-locked:hover { color: #aab4bf; background: transparent; }
.summary-free-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 0 8px; border: 1px solid #cfe9df; border-radius: 7px; background: #f4fbf8; color: #0f766e; font-size: 10px; font-weight: 800; white-space: nowrap; }
.file-acts .ibtn.danger:hover { background: #fdeef2; color: var(--danger); }
.file-acts a.ibtn { color: var(--muted); }
.file-acts a.ibtn:hover { background: #eceff3; color: var(--ink); }
.download-action { gap: 2px; }
.download-count { font-size: 9px; line-height: 1; font-weight: 800; color: var(--faint); }
.processing-state { font-size: 10px; font-weight: 700; white-space: nowrap; }
.processing-state.pending, .processing-state.running { color: var(--warn); }
.processing-state.saved { color: #4f46e5; }
.processing-state.ready { color: var(--ok); }
.processing-state.failed { color: var(--danger); }
.processing-state-line { display: block; margin-top: 4px; line-height: 12px; }
.processing-progress { display: flex; align-items: center; gap: 7px; width: 100%; margin-top: 5px; }
.processing-track { flex: 1; min-width: 70px; height: 4px; border-radius: 999px; overflow: hidden; background: #e8edf2; }
.processing-fill { display: block; height: 100%; border-radius: inherit; background: var(--acc); transition: width .35s ease; }
.processing-progress em { flex: none; color: var(--warn); font-size: 10px; line-height: 12px; font-style: normal; font-weight: 700; white-space: nowrap; }
.transcription-btn { font-size: 10px; font-weight: 800; letter-spacing: -.03em; color: #4f46e5; }
.reprocess-btn { color: var(--warn); font-size: 16px; }
/* O lápis do autor/admin fica sempre disponível e fecha a barra de ações. */
.file-title-edit { opacity: 1; color: var(--muted); }
.file-title-edit:hover, .file-title-edit:focus { color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.transcription-modal { min-width: min(680px, 80vw); }
.transcription-status { color: var(--ok); font-size: 11px; font-weight: 700; white-space: nowrap; }
.transcription-copy { margin-top: 12px; max-height: 58dvh; overflow: auto; padding: 12px; white-space: pre-wrap; line-height: 1.55; font-size: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }

/* arquivos de nível da prova (extras/resumos) */
.exam-file-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 7px; }
.exam-file-row:hover { background: #f4f6f8; }

.notifications-modal { width: 100%; min-width: 0; max-width: 100%; }
.notification-hero { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-4px -4px 12px; padding:12px; border-radius:13px; background:linear-gradient(135deg,#f2fbfa,#f7f5ff); border:1px solid #dfecea; }
.notification-hero > div { display:flex; align-items:center; gap:10px; min-width:0; }
.notification-hero h3 { margin:0 0 2px; }
.notification-hero p { margin:0; color:var(--muted); font-size:11px; }
.notification-spark { width:34px; height:34px; flex:none; display:grid; place-items:center; border-radius:11px; color:#fff; background:linear-gradient(145deg,#12a89b,#6c5ce7); box-shadow:0 8px 18px rgba(18,168,155,.2); animation:notificationGlow 2.4s ease-in-out infinite; }
@keyframes notificationGlow { 0%,100%{transform:translateY(0);box-shadow:0 7px 17px rgba(18,168,155,.18)} 50%{transform:translateY(-1px);box-shadow:0 10px 24px rgba(108,92,231,.24)} }
.notification-count { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.notification-list { display: flex; flex-direction: column; gap: 6px; max-height: 56dvh; overflow-y: auto; }
.notification-item { position:relative; display:flex; gap:10px; padding:10px; border:1px solid var(--line); border-radius:11px; background:#fff; transition:transform .15s,box-shadow .15s; overflow:hidden; }
.notification-item:hover { transform:translateY(-1px); box-shadow:0 7px 18px rgba(29,43,61,.07); }
.notification-item.unread { border-color:#aedfd8; background:linear-gradient(135deg,#f6fffd,#fff); }
.notification-item.unread::after { content:''; position:absolute; right:-16px; top:-18px; width:50px; height:50px; border-radius:50%; background:rgba(29,188,169,.09); }
.notification-icon { width:28px; height:28px; flex:none; display:grid; place-items:center; border-radius:9px; background:#eef4f8; color:#58708a; font-weight:900; }
.tone-download .notification-icon { color:#087d70; background:#e9f8f5; }.tone-like .notification-icon{color:#e25578;background:#fff0f4}.tone-sale .notification-icon{color:#6b54cc;background:#f1efff}.tone-welcome .notification-icon{color:#b06b00;background:#fff6df}.tone-warning .notification-icon{color:#bf5c15;background:#fff1e7}
.notification-copy { min-width:0; flex:1; }
.notification-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.notification-item-top b { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
.notification-item-top time { color: var(--faint); font-size: 10px; white-space: nowrap; }
.notification-item p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.notification-empty { color: var(--muted); font-size: 12.5px; padding: 14px 4px; text-align: center; }

.purchase-confirm { max-width: 390px; }
.purchase-confirm-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 9px; border-radius: 50%; background: #f1efff; color: #5d4fd0; font-size: 20px; font-weight: 800; }
.purchase-confirm h3 { margin-bottom: 7px; }
.purchase-confirm p { color: var(--muted); font-size: 12.5px; line-height: 1.48; }
.purchase-confirm p b { color: var(--ink); }
.purchase-balance { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin: 12px 0; padding: 10px; border: 1px solid #e0ddff; border-radius: 10px; background: #fbfaff; }
.purchase-balance span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.purchase-balance small { color: var(--faint); font-size: 10px; }
.purchase-balance b { color: var(--ink); font-size: 14px; }
.purchase-balance .purchase-minus { color: #6d58d9; font-size: 11px; font-weight: 800; white-space: nowrap; }
.purchase-confirm-note { margin-top: 9px; font-size: 11px !important; color: var(--faint) !important; }

/* trilha privada do administrador: densa e legível, sem misturar com as
   notificações comuns da comunidade */
.admin-activity { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-activity-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.admin-activity-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-activity-head b { color: var(--ink); font-size: 12px; }
.admin-activity-head span { color: var(--faint); font-size: 10px; }
.admin-activity-head em { flex: none; min-width: 22px; padding: 3px 6px; border-radius: 999px; background: #eef7f5; color: var(--acc); font-size: 10px; font-style: normal; font-weight: 800; text-align: center; }
.admin-activity-list { display: flex; flex-direction: column; gap: 5px; max-height: 42dvh; overflow-y: auto; padding-right: 2px; }
.admin-activity-item { padding: 7px 8px; border: 1px solid #e5eaee; border-radius: 8px; background: #fbfcfd; }
.admin-activity-main { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 11.5px; line-height: 1.38; }
.admin-activity-main strong { color: var(--ink); font-weight: 750; }
.admin-activity-icon { flex: none; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 5px; background: #edf7f5; color: var(--acc); font-weight: 900; line-height: 1; }
.admin-activity-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; padding-left: 22px; color: var(--faint); font-size: 10px; }
.admin-activity-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-activity-meta time { flex: none; white-space: nowrap; }
.admin-activity-empty { color: var(--muted); font-size: 11.5px; padding: 8px 2px; text-align: center; }

/* Central administrativa: ocupa a tela com densidade de dashboard, mantendo
   todos os controles existentes e agrupando a atividade ao vivo. */
.modal:has(.admin-modal-shell) { max-width:min(1380px,calc(100vw - 28px)); width:min(1380px,calc(100vw - 28px)); padding:0; overflow:hidden; }
.admin-modal-shell { display:flex; flex-direction:column; height:min(760px,90dvh); max-height:90dvh; background:#f8fafb; }
.admin-wide-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 18px 10px; background:#fff; border-bottom:1px solid var(--line); }
.admin-wide-head h3 { margin:1px 0 1px; font-size:18px; letter-spacing:-.025em; }.admin-wide-head p{margin:0;color:var(--muted);font-size:10.5px}.admin-kicker{color:var(--acc);font-size:8.5px;font-weight:850;text-transform:uppercase;letter-spacing:.1em}.admin-head-actions{display:flex;align-items:center;gap:7px}.admin-head-actions .ibtn{width:27px;height:27px;border:1px solid #e2e7eb;background:#fff}
.admin-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 18px 0}.admin-stat-strip { display:flex; gap:6px; padding:0; }.admin-stat-strip span{display:flex;align-items:baseline;gap:4px;padding:5px 9px;border:1px solid #e2e8ed;border-radius:999px;background:#fff;color:var(--muted);font-size:9.5px}.admin-stat-strip b{color:var(--ink);font-size:11px}.admin-stat-strip .online{border-color:#cdebe2;background:#f3fcf9}.admin-stat-strip .online b{color:#07866f}
.admin-tabs { display:flex; gap:3px; margin:0; padding:3px; width:max-content; border-radius:9px; background:#e9eef1; }.admin-tabs button{padding:6px 14px;border-radius:7px;color:var(--muted);font-size:10.5px;font-weight:750}.admin-tabs button.active{color:var(--ink);background:#fff;box-shadow:0 1px 3px rgba(20,30,42,.1)}
.admin-tab-panel { flex:1; min-height:0; overflow:auto; padding:9px 18px 12px; }.admin-tab-panel[hidden]{display:none}.admin-section-title{display:flex;align-items:center;gap:6px;margin:2px 0 6px;color:var(--ink);font-size:10.5px;font-weight:800}.admin-section-title em{padding:1px 5px;border-radius:999px;background:#e8eef1;color:var(--muted);font-size:8px;font-style:normal}.admin-section-title.timeline-title{margin-top:12px}
.admin-user-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }.pending-grid{margin-bottom:11px}
.user-card { position:relative; display:flex; flex-direction:column; align-items:stretch; gap:6px; min-width:0; padding:9px 10px; border:1px solid #e0e6eb; border-radius:10px; background:#fff; box-shadow:0 1px 5px rgba(26,40,58,.035); font-size:10.5px; }.user-card.is-online{border-color:#bfe3d8;box-shadow:0 3px 10px rgba(15,150,122,.06)}.user-card.is-online::before{content:'';position:absolute;left:-1px;top:9px;bottom:9px;width:2px;border-radius:0 2px 2px 0;background:#18aa87}.user-card .u-info{min-width:0}.u-name-line{display:flex;align-items:center;gap:5px}.u-name-line strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px}.u-crown{color:#a17615}.user-card .u-email{margin-top:1px!important;font-size:9.5px!important}.u-last-seen,.u-live-detail{display:flex;align-items:center;gap:5px;min-width:0;margin-top:4px;color:#6d7d8e;font-size:9.5px;line-height:1.25}.u-last-seen .ui-icon,.u-live-detail .ui-icon{width:12px;height:12px}.u-last-seen span,.u-live-detail span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.u-last-seen b,.u-live-detail b{color:#455667;font-weight:700}.u-live-detail{margin-top:3px;padding:5px 6px;border-radius:6px;background:#f4f7f9}.user-card.is-online .u-live-detail{background:#effaf6;color:#27705f}.u-name-line .u-presence{margin-left:auto;font-size:9px}.u-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:6px;padding-top:6px;border-top:1px solid #edf0f2}.u-card-meta,.u-card-actions{display:flex;align-items:center;gap:4px;min-width:0}.u-card-meta{flex-wrap:wrap}.u-card-actions{flex:none}.u-card-actions .ibtn{width:24px;height:24px;border-radius:6px}.u-card-actions .ui-icon{width:14px;height:14px}.u-hours{display:inline-flex;align-items:center;gap:3px;font-size:9.5px}.u-hours .ui-icon{width:11px;height:11px}.status-pill{font-size:8.5px!important;padding:2px 6px!important}.u-card-actions .danger{margin-left:0}
.live-activity-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.live-activity-card{display:flex;align-items:flex-start;gap:9px;padding:11px;border:1px solid #dce9e5;border-radius:11px;background:#fff}.live-activity-card .live-dot{width:8px;height:8px;flex:none;margin-top:3px;border-radius:50%;background:#16a77f;box-shadow:0 0 0 4px rgba(22,167,127,.11);animation:livePulse 2s infinite}.live-activity-card b{font-size:11.5px}.live-activity-card p{margin:3px 0 0;color:var(--muted);font-size:10.5px;line-height:1.35}@keyframes livePulse{50%{box-shadow:0 0 0 7px rgba(22,167,127,0)}}
.activity-timeline{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.activity-row{display:grid;grid-template-columns:26px 1fr auto;align-items:start;gap:8px;padding:9px 10px;border:1px solid #e2e7eb;border-radius:10px;background:#fff}.activity-mark{width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:#eff4f7;color:#607486;font-weight:900}.activity-row.watch .activity-mark{color:#12866d;background:#eaf8f4}.activity-row.download .activity-mark{color:#476b91;background:#edf4fb}.activity-row.publication .activity-mark{color:#745ac6;background:#f2effd}.activity-row.like .activity-mark{color:#d94f75;background:#fff0f4}.activity-mark .ui-icon{width:14px;height:14px}.activity-row b{font-size:11.5px}.activity-row p{margin:2px 0 0;color:var(--muted);font-size:10.5px;line-height:1.35}.activity-row time{color:var(--faint);font-size:9.5px;white-space:nowrap}
.admin-wide-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 18px;border-top:1px solid var(--line);background:#fff}.admin-wide-foot p{margin:0;color:var(--faint);font-size:9.5px}.admin-wide-foot .btn{padding:6px 13px;font-size:11px}
.u-name-line .u-presence{max-width:54%;font-size:8.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.u-crown .ui-icon{width:13px;height:13px}
@media (max-width:1120px){.admin-user-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:820px){.admin-user-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-toolbar{align-items:flex-start;flex-direction:column}.admin-stat-strip{width:100%;overflow-x:auto}}

.warning-modal { max-width: 390px; }
.warning-modal .warning-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #fff4df; color: var(--warn); font-size: 19px; margin-bottom: 9px; }
.warning-modal h3 { margin-bottom: 7px; }
.warning-modal p { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.warning-modal p b { color: var(--ink); }
.warning-modal .warning-note { margin-top: 10px; padding: 9px 10px; border-left: 3px solid var(--warn); border-radius: 0 8px 8px 0; background: #fffaf0; color: #7c4a03; font-size: 11.5px; }

/* coluna fantasma */
.ghost-column {
  width: 150px; min-width: 150px; min-height: 74px; align-self: flex-start; margin-top: 0; border-radius: var(--radius);
  border: 1.5px dashed #d3dae1; display: flex; align-items: center; justify-content: center;
  gap: 6px; color: var(--faint); font-size: 12px; font-weight: 700; transition: border-color .12s, color .12s, background .12s;
}
.ghost-column .ui-icon { width: 15px; height: 15px; }
.ghost-column:hover { border-color: #0f766e; color: #0f766e; background: rgba(15,118,110,.04); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 22, 32, .35); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(2px);
}
.modal-backdrop.above-reader { z-index: 230; }
.modal {
  background: var(--card); border-radius: 14px; padding: 20px; width: 100%; max-width: 440px;
  max-height: 88dvh; overflow-y: auto;
}
.modal h3 { font-size: 15.5px; margin-bottom: 14px; letter-spacing: -.01em; }
.modal form { display: flex; flex-direction: column; gap: 10px; }
.modal label { font-size: 11.5px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 4px; letter-spacing: .02em; }
.modal textarea { min-height: 84px; resize: vertical; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.seg { display: flex; gap: 4px; background: #f0f2f5; border-radius: 10px; padding: 3px; }
.seg button {
  flex: 1; padding: 8px 6px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--muted);
  transition: background .12s, color .12s;
}
.seg button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.1); }
.file-drop {
  border: 1.5px dashed #d3dae1; border-radius: 10px; padding: 18px 12px; text-align: center;
  color: var(--muted); font-size: 13px; cursor: pointer; transition: border-color .12s;
}
.file-drop:hover { border-color: #0f766e; color: #0f766e; }
.file-drop input { display: none; }
.pend-group { margin-bottom: 12px; }
.pend-group h4 { font-size: 13px; margin-bottom: 4px; }
.pend-item { font-size: 12.5px; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); margin-left: 2px; color: var(--muted); }
.pend-item b { color: var(--danger); font-weight: 600; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.user-row:last-of-type { border-bottom: 0; }
.user-row .u-info { flex: 1; min-width: 0; }
.user-row .u-email { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.user-row .role-btn { color: #8b6f2f; }
.user-row .role-btn.on { background: #fff7dc; border-color: #ead38a; color: #8a6410; }
.user-row .role-btn:hover { color: #79590b; background: #fff7dc; }
.user-row .study-btn { color: #58708a; }
.user-row .study-btn.on { background: #edf5ff; border-color: #bfd8f5; color: #2563a6; }
.user-row .study-btn:hover { color: #1d4f82; background: #edf5ff; }
.admin-help { font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; line-height: 1.45; }
.status-pill { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.status-pill.approved { background: #e9f7ee; color: var(--ok); }
.status-pill.pending { background: #fdf3e0; color: var(--warn); }
.status-pill.rejected { background: #fdeef2; color: var(--danger); }
.status-pill.banned { background: #fde7ec; color: #be123c; }
.u-warning { color: var(--warn); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.txt-view {
  background: var(--card); border-radius: 10px; padding: 18px; white-space: pre-wrap;
  font-size: 13.5px; max-height: 58dvh; overflow-y: auto; border: 1px solid var(--line);
}

/* ---------- viewer PDF ---------- */
.viewer { position: fixed; inset: 0; z-index: 100; background: #1c1f24; display: flex; flex-direction: column; }
.viewer-bar {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: #171a1e; color: #e6e9ed; flex-wrap: wrap;
}
.v-btn {
  border-radius: 8px; padding: 6px 11px; font-weight: 600; font-size: 13px; color: #c9cfd7;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  transition: background .12s, color .12s;
}
.v-btn:hover { background: #262b31; color: #fff; }
.v-back { background: #0f766e; color: #fff; font-weight: 700; padding: 6px 14px; }
.v-back:hover { background: #0c625b; color: #fff; }
.v-btn.icon { padding: 6px 10px; font-size: 15px; }
.v-dl { background: #1d63d1; color: #fff; }
.v-dl:hover { background: #1a55b4; color: #fff; }
.v-title { font-size: 12.5px; font-weight: 600; color: #aab2bd; max-width: 32vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-spacer { flex: 1; }
.v-zoom { font-size: 11.5px; color: #838c97; font-variant-numeric: tabular-nums; }
.viewer-container { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 14px; }
#v-canvas { box-shadow: 0 6px 30px rgba(0,0,0,.45); max-width: none; }
.txt-view.viewer-mode { max-width: 820px; width: 100%; margin: auto; max-height: none; border: 0; background: transparent; color: #e6e9ed; }

/* ---------- leitor de transcrição em tela inteira ---------- */
.transcription-reader {
  position: fixed; inset: 0; z-index: 170; display: flex; flex-direction: column;
  background: #f7f9fb; color: var(--ink); overscroll-behavior: none;
}
.transcription-reader-bar {
  min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 1px 8px rgba(16,24,40,.06);
}
.transcription-reader-bar h1 {
  flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.25; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tr-btn, .tr-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none;
  min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--muted); padding: 0 9px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.tr-btn:hover, .tr-download:hover { color: var(--acc); border-color: color-mix(in srgb, var(--acc) 35%, var(--line)); background: #f6fbfa; }
.tr-close { width: 32px; padding: 0; font-size: 22px; line-height: 1; }
.tr-download .ui-icon { width: 15px; height: 15px; }
.transcription-reader-body { flex: 1; min-height: 0; overflow: auto; padding: clamp(18px, 4vw, 48px); }
.transcription-reader-body article {
  width: min(920px, 100%); margin: 0 auto; white-space: pre-wrap; overflow-wrap: anywhere;
  color: #253142; font-size: clamp(14px, 1.6vw, 17px); line-height: 1.72;
}

/* ---------- leitor Anki de imagens da Radiologia ---------- */
.image-reader {
  position: fixed; inset: 0; z-index: 180; display: flex; flex-direction: column;
  background: #0b1118; color: #f4f7fa; overscroll-behavior: none;
}
.image-reader-topbar {
  min-height: 44px; display: flex; align-items: center; gap: 3px; padding: 5px 8px;
  background: rgba(10, 16, 23, .96); border-bottom: 1px solid rgba(255,255,255,.1);
}
.ir-btn {
  width: 31px; height: 31px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 8px; color: #c9d2dc; font-size: 19px; line-height: 1;
}
.ir-btn:hover, .ir-btn.active { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.12); }
.ir-btn.ir-reveal { width: auto; padding: 0 8px; font-size: 10.5px; font-weight: 700; }
.ir-btn.ir-close { font-size: 24px; }
.ir-counter { flex: none; min-width: 31px; color: #8f9baa; font-size: 10.5px; font-variant-numeric: tabular-nums; text-align: center; }
.ir-title { min-width: 0; max-width: min(36vw, 360px); color: #e7edf3; font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ir-spacer { flex: 1; }
.image-reader-stage {
  position: relative; flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center;
  padding: 12px; touch-action: pan-x pan-y;
}
.image-canvas { position: relative; line-height: 0; max-width: 100%; max-height: 100%; transition: transform .18s ease; }
.image-reader.zoomed .image-reader-stage { align-items: flex-start; justify-content: flex-start; }
.image-reader.zoomed .image-canvas { transform: scale(1.65); transform-origin: top left; margin: 10px; }
#ir-image { display: block; max-width: calc(100vw - 24px); max-height: calc(100dvh - 70px); width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.image-box-layer { position: absolute; inset: 0; }
.image-box {
  position: absolute; display: flex; align-items: center; justify-content: center; padding: 2px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 6px; background: #08111b; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.24); cursor: pointer; overflow: hidden; line-height: 1.1;
}
.image-box span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.image-box.revealed { background: transparent; border-color: rgba(94,234,212,.96); box-shadow: none; }
.image-box-draft { position: absolute; border: 2px dashed #5eead4; background: rgba(13,148,136,.14); pointer-events: none; }
.image-edit-hint { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px); padding: 6px 10px; border-radius: 999px; background: rgba(10,16,23,.86); color: #c9d2dc; font-size: 10.5px; text-align: center; white-space: nowrap; }
.image-box-form { max-width: 360px; }
.image-box-copy { color: var(--muted); font-size: 12px; line-height: 1.45; margin: -6px 0 5px; }

/* ---------- responsivo ---------- */
@media (max-width: 720px) {
  #topbar { padding: 8px 10px; gap: 7px; flex-wrap: wrap; }
  .tb-left { gap: 7px; min-width: 0; }
  .tb-left { flex: 1 1 auto; }
  .logo { font-size: 19px; }
  .tb-title strong { font-size: 14px; }
  .tb-left span#today-label { display: block; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .tb-right { order: 4; width: 100%; margin-left: 0; gap: 1px; min-width: 0; justify-content: space-between; padding-top: 3px; border-top: 1px solid #f0f2f5; }
  .tb-user { margin-left: 2px; gap: 1px; }
  .tb-user span { max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
  .tb-user #btn-logout { width: 27px; padding: 0; font-size: 0; }
  .tb-user #btn-logout::before { content: '↪'; font-size: 17px; }
  .storage { display: flex; gap: 3px; }
  .storage-track { width: 34px; }
  .storage > span { display: none; }
  .access-chip { min-width: 0; padding: 5px 8px; gap: 4px; }
  .access-meter { width: 30px; }
  .community-online span { font-size: 10px; }
  .next-exam { order: 5; width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; }
  .column { width: 84vw; min-width: 84vw; max-height: none; }
  #board { padding: 12px 10px 48px; gap: 10px; }
  .ghost-column { width: 132px; min-width: 132px; min-height: 60px; }
  .modal { padding: 16px; }
  .modal:has(.admin-modal-shell) { width:calc(100vw - 12px); max-width:calc(100vw - 12px); max-height:96dvh; border-radius:14px; }
  .admin-modal-shell{height:94dvh;min-height:0;max-height:94dvh}.admin-wide-head{padding:11px 12px 8px}.admin-wide-head h3{font-size:16px}.admin-wide-head p{display:none}.admin-toolbar{padding:7px 12px 0;gap:6px}.admin-stat-strip{padding:0;overflow-x:auto}.admin-tabs{margin:0}.admin-tab-panel{padding:8px 12px 11px}.admin-user-grid,.live-activity-grid,.activity-timeline{grid-template-columns:1fr}.admin-wide-foot{padding:7px 12px}.admin-wide-foot p{display:none}.notification-hero{padding:10px}.notification-hero p{display:none}
  .v-title { max-width: 38vw; }
  .transcription-reader-bar { min-height: 46px; padding: 6px 8px; gap: 6px; }
  .transcription-reader-bar h1 { font-size: 13px; }
  .tr-btn, .tr-download { min-height: 30px; padding: 0 7px; font-size: 11px; }
  .tr-close { width: 30px; font-size: 21px; }
  .tr-download span { display: none; }
  .transcription-reader-body { padding: 18px 15px 28px; }
  .transcription-reader-body article { font-size: 14px; line-height: 1.62; }
  .image-reader-topbar { min-height: 42px; padding: 4px 5px; gap: 1px; }
  .ir-btn { width: 29px; height: 29px; font-size: 18px; }
  .ir-btn.ir-reveal { padding: 0 6px; font-size: 10px; }
  .ir-counter { min-width: 27px; font-size: 10px; }
  .ir-title { max-width: 28vw; font-size: 10.5px; }
  .image-reader-stage { padding: 7px; }
  #ir-image { max-width: calc(100vw - 14px); max-height: calc(100dvh - 60px); }
  .image-edit-hint { bottom: 7px; font-size: 10px; }
}
/* setas de reordenação só em telas de toque (desktop usa arrastar) */
.move-arrows { display: none; }
@media (hover: none) and (pointer: coarse) {
  .move-arrows { display: inline-flex; }
}

/* acabamento dos cards de materiais: mais leve no texto e mais claro no
   estado de processamento, sem transformar a fila em um painel pesado */
.file-card, .exam-file-row { position: relative; }
.file-row, .exam-file-row {
  position: relative; overflow: hidden; padding: 10px 10px 9px; border-radius: 11px;
  border-color: #e3e8ee; background: linear-gradient(145deg, #fff 0%, #fbfcfd 100%);
  box-shadow: 0 1px 2px rgba(24,32,43,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.file-row::before, .exam-file-row::before {
  content: ''; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 4px 4px 0; background: #d6dee7; transition: background .18s ease;
}
.file-card:hover .file-row, .exam-file-row:hover {
  border-color: #cfd8e2; background: #fff; box-shadow: 0 6px 16px rgba(24,32,43,.07); transform: translateY(-1px);
}
.file-card-slide .file-row::before, .exam-file-row.file-card-slide::before { background: #9fb7c7; }
.file-card-transcript .file-row::before, .exam-file-row.file-card-transcript::before { background: #93a6c4; }
.file-card-summary .file-row::before, .exam-file-row.file-card-summary::before { background: #b2a6c8; }
.file-card.is-processing .file-row, .exam-file-row.is-processing {
  border-color: #d8def2; background: linear-gradient(145deg, #fff 0%, #f8f9ff 100%);
}
.file-card.is-processing .file-row::before, .exam-file-row.is-processing::before { background: #6572d9; animation: processing-rail 2.2s ease-in-out infinite; }
@keyframes processing-rail { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.file-ic { width: 22px; margin-top: 2px; color: #64748b; }
.file-name { font-size: 13.5px; line-height: 18px; letter-spacing: -.012em; }
.file-bottom { margin-top: 7px; min-height: 27px; gap: 7px; }
.file-acts { gap: 2px; }
.file-acts .ibtn { width: 27px; height: 27px; border-radius: 8px; }
.file-meta { font-size: 9.5px; line-height: 12px; }
.processing-progress {
  display: block; margin-top: 7px; padding: 6px 8px 5px; border: 1px solid #e5e9f1;
  border-radius: 9px; background: #f8fafc; transition: border-color .18s, background .18s;
}
.processing-progress-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.processing-progress-top em { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #526070; font-size: 10.5px; line-height: 13px; font-style: normal; font-weight: 750; white-space: nowrap; }
.processing-progress-top b { flex: none; color: #5967c9; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.processing-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #6674dc; box-shadow: 0 0 0 3px rgba(102,116,220,.12); animation: processing-dot 1.8s ease-in-out infinite; }
@keyframes processing-dot { 0%,100% { transform: scale(.88); opacity: .65; } 50% { transform: scale(1.15); opacity: 1; } }
.processing-progress .processing-track { display: block; width: 100%; min-width: 0; height: 5px; margin-top: 6px; background: #e5eaf1; }
.processing-progress .processing-fill { background: linear-gradient(90deg, #7582e5, #5967c9); }
.processing-progress.is-pending { border-color: #e8e8ed; background: #fafbfc; }
.processing-progress.is-pending .processing-dot { background: #a5afbd; box-shadow: 0 0 0 3px rgba(165,175,189,.13); animation: none; }
.processing-progress.is-pending .processing-progress-top b { color: #8e99a8; }
.processing-progress.is-transcribed { border-color: #dce8e3; background: #f8fcfa; }
.processing-progress.is-transcribed .processing-dot { background: #3b9a72; box-shadow: 0 0 0 3px rgba(59,154,114,.12); animation: none; }
.processing-progress.is-transcribed .processing-progress-top b { color: #27805b; }
.exam-edit-btn { width: 27px; height: 27px; color: #a7b2bf; }
.exam-edit-btn:hover { color: var(--acc); background: color-mix(in srgb, var(--acc) 10%, transparent); }

/* setas discretas de coluna: ficam totalmente fora do layout no desktop */
.mobile-column-nav { display: none; }

@media (max-width: 720px) {
  #board-scrollbar { display: none !important; }
  #board { padding: 12px 14px 48px; gap: 12px; scroll-snap-type: x mandatory; scroll-behavior: smooth; }
  #board > .column, .past-group { scroll-snap-align: center; }
  .column { width: calc(100vw - 28px); min-width: calc(100vw - 28px); max-width: calc(100vw - 28px); }
  .past-group { flex: 0 0 auto; }
  .past-columns { gap: 12px; }
  .file-row, .exam-file-row { padding: 10px 9px 9px; }
  .file-name { font-size: 13.5px; line-height: 18px; }
  .file-meta { font-size: 9.5px; }
  .file-acts .ibtn { width: 28px; height: 28px; }
  .mobile-column-nav {
    position: fixed; z-index: 39; left: 0; right: 0; top: 56%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: space-between; padding: 0 3px; pointer-events: none;
  }
  .mobile-column-nav button {
    pointer-events: auto; width: 31px; height: 52px; border: 1px solid rgba(207,216,226,.9); border-radius: 16px;
    background: rgba(255,255,255,.88); color: #8290a1; font-size: 28px; line-height: 1;
    box-shadow: 0 4px 14px rgba(24,32,43,.1); backdrop-filter: blur(8px); transition: opacity .15s, background .15s, color .15s;
  }
  .mobile-column-nav button:hover { background: #fff; color: var(--ink); }
  .mobile-column-nav button:disabled { opacity: .22; pointer-events: none; }
  .mobile-column-nav.hidden { display: none !important; }
}

/* A fila não deve criar um card alto: a barra cabe em uma única linha entre
   o título e os ícones, com o mesmo respiro vertical dos demais materiais. */
.processing-progress {
  display: flex; align-items: center; gap: 6px; min-height: 14px; margin-top: 4px;
  padding: 0; border: 0; background: transparent;
}
.processing-progress-top { display: contents; }
.processing-progress .processing-dot { width: 6px; height: 6px; }
.processing-progress-top em { flex: 0 1 auto; max-width: 104px; font-size: 10px; line-height: 13px; }
.processing-progress-top b { font-size: 9.5px; }
.processing-progress .processing-track { flex: 1; min-width: 42px; height: 4px; margin-top: 0; }
.processing-progress.is-transcribing .processing-track { height: 6px; background: #e5eaf4; box-shadow: inset 0 1px 2px rgba(35,48,90,.08), 0 0 0 1px rgba(101,114,217,.04); }
.processing-progress.is-transcribing .processing-fill {
  background: linear-gradient(90deg, #5866cf 0%, #8295f4 48%, #5866cf 100%); background-size: 220% 100%;
  box-shadow: 0 0 7px rgba(101,114,217,.3); animation: processing-sheen 1.8s linear infinite;
}
@keyframes processing-sheen { from { background-position: 0% 0; } to { background-position: 220% 0; } }
.processing-progress.is-pending .processing-progress-top em { color: #667386; }
.processing-progress.is-pending .processing-fill { background: #b4beca; }
.processing-progress.is-transcribed .processing-fill { background: #4a9f7a; }

/* A seção vazia continua visível para orientar a contribuição, sem parecer
   um arquivo fantasma ou acrescentar mais um card ao quadro. */
.materials-empty {
  display: flex; align-items: center; gap: 5px; width: 100%; min-height: 29px; padding: 5px 6px;
  border: 0; border-radius: 7px; background: #f6fbf9; color: #16836f; text-align: left;
  font-size: 10.5px; line-height: 14px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s;
}
.materials-empty > span { font-size: 15px; line-height: 1; font-weight: 400; }
.materials-empty:hover { background: #edf8f4; color: #0f766e; }

/* cabeçalhos das três famílias: centralizados, com um único + discreto */
.materials-block-head {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 29px;
  padding: 4px 35px 4px 8px; border: 0; border-radius: 8px; text-transform: none;
  letter-spacing: -.01em; font-size: 11px; line-height: 15px; text-align: center;
}
.materials-block-label { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; }
.materials-block-label small { color: currentColor; opacity: .62; font-size: 10px; font-weight: 750; }
.materials-section-add {
  position: absolute; right: 4px; top: 3px; width: 24px; height: 24px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 7px; color: currentColor; opacity: .7;
  transition: opacity .15s, background .15s, transform .15s;
}
.materials-section-add .ui-icon { width: 14px; height: 14px; }
.materials-section-add:hover { opacity: 1; background: rgba(255,255,255,.72); transform: scale(1.05); }
.materials-slide .materials-block-head { color: #0f766e; background: #e7f7f3; }
.materials-transcript .materials-block-head { color: #4f46c8; background: #eeefff; }
.materials-summary .materials-block-head { color: #a16408; background: #fff4df; }

/* cada card acompanha a cor da sua seção, sem mudar sua altura ou a ordem dos ícones */
.file-card-slide .file-row, .exam-file-row.file-card-slide { background: #f0faf8; border-color: #c3e7df; }
.file-card-transcript .file-row, .exam-file-row.file-card-transcript { background: #f4f5ff; border-color: #d2d5fa; }
.file-card-summary .file-row, .exam-file-row.file-card-summary { background: #fff9ef; border-color: #efdfbf; }
.file-card-slide .file-row::before, .exam-file-row.file-card-slide::before { background: #28a892; }
.file-card-transcript .file-row::before, .exam-file-row.file-card-transcript::before { background: #6975df; }
.file-card-summary .file-row::before, .exam-file-row.file-card-summary::before { background: #d69b37; }
.file-card-slide:hover .file-row, .exam-file-row.file-card-slide:hover { background: #e8f7f3; border-color: #a9dace; }
.file-card-transcript:hover .file-row, .exam-file-row.file-card-transcript:hover { background: #eef0ff; border-color: #bfc4f4; }
.file-card-summary:hover .file-row, .exam-file-row.file-card-summary:hover { background: #fff5e4; border-color: #e6cb9a; }
.file-card-transcript.is-processing .file-row, .exam-file-row.file-card-transcript.is-processing { background: #eef0ff; border-color: #bfc5f2; }
