/* Tatame — design system.
   Plano e estruturado por linhas finas, não por caixas. Cor só onde tem significado:
   azul para ação, cores de faixa para graduação, verde/âmbar/vermelho para estado.
   Títulos, nomes e números em Archivo condensada: leitura de placar. */
:root {
  --bg: #08080A;            /* fundo externo e sidebar */
  --surface: #0E0E11;       /* canvas do conteúdo (gráficos usam como recorte) */
  --surface-2: #16161A;     /* hover, campos */
  --surface-3: #1E1E23;     /* ativo, tooltip */
  --raised: #131316;        /* sheets e painéis */
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.1); --line-3: rgba(255,255,255,.16);
  --track: #24242A;
  --text: #EDEDF0; --text-2: #B4B4BC; --muted: #8A8A94; --faint: #5A5A63;
  --accent: #4A84F5;        /* marcas, foco, progresso */
  --accent-2: #2E6AE6;      /* fundo de botão (branco 4,8:1) */
  --accent-fg: #82ACFF;     /* texto azul sobre escuro */
  --accent-soft: rgba(74,132,245,.13);
  --good: #3CC08E; --warn: #E8B44C; --bad: #F06B73;
  --good-soft: rgba(60,192,142,.12); --warn-soft: rgba(232,180,76,.12); --bad-soft: rgba(240,107,115,.12);
  --r-xs: 4px; --r-sm: 6px; --r: 8px; --r-lg: 12px;
  /* Archivo tem eixo de largura: condensada (75–87,5%) em títulos, nomes e números; normal no texto corrido. */
  --font: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Archivo', 'Arial Narrow', -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--surface); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; }
body { min-height: 100dvh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
b, strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: rgba(74,132,245,.35); }
.mono, .stat-value, .heat .c { font-variant-numeric: tabular-nums; }
.num, .mono { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.app { max-width: 600px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px 120px; }
@media (min-width: 900px) {
  .app { max-width: 1080px; padding: 40px 40px 96px; }
}
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.top > :last-child:not(:first-child) { margin-left: auto; }
.top h1 { font-family: var(--display); font-stretch: 75%; font-size: 34px; line-height: 1.05; letter-spacing: -.01em; margin: 0; font-weight: 600; }
.top .sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; white-space: nowrap; }
@media (min-width: 900px) { .top h1 { font-size: 42px; } }

/* Título de seção: rótulo em mono, régua fina e ação à direita. */
.section-title { display: flex; align-items: center; gap: 14px; margin: 40px 0 10px; min-height: 24px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 1; }
.section-title > :not(h2) { order: 2; }
.section-title h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--display); font-stretch: 87.5%; font-size: 15.5px; font-weight: 600; letter-spacing: 0; color: var(--text); white-space: nowrap; }
.section-title .link, .link { color: var(--accent-fg); font-size: 13px; font-weight: 500; text-decoration: none; transition: color .15s; }

.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 12px; }
.card.tight { padding: 12px 14px; }
.card h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.card .meta { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Indicadores: faixa contínua dividida por linhas finas ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-block: 1px solid var(--line); }
.stat { padding: 16px 16px 18px; display: block; color: inherit; text-decoration: none; min-width: 0; transition: background .15s; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-label svg { display: none; }
.stat-value { font-family: var(--display); font-stretch: 75%; font-size: 32px; line-height: 1.05; font-weight: 600; letter-spacing: -.01em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.delta { font-size: 12px; margin-top: 6px; color: var(--muted); }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
/* divisórias: as células da coluna esquerda encostam na margem do conteúdo */
@media (max-width: 899px) {
  .stats > .stat:nth-child(odd) { padding-left: 0; }
  .stats > .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stats > .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { padding: 18px 20px 20px; }
  .stat:first-child { padding-left: 0; }
  .stat + .stat { border-left: 1px solid var(--line); }
  .stat-value { font-size: 34px; }
}

.hero { padding: 4px 0 24px; }

/* ---------- Progresso ---------- */
.bar { height: 4px; background: var(--track); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transform-origin: left; animation: grow .7s var(--ease) both; }
.bar.thin { height: 3px; }
@keyframes grow { from { transform: scaleX(0); } }
.macro { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; }
.macro + .macro { margin-top: 14px; }
.macro .bar { grid-column: 1 / -1; }

/* ---------- Botões e formulários ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 7px; background: var(--accent-2); color: #fff; font-size: 13.5px; font-weight: 500; letter-spacing: -.005em; text-decoration: none; white-space: nowrap; border: 1px solid rgba(255,255,255,.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.35); transition: background .15s, border-color .15s, transform .1s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(240,107,115,.32); box-shadow: none; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 6px; gap: 6px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after { content: ''; width: 13px; height: 13px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: var(--text-2); flex: none; text-decoration: none; transition: background .15s, color .15s; }
.icon-btn svg { width: 17px; height: 17px; }

/* Filtros: rótulo de texto com contagem, sem pílulas coloridas. */
.chips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 500; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.chip.on { color: var(--text); background: var(--surface-3); border-color: var(--line-2); }
.chip .muted { font-variant-numeric: tabular-nums; font-size: 12px; }
.seg { display: flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { flex: 1; height: 30px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); transition: background .15s, color .15s; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 2px rgba(0,0,0,.4); }

label.field { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
label.field > span { display: block; margin-bottom: 7px; }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 11px; background: rgba(255,255,255,.025); border: 1px solid var(--line-2); border-radius: 7px; outline: none; font-size: 14px; color: var(--text); transition: border-color .15s, box-shadow .15s, background .15s; }
.input::placeholder { color: #82828C; }
.input:focus { border-color: rgba(74,132,245,.75); box-shadow: 0 0 0 3px rgba(74,132,245,.16); background: rgba(255,255,255,.04); }
.input:disabled { opacity: .5; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px; 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='%238A8A94' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select.input option { background: var(--raised); }
textarea.input { height: auto; min-height: 88px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; }
.form-grid .full { grid-column: 1 / -1; }
.err { color: var(--bad); font-size: 12.5px; margin-top: 2px; }
.err:empty { display: none; }
@media (max-width: 899px) {
  /* alvos de toque maiores e campos a 16px para o iOS não dar zoom */
  .btn { height: 42px; } .btn.sm { height: 34px; }
  .icon-btn { width: 38px; height: 38px; }
  .input, select.input { height: 44px; font-size: 16px; }
  textarea.input { font-size: 16px; }
  .chip { height: 34px; }
  .seg button { height: 34px; }
}

/* ---------- Listas: linhas, não cartões ---------- */
.list { margin: 0 -10px 8px; }
.item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 10px; width: 100%; text-align: left; border-radius: var(--r); color: inherit; text-decoration: none; transition: background .15s; }
.item + .item::before { content: ''; position: absolute; top: 0; left: 10px; right: 10px; height: 1px; background: var(--line); transition: opacity .15s; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--text-2); border: 1px solid var(--line-2); }
.tag.accent { color: var(--accent-fg); border-color: rgba(74,132,245,.35); background: var(--accent-soft); }
.tag.good { color: var(--good); border-color: rgba(60,192,142,.35); background: var(--good-soft); }
.tag.warn { color: var(--warn); border-color: rgba(232,180,76,.35); background: var(--warn-soft); }
.empty { padding: 22px 10px; color: var(--muted); font-size: 13.5px; }
.empty b { display: block; color: var(--text); font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.card.empty { padding: 28px 22px; }

/* ---------- Gráficos ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .cross { stroke: var(--line-3); stroke-width: 1; }
.chart .bar { transition: opacity .15s; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; padding: 6px 9px; border-radius: var(--r-sm); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.chart-tip b { color: var(--text); }
.chart-empty { height: 120px; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 0 20px; border: 1px dashed var(--line-2); border-radius: var(--r); }

/* ---------- Navegação ---------- */
.nav a { text-decoration: none; position: relative; }
.nav-count { font-style: normal; }
.side-brand, .side-foot { display: none; }
.side-brand .belt { flex: none; }

/* Mobile: barra inferior de borda a borda; o item ativo ganha um traço azul no topo. */
@media (max-width: 899px) {
  .side { display: contents; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 2px env(safe-area-inset-bottom); background: rgba(14,14,17,.86); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-top: 1px solid var(--line-2); }
  .nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 58px; color: var(--muted); font-size: 10.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap; transition: color .2s; }
  .nav a svg { width: 21px; height: 21px; transition: transform .25s var(--ease); }
  .nav a:active svg { transform: scale(.9); }
  .nav a.on { color: var(--text); }
  .nav a::before { content: ''; position: absolute; top: -1px; left: 50%; width: 20px; height: 2px; margin-left: -10px; border-radius: 0 0 2px 2px; background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease); }
  .nav a.on::before { transform: scaleX(1); }
  .nav-count { display: none; }
  .nav-count.due { display: block; position: absolute; top: 10px; left: calc(50% + 7px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); font-size: 0; }
  .app { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Desktop: sidebar fixa no fundo mais escuro; o conteúdo vira um painel recortado à direita. */
@media (min-width: 900px) {
  body { background: var(--bg); }
  .shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
  .side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 16px 12px 14px; }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 8px 8px 22px; text-decoration: none; }
  .side-brand b { display: block; font-family: var(--display); font-stretch: 87.5%; font-size: 17px; font-weight: 600; line-height: 1.15; }
  .side-acad { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 12px; line-height: 1.35; color: var(--muted); margin-top: 2px; }
  .nav { display: flex; flex-direction: column; gap: 1px; }
  .nav a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px; color: var(--text-2); font-size: 13.5px; font-weight: 500; transition: background .15s, color .15s; }
  .nav a svg { width: 17px; height: 17px; color: var(--muted); transition: color .15s; }
  .nav a.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
  .nav a.on svg { color: var(--accent-fg); }
  .nav-count { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
  .nav-count.due { color: var(--accent-fg); }
  .nav-count.due::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
  .side-foot { display: block; margin-top: auto; }
  .side-date { padding: 0 10px 10px; font-size: 12px; color: var(--muted); }
  .side-me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border-top: 1px solid var(--line); text-decoration: none; transition: background .15s; }
  .side-me .avatar { width: 28px; height: 28px; font-size: 11px; }
  .side-me b { display: block; font-size: 13px; font-weight: 500; }
  .side-me small { display: block; font-size: 12px; color: var(--muted); }
  .shell > .app { max-width: none; margin: 8px 8px 8px 0; min-height: calc(100dvh - 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 40px max(48px, calc((100% - 1080px) / 2)) 96px; }
}

/* Entrada de tela: sobe 6px e aparece, em cascata curta. */
.enter > * { animation: rise .42s var(--ease) both; }
.enter > :nth-child(2) { animation-delay: .03s; } .enter > :nth-child(3) { animation-delay: .06s; }
.enter > :nth-child(4) { animation-delay: .09s; } .enter > :nth-child(n+5) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Sheets e telas cheias ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { width: 100%; max-width: 540px; max-height: 92dvh; overflow-y: auto; background: var(--raised); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 48px rgba(0,0,0,.5); animation: up .34s var(--ease); }
.sheet .grab { width: 36px; height: 4px; border-radius: 99px; background: var(--line-3); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-stretch: 87.5%; font-size: 19px; font-weight: 600; }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { border-radius: var(--r-lg); border-bottom: 1px solid var(--line-2); padding: 20px 24px 24px; box-shadow: 0 30px 90px rgba(0,0,0,.65); animation: pop .24s var(--ease); }
  .sheet .grab { display: none; }
}
.full-screen { position: fixed; inset: 0; z-index: 50; background: var(--surface); overflow-y: auto; animation: fade .18s ease; }
.full-screen .app { max-width: 720px; padding-bottom: 40px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 90; background: var(--surface-3); border: 1px solid var(--line-2); padding: 10px 14px; border-radius: var(--r); font-size: 13.5px; font-weight: 500; display: flex; gap: 10px; align-items: center; box-shadow: 0 12px 32px rgba(0,0,0,.5); animation: toast .3s var(--ease); max-width: calc(100vw - 32px); }
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.toast.error .dot { background: var(--bad); } .toast.success .dot { background: var(--good); }
@keyframes toast { from { transform: translate(-50%, -8px); opacity: 0; } }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; border-radius: var(--r); height: 90px; margin-bottom: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Entrada ---------- */
/* O fundo da tela de entrada lembra as placas do tatame: grade fina que some nas bordas. */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-box { position: relative; width: 100%; max-width: 360px; }
.auth-box.card { background: var(--raised); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.brand .logo { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; }
.brand h1 { margin: 0; font-family: var(--display); font-stretch: 75%; font-size: 34px; font-weight: 600; line-height: 1.05; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ===================== Domínio: faixas, alunos, técnicas ===================== */
.belt { --c: #EDEDED; --tab: #111; position: relative; display: inline-flex; width: 60px; height: 12px; border-radius: 2px; background: linear-gradient(rgba(255,255,255,.1), transparent 45%, rgba(0,0,0,.14)), var(--c); outline: 1px solid rgba(255,255,255,.14); outline-offset: -1px; flex: none; overflow: hidden; vertical-align: middle; }
.belt::after { content: ''; position: absolute; right: 8px; top: 0; bottom: 0; width: 22px; background: var(--tab); }
.belt i { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; z-index: 1; }
.belt.lg { width: 120px; height: 22px; border-radius: 3px; } .belt.lg::after { width: 40px; right: 14px; }
.belt.lg i { width: 4px; }
[data-b=branca] { --c: #EDEDED; } [data-b=cinza] { --c: #8C8F96; } [data-b=amarela] { --c: #E6C229; }
[data-b=laranja] { --c: #E07B28; } [data-b=verde] { --c: #2E9E5B; } [data-b=azul] { --c: #2563EB; }
[data-b=roxa] { --c: #7C3AED; } [data-b=marrom] { --c: #7B4B2A; } [data-b=preta] { --c: #0E0F12; --tab: #C8102E; outline-color: rgba(255,255,255,.24); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 600; color: var(--text-2); flex: none; font-size: 12px; letter-spacing: .02em; }
.stu { display: flex; align-items: center; gap: 12px; }
.stu .meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
/* Anel de progresso: o traço é um pseudo-elemento mascarado, então o centro é transparente sobre qualquer fundo. */
.mini-ring { --p: 0; --rc: var(--accent); position: relative; width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.mini-ring::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--rc) calc(var(--p) * 1%), var(--track) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.mini-ring > span { position: relative; display: grid; place-items: center; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crit { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 11px 0; }
.crit + .crit { border-top: 1px solid var(--line); }
.crit .bar { grid-column: 1 / -1; }
.crit .ok { color: var(--good); } .crit .no { color: var(--faint); }
.crit svg { vertical-align: -2px; }
.lvl { display: flex; gap: 3px; }
.lvl button { width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 500; border: 1px solid var(--line); transition: background .15s, color .15s, border-color .15s, transform .1s; }
.lvl button:active { transform: scale(.92); }
.lvl button.on { color: #fff; border-color: transparent; }
.lvl button.on[data-l="0"] { background: var(--surface-3); color: var(--text-2); border-color: var(--line-2); }
.lvl button.on[data-l="1"] { background: #2A3142; color: #C9D3E8; } .lvl button.on[data-l="2"] { background: #2B4A8A; } .lvl button.on[data-l="3"] { background: #3567D6; }
.lvl button.on[data-l="4"] { background: #1E7A5B; } .lvl button.on[data-l="5"] { background: var(--good); color: #052A1C; }
@media (max-width: 899px) { .lvl button { width: 36px; height: 34px; } }
.tech-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 12px 10px; position: relative; }
.tech-row + .tech-row::before { content: ''; position: absolute; top: 0; left: 10px; right: 10px; height: 1px; background: var(--line); }
@media (max-width: 520px) { .tech-row { grid-template-columns: 1fr; } }
.diff { display: inline-flex; gap: 2px; vertical-align: middle; }
.diff i { width: 5px; height: 5px; border-radius: 1px; background: var(--track); }
.diff i.on { background: var(--text-2); }
.att { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px; width: 100%; text-align: left; border-radius: var(--r); transition: background .15s; }
.att + .att::before { content: ''; position: absolute; top: 0; left: 10px; right: 10px; height: 1px; background: var(--line); }
.att .box { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--line-3); display: grid; place-items: center; color: transparent; flex: none; transition: background .15s, border-color .15s, color .15s, transform .15s var(--ease); }
.att .box svg { width: 13px; height: 13px; }
.att.on .box { background: var(--accent-2); border-color: var(--accent-2); color: #fff; transform: scale(1.06); }
.att.on { background: rgba(74,132,245,.06); }
.sticky-bar { position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--surface) 35%); z-index: 5; }
.heat { display: grid; gap: 3px; font-size: 12px; }
.heat .c { height: 28px; border-radius: var(--r-xs); display: grid; place-items: center; color: var(--text); font-weight: 500; }
.heat .h { color: var(--muted); display: grid; place-items: center; font-size: 12px; }
.table-wrap { overflow-x: auto; margin: 0 -2px; }
table.rules { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.rules th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 6px; vertical-align: bottom; }
table.rules td { padding: 5px 6px; border-top: 1px solid var(--line); }
table.rules input { height: 32px; padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13.5px; }

/* ===================== Telas ===================== */
/* Painel: duas colunas no desktop (operação à esquerda, alunos à direita);
   no mobile as seções se intercalam por --o para o que pede ação vir primeiro. */
.dash { display: flex; flex-direction: column; }
.dash-col { display: contents; }
.dash section { order: var(--o); min-width: 0; }
@media (min-width: 900px) {
  .dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0 56px; align-items: start; }
  .dash-col { display: block; }
}
.slot { gap: 16px; padding-block: 13px; }
.slot-time { width: 48px; flex: none; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.25; }
.slot-time b { font-size: 14px; font-weight: 500; color: var(--text); }
.slot-time span { font-size: 12px; color: var(--muted); }
.slot.done .slot-time b { color: var(--muted); }
.slot .grow > b { font-weight: 500; }
/* Distribuição da academia como uma faixa só, segmentada pelas cores de graduação. */
.belt-dist { display: flex; gap: 2px; height: 10px; border-radius: 2px; overflow: hidden; margin: 8px 0 14px; }
.belt-dist i { min-width: 3px; transform-origin: left; animation: grow .9s var(--ease) both; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.belt-legend .row { gap: 12px; padding: 7px 0; }
.belt-legend .row + .row { border-top: 1px solid var(--line); }
.belt-legend .mono.xs { width: 34px; text-align: right; }

/* Barra de ferramentas: filtros à esquerda, busca e faixa à direita (no mobile, busca primeiro). */
.toolbar { display: flex; flex-direction: column-reverse; gap: 10px; margin-bottom: 14px; }
.toolbar-r { display: flex; gap: 8px; }
.toolbar-r .search { flex: 1; }
.toolbar-r select.input { width: auto; flex: none; }
@media (min-width: 900px) {
  .toolbar { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
  .toolbar-r .search { flex: none; width: 240px; }
}
.search { position: relative; display: block; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 32px; }

/* Tabela de alunos */
.thead { display: none; }
.trow { display: grid; grid-template-columns: 34px auto auto minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.t-name { grid-column: 1 / 5; display: flex; align-items: center; gap: 12px; min-width: 0; }
.t-name .grow { display: flex; flex-direction: column; min-width: 0; }
.t-name b { font-weight: 500; }
.t-belt { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.t-freq { grid-column: 3; grid-row: 2; font-size: 13px; }
.t-last { grid-column: 4; grid-row: 2; color: var(--muted); }
.t-belt .rank { min-width: 96px; }
.t-next { grid-column: 5; grid-row: 1; display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.t-next .tag svg { width: 12px; height: 12px; }
@media (max-width: 899px) { .t-belt .small, .t-next .bar, .t-next-l { display: none; } }
@media (min-width: 900px) {
  .thead, .trow { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.7fr); gap: 16px; }
  .thead { display: grid; margin: 0 -10px; padding: 0 10px 10px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--muted); }
  .trow > * { grid-column: auto !important; grid-row: auto !important; }
  .trow { padding-block: 10px; }
  .t-next { justify-content: flex-start; }
  .t-next-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .thead + .list .item:first-child::before { display: none; }
}

/* Abas de página: texto com sublinhado azul, sem caixa. */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; flex: none; height: 40px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: color .15s; }
.tabs button.on { color: var(--text); }
.tabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease); }
.tabs button.on::after { transform: scaleX(1); }
.tabs .muted { font-size: 12px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tab-body { padding-top: 20px; }
.tab-body > .section-title:first-child { margin-top: 4px; }

/* Ficha do aluno */
.crumbs { align-items: center; margin-bottom: 20px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-left: -4px; padding: 4px 8px 4px 4px; border-radius: var(--r-sm); color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; transition: color .15s, background .15s; }
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; padding: 0 0 28px; }
.hero-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.hero-id .avatar { width: 52px; height: 52px; font-size: 17px; }
.hero h1 { margin: 0; font-family: var(--display); font-stretch: 75%; font-size: 34px; line-height: 1.05; font-weight: 600; letter-spacing: -.01em; }
.hero .sub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.hero-belt { display: flex; align-items: center; gap: 14px; }
.hero-belt b { font-weight: 500; }
.stats .stat-value { font-size: 26px; }
.stats .stat-value small { font-size: 12.5px; }
@media (min-width: 900px) { .hero h1 { font-size: 42px; } .stats .stat-value { font-size: 28px; } }

/* Aulas: agenda de chamadas com a data numa coluna à esquerda. */
.agenda-day { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 6px 0; }
.agenda-day + .agenda-day { border-top: 1px solid var(--line); }
.agenda-date { display: flex; flex-direction: column; padding-top: 10px; }
.agenda-date b { font-family: var(--display); font-stretch: 75%; font-size: 28px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.agenda-date span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.agenda-date span + span { margin-top: 1px; }
.agenda .list { margin-bottom: 0; }
.lrow { gap: 14px; }
.lrow .slot-time { width: 42px; }
.lrow .grow > b { font-weight: 500; }
.l-count { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1.2; }
.l-count b { font-family: var(--display); font-stretch: 75%; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .agenda-day { grid-template-columns: 88px minmax(0, 1fr); } }

/* Aulas: grade semanal. Mobile empilha só os dias com aula. */
.week { display: flex; flex-direction: column; gap: 22px; }
.wcol.none { display: none; }
.wcol-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: var(--display); font-stretch: 87.5%; font-size: 15px; font-weight: 600; color: var(--text-2); }
.wcol.today .wcol-h { color: var(--accent-fg); }
.wcol-h .tag { height: 18px; font-family: var(--font); letter-spacing: 0; text-transform: none; }
.cls { position: relative; display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 11px 12px 11px 14px; margin-bottom: 6px; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); transition: background .15s, border-color .15s, transform .15s var(--ease); }
.cls:active { transform: scale(.99); }
.cls.off { opacity: .5; }
.cls-t { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cls b { font-weight: 500; font-size: 13.5px; }
.cls-occ { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
.cls-occ b { font-size: 13px; }
@media (max-width: 899px) {
  .cls { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .cls > :not(.cls-occ) { grid-column: 1; }
  .cls-occ { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: flex; flex-direction: column; align-items: flex-end; margin: 0; padding: 0; border: 0; }
  .cls-occ b { font-size: 16px; }
}
.wcol-none { display: block; padding: 12px 0; font-size: 12px; color: var(--faint); text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }
@media (min-width: 900px) {
  .week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
  .wcol, .wcol.none { display: block; padding: 12px 8px 10px; min-height: 260px; }
  .wcol + .wcol { border-left: 1px solid var(--line); }
  .wcol.today { background: rgba(74,132,245,.04); }
  .wcol-h { justify-content: space-between; padding: 0 4px 10px; margin: 0 -8px 10px; padding-inline: 12px; border-bottom: 1px solid var(--line); }
  .cls { padding: 9px 10px 9px 12px; }
  .wcol-none { border: 0; padding-top: 24px; }
}

/* Técnicas: biblioteca com categorias na lateral (desktop) ou em faixa rolável (mobile). */
.lib-cats { margin: 0 -2px 14px; }
.lib-tools { margin-bottom: 4px; }
.lib-main > .section-title:nth-child(2) { margin-top: 24px; }
.section-title h2 .belt { width: 32px; height: 8px; }
.section-title h2 .belt::after { width: 10px; right: 4px; }
.tlib { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name lvl" "use diff"; gap: 4px 16px; }
.tlib.off { opacity: .5; }
.tl-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; }
.tl-name b { font-weight: 500; }
.tl-diff { grid-area: diff; justify-self: end; }
.tl-use { grid-area: use; }
.tl-lvl { grid-area: lvl; display: flex; align-items: center; gap: 8px; justify-self: end; }
.tl-lvl .bar { width: 44px; }
@media (min-width: 900px) {
  .lib { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 40px; align-items: start; }
  .lib-cats { position: sticky; top: 24px; flex-direction: column; gap: 1px; margin: 0; overflow: visible; }
  .lib-cats .chip { justify-content: space-between; width: 100%; height: 30px; }
  .lib-tools .search { flex: 1; width: auto; }
  .tlib { grid-template-columns: minmax(0, 1fr) 70px 170px 104px; grid-template-areas: "name diff use lvl"; }
  .tl-diff, .tl-lvl { justify-self: start; }
}

/* Entrada: a faixa preta com graus é a marca. */
.brand { flex-direction: column; align-items: flex-start; gap: 22px; }
.auth .input { background-color: var(--surface); }
.top > div:first-child { min-width: 0; max-width: 100%; }
.top .sub { overflow: hidden; text-overflow: ellipsis; }
/* Mobile: título e ação na mesma linha, subtítulo embaixo em largura total. */
@media (max-width: 899px) {
  .top:has(> div:first-child > h1) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; }
  .top:has(> div:first-child > h1) > div:first-child { display: contents; }
  .top:has(> div:first-child > h1) .sub { grid-column: 1 / -1; grid-row: 2; }
  .top:has(> div:first-child > h1) > :last-child:not(:first-child) { grid-column: 2; grid-row: 1; margin-left: 0; }
}


/* ===================== Progressão da graduação =====================
   A faixa desenhada com a ponteira e as casas de grau. Graus conquistados são listras brancas;
   a casa do próximo grau enche de baixo para cima conforme os critérios; verde só quando apto.
   Com os graus completos, a próxima faixa aparece em contorno e enche da esquerda para a direita. */
@property --f { syntax: '<number>'; inherits: false; initial-value: 0; }
.rank { --tab: #111; --h: 12px; --body: 24px; --end: 6px; --sw: 3px; --sg: 2px; --tp: 4px; --nw: 16px;
  display: inline-flex; align-items: center; gap: 4px; flex: none; vertical-align: middle; }
.rk-belt { display: flex; justify-content: flex-end; height: var(--h); padding: 0 var(--end) 0 var(--body); border-radius: 2px;
  background: linear-gradient(rgba(255,255,255,.1), transparent 45%, rgba(0,0,0,.16)), var(--c); outline: 1px solid rgba(255,255,255,.14); outline-offset: -1px; }
.rank[data-b=preta] { --tab: #C8102E; }
.rank[data-b=preta] .rk-belt { outline-color: rgba(255,255,255,.26); }
.rk-tab { display: flex; gap: var(--sg); padding: 0 var(--tp); background: var(--tab); }
.rk-tab i { position: relative; width: var(--sw); background: rgba(255,255,255,.16); }
.rk-tab i.on { background: #fff; }
.rk-tab i.pend { background: linear-gradient(to top, rgba(255,255,255,.8) calc(var(--f) * 100%), rgba(255,255,255,.16) 0); }
.rk-tab i.pend.ready { background: var(--good); }
.rk-next { width: var(--nw); height: var(--h); border-radius: 2px; box-shadow: inset 0 0 0 1.5px var(--c);
  background: linear-gradient(90deg, var(--c) calc(var(--f) * 100%), transparent 0); }
.rk-next[data-b=preta] { --c: #6A6D77; }
.rk-next.ready { background: var(--c); box-shadow: inset 0 0 0 1.5px var(--c), 0 0 0 2px var(--surface), 0 0 0 3.5px var(--good); }
.rk-max { font-size: 12px; color: var(--muted); margin-left: 6px; }
.rank.lg { --h: 26px; --body: 96px; --end: 16px; --sw: 7px; --sg: 13px; --tp: 10px; --nw: 44px; gap: 8px; margin-bottom: 20px; }
.rank.lg .rk-tab i::after { content: attr(data-n); position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 500; color: var(--muted); }
.rank.lg .rk-tab i.on::after { color: var(--text-2); }
.rank.lg .rk-tab i.pend::after { color: var(--text); }
/* O preenchimento anima só na entrada da tela (classe .enter); filtros e buscas não repetem. */
.enter .rk-tab i.pend, .enter .rk-next { animation: rk-fill .9s var(--ease) .15s both; }
@keyframes rk-fill { from { --f: 0; } }

/* ===================== Painel: hoje no tatame ===================== */
.today { border-top: 2px solid var(--text); padding: 18px 0 22px; margin-bottom: 8px; }
.today-k { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.today-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "time info" "cta cta"; gap: 14px 20px; align-items: center; margin-top: 12px; }
.today-time { grid-area: time; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.today-time b { font-family: var(--display); font-stretch: 75%; font-size: 64px; line-height: .9; font-weight: 600; letter-spacing: -.01em; }
.today-time span { font-size: 13px; color: var(--muted); margin-top: 6px; }
.today-info { grid-area: info; min-width: 0; }
.today h2 { margin: 0; font-family: var(--display); font-stretch: 75%; font-size: 30px; line-height: 1.05; font-weight: 600; }
.today-info .muted { font-size: 14px; margin-top: 6px; }
.today-cta { grid-area: cta; height: 48px; font-size: 15px; }
.today.quiet { padding-bottom: 16px; }
.today.quiet h2 { margin-top: 8px; }
.today.quiet p { margin: 6px 0 0; }
@media (min-width: 900px) {
  .today-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "time info cta"; gap: 28px; }
  .today-time b { font-size: 88px; }
  .today h2 { font-size: 40px; }
  .today-cta { padding: 0 22px; }
}
/* Indicadores como contexto: uma frase por dado, separados por linhas finas, sem caixas. */
.context { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.context > * { padding: 2px 14px; border-left: 1px solid var(--line); text-decoration: none; color: inherit; }
.context > :first-child, .context .br + * { padding-left: 0; border-left: 0; }
.context .br { flex-basis: 100%; height: 0; padding: 0; border: 0; }
.context b { font-family: var(--display); font-stretch: 75%; font-size: 19px; font-weight: 600; color: var(--text); margin-right: 3px; font-variant-numeric: tabular-nums; }
.context b.good { color: var(--good); } .context b.warn { color: var(--warn); }
.context .up { color: var(--good); } .context .down { color: var(--bad); }
.context a { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 4px; }
@media (max-width: 899px) { .context > * { flex: 1 1 100%; padding: 4px 0; border-left: 0; } }
.slot .grow > b, .lrow .grow > b, .sname, .t-name b, .cls b { font-family: var(--display); font-stretch: 87.5%; font-weight: 600; font-size: 15px; }
.slot-time b { font-family: var(--display); font-stretch: 75%; font-size: 19px; font-weight: 600; }
.section-title.sub { margin-top: 28px; }
.cls.now { border-color: rgba(74,132,245,.55); background: rgba(74,132,245,.08); }
.cls-t em { font-style: normal; font-weight: 600; color: var(--accent-fg); margin-left: 4px; }

/* ---------- Hover só onde há ponteiro de verdade ----------
   No toque, :hover fica preso depois do toque; lá o retorno visual vem de :active. */
@media (hover: hover) and (pointer: fine) {
  .section-title .link:hover, .link:hover { color: var(--text); }
  .btn:hover { background: #275FD6; }
  .btn.ghost:hover { background: var(--surface-2); border-color: var(--line-3); }
  .btn.danger:hover { background: var(--bad-soft); }
  .icon-btn:hover { color: var(--text); background: var(--surface-2); }
  .chip:not(.on):hover { color: var(--text); background: var(--surface-2); }
  .seg button:hover { color: var(--text); }
  .input:hover:not(:focus) { border-color: var(--line-3); }
  a.item:hover, button.item:hover { background: var(--surface-2); }
  a.item:hover::before, button.item:hover::before, a.item:hover + .item::before, button.item:hover + .item::before { opacity: 0; }
  .lvl button:not(.on):hover { color: var(--text); border-color: var(--line-3); }
  .att:not(.on):hover { background: var(--surface-2); }
  .tabs button:hover { color: var(--text); }
  .back:hover { color: var(--text); background: var(--surface-2); }
  .cls:hover { background: var(--surface-3); border-color: var(--line-3); }
  @media (min-width: 900px) {
    .nav a:not(.on):hover { background: var(--surface-2); color: var(--text); }
    .side-me:hover { background: var(--surface-2); }
  }
}
@media (hover: none) {
  a.item:active, button.item:active, .att:active, .chip:active, .icon-btn:active, .back:active, .btn.ghost:active { background: var(--surface-2); }
  .cls:active { background: var(--surface-3); }
  .tabs button:active, .seg button:active { color: var(--text); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Diário de aulas (equipe) ---------- */
.j-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 14px; }
.j-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.j-stat b { font-family: var(--display); font-stretch: 80%; font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.j-stat span { color: var(--muted); font-size: 12px; }
.j-stat.good b { color: var(--good); } .j-stat.warn b { color: var(--warn); }
.j-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.j-range { display: flex; align-items: center; gap: 8px; }
.j-item { gap: 14px; }
.j-time { width: 46px; flex: none; display: flex; flex-direction: column; line-height: 1.2; font-variant-numeric: tabular-nums; }
.j-time small { color: var(--muted); font-size: 12px; }
.j-go { color: var(--accent-fg); font-size: 13px; font-weight: 500; flex: none; min-width: 52px; text-align: right; }
.j-head { display: flex; gap: 16px; align-items: flex-start; margin-top: 14px; }
.j-date { flex: none; width: 58px; height: 64px; border-radius: 10px; background: var(--accent-2); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.j-date b { font-family: var(--display); font-size: 26px; font-weight: 700; } .j-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.j-title { font-family: var(--display); font-stretch: 85%; font-size: 24px; margin: 0 0 2px; }
.j-vis { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-fg); font-size: 12.5px; }
.j-ro { border-color: rgba(232,180,76,.35); background: var(--warn-soft); color: var(--text-2); font-size: 13.5px; }
.j-form .card { margin-top: 12px; }
.j-lab { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.j-lab em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 6px; }
.j-lab em.sug { color: var(--accent-fg); }
.j-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.j-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); font-size: 13px; }
.j-chip.tech { background: var(--accent-soft); border-color: rgba(74,132,245,.35); }
.j-chip small { color: var(--muted); font-size: 11px; }
.j-chip button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: var(--text-2); cursor: pointer; line-height: 1; }
.j-chip button:hover { background: var(--bad-soft); color: var(--bad); }
.j-found { display: grid; gap: 2px; margin-top: 6px; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px; background: var(--surface-2); }
.j-opt { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 6px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.j-opt:hover { background: var(--surface-3); } .j-opt span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.j-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0 6px; margin-top: 6px; background: linear-gradient(transparent, var(--surface) 35%); }
.j-actions .err { flex: 1 1 100%; text-align: right; }
@media (max-width: 760px) {
  .j-stats { grid-template-columns: repeat(2, 1fr); }
  .j-actions { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .j-actions .btn { flex: 1; }
  .j-head { gap: 12px; } .j-title { font-size: 20px; }
}
@media (min-width: 761px) { .j-actions { position: static; background: none; } }
