@import url('./base.css');

/* English — app-specific styles below (somente variáveis do base.css) */

[hidden] { display: none !important; }
.nav-divider { height: 1px; background: var(--border); margin: 10px 4px; }
.topbar h1 { font-size: 1.1rem; }
.topbar-right select { min-width: 180px; }
.hint { font-size: .75rem; color: var(--muted); font-weight: 400; }
kbd { font-size: .68rem; padding: 1px 5px; border-radius: 4px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); margin-left: 6px; opacity: .8; font-family: inherit; }
textarea.input { resize: vertical; font-family: inherit; line-height: 1.4; }

/* ── Review ─────────────────────────────────────────────────────────────── */
.view { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 760px; margin: 0 auto; }
.queue-counts { display: flex; gap: 18px; justify-content: center; font-size: .85rem; color: var(--muted); }
.qc b { font-size: 1rem; margin-left: 4px; }
.qc-new b { color: var(--blue); }
.qc-learn b { color: var(--red); }
.qc-review b { color: var(--accent); }

.study-card { padding: 28px 32px; display: flex; flex-direction: column; gap: 18px; min-height: 340px; }
.study-meta { display: flex; gap: 8px; justify-content: center; }
.study-front { font-size: 1.6rem; font-weight: 600; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.study-answer hr { border: none; border-top: 1px solid var(--border); margin: 4px 0 18px; }
.study-back { font-size: 1.25rem; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.study-notes { margin-top: 12px; color: var(--muted); font-size: .9rem; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; font-style: italic; }
.study-actions { margin-top: auto; display: flex; justify-content: center; }
.grade-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; }
.grade { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 8px; cursor: pointer;
         font-weight: 600; font-size: .85rem; border: 1px solid var(--grade-color); color: var(--grade-color);
         background: color-mix(in srgb, var(--grade-color) 12%, transparent); }
.grade:hover { background: color-mix(in srgb, var(--grade-color) 24%, transparent); }
.grade small { font-size: .72rem; font-weight: 400; color: var(--muted); min-height: 1em; }
.grade-again { --grade-color: var(--red); }
.grade-hard  { --grade-color: var(--yellow); }
.grade-good  { --grade-color: var(--accent); }
.grade-easy  { --grade-color: var(--blue); }

.study-empty { padding: 40px 32px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.study-empty h2 { font-size: 1.2rem; }
.study-empty p { color: var(--muted); font-size: .9rem; max-width: 460px; }
.study-empty .btn-primary, .form-footer .btn-primary { text-decoration: none; }

/* ── Add card ───────────────────────────────────────────────────────────── */
.panel-body { padding: 18px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
#add-msg.ok { color: var(--accent); }
#add-msg.err, #deck-msg.err { color: var(--red); }

/* ── Decks ──────────────────────────────────────────────────────────────── */
.ribbon { display: flex; gap: 8px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ribbon-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.ribbon button:disabled { opacity: .45; cursor: not-allowed; }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.deck-tile { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
             display: flex; flex-direction: column; gap: 8px; user-select: none; }
.deck-tile:hover { border-color: var(--muted); }
.deck-tile.selected { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.deck-tile h3 { font-size: .95rem; overflow-wrap: anywhere; }
.deck-tile p { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.deck-counts { display: flex; gap: 12px; font-size: .78rem; color: var(--muted); }
.deck-counts b { color: var(--text); }
.deck-counts .c-new b { color: var(--blue); }
.deck-counts .c-due b { color: var(--accent); }

/* ── Telas estreitas: a barra lateral vira uma faixa no topo ───────────── */
@media (max-width: 760px) {
  body { overflow: auto; height: auto; }
  .layout { flex-direction: column; height: auto; min-height: 100vh; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 8px; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-logo { border-bottom: none; margin: 0; padding: 4px 10px; }
  .sidebar-nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-divider { display: none; }
  .main { overflow: visible; }
  .content { padding: 16px; overflow: visible; }
  .topbar { padding: 12px 16px; }
  .study-card { padding: 20px 16px; }
  .grade-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Browse (grid-pattern: tema escuro do Tabulator com as variáveis da casa) ── */
.view-wide { max-width: none; }
#browse-grid { min-height: 100px; }
#browse-grid .tabulator { background: var(--surface); border: none; border-radius: 0 0 var(--radius) var(--radius); font-family: inherit; font-size: .82rem; }
#browse-grid .tabulator-header { background: var(--surface); border-bottom: 1px solid var(--border); }
#browse-grid .tabulator-col { background: var(--surface); color: var(--muted); font-size: .72rem; text-transform: uppercase; }
#browse-grid .tabulator-col:hover { background: var(--surface2); }
#browse-grid .tabulator-row { background: var(--surface); border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); color: var(--text); }
#browse-grid .tabulator-row:hover { background: var(--surface2); }
#browse-grid .tabulator-row.tabulator-row-even { background: var(--bg); }
#browse-grid .tabulator-row.tabulator-selected { background: color-mix(in srgb, var(--accent) 14%, transparent) !important; }
#browse-grid .tabulator-cell { border-right: none; padding: 8px 10px; }
#browse-grid .tabulator-cell input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
#browse-grid .tabulator-footer { background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); }
#browse-grid .tabulator-page { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 3px 9px; }
#browse-grid .tabulator-page.active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
#browse-grid .tabulator-header-filter input, #browse-grid .tabulator-header-filter select {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 3px 6px; font-size: .75rem; }
.grid-title { color: var(--accent); text-decoration: none; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.grid-title-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-title-icon { flex-shrink: 0; opacity: .55; font-size: .85em; }
a.btn-primary-sm { text-decoration: none; }

/* ── Lessons ── */
.lesson-objective { color: var(--text); font-size: .9rem; margin-bottom: 12px; }
.lesson-activities { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .85rem; color: var(--muted); }
.lesson-activities .badge { margin-right: 4px; }
.lesson-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lesson-list li { display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.lesson-date { color: var(--muted); width: 92px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.lesson-title { overflow-wrap: anywhere; }

/* ── Stats ── */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--tile-color, var(--border)); border-radius: var(--radius);
             padding: 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--tile-color, var(--text)); line-height: 1; }
.stat-label { font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-align: center; }
.simple-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.simple-table th { text-align: left; color: var(--muted); font-size: .72rem; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.simple-table td { padding: 6px 8px; border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent); font-variant-numeric: tabular-nums; }

/* ── Dashboard de proficiência ─────────────────────────────────────────── */
.view-dash { max-width: 1180px; }
.dash-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash-toolbar .spacer { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); cursor: pointer; }
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.goal-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--gc); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.goal-ielts { --gc: var(--red); } .goal-det { --gc: var(--accent); }
.goal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.goal-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gnum { background: var(--surface2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gnum b { font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gnum .hint { overflow-wrap: anywhere; }
.lv-ok { color: var(--accent); } .lv-near { color: var(--yellow); } .lv-far { color: var(--red); } .lv-none { color: var(--muted); }
.gbar { position: relative; height: 10px; border-radius: 6px; background: var(--surface2); border: 1px solid var(--border); }
.gbar-fill { height: 100%; border-radius: 6px; background: var(--slate); }
.gbar-fill.lv-ok { background: var(--accent); } .gbar-fill.lv-near { background: var(--yellow); } .gbar-fill.lv-far { background: var(--red); }
.gbar-fill.derived { background-image: repeating-linear-gradient(45deg, transparent 0 4px, color-mix(in srgb, var(--bg) 35%, transparent) 4px 8px); }
.gbar-goal { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 2px; }
.irow { display: grid; grid-template-columns: minmax(0, 1.3fr) 150px minmax(120px, 1fr); gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent); }
.irow:last-child { border-bottom: none; }
.iname { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
.iname .hint { overflow-wrap: anywhere; }
.ival { display: flex; flex-direction: column; font-size: .8rem; }
.ival b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.src { font-size: .68rem; color: var(--muted); }
.src-newer { font-style: italic; opacity: .8; }
.src-real_test { color: var(--accent); } .src-recording_ai { color: var(--purple); } .src-calculated { color: var(--cyan); } .src-app_estimate { color: var(--yellow); }
.prow { display: grid; grid-template-columns: 24px minmax(0, 1.2fr) minmax(120px, 1fr) 110px; gap: 10px; align-items: center; padding: 6px 0; font-size: .88rem; }
.pnum { width: 22px; height: 22px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.pgap { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.dash-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sub-h { font-size: .85rem; margin: 14px 0 6px; color: var(--cyan); }
.radar { width: 100%; max-width: 360px; display: block; margin: 10px auto 0; }
.r-grid { fill: none; stroke: var(--border); } .r-goal { fill: none; stroke: var(--text); stroke-dasharray: 4 4; stroke-width: 1.5; }
.r-now { fill: color-mix(in srgb, var(--red) 22%, transparent); stroke: var(--red); stroke-width: 2; }
.r-label { fill: var(--muted); font-size: 12px; } .r-val { fill: var(--text); font-size: 12px; font-weight: 700; } .r-legend { fill: var(--muted); font-size: 11px; }
.history { width: 100%; height: auto; display: block; }
.h-grid { stroke: var(--border); stroke-width: 1; } .h-goal { stroke: var(--text); stroke-dasharray: 5 4; stroke-width: 1.5; }
.h-axis { fill: var(--muted); font-size: 11px; } .h-line { fill: none; stroke-width: 2; } .h-dot { stroke: var(--bg); stroke-width: 1.5; }
.h-s0 { stroke: var(--text); fill: var(--text); background: var(--text); } .h-s1 { stroke: var(--blue); fill: var(--blue); background: var(--blue); }
.h-s2 { stroke: var(--accent); fill: var(--accent); background: var(--accent); } .h-s3 { stroke: var(--yellow); fill: var(--yellow); background: var(--yellow); }
.h-s4 { stroke: var(--pink); fill: var(--pink); background: var(--pink); }
.h-line.h-s0, .h-line.h-s1, .h-line.h-s2, .h-line.h-s3, .h-line.h-s4 { fill: none; background: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); margin-top: 6px; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
details.ref > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.ref-block .simple-table { margin-bottom: 4px; }
.ref-block a { color: var(--blue); }
.sim { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.sim-out { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.sim-m { display: flex; flex-direction: column; background: var(--surface); border-radius: 8px; padding: 8px; min-width: 0; }
.sim-m b { font-size: 1.1rem; overflow-wrap: anywhere; }
.sim-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: .85rem; margin: 6px 0; }
.sim-row input { width: 100%; accent-color: var(--accent); }
.modal-wide { width: 860px; }
/* INIT-003 SLC-007: o card com a ficha completa precisa de espaço (largura quase toda e a ficha rolando por dentro) */
.modal-xl { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-xl .modal-form-body { overflow-y: auto; }
.card-expl { margin-top: 6px; }
.card-expl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.card-expl-view { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface2); padding: 4px 18px; min-height: 120px; max-height: 58vh; overflow-y: auto; }
.card-expl-text { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .82rem; min-height: 320px; }
.back-link { color: var(--muted); text-decoration: none; margin-right: 6px; }
.back-link:hover { color: var(--text); }
.tutor-bubble .md { font-size: inherit; line-height: inherit; }
.tutor-bubble .md > :first-child { margin-top: 0; } .tutor-bubble .md > :last-child { margin-bottom: 0; }
.tutor-action a { color: var(--blue); }
.as-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0; }
.as-group { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.as-group legend { font-size: .75rem; color: var(--cyan); padding: 0 4px; }
.as-field { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 8px; align-items: center; font-size: .8rem; }
.as-field .input { padding: 4px 6px; }
@media (max-width: 1000px) { .goal-grid, .dash-two { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .irow { grid-template-columns: minmax(0, 1fr) 110px; } .irow .gbar { grid-column: 1 / -1; } .prow { grid-template-columns: 24px minmax(0, 1fr) 90px; } .prow .gbar { grid-column: 2 / -1; } .goal-nums, .sim-out { grid-template-columns: 1fr 1fr; } }

/* ── INIT-002 (desenho do PP Course): wiki, exercícios, Setup ── */
.empty-msg { color: var(--muted); font-size: .88rem; padding: 24px; text-align: center; }
.wiki-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.wiki-tree { padding: 10px 8px; max-height: calc(100vh - 130px); overflow: auto; position: sticky; top: 0; }
.tree-area { margin-bottom: 8px; }
.tree-area > button { width: 100%; text-align: left; background: none; border: none; color: var(--accent); font-weight: 700; font-size: .78rem;
                      text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; cursor: pointer; display: flex; justify-content: space-between; }
.tree-area ul { list-style: none; margin: 0; padding: 0; }
.tree-area ul ul { padding-left: 14px; border-left: 1px solid var(--border); margin-left: 10px; }
.tree-item { display: flex; align-items: center; gap: 4px; }
.tree-item a { flex: 1; display: block; padding: 5px 8px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .84rem; overflow-wrap: anywhere; }
.tree-item a:hover { background: var(--surface2); }
.tree-item a.active { background: var(--surface2); color: var(--accent); font-weight: 600; }
.tree-item .tw { width: 18px; flex-shrink: 0; background: none; border: none; color: var(--muted); cursor: pointer; font-size: .7rem; padding: 0; }
.draft-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
.wiki-page { padding: 22px 28px; min-width: 0; }
.crumbs { font-size: .75rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-head h2 { font-size: 1.4rem; }
.page-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.page-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 8px 0 14px; }
.page-summary { color: var(--muted); font-size: .95rem; margin-bottom: 14px; }
.md { line-height: 1.6; font-size: .93rem; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { margin: 18px 0 8px; } .md h2 { font-size: 1.1rem; color: var(--cyan); } .md h3 { font-size: .98rem; }
.md p { margin: 8px 0; } .md ul, .md ol { margin: 6px 0 6px 22px; } .md li { margin: 3px 0; }
.md blockquote { border-left: 3px solid var(--yellow); background: var(--surface2); padding: 8px 12px; margin: 10px 0; border-radius: 0 8px 8px 0; }
.md table { border-collapse: collapse; margin: 10px 0; font-size: .86rem; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md th { background: var(--surface2); }
.md a { color: var(--blue); } .md a.wl { color: var(--accent); text-decoration: none; border-bottom: 1px dashed var(--accent); }
.md a.wl.missing { color: var(--red); border-color: var(--red); }
.md code { background: var(--surface2); padding: 1px 5px; border-radius: 4px; }
.page-foot { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.foot-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: .82rem; }
.foot-box b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.foot-box a { color: var(--accent); display: block; padding: 2px 0; text-decoration: none; }
.source { font-size: .78rem; color: var(--muted); margin-top: 18px; border-top: 1px solid var(--border); padding-top: 10px; overflow-wrap: anywhere; }
.source a { color: var(--blue); }
.run-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ex-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.ex-count { font-size: .75rem; color: var(--muted); }
.ex-prompt { font-size: 1.08rem; font-weight: 600; line-height: 1.45; }
.ex-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: .92rem; }
.opt:hover { border-color: var(--muted); }
.opt input { margin-top: 3px; }
.opt.right { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.opt.wrong { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.feedback { border-radius: 10px; padding: 10px 12px; font-size: .88rem; background: var(--surface2); border: 1px solid var(--border); }
.feedback.good { border-color: var(--accent); } .feedback.bad { border-color: var(--red); } .feedback.part { border-color: var(--yellow); }
.model { border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--surface2); border-radius: 0 8px 8px 0; font-size: .9rem; }
.ex-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.self { padding: 6px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .82rem; border: 1px solid var(--c); color: var(--c);
        background: color-mix(in srgb, var(--c) 12%, transparent); }
.self-0 { --c: var(--red); } .self-5 { --c: var(--yellow); } .self-1 { --c: var(--accent); }
.setup-state { font-size: .8rem; display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Modal ──────────────────────────────────────────────────────────────── */

/* ── INIT-002: barras, Recordings, Practice, Notes, painel do Dashboard ── */
.pbar { flex: 1; height: 8px; border-radius: 6px; background: var(--surface2); overflow: hidden; border: 1px solid var(--border); min-width: 60px; }
.pbar-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.pbar-fill.prog { background: var(--blue); }
.pbar-fill.lvl-low { background: var(--red); } .pbar-fill.lvl-mid { background: var(--yellow); } .pbar-fill.lvl-high { background: var(--accent); } .pbar-fill.lvl-none { background: var(--slate); }
.lvl-none { color: var(--muted); } .lvl-low { color: var(--red); } .lvl-mid { color: var(--yellow); } .lvl-high { color: var(--accent); }
.chip-low { color: var(--red); } .chip-mid { color: var(--yellow); } .chip-high { color: var(--accent); }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rec-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-decoration: none; color: var(--text); }
.rec-card:hover { border-color: var(--muted); }
.rec-badges, .rec-status, .rec-legend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rec-status, .rec-legend { margin: 10px 0; }
.rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px; flex-wrap: wrap; }
.rec-head h2 { font-size: 1.2rem; margin: 4px 0; }
.rec-head a.hint { text-decoration: none; }
.rec-actions { display: flex; gap: 8px; align-items: center; }
#view-recordings audio { width: 100%; margin-top: 10px; }
.seg-list { padding: 6px 0; }
.seg { display: grid; grid-template-columns: 54px 48px minmax(0, 1fr) auto; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--border); align-items: baseline; }
.seg:last-child { border-bottom: none; }
.seg-context { color: var(--muted); font-size: .84rem; }
.seg-me .seg-text { color: var(--text); line-height: 1.6; }
.seg-pt .seg-text { color: var(--muted); }
.seg-time { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; font-size: .72rem; padding: 2px 4px; cursor: pointer; }
.seg-time:hover { color: var(--text); border-color: var(--muted); }
.seg-who { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.seg-text { overflow-wrap: anywhere; }
.mk { border-radius: 4px; padding: 1px 3px; cursor: pointer; color: var(--text); }
.mk-error { background: color-mix(in srgb, var(--red) 32%, transparent); box-shadow: inset 0 -2px 0 var(--red); }
.mk-improve { background: color-mix(in srgb, var(--yellow) 26%, transparent); box-shadow: inset 0 -2px 0 var(--yellow); }
.rec-legend .mk { cursor: default; font-size: .8rem; }
.lost { margin-top: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.lost-row { text-align: left; background: var(--surface2); border: 1px solid var(--border); border-left-width: 3px; color: var(--text); border-radius: 6px; padding: 6px 10px; cursor: pointer; font-size: .85rem; }
.lost-row.mk-error { border-left-color: var(--red); background: var(--surface2); box-shadow: none; } .lost-row.mk-improve { border-left-color: var(--yellow); background: var(--surface2); box-shadow: none; }
.mark-said, .mark-sug { margin-bottom: 12px; }
.mark-said .mk { display: inline-block; margin-top: 4px; cursor: default; }
.sug { font-weight: 600; font-size: 1.02rem; margin-top: 4px; color: var(--accent); }
.modal-actions-inline { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.modal-actions-inline a { text-decoration: none; }
.varys-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.varys-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.varys-row a { text-decoration: none; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.area-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.area-head { display: flex; justify-content: space-between; align-items: baseline; }
.area-head .dom { font-weight: 700; font-size: 1.1rem; }
.area-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) 40px; gap: 8px; align-items: center; }
.baseline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.baseline input[type=range] { flex: 1; min-width: 90px; }
.drill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding-top: 8px; border-top: 1px solid var(--border); }
.drill-row a { text-decoration: none; }
.run-head a { text-decoration: none; }
#view-practice .form-footer { margin-top: 14px; }
.note-form { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.note-form-row { display: flex; gap: 8px; justify-content: space-between; }
.note-form-row select { max-width: 200px; }
.note { padding: 12px 16px; margin-bottom: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
.note.pinned { border-color: var(--accent); }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-actions { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.dp-tile { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--text); }
.dp-tile:hover { border-color: var(--muted); }
.dp-aspect { border-style: dashed; }
.dp-name { font-size: .78rem; color: var(--muted); }
.dp-val { font-size: 1.3rem; font-weight: 700; }
#setup-dir { width: 100%; margin: 6px 0; }
@media (max-width: 800px) {
  .seg { grid-template-columns: 48px minmax(0, 1fr); }
  .seg-who { display: none; }
  .seg > .badge { grid-column: 2; justify-self: start; }
}
@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-tree { max-height: 220px; }
}
/* janela do dono (1040): dois painéis lado a lado deixavam 57 px para o nome do critério — empilha abaixo de 1200 */
@media (max-width: 1200px) { .dash-two { grid-template-columns: 1fr; } }

/* ── INIT-003: 💬 Pimsleur (conversa com o agente) ── */
.view-tutor { display: flex; flex-direction: column; gap: 12px; }
.view-tutor[hidden] { display: none; }
.tutor-panel { display: flex; flex-direction: column; height: calc(100vh - 190px); min-height: 360px; }
.tutor-log { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.tutor-msg { display: flex; flex-direction: column; max-width: min(760px, 92%); }
.tutor-user { align-self: flex-end; align-items: flex-end; }
.tutor-assistant { align-self: flex-start; }
.tutor-bubble { padding: 10px 14px; border-radius: var(--radius); line-height: 1.5; font-size: .9rem; overflow-wrap: anywhere; }
.tutor-user .tutor-bubble { background: color-mix(in srgb, var(--accent) 18%, var(--surface2)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.tutor-assistant .tutor-bubble { background: var(--surface2); border: 1px solid var(--border); }
.tutor-wait .tutor-bubble { color: var(--muted); animation: tutor-pulse 1.2s ease-in-out infinite; }
@keyframes tutor-pulse { 50% { opacity: .45; } }
.tutor-bubble code { background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.tutor-meta { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.tutor-meta-cli, .tutor-meta-api { color: var(--orange); }
.tutor-action { font-size: .78rem; margin-top: 6px; padding: 4px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tutor-action-skip { background: var(--surface2); color: var(--muted); }
.tutor-chip { display: inline-block; margin: 4px 4px 0 0; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .78rem; text-decoration: none; }
.tutor-quick { margin: 4px 4px 0 0; }
.tutor-empty { margin: auto; text-align: center; line-height: 2.2; }
.tutor-form { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); align-items: flex-end; }
.tutor-form .input { flex: 1; resize: vertical; min-height: 44px; font-family: inherit; }
@media (max-width: 800px) { .tutor-panel { height: calc(100vh - 230px); } .tutor-msg { max-width: 100%; } }

/* ── Tasks (tasks/embed) ────────────────────────────────────────────────── */
.tasks-frame { width: 100%; height: calc(100vh - 120px); min-height: 420px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }

/* 💡 Ideas (INIT-003 SLC-008): o Banco de Ideias embutido; a altura vem do próprio iframe (mensagem ideas:height) */
.ideas-holder { width: 100%; }
.ideas-frame { width: 100%; min-height: calc(100vh - 140px); border: 1px solid var(--border); border-radius: 12px; background: var(--bg); display: block; }
/* rodapé de paginação do grid quebra linha na janela estreita (768: estourava 11 px) */
#browse-grid .tabulator-footer-contents { flex-wrap: wrap; row-gap: 6px; }

/* logo do app Tasks no item do menu (03/12, o mesmo da aba do Tasks) */
.nav-item .nav-logo{width:16px;height:16px;flex-shrink:0}

/* INIT-004 — páginas de login (Sign-in failed, Signed out): sem layout do app, só a caixa no meio */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--text); margin: 0; padding: 16px; }
.auth-box { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; max-width: 420px; width: 100%; }
.auth-box h1 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; margin: 0 0 12px; }
.auth-box a { color: var(--accent); }
.auth-box a.btn-primary { color: inherit; display: inline-block; text-decoration: none; }
