:root {
    --bg: #F3F4F6;
    --bg-accent: radial-gradient(circle at 20% 0%, rgba(187, 234, 77, 0.07) 0%, transparent 45%), radial-gradient(circle at 100% 20%, rgba(92, 184, 255, 0.07) 0%, transparent 42%), #F3F4F6;
    --surface: #FFFFFF;
    --surface-soft: #F9FAFB;
    --surface-muted: #EDEEF1;
    --text: #24252A;
    --text-muted: #4B5563;
    --text-soft: #9CA3AF;
    --border: #D1D5DB;
    --primary: #8BAE2B;
    --primary-strong: #749422;
    --primary-soft: #F2FADE;
    --danger: #FF5C35;
    --warn: #FF5C35;
    --info: #5CB8FF;
    --ok: #8BAE2B;
    --shadow-sm: 0 4px 12px rgba(36, 37, 42, 0.07);
    --shadow-md: 0 16px 32px rgba(36, 37, 42, 0.09);
    --shadow-lg: 0 26px 48px rgba(36, 37, 42, 0.14);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

:root[data-theme="dark"] {
    --bg: #24252A;
    --bg-accent: radial-gradient(circle at 20% 0%, rgba(187, 234, 77, 0.06) 0%, transparent 45%), radial-gradient(circle at 100% 20%, rgba(92, 184, 255, 0.06) 0%, transparent 42%), #24252A;
    --surface: #313338;
    --surface-soft: #383B42;
    --surface-muted: #2C2D32;
    --text: #FFFFFF;
    --text-muted: #D1D5DB;
    --text-soft: #9CA3AF;
    --border: #44464D;
    --primary: #BBEA4D;
    --primary-strong: #A8D43A;
    --primary-soft: rgba(187, 234, 77, 0.14);
    --danger: #FF5C35;
    --warn: #FF5C35;
    --info: #5CB8FF;
    --ok: #BBEA4D;
    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.32);
    --shadow-md: 0 20px 42px rgba(0, 0, 0, 0.36);
    --shadow-lg: 0 32px 60px rgba(0, 0, 0, 0.48);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: var(--bg-accent);
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    line-height: 1.5;
    padding: 18px;
}

.container {
    width: min(1280px, 100%);
    margin: 0 auto;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
    padding: 8px 6px 14px;
    border-bottom: 2px solid color-mix(in srgb, var(--primary) 52%, transparent);
}

h1 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.app-header p {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.metrics-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
    margin: 12px 0 16px;
}

.metric-pill {
    background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.metric-label {
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.metric-value {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 800;
    color: var(--text);
}

.metric-hint {
    font-size: 0.76rem;
    color: var(--text-soft);
    line-height: 1.35;
}

.info-badge,
.mini-kpi,
.tooltip-anchor,
.srs-btn {
    position: relative;
}

.info-badge {
    width: 30px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--primary) 48%, transparent);
    background: color-mix(in srgb, var(--primary-soft) 75%, var(--surface));
    color: var(--primary-strong);
    font-size: 0.62rem;
    font-weight: 800;
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.info-badge:hover,
.info-badge:focus-visible {
    background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
    border-color: var(--primary);
}

.info-badge[data-tooltip]::after,
.mini-kpi[data-tooltip]::after,
.tooltip-anchor[data-tooltip]::after,
.srs-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) scale(0.96);
    min-width: 210px;
    max-width: 280px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 86%, var(--bg) 14%);
    color: var(--text);
    box-shadow: var(--shadow-md);
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1.32;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.info-badge[data-tooltip]:hover::after,
.info-badge[data-tooltip]:focus-visible::after,
.mini-kpi[data-tooltip]:hover::after,
.mini-kpi[data-tooltip]:focus-visible::after,
.tooltip-anchor[data-tooltip]:hover::after,
.tooltip-anchor[data-tooltip]:focus-visible::after,
.srs-btn[data-tooltip]:hover::after,
.srs-btn[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.srs-btn[data-tooltip]::after {
    min-width: 190px;
    max-width: 240px;
    font-size: 0.7rem;
}

.grade-guide-global,
.insights-accordion {
    margin: 12px 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, var(--primary-soft) 8%), var(--surface));
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.grade-guide-global summary,
.insights-accordion summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.grade-guide-global summary::-webkit-details-marker,
.insights-accordion summary::-webkit-details-marker {
    display: none;
}

.grade-guide-global summary::after,
.insights-accordion summary::after {
    content: "+";
    float: right;
    font-weight: 700;
    color: var(--text-soft);
}

.grade-guide-global[open] summary::after,
.insights-accordion[open] summary::after {
    content: "−";
}

.grade-guide-global[open] summary,
.insights-accordion[open] summary {
    border-bottom: 1px solid var(--border);
}

.grade-guide-grid {
    padding: 12px 14px 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 10px;
}

.study-mode-note {
    padding: 12px 14px 0;
}

.study-mode-note p {
    margin: 0 0 6px;
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.study-mode-rubric {
    padding: 0 14px 6px;
}

.study-mode-rubric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px;
}

.study-mode-rubric-grid article {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-soft) 90%, var(--surface));
    padding: 10px 11px;
}

.study-mode-rubric-grid h4 {
    margin: 0 0 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
}

.study-mode-rubric-grid p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.42;
}

.study-mode-rubric-grid ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.79rem;
    color: var(--text-muted);
    line-height: 1.42;
}

.study-mode-rubric-grid li {
    margin-bottom: 5px;
}

.study-mode-rubric-grid li:last-child {
    margin-bottom: 0;
}

.grade-guide-grid article {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-soft) 90%, var(--surface));
    padding: 10px 11px;
}

.grade-guide-grid h4 {
    margin: 0 0 6px;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-soft);
}

.grade-guide-grid p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.grade-guide-note {
    margin: 0;
    padding: 0 14px 12px;
    font-size: 0.82rem;
    color: var(--text-soft);
}

.insights-panel {
    margin: 0;
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 14px;
}

.insights-accordion .insights-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.insights-header h2 {
    margin: 0 0 2px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.08rem;
}

.insights-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.84rem;
}

.insights-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px;
}

.insight-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 88%, var(--surface));
    padding: 11px 12px;
    min-height: 122px;
}

.insight-item h3 {
    margin: 0 0 7px;
    font-size: 0.84rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.insight-item p {
    margin: 0 0 7px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.insight-item p:last-child {
    margin-bottom: 0;
}

.insight-item code {
    font-family: "Space Grotesk", "Consolas", monospace;
    font-size: 0.78rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1px 5px;
}

.toggle-container {
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-end;
}

.config-panel {
    margin-bottom: 14px;
}

.settings-bar {
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
}

.field-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#examCountdown {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--warn);
}

#startDateInfo {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-soft);
}

.form-field-wide {
    grid-column: 1 / -1;
}

.weekdays-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.weekday-check {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.weekday-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.weekday-check span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.weekday-check:has(input:checked) span {
    color: var(--primary);
}

.controls-grid {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.controls-grid > .btn {
    flex: 0 0 auto;
}

.controls-spacer {
    flex: 1 1 auto;
}

.sync-row {
    grid-column: 1 / -1;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.84rem;
    color: var(--text-soft);
}

input[type="date"],
input[type="number"],
select {
    height: 44px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    padding: 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-soft) 80%, transparent);
}

.btn,
.btn-small,
.tab-btn,
.cal-btn {
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: "Manrope", sans-serif;
    font-weight: 700;
    font-size: 0.93rem;
    line-height: 1;
    height: 44px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.btn:hover,
.btn-small:hover,
.tab-btn:hover,
.cal-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn {
    background: linear-gradient(140deg, var(--primary), var(--primary-strong));
    color: #1a1a1a;
}

.btn-secondary {
    background: var(--surface-muted);
    color: var(--text);
    border-color: var(--border);
}

.btn-primary {
    background: linear-gradient(140deg, var(--primary), color-mix(in srgb, var(--primary) 85%, #000));
    color: #1a1a1a;
    border-color: var(--primary);
    font-weight: 700;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-danger {
    background: linear-gradient(140deg, #FF5C35, #E0472A);
    color: #fff;
}

.btn-reta-final {
    background: linear-gradient(140deg, #9CA3AF, #6B7280);
    color: #FFFFFF;
}

.btn-reta-final.ativa {
    background: linear-gradient(140deg, #FF5C35, #E0472A);
    box-shadow: 0 0 0 3px rgba(255, 92, 53, 0.25);
}

.btn-upload {
    position: relative;
    overflow: hidden;
}

.btn-upload input[type="file"] {
    display: none;
}

.btn-small {
    height: 36px;
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.tabs {
    display: flex;
    gap: 10px;
    margin: 14px 0 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.tab-btn {
    background: transparent;
    color: var(--text-soft);
    border-color: transparent;
    min-width: 180px;
}

.tab-btn.active {
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 85%, var(--primary-soft) 15%);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.schedule-container {
    margin-top: 8px;
}

.day-card {
    background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft) 8%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px;
}

.day-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 10px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1rem, 2vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.queue-legend {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
}

.legend-item.review {
    color: color-mix(in srgb, var(--danger) 70%, var(--text));
    background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.legend-item.new {
    color: color-mix(in srgb, var(--info) 72%, var(--text));
    background: color-mix(in srgb, var(--info) 14%, transparent);
}

.session-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(230px, 1fr));
    gap: 14px;
}

.session-item,
.srs-card {
    background: linear-gradient(170deg, color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    animation: cardEnter 0.34s ease both;
    animation-delay: calc(var(--card-index, 0) * 42ms);
}

.srs-card:hover {
    transform: translateY(-2px) scale(1.008);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
}

.srs-card.card-foco {
    outline: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.topic-title {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.32;
    letter-spacing: -0.01em;
}

.badge-novo,
.badge-revisao {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 5px 9px;
    white-space: nowrap;
}

.badge-novo {
    color: #5CB8FF;
    background: color-mix(in srgb, #5CB8FF 18%, transparent);
}

.badge-revisao {
    color: #FF5C35;
    background: color-mix(in srgb, #FF5C35 18%, transparent);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: 0.8rem;
}

.meta-discipline {
    font-weight: 600;
}

.meta-separator {
    color: color-mix(in srgb, var(--text-soft) 70%, transparent);
}

.meta-relevance {
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #BBEA4D;
}

.card-why {
    border-top: 1px dashed color-mix(in srgb, var(--border) 70%, transparent);
    padding-top: 9px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.why-title {
    font-size: 0.67rem;
    font-weight: 800;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.why-main {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.why-sub {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.why-impact {
    font-size: 0.78rem;
    color: var(--text-soft);
    line-height: 1.35;
}

.mini-kpi {
    border: 1px solid color-mix(in srgb, var(--primary) 33%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-soft) 72%, transparent);
    color: var(--primary-strong);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 9px;
    cursor: help;
}

.srs-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.srs-btn {
    height: 56px;
    border-radius: 12px;
    border: 0;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    gap: 4px;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.srs-btn .btn-label {
    font-size: 0.96rem;
}

.srs-btn .btn-interval {
    font-size: 0.76rem;
    opacity: 0.94;
}

.srs-buttons-grid .btn-errei {
    background: linear-gradient(140deg, #FF5C35, #E0472A);
}

.srs-buttons-grid .btn-dificil {
    background: linear-gradient(140deg, #FF5C35, #CC4A2B);
}

.srs-buttons-grid .btn-bom {
    background: linear-gradient(140deg, #5CB8FF, #3DA0E6);
}

.srs-buttons-grid .btn-facil {
    grid-column: 1 / -1;
    height: 58px;
    background: linear-gradient(140deg, #BBEA4D, #A8D43A);
}

.srs-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.srs-btn:active {
    transform: translateY(0) scale(0.98);
    filter: brightness(1);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.25);
}

.overview-container {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft) 8%);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.metrics-summary {
    margin-top: 18px;
}

.overview-explainer {
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-muted) 76%, var(--surface));
}

.overview-explainer-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
}

.overview-explainer-toggle::-webkit-details-marker { display: none; }
.overview-explainer-toggle::marker { content: ''; }

.overview-explainer-toggle::before {
    content: '\25B6';
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.overview-explainer[open] > .overview-explainer-toggle::before {
    transform: rotate(90deg);
}

.overview-explainer-avg {
    font-weight: 400;
    font-size: 0.76rem;
    color: var(--text-soft);
    margin-left: auto;
}

.overview-explainer-body {
    padding: 0 14px 12px;
}

.overview-explainer-body p {
    margin: 0 0 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.overview-explainer-body p:last-child {
    margin-bottom: 0;
}

.overview-explainer-body code {
    font-family: "Space Grotesk", "Consolas", monospace;
    font-size: 0.78rem;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1px 5px;
}

.overview-header-row,
.topic-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) 80px 110px 70px 80px 100px 85px;
    gap: 6px;
    align-items: center;
    padding: 10px 12px;
}

.overview-header-row {
    position: sticky;
    top: 0;
    z-index: 3;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 800;
    background: color-mix(in srgb, var(--surface-muted) 80%, var(--surface));
    color: var(--text-soft);
    border-bottom: 1px solid var(--border);
}

.subject-overview {
    border-top: 2px solid var(--border);
}

.subject-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: color-mix(in srgb, var(--primary-soft) 18%, var(--surface));
    border-bottom: 1px solid var(--border);
}

.subject-header h3 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    color: var(--text);
}

.subject-meta {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.topic-row {
    border-bottom: 1px dashed color-mix(in srgb, var(--border) 76%, transparent);
    font-size: 0.84rem;
    position: relative;
    padding-left: 28px;
}

.topic-row:last-child {
    border-bottom: 0;
}

.topic-row.vencido {
    background: color-mix(in srgb, var(--danger) 9%, transparent);
}

.topic-name {
    line-height: 1.35;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topic-peso {
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-actions {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    gap: 4px;
    z-index: 5;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px 6px;
    box-shadow: var(--shadow-sm);
}

.topic-row:hover .topic-actions {
    display: flex;
}

.topic-action-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.topic-action-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
}

.topic-action-btn.btn-danger-action:hover {
    background: color-mix(in srgb, var(--danger) 15%, transparent);
    border-color: var(--danger);
    color: var(--danger);
}

/* Evolução de Acertos Chart */
.evolucao-acertos-wrapper {
    margin-top: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 18px 20px 20px;
    box-shadow: var(--shadow-sm);
    overflow: visible;
}

.evolucao-acertos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.evolucao-acertos-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.evolucao-acertos-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.evolucao-select {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.evolucao-select:focus {
    border-color: var(--primary);
}

#evolucaoAcertosCanvas {
    width: 100% !important;
    height: 280px;
    max-height: 280px;
    display: block;
}

.srs-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-novo {
    color: #5CB8FF;
    background: color-mix(in srgb, #5CB8FF 18%, transparent);
}

.status-vencido {
    color: #FF5C35;
    background: color-mix(in srgb, #FF5C35 18%, transparent);
}

.status-hoje {
    color: #FF5C35;
    background: color-mix(in srgb, #FF5C35 18%, transparent);
}

.status-agendado {
    color: #BBEA4D;
    background: color-mix(in srgb, #BBEA4D 18%, transparent);
}

.srs-stat {
    color: var(--text-muted);
    font-weight: 700;
}

.ds-stat {
    font-family: "Space Grotesk", "Consolas", monospace;
    font-size: 0.8em;
    cursor: help;
}

.peso-alto {
    color: #FF5C35;
}

.peso-medio {
    color: #5CB8FF;
}

.peso-baixo {
    color: var(--text-soft);
}

.empty-state {
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft) 8%);
}

.meta-concluida {
    border-radius: var(--radius-md);
    border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
    background: color-mix(in srgb, var(--ok) 14%, transparent);
}

.toast-notification {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    background: color-mix(in srgb, var(--surface) 84%, var(--surface-muted));
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    opacity: 0;
    animation: toastFadeInOut 3s ease forwards;
    pointer-events: none;
}

.toast-icon {
    color: var(--ok);
    margin-right: 8px;
}

@keyframes toastFadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }

    12% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.58);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

/* Edital: usa toda a altura útil (padding 18px × 2 do overlay) */
#syllabusModal.modal-overlay {
    align-items: stretch;
}

.modal-container {
    width: min(860px, 100%);
    max-height: 88vh;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.modal-container.modal-edit-topic {
    width: min(440px, 100%);
}

.edit-topic-body {
    padding: 0 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.edit-topic-lead {
    margin-top: 12px;
}

.edit-topic-discipline {
    font-size: 0.88rem;
    color: var(--text-soft);
    line-height: 1.4;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.edit-topic-discipline strong {
    color: var(--text);
    font-weight: 600;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.form-label-row label {
    margin: 0;
}

.edit-topic-preview-dots {
    flex-shrink: 0;
}

.edit-topic-preview-dots .importance-dots {
    vertical-align: middle;
}

.relevance-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.edit-topic-rel-btn {
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.edit-topic-rel-btn:hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    color: var(--text);
}

.edit-topic-rel-btn.is-selected {
    background: color-mix(in srgb, var(--primary) 22%, transparent);
    border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    color: var(--primary);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
}

.edit-topic-hint {
    margin: 6px 0 0;
    font-size: 0.78rem;
    color: var(--text-soft);
    line-height: 1.35;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
}

.modal-header h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.18rem;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-description {
    margin: 0 0 12px;
    color: var(--text-soft);
}

.calibration-actions {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: var(--surface-soft);
}

.calibration-actions span {
    font-size: 0.84rem;
    color: var(--text-soft);
    margin-right: 6px;
}

.cal-btn {
    height: 34px;
    font-size: 0.76rem;
    border-radius: 10px;
}

.cal-0 {
    background: color-mix(in srgb, #9CA3AF 24%, transparent);
    color: var(--text);
}

.cal-1 {
    background: color-mix(in srgb, #FF5C35 20%, transparent);
    color: #FF5C35;
}

.cal-2 {
    background: color-mix(in srgb, #BBEA4D 20%, transparent);
    color: #8BAE2B;
}

.cal-3 {
    background: color-mix(in srgb, #5CB8FF 20%, transparent);
    color: #5CB8FF;
}

.cal-4 {
    background: color-mix(in srgb, #FF5C35 16%, transparent);
    color: #FF5C35;
}

.calibration-list {
    padding: 12px 18px;
    overflow-y: auto;
    flex: 1;
}

.calibration-item {
    display: grid;
    grid-template-columns: 24px 1fr minmax(190px, 260px);
    gap: 10px;
    align-items: center;
    border-bottom: 1px dashed var(--border);
    padding: 10px 0;
}

.calibration-item:last-child {
    border-bottom: 0;
}

.calibration-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.topic-info {
    min-width: 0;
}

.topic-name {
    font-size: 0.88rem;
    font-weight: 700;
}

.topic-discipline {
    font-size: 0.75rem;
    color: var(--text-soft);
}

.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1220px) {
    .session-list {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 940px) {
    body {
        padding: 14px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-summary {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .grade-guide-grid {
        grid-template-columns: 1fr;
    }

    .study-mode-rubric-grid {
        grid-template-columns: 1fr;
    }

    .settings-bar {
        grid-template-columns: 1fr;
    }

    .session-list {
        grid-template-columns: 1fr;
    }

    .overview-header-row,
    .topic-row {
        grid-template-columns: minmax(130px, 1fr) 60px 80px 55px 70px 70px 60px;
        font-size: 0.75rem;
        padding: 8px 10px;
        gap: 4px;
    }

    .topic-row {
        padding-left: 22px;
    }

    .tab-btn {
        min-width: 120px;
        font-size: 0.82rem;
        padding: 10px 14px;
    }

    .calibration-item {
        grid-template-columns: 24px 1fr;
    }

    .calibration-item select {
        grid-column: 2 / -1;
    }
    
    .overview-explainer-toggle {
        font-size: 0.78rem;
        padding: 8px 12px;
    }

    .overview-explainer-body {
        padding: 0 12px 10px;
    }
    
    .overview-explainer-body p {
        font-size: 0.76rem;
    }
}

@media (max-width: 620px) {
    .metrics-summary {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
        gap: 6px;
    }

    .tab-btn {
        width: 100%;
        min-width: 0;
        padding: 12px 16px;
        font-size: 0.88rem;
    }

    .day-card {
        padding: 14px;
    }

    .day-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .srs-buttons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .srs-buttons-grid .btn-facil {
        grid-column: 1 / -1;
    }

    .overview-header-row,
    .topic-row {
        grid-template-columns: 1fr 80px 60px;
        gap: 6px;
        font-size: 0.78rem;
        padding: 9px 10px;
    }

    .topic-row {
        padding-left: 16px;
    }

    .overview-header-row span:nth-child(n+5),
    .topic-row > :nth-child(n+5) {
        display: none;
    }

    /* Oculta peso, D|S, revisões, data – mantém nome, status e acertos */
    .overview-header-row span:nth-child(2),
    .overview-header-row span:nth-child(5),
    .overview-header-row span:nth-child(6),
    .overview-header-row span:nth-child(7),
    .topic-row > :nth-child(2),
    .topic-row > :nth-child(5),
    .topic-row > :nth-child(6),
    .topic-row > :nth-child(7) {
        display: none;
    }

    .topic-name {
        font-size: 0.81rem;
        white-space: normal;
    }
    
    .overview-explainer-toggle {
        font-size: 0.76rem;
        padding: 8px 10px;
    }

    .overview-explainer-avg {
        display: none;
    }
    
    .overview-explainer-body p {
        font-size: 0.74rem;
        line-height: 1.35;
    }
    
    .subject-header h3 {
        font-size: 0.9rem;
    }

    .subject-header {
        padding: 10px 12px;
    }
}

@media print {
    body {
        background: #fff;
        color: #24252A;
        padding: 0;
    }

    .no-print,
    .tabs,
    #tab-overview {
        display: none !important;
    }

    .day-card,
    .session-item {
        box-shadow: none;
        border-color: #9CA3AF;
        break-inside: avoid;
    }
}

@media (prefers-reduced-motion: reduce) {
    .srs-card {
        animation: none;
    }

    .srs-card,
    .srs-btn,
    .btn,
    .btn-small,
    .tab-btn,
    .cal-btn {
        transition: none !important;
    }
}

.syllabus-textarea {
    width: 100%;
    min-height: 320px;
    resize: vertical;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.92rem;
    line-height: 1.45;
}

/* Modal: editar conteúdo programático */
.modal-container.modal-syllabus {
    width: min(880px, 100%);
    height: calc(100vh - 36px);
    min-height: calc(100vh - 36px);
    max-height: calc(100vh - 36px);
    height: calc(100dvh - 36px);
    min-height: calc(100dvh - 36px);
    max-height: calc(100dvh - 36px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Garantir que [hidden] não seja sobrescrito por display:flex dos painéis/intro */
.modal-syllabus [hidden] {
    display: none !important;
}

.syllabus-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.syllabus-modal-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.syllabus-modal-intro--compact .syllabus-modal-lead {
    margin: 6px 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

.syllabus-modal-lead {
    margin: 12px 0 0;
    font-size: 0.92rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.syllabus-text-compact {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.syllabus-text-compact code {
    font-size: 0.88em;
}

.syllabus-modal-lead strong {
    color: var(--text);
}

.syllabus-format-card {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.syllabus-format-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.syllabus-format-code {
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.88rem;
    color: var(--primary);
    word-break: break-all;
}

.syllabus-format-meta {
    font-size: 0.8rem;
    color: var(--text-soft);
    line-height: 1.45;
}

.syllabus-editor-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.syllabus-editor-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.syllabus-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.syllabus-toolbar--stats-only {
    justify-content: flex-start;
}

.syllabus-stats {
    font-size: 0.82rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.syllabus-stats strong {
    color: var(--text);
    font-weight: 600;
}

.syllabus-stats .syllabus-stat-ok {
    color: var(--ok);
}

.syllabus-stats .syllabus-stat-warn {
    color: var(--warn);
}

.syllabus-stats .syllabus-stat-muted {
    color: var(--text-muted);
}

.syllabus-textarea--modal {
    min-height: 120px;
    flex: 1 1 auto;
    overflow-y: auto;
    resize: vertical;
}

.syllabus-panel--text {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.syllabus-panel--text .syllabus-editor-section {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#syllabusPanelForm.syllabus-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#syllabusPanelForm .syllabus-form-section {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.syllabus-paste-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.syllabus-hint-icon {
    opacity: 0.7;
}

.syllabus-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.syllabus-footer-hint {
    font-size: 0.78rem;
    color: var(--text-soft);
    line-height: 1.35;
}

.syllabus-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.syllabus-modal-body kbd,
.syllabus-paste-hint kbd,
.syllabus-text-compact kbd {
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.72em;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text-muted);
}

.syllabus-mode-tabs {
    display: flex;
    gap: 8px;
    margin: 4px 0 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.syllabus-mode-tab {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: background 0.15s, color 0.15s;
}

.syllabus-mode-tab:hover {
    color: var(--text);
}

.syllabus-mode-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 12%, transparent);
}

.syllabus-mode-tab:not(.syllabus-mode-tab--secondary) {
    flex: 1 1 58%;
}

.syllabus-mode-tab--secondary {
    flex: 0 1 42%;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-soft);
}

.syllabus-mode-tab--secondary.active {
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 10%, transparent);
}

.syllabus-form-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.syllabus-form-head {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 72px 44px;
    gap: 8px;
    padding: 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.syllabus-form-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 120px;
    overflow-y: auto;
    padding-right: 4px;
}

.syllabus-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 72px 44px;
    gap: 8px;
    align-items: center;
}

.syllabus-form-row .syllabus-f-disc,
.syllabus-form-row .syllabus-f-nome {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    font-size: 0.88rem;
}

.syllabus-form-row .syllabus-f-rel {
    width: 100%;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.86rem;
}

.syllabus-form-row .syllabus-form-remove {
    padding: 8px 6px;
    font-size: 0.72rem;
    white-space: nowrap;
}

.syllabus-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.syllabus-form-actions .syllabus-stats {
    flex: 1;
    min-width: 140px;
}

.title-input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
}

.support-footer {
    margin-top: 18px;
    margin-bottom: 4px;
}

.support-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface) 90%, var(--primary-soft) 10%);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.support-card summary {
    list-style: none;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-soft);
}

.support-card summary::-webkit-details-marker {
    display: none;
}

.support-card summary::after {
    content: "+";
    float: right;
    font-weight: 700;
    color: var(--text-soft);
}

.support-card[open] summary::after {
    content: "−";
}

.support-card[open] summary {
    border-bottom: 1px solid var(--border);
}

.support-body {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
}

.support-text {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.support-qr-wrap {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 118px;
}

.support-qr {
    width: 112px;
    height: 112px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    object-fit: cover;
}

.support-qr-wrap figcaption {
    margin: 0;
    font-size: 0.7rem;
    color: var(--text-soft);
}

@media (max-width: 620px) {
    .support-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .support-qr-wrap {
        align-self: center;
    }
}

/* =====================================================
   RETA FINAL TOGGLE
   ===================================================== */

.btn-reta-final-toggle {
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reta-final-toggle:hover {
    background: var(--surface);
    border-color: var(--primary-soft);
}

.btn-reta-final-toggle.ativa {
    background: linear-gradient(140deg, #FF5C35, #E0472A);
    border-color: #E0472A;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 92, 53, 0.3);
}


/* =====================================================
   ABA DE ANALYTICS
   ===================================================== */

.analytics-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.analytics-card {
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.analytics-card h3 {
    margin: 0 0 12px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    color: var(--text);
}

.coverage-card {
    grid-column: span 2;
}

.coverage-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coverage-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.coverage-percent {
    font-family: "Space Grotesk", sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.coverage-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.coverage-bar {
    height: 24px;
    background: var(--surface-muted);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
}

.bar-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.bar-segment.dominado {
    background: var(--ok);
}

.bar-segment.progresso {
    background: var(--warn);
}

.coverage-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.legend-dominado::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--ok);
    border-radius: 4px;
    margin-right: 6px;
}

.legend-progresso::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--warn);
    border-radius: 4px;
    margin-right: 6px;
}

.legend-novos::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-right: 6px;
}

.coverage-projection {
    padding-top: 8px;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.coverage-projection p {
    margin: 4px 0;
}

/* Gráfico de Evolução */
.chart-card {
    grid-column: span 2;
}

.chart-filters {
    margin-bottom: 12px;
}

.chart-filters select {
    height: 36px;
    font-size: 0.85rem;
}

/* ── Projeção Dia da Prova ── */
.exam-projection-card {
    grid-column: span 2;
}

.exam-proj-empty {
    color: var(--text-soft);
    font-size: 0.9rem;
    text-align: center;
    padding: 24px 0;
}

.exam-proj-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
}

.exam-proj-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score-ring {
    position: relative;
    width: 110px;
    height: 110px;
}

.score-ring svg {
    width: 100%;
    height: 100%;
}

.score-ring circle:last-child {
    transition: stroke-dasharray 0.6s ease;
}

.score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--score-color);
}

.score-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.score-label {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
}

.score-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.exam-proj-metrics {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.epm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-sm, 8px);
    background: color-mix(in srgb, var(--surface-muted) 50%, transparent);
    font-size: 0.82rem;
}

.epm-label {
    color: var(--text-muted);
}

.epm-value {
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

.exam-proj-diagnostics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.epd-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm, 8px);
    font-size: 0.82rem;
    line-height: 1.4;
}

.epd-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.epd-ok {
    background: color-mix(in srgb, var(--ok) 8%, var(--surface));
    color: var(--text);
}

.epd-warn {
    background: color-mix(in srgb, var(--warn) 10%, var(--surface));
    color: var(--text);
}

.epd-danger {
    background: color-mix(in srgb, var(--danger, #FF5C35) 10%, var(--surface));
    color: var(--text);
}

.epd-neutral {
    background: color-mix(in srgb, var(--surface-muted) 60%, var(--surface));
    color: var(--text);
}

@media (max-width: 620px) {
    .exam-proj-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    .exam-proj-metrics {
        width: 100%;
    }
    .epm-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .epm-value {
        text-align: left;
    }
}

.chart-canvas-wrap {
    position: relative;
    height: 260px;
    padding: 4px 0;
}

.chart-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-kpi-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0 10px;
}

.kpi-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-muted) 76%, var(--surface));
    font-size: 0.78rem;
}

.kpi-label {
    color: var(--text-muted);
}

.kpi-value {
    font-weight: 700;
    color: var(--text);
}

.kpi-positive { color: var(--ok); }
.kpi-negative { color: var(--danger, #FF5C35); }

.kpi-chip.kpi-proj {
    border-color: color-mix(in srgb, var(--warn) 50%, var(--border));
    background: color-mix(in srgb, var(--warn) 8%, var(--surface));
}

.chart-legend {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

/* Timeline de Acertos */
.accuracy-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr 100px;
    gap: 10px;
    align-items: center;
}

.timeline-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.timeline-bar-container {
    height: 20px;
    background: var(--surface-muted);
    border-radius: 10px;
    overflow: hidden;
}

.timeline-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.timeline-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* Desempenho por Disciplina */
.discipline-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.discipline-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discipline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discipline-name {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
}

.discipline-stats {
    font-size: 0.82rem;
    font-weight: 700;
}

.discipline-bar-container {
    height: 8px;
    background: var(--surface-muted);
    border-radius: 4px;
    overflow: hidden;
}

.discipline-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}


/* =====================================================
   ABA DE PONTOS FRACOS
   ===================================================== */

.weakpoints-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.weakpoints-header {
    background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, var(--primary-soft) 12%), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.weakpoints-header h3 {
    margin: 0 0 6px;
    font-family: "Space Grotesk", sans-serif;
}

.weakpoints-header p {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.weakpoints-filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.weakpoints-filters label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.weakpoints-filters select {
    height: 36px;
    font-size: 0.85rem;
}

.weakpoints-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weakpoint-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weakpoint-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.weakpoint-rank {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.weakpoint-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weakpoint-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.weakpoint-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.weakpoint-discipline {
    font-size: 0.82rem;
    color: var(--text-soft);
}

.weakpoint-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.weakpoint-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
}

.tag-stability {
    background: color-mix(in srgb, var(--warn) 20%, transparent);
    color: var(--warn);
}

.tag-lapses {
    background: color-mix(in srgb, var(--danger) 20%, transparent);
    color: var(--danger);
}

.tag-overdue {
    background: color-mix(in srgb, var(--info) 20%, transparent);
    color: var(--info);
}

.btn-focus {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary);
    height: 32px;
    font-size: 0.8rem;
}

.btn-focus:hover {
    background: var(--primary);
    color: #1a1a1a;
}

.weakpoints-summary {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
}

.summary-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.summary-item {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.summary-tip {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* =====================================================
   MODAL SUBTÓPICOS
   ===================================================== */

.modal-wide {
    max-width: 600px;
}

.subtopic-original {
    margin-bottom: 16px;
}

.subtopic-original label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

.subtopic-original select {
    width: 100%;
}

.subtopic-names {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subtopic-preview {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-top: 12px;
}

.preview-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.preview-note {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: var(--text-soft);
    font-style: italic;
}


/* =====================================================
   RESPONSIVIDADE ADICIONAL
   ===================================================== */

@media (max-width: 900px) {
    .analytics-container {
        grid-template-columns: 1fr;
    }
    
    .coverage-card,
    .chart-card {
        grid-column: span 1;
    }
    
    .timeline-item {
        grid-template-columns: 100px 1fr 80px;
    }
    
    .topic-actions {
        display: flex;
    }
    
    .topic-action-btn {
        padding: 3px 6px;
        font-size: 0.68rem;
    }
    
    .weakpoint-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .weakpoint-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 620px) {
    .weakpoints-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .weakpoints-filters select {
        width: 100%;
    }
    
    .weakpoint-item {
        flex-direction: column;
        align-items: stretch;
        position: relative;
        padding-top: 40px;
    }
    
    .weakpoint-rank {
        position: absolute;
        top: 12px;
        right: 12px;
    }
    
    .weakpoint-content {
        gap: 8px;
    }
    
    .weakpoint-stats {
        flex-direction: column;
        gap: 4px;
    }
    
    .btn-focus {
        width: 100%;
        margin-top: 8px;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .timeline-value {
        text-align: left;
    }
    
    .coverage-main {
        flex-direction: column;
        gap: 4px;
    }
    
    .coverage-percent {
        font-size: 2.5rem;
    }
    
    .coverage-legend {
        flex-direction: column;
        gap: 8px;
    }
    
    .chart-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .discipline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .analytics-card {
        padding: 14px;
    }
    
    .analytics-card h3 {
        font-size: 0.95rem;
    }
    
    .weakpoints-header {
        padding: 14px;
    }
    
    .weakpoints-header h3 {
        font-size: 1rem;
    }
    
    .weakpoints-header p {
        font-size: 0.82rem;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* =====================================================
   Calculadora de Sessões
   ===================================================== */

.calc-inputs {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.calc-inputs .form-field {
    flex: 1;
}

.calc-resultado {
    margin-bottom: 16px;
}

.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.calc-table th,
.calc-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.calc-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-table tr.calc-ok td {
    color: var(--ok);
}

.calc-table tr.calc-warn td {
    color: var(--warn);
}

.calc-table tr.calc-bad td {
    color: var(--text-muted);
}

.calc-table tr.calc-recomendado {
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
}

.calc-table tr.calc-recomendado td {
    color: var(--primary);
    font-weight: 600;
}

.calc-recomendacao {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--primary-soft);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 500;
}

.calc-scope-note {
    margin: 0 0 12px;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-soft);
}

.calc-scope-technical {
    margin-top: 8px;
    margin-bottom: 12px;
}

.calc-col-hint {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--text-soft);
}

.calc-fila-ok {
    color: var(--ok);
    font-weight: 500;
}

.calc-fila-warn {
    color: var(--warn);
    font-weight: 500;
}

.calc-info,
.calc-info-dias {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

/* Help Modal */
.modal-help .modal-body {
    padding: 24px;
}

.help-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.help-section h3 {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

.help-grid {
    display: grid;
    gap: 10px;
}

.help-grid dt {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.help-grid dd {
    margin: 0 0 12px;
    padding-left: 12px;
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.5;
    border-left: 2px solid var(--border);
}

.help-grid dd:last-child {
    margin-bottom: 0;
}

.help-note {
    background: var(--surface-soft);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-soft);
    line-height: 1.6;
}

.help-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.help-shortcuts div {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface-soft);
    border-radius: var(--radius-sm);
}

.help-shortcuts kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 2px 0 var(--border);
}

.help-shortcuts span {
    font-size: 0.88rem;
    color: var(--text-soft);
}

.btn-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-help:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.btn-small:hover {
    background: var(--surface-soft);
}

/* =====================================================
   Lista de Fila Paginada
   ===================================================== */

.queue-list-container {
    background: color-mix(in srgb, var(--surface) 92%, var(--primary-soft) 8%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.queue-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-muted) 76%, var(--surface));
    flex-wrap: wrap;
    gap: 12px;
}

.queue-list-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    color: var(--text);
}

/* Progress Bar */
.queue-progress-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 300px;
    min-width: 150px;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: var(--surface-soft);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-dominados {
    background: linear-gradient(90deg, #BBEA4D, #A8D43A);
}

.progress-estudados {
    background: linear-gradient(90deg, #5CB8FF, #7DC8FF);
}

.progress-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-soft);
    white-space: nowrap;
}

/* Aviso: dia sem estudo / antes do início — fila completa visível abaixo */
.queue-banner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.queue-banner strong {
    font-weight: 700;
}
.queue-banner span {
    color: var(--text-muted);
    font-size: 0.84rem;
}
.queue-banner--info {
    background: color-mix(in srgb, var(--info) 12%, var(--surface));
    border-left: 3px solid var(--info);
}
.queue-banner--warn {
    background: color-mix(in srgb, var(--warn) 10%, var(--surface));
    border-left: 3px solid var(--warn);
}

/* Stats Grid */
.queue-stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.stat-box {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: color-mix(in srgb, var(--surface-muted) 50%, var(--surface));
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: default;
    transition: background 0.15s;
}

.stat-box:hover {
    background: var(--surface-soft);
}

.stat-number {
    font-size: 0.78rem;
    font-weight: 800;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stat-box.stat-hoje .stat-number { color: color-mix(in srgb, var(--primary) 60%, var(--text-muted)); }
.stat-box.stat-pendente .stat-number { color: color-mix(in srgb, var(--warn) 50%, var(--text-muted)); }
.stat-box.stat-futuro .stat-number { color: color-mix(in srgb, var(--info) 55%, var(--text-muted)); }
.stat-box.stat-novos .stat-number { color: var(--text-muted); }
.stat-box.stat-revisao .stat-number { color: var(--text-muted); }
.stat-box.stat-dominados .stat-number { color: var(--text-muted); }
.stat-box.stat-total .stat-number { color: var(--text-muted); }

/* Legacy stats (can be removed) */
.queue-list-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.stat-hoje {
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
}

.stat-pendente {
    background: color-mix(in srgb, var(--warn) 18%, transparent);
    color: var(--warn);
    border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
}

.stat-total {
    background: var(--surface-soft);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Tabela da Lista */
.queue-list-table {
    width: 100%;
}

.queue-list-row {
    display: grid;
    grid-template-columns: 1fr 200px 150px 70px 85px 72px 130px;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.queue-list-row:last-child {
    border-bottom: none;
}

.queue-list-row:hover:not(.queue-list-row-header) {
    background: color-mix(in srgb, var(--surface-soft) 60%, var(--surface));
}

.queue-list-row-header {
    background: color-mix(in srgb, var(--surface-muted) 70%, var(--surface));
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
    position: sticky;
    top: 0;
    z-index: 2;
}

.queue-row-hoje {
    background: color-mix(in srgb, var(--primary-soft) 40%, var(--surface));
    border-left: 4px solid var(--primary);
}

.queue-row-hoje:hover {
    background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface));
}

/* Week Separator */
.queue-week-separator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: color-mix(in srgb, var(--surface-muted) 50%, var(--surface));
    border-bottom: 1px solid var(--border);
    border-top: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
}

.queue-week-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-soft);
    letter-spacing: 0.01em;
    opacity: 0.45;
}

.queue-week-count {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-soft);
    opacity: 0.4;
}

/* Colunas */
.queue-col-status {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.queue-col-topic {
    min-width: 0;
}

.topic-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.92rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-col-discipline {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-col-relevance {
    text-align: center;
    min-width: 0;
}

.importance-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.importance-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1.5px solid var(--primary);
    background: transparent;
    flex-shrink: 0;
}

.importance-dot.filled {
    background: var(--primary);
}

.queue-col-time {
    text-align: center;
}

.time-estimate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.time-new {
    background: color-mix(in srgb, var(--info) 15%, transparent);
    color: var(--info);
}

.time-review {
    background: color-mix(in srgb, var(--ok) 15%, transparent);
    color: var(--ok);
}

.queue-col-date {
    text-align: center;
}

.queue-col-actions {
    display: flex;
    justify-content: flex-end;
}

/* Tags de Status */
.tag-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.4;
}

.tag-hoje {
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    color: var(--primary-strong);
    border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
}

.tag-atrasado {
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}

/* ============================================
   POMODORO BAR
   ============================================ */

.pomo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 4px;
    position: relative;
    transition: border-color 0.3s, background 0.3s;
}

.pomo-bar[data-phase="focus"]   { border-left: 3px solid var(--primary); }
.pomo-bar[data-phase="short"]   { border-left: 3px solid var(--ok); }
.pomo-bar[data-phase="long"]    { border-left: 3px solid var(--info); }

/* Left: dot + label + session */
.pomo-bar__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pomo-bar__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.3s;
}

.pomo-bar[data-phase="focus"]  .pomo-bar__dot { background: var(--primary); }
.pomo-bar[data-phase="short"]  .pomo-bar__dot { background: var(--ok); }
.pomo-bar[data-phase="long"]   .pomo-bar__dot { background: var(--info); }

.pomo-bar__label {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.pomo-bar__session {
    font-size: 0.68rem;
    color: var(--text-soft);
    white-space: nowrap;
}

/* Center: timer */
.pomo-bar__center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pomo-bar__time {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

.pomo-bar[data-phase="focus"]  .pomo-bar__time { color: var(--primary); }
.pomo-bar[data-phase="short"]  .pomo-bar__time { color: var(--ok); }
.pomo-bar[data-phase="long"]   .pomo-bar__time { color: var(--info); }

/* Right: buttons */
.pomo-bar__right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pomo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
    background: var(--surface-muted);
    color: var(--text-muted);
}

.pomo-btn:hover { background: var(--border); transform: scale(1.06); }
.pomo-btn:active { transform: scale(0.95); }

.pomo-btn--play {
    background: color-mix(in srgb, var(--primary) 15%, var(--surface));
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 30%, transparent);
    font-size: 0.75rem;
}

.pomo-bar[data-phase="short"] .pomo-btn--play {
    background: color-mix(in srgb, var(--ok) 15%, var(--surface));
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}
.pomo-bar[data-phase="long"]  .pomo-btn--play {
    background: color-mix(in srgb, var(--info) 15%, var(--surface));
    color: var(--info);
    border-color: color-mix(in srgb, var(--info) 30%, transparent);
}

.pomo-btn--play:hover { filter: brightness(0.95); }

.pomo-btn--skip { font-size: 0.8rem; }
.pomo-btn--gear { font-size: 0.95rem; }

/* Pulse animation when running */
.pomo-bar.pomo-running .pomo-bar__dot {
    animation: pomoPulse 1.5s ease-in-out infinite;
}

@keyframes pomoPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(0.8); }
}

/* Settings popover */
.pomo-settings {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-md);
    min-width: 250px;
}

.pomo-settings__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pomo-settings__row > label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.pomo-settings__stepper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pomo-settings__step-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.pomo-settings__step-btn:hover { background: var(--border); }

.pomo-settings__stepper input {
    width: 40px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 4px 0;
    -moz-appearance: textfield;
}

.pomo-settings__stepper input::-webkit-outer-spin-button,
.pomo-settings__stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pomo-settings__unit {
    font-size: 0.7rem;
    color: var(--text-soft);
}

.pomo-settings__row--toggle {
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.pomo-settings__row--toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.pomo-settings__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}

.pomo-btn--save {
    width: auto;
    padding: 7px 18px;
    font-size: 0.8rem;
    font-weight: 700;
    background: linear-gradient(140deg, var(--primary), var(--primary-strong));
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: box-shadow 0.2s, filter 0.15s;
}

.pomo-btn--save:hover {
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent);
}

/* Mobile: stack vertically */
@media (max-width: 560px) {
    .pomo-bar {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 10px;
    }
    .pomo-bar__left  { order: 1; flex: 1 1 auto; }
    .pomo-bar__right { order: 2; flex: 0 0 auto; }
    .pomo-bar__center { order: 3; flex: 1 1 100%; justify-content: center; }
    .pomo-bar__time { font-size: 1.8rem; }
    .pomo-settings { left: 0; right: 0; min-width: 0; }
}

.tag-pendente {
    background: color-mix(in srgb, var(--danger) 15%, transparent);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

.tag-novo {
    background: color-mix(in srgb, var(--info) 15%, transparent);
    color: var(--info);
    border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
}

.tag-futuro {
    background: color-mix(in srgb, var(--info) 14%, transparent);
    color: var(--info);
    border: 1px solid color-mix(in srgb, var(--info) 35%, transparent);
}

/* Data formatada */
.date-new {
    color: var(--info);
    font-weight: 700;
}

.date-today {
    color: var(--primary);
    font-weight: 700;
}

.date-overdue {
    color: var(--danger);
    font-weight: 700;
}

.date-future {
    color: var(--text-muted);
    font-weight: 500;
}

/* Botões de Ação Inline */
.action-buttons-inline {
    display: flex;
    gap: 4px;
}

/* ── Grade Popover ── */
.grade-popover-wrap {
    position: relative;
}

.btn-avaliar {
    padding: 6px 14px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary-soft) 50%, var(--surface));
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-avaliar:hover {
    background: var(--primary);
    color: #1a1a1a;
    transform: translateY(-1px);
}

.grade-popover {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    flex-direction: row;
    gap: 5px;
    padding: 10px 14px;
    background: var(--surface-muted);
    border: 2px solid var(--primary);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28), 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
    white-space: nowrap;
}

.grade-popover.open {
    display: flex;
}

.btn-grade {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
    color: #fff;
    min-width: 56px;
}

.btn-grade:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.btn-grade:active {
    transform: scale(0.95);
}

.grade-icon {
    font-size: 1rem;
    line-height: 1;
}

.grade-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.btn-grade.btn-errei {
    background: linear-gradient(140deg, #FF5C35, #E0472A);
}

.btn-grade.btn-dificil {
    background: linear-gradient(140deg, #FF5C35, #CC4A2B);
}

.btn-grade.btn-bom {
    background: linear-gradient(140deg, #5CB8FF, #3DA0E6);
}

.btn-grade.btn-facil {
    background: linear-gradient(140deg, #BBEA4D, #A8D43A);
}

@media (max-width: 620px) {
    .grade-popover {
        position: fixed;
        left: 50%;
        top: auto;
        bottom: 16px;
        right: auto;
        transform: translateX(-50%);
        gap: 6px;
        padding: 8px 10px;
        border-radius: 16px;
    }
}

/* ── Acerto Slider ── */
.acerto-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    padding: 2px 0;
}

.acerto-slider-value {
    font-size: 1.1rem;
    font-weight: 800;
    min-width: 42px;
    text-align: center;
    color: #5CB8FF;
    font-variant-numeric: tabular-nums;
}

.acerto-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}

.acerto-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--primary), var(--primary-strong));
    border: 2px solid var(--surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.12s ease;
}

.acerto-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.acerto-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--primary), var(--primary-strong));
    border: 2px solid var(--surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.acerto-slider-grade {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-soft);
    white-space: nowrap;
    min-width: 52px;
}

.btn-confirmar-acerto {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(140deg, var(--primary), var(--primary-strong));
    color: #1a1a1a;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
    white-space: nowrap;
}

.btn-confirmar-acerto:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-confirmar-acerto:active {
    transform: scale(0.95);
}

@media (max-width: 620px) {
    .acerto-slider-wrap {
        min-width: 220px;
        gap: 8px;
    }
}

/* ── Accuracy tag in Pontos Fracos ── */
.tag-accuracy {
    background: color-mix(in srgb, #FF5C35 16%, transparent);
    color: #FF5C35;
    font-weight: 600;
}

.weakpoint-acerto {
    color: var(--text-soft);
    font-weight: 600;
    font-size: 0.82em;
}

.btn-action {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-action:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.btn-action:active {
    transform: scale(0.95);
}

.btn-action.btn-errei {
    background: linear-gradient(140deg, #FF5C35, #E0472A);
}

.btn-action.btn-dificil {
    background: linear-gradient(140deg, #FF5C35, #CC4A2B);
}

.btn-action.btn-bom {
    background: linear-gradient(140deg, #5CB8FF, #3DA0E6);
}

.btn-action.btn-facil {
    background: linear-gradient(140deg, #BBEA4D, #A8D43A);
    color: #1a1a1a;
}

.action-waiting {
    color: var(--text-soft);
    font-size: 0.9rem;
}

.btn-adiantar {
    padding: 6px 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 50%, var(--border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary-soft) 60%, var(--surface));
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-adiantar:hover {
    background: var(--primary);
    color: #1a1a1a;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-adiantar:active {
    transform: translateY(0);
}

/* Paginação */
.queue-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-muted) 50%, var(--surface));
}

.btn-page {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-page:hover:not(.disabled) {
    background: var(--primary);
    color: #1a1a1a;
    border-color: var(--primary);
}

.btn-page.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    padding: 0 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Animação de linha completada */
.row-completed {
    opacity: 0.5;
    background: color-mix(in srgb, var(--ok) 15%, var(--surface)) !important;
}

/* Responsividade da lista */
@media (max-width: 1024px) {
    .queue-list-row {
        grid-template-columns: 1fr 130px 65px 72px 70px 120px;
    }
    
    .queue-col-discipline {
        display: none;
    }
    
    .importance-dots {
        gap: 3px;
    }

    .importance-dot {
        width: 7px;
        height: 7px;
    }
}

@media (max-width: 768px) {
    .queue-list-row {
        grid-template-columns: 1fr 110px 70px 110px;
    }
    
    .queue-col-relevance,
    .queue-col-time {
        display: none;
    }
    
    .queue-stats-grid {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .queue-list-row {
        grid-template-columns: 1fr 80px 90px;
        padding: 8px 12px;
        gap: 6px;
    }

    .badge-study-mode {
        display: none;
    }

    .queue-col-date,
    .queue-col-time,
    .queue-col-relevance {
        display: none;
    }

    .queue-list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .queue-progress-bar {
        max-width: 100%;
        width: 100%;
    }
    
    .queue-stats-grid {
        justify-content: flex-start;
    }
    
    .stat-box {
        padding: 3px 8px;
    }
    
    .stat-number {
        font-size: 0.72rem;
    }

    .btn-avaliar {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}

/* =====================================================
   PROFILE DROPDOWN MENU
   ===================================================== */

.profile-dropdown-wrapper {
    position: relative;
}

.btn-profile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-width: 120px;
}

.btn-profile svg {
    flex-shrink: 0;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.15s ease;
}

.profile-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    font-size: 0.88rem;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-item:hover {
    background: var(--surface-soft);
}

.dropdown-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.dropdown-item-danger {
    color: var(--error);
}

.dropdown-item-danger svg {
    color: var(--error);
}

.dropdown-item-danger:hover {
    background: color-mix(in srgb, var(--error) 10%, transparent);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* =====================================================
   CONFIG MODAL
   ===================================================== */

.modal-config {
    width: min(720px, 100%);
}

.config-modal-body {
    padding: 24px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.config-grid .form-field-wide {
    grid-column: 1 / -1;
}

.config-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.config-data-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.config-data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.config-data-actions .btn-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger {
    background: linear-gradient(140deg, #FF5C35, #E0472A);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(140deg, #E0472A, #CC3D22);
}

/* Queue list title with Reta Final button */
.queue-list-title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.queue-list-title .btn-reta-final-toggle {
    font-size: 0.78rem;
    padding: 5px 12px;
}

.queue-list-title .btn-skip-study-day {
    font-size: 0.78rem;
    padding: 5px 12px;
    white-space: nowrap;
}

/* =====================================================
   NEW FEATURES: Radar, BoxPlot, Meta Semanal,
   Timeline concursos, Stars, Timer, Badges, Topic Trend
   ===================================================== */

/* ── Radar Chart + Discipline List ── */
.radar-card .chart-canvas-wrap {
    max-width: 500px;
    margin: 0 auto;
}

.radar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.radar-controls label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.radar-controls input[type="number"] {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.radar-discipline-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.radar-disc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.radar-disc-icon {
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
}

.radar-disc-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radar-disc-pct {
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 40px;
    text-align: right;
}

/* ── Box Plot ── */
.boxplot-card .card-description {
    font-size: 0.82rem;
    color: var(--text-soft);
    margin: -4px 0 12px;
}

/* ── Meta Semanal (Sprint) ── */
.meta-semanal-card #metaSemanalContent {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.meta-semanal-progress {
    display: flex;
    align-items: center;
    gap: 14px;
}

.meta-semanal-bar {
    flex: 1;
    height: 18px;
    background: var(--surface-muted);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.meta-semanal-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary), var(--ok));
    transition: width 0.4s ease;
}

.meta-semanal-pct {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 48px;
    text-align: right;
}

.meta-semanal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.meta-semanal-stat {
    padding: 10px;
    border-radius: 10px;
    background: var(--surface-soft);
    text-align: center;
}

.meta-semanal-stat .stat-number {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

.meta-semanal-stat .stat-label {
    font-size: 0.72rem;
    color: var(--text-soft);
    display: block;
}

.meta-semanal-backlog {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.meta-semanal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    background: var(--surface-soft);
}

.meta-semanal-item.done {
    opacity: 0.5;
    text-decoration: line-through;
}

/* ── Timeline de concursos (board / roadmap) ── */
.timeline-concursos {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline-concursos__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.timeline-concursos__header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.timeline-empty {
    text-align: center;
    padding: 52px 24px;
    border-radius: 16px;
    border: 1px dashed color-mix(in srgb, var(--border) 85%, var(--primary));
    background: var(--surface-soft);
    color: var(--text-muted);
}

.timeline-empty__hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.5;
    max-width: 48ch;
    margin-left: auto;
    margin-right: auto;
}

/* Board: grid + coluna de datas com “Hoje” contínuo */
.timeline-board {
    border-radius: 16px;
    border: 1px solid var(--border);
    border-top: none;
    background: var(--surface);
    box-shadow:
        0 1px 2px color-mix(in srgb, var(--text) 4%, transparent),
        0 8px 24px color-mix(in srgb, var(--text) 6%, transparent);
    overflow: hidden;
    padding-top: 0;
}

.timeline-board__matrix {
    display: grid;
    grid-template-columns: minmax(200px, 26%) 1fr;
    grid-auto-rows: auto;
    /* Mesmo recuo horizontal que .timeline-board__lane (trilha = régua = “Hoje”) */
    --timeline-track-inset: 16px;
    /* Base do rótulo “Hoje”: borda inferior da régua (pill sobe com translateY -100%) */
    --timeline-ruler-stack-h: calc(3px + 38px + 6px);
    --timeline-hoje-cap-top: var(--timeline-ruler-stack-h);
}

.timeline-board__matrix:has(.timeline-ruler--denser) {
    --timeline-ruler-stack-h: calc(3px + 40px + 6px);
    --timeline-hoje-cap-top: var(--timeline-ruler-stack-h);
}

.timeline-board__today-layer {
    position: relative;
    z-index: 5;
    pointer-events: none;
    min-height: 0;
    align-self: stretch;
    justify-self: center;
    box-sizing: border-box;
    width: calc(100% - (2 * var(--timeline-track-inset)));
    max-width: 100%;
}

.timeline-board__today-stem {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--primary);
    opacity: 0;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 70%, transparent);
    transition: opacity 0.16s ease;
    z-index: 1;
}

.timeline-board__today-cap {
    position: absolute;
    top: var(--timeline-hoje-cap-top);
    left: 0;
    margin-top: -1px;
    transform: translate(-50%, -100%);
    z-index: 20;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.timeline-board:hover .timeline-board__today-stem {
    opacity: 0.55;
}

.timeline-board:hover .timeline-board__today-cap {
    opacity: 1;
}

@media (hover: none) {
    .timeline-board__today-stem {
        opacity: 0.5;
    }

    .timeline-board__today-cap {
        opacity: 1;
    }
}

.timeline-board__today-cap-label {
    display: inline-block;
    position: relative;
    z-index: 1;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 14%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    white-space: nowrap;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 55%, transparent);
}

.timeline-board__corner {
    grid-column: 1;
    grid-row: 1;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface-soft) 88%, var(--surface));
    min-height: 0;
    align-self: stretch;
}

.timeline-board__ruler-cell {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 4;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--surface-soft) 88%, var(--surface));
    padding-bottom: 0;
    min-width: 0;
    overflow: visible;
}

.timeline-board__ruler-cell-inner {
    position: relative;
    padding-bottom: 4px;
}

.timeline-board__matrix > .timeline-board__side:last-of-type {
    border-bottom: none;
}

.timeline-board__matrix > .timeline-board__lane:last-of-type {
    border-bottom: none;
}

.timeline-board__side {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    transition: background 0.16s ease;
}

.timeline-board__side:hover,
.timeline-board__lane:hover,
.timeline-board__side.timeline-board__pair--hover,
.timeline-board__lane.timeline-board__pair--hover {
    background: color-mix(in srgb, var(--surface-soft) 45%, transparent);
}

.timeline-board__side-inner {
    position: relative;
    padding: 8px 44px 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 56px;
    min-width: 0;
    justify-content: center;
}

.timeline-board__lane {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 3;
    min-height: 56px;
    min-width: 0;
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    transition: background 0.16s ease;
}

.timeline-ruler.timeline-ruler--board {
    position: relative;
    min-height: 38px;
    margin-left: var(--timeline-track-inset);
    margin-right: var(--timeline-track-inset);
    width: auto;
    box-sizing: border-box;
    padding: 3px 0 6px 0;
    font-variant-numeric: tabular-nums;
}

.timeline-ruler--board.timeline-ruler--denser {
    min-height: 40px;
}

.timeline-ruler--board.timeline-ruler--denser .timeline-ruler__tick-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.timeline-ruler__tick {
    position: absolute;
    bottom: 6px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    width: max-content;
    max-width: min(10em, 32vw);
}

/* Extremos: evita texto saindo à esquerda/direita do quadro (eixo mantém left:% no trilho) */
.timeline-ruler__tick--lead {
    transform: translateX(0);
    align-items: flex-start;
}

.timeline-ruler__tick--trail {
    transform: translateX(-100%);
    align-items: flex-end;
}

.timeline-ruler__tick-line {
    width: 1px;
    height: 6px;
    background: color-mix(in srgb, var(--text-soft) 45%, var(--border));
    margin-bottom: 4px;
}

.timeline-ruler__tick-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: capitalize;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.timeline-row__title-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.timeline-row__swatch {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 80%, var(--border));
}

.timeline-row__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-soft);
    line-height: 1.35;
}

.timeline-row__meta--compact {
    display: block;
    flex-wrap: nowrap;
    gap: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 0;
    line-height: 1.4;
}

.timeline-row__meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-soft);
    opacity: 0.55;
}

.timeline-row__pill {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: color-mix(in srgb, var(--text-soft) 12%, var(--surface-soft));
    color: var(--text-muted);
}

.timeline-row__pill--ok {
    background: color-mix(in srgb, var(--ok) 18%, var(--surface-soft));
    color: color-mix(in srgb, var(--ok) 90%, var(--text));
}

.timeline-row__btn--float {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    box-shadow: 0 2px 14px color-mix(in srgb, var(--text) 12%, transparent);
    font-size: 0.76rem;
    padding: 6px 11px;
    z-index: 3;
}

.timeline-board__side:hover .timeline-row__btn--float,
.timeline-board__side:focus-within .timeline-row__btn--float,
.timeline-board__side.timeline-board__pair--hover .timeline-row__btn--float {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: none) {
    .timeline-row__btn--float {
        opacity: 0.92;
        pointer-events: auto;
    }
}

.timeline-row__track {
    position: relative;
    width: 100%;
    height: 46px;
    border-radius: 10px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

/* Só linhas sem período: contorno leve (sem caixa cinza em toda a largura) */
.timeline-row__track:has(.timeline-track__placeholder) {
    overflow: hidden;
}

.timeline-period-fill {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    min-width: 4px;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 0;
    border-radius: 6px;
    margin: 0;
    background: color-mix(in srgb, var(--timeline-fill, var(--primary)) 58%, var(--surface-soft));
    border: 1px solid color-mix(in srgb, var(--timeline-fill, var(--primary)) 82%, var(--border));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--timeline-fill, var(--primary)) 22%, transparent);
}

.timeline-track__placeholder {
    position: absolute;
    inset: 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-size: 0.78rem;
    color: var(--text-soft);
    text-align: center;
    z-index: 1;
    border-radius: 6px;
    border: 1px dashed color-mix(in srgb, var(--border) 75%, transparent);
    background: color-mix(in srgb, var(--surface-soft) 40%, transparent);
}

.timeline-node {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 13px;
    height: 13px;
    cursor: default;
}

.timeline-node__ring {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-sizing: border-box;
    background: var(--surface);
    border: 2px solid var(--text-soft);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--text) 14%, transparent);
}

.timeline-node--edital .timeline-node__ring {
    border-color: color-mix(in srgb, var(--primary) 65%, var(--border));
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.timeline-node--prova .timeline-node__ring {
    border-color: color-mix(in srgb, var(--ok) 55%, var(--border));
    background: color-mix(in srgb, var(--ok) 14%, var(--surface));
}

/* Prova estimada: losango (não círculo tracejado — evita artefatos e confusão com “prova”) */
.timeline-node--prova-estimada {
    width: 11px;
    height: 11px;
}

.timeline-node--prova-estimada .timeline-node__ring {
    border-radius: 2px;
    border-style: solid;
    border-width: 2px;
    border-color: color-mix(in srgb, var(--warn) 72%, var(--border));
    background: color-mix(in srgb, var(--warn) 18%, var(--surface));
    transform: rotate(45deg);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 85%, transparent);
}

.timeline-node--cronograma .timeline-node__ring {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.timeline-form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.timeline-form-hint {
    font-size: 0.8rem;
    color: var(--text-soft);
    margin: 4px 0 12px;
    line-height: 1.45;
}

.timeline-form-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.88rem;
    box-sizing: border-box;
}

.timeline-modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.timeline-modal-footer__spacer {
    flex: 1;
    min-width: 8px;
}

.modal-trend .chart-canvas-wrap {
    min-height: 200px;
    max-height: 300px;
}

/* ── Stars (Maestria) ── */
.stars-display {
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

.star {
    font-size: 0.9rem;
    line-height: 1;
}

.star.filled {
    color: #F9A825;
}

.star.empty {
    color: var(--border);
    opacity: 0.5;
}

.star.alert {
    color: var(--danger);
}

/* ── Topic Timer (session) ── */
.topic-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.topic-timer-icon {
    font-size: 0.82rem;
}

/* ── Study Mode Badge (Fila diária) ── */
.badge-study-mode {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.4;
}

.badge-study-mode.badge-revisao {
    background: color-mix(in srgb, var(--info) 14%, transparent);
    color: var(--info);
    border: 1px solid color-mix(in srgb, var(--info) 25%, transparent);
}

.badge-study-mode.badge-teoria {
    background: color-mix(in srgb, var(--ok) 14%, transparent);
    color: var(--ok);
    border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent);
}

.badge-study-mode.badge-questoes {
    background: color-mix(in srgb, #F9A825 14%, transparent);
    color: #D48C10;
    border: 1px solid color-mix(in srgb, #F9A825 25%, transparent);
}

.badge-study-mode.badge-teste {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
}

/* ── Topic ID code ── */
.topic-id-code {
    display: block;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.65rem;
    color: var(--text-soft);
    opacity: 0.7;
    margin-top: 1px;
}

/* ── Weakpoint clickable trend ── */
.weakpoint-name.clickable {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.weakpoint-name.clickable:hover {
    color: var(--info);
}

/* ── Topic Trend Modal Stats ── */
#topicTrendStats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.trend-stat {
    padding: 10px;
    border-radius: 10px;
    background: var(--surface-soft);
    text-align: center;
}

.trend-stat .stat-number {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    display: block;
}

.trend-stat .stat-label {
    font-size: 0.7rem;
    color: var(--text-soft);
}

@media (max-width: 620px) {
    .radar-discipline-list {
        grid-template-columns: 1fr;
    }
    .meta-semanal-stats {
        grid-template-columns: 1fr 1fr;
    }
    .timeline-board__matrix {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        --timeline-track-inset: 10px;
    }
    .timeline-board__side-inner {
        padding-right: 12px;
        padding-left: 12px;
    }
    .timeline-board__lane {
        padding: 10px 10px;
    }
}

/* ── Login Firebase ── */
body:not(.editaliza-app-ready) #editalizaAppShell {
    display: none !important;
}

.editaliza-login-gate {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: color-mix(in srgb, var(--bg) 88%, var(--surface-soft) 12%);
}

.editaliza-login-gate[hidden] {
    display: none !important;
}

body.editaliza-app-ready .editaliza-login-gate {
    display: none !important;
}

.editaliza-login-card {
    width: 100%;
    max-width: 400px;
    padding: 28px 26px 24px;
    border-radius: 16px;
    background: linear-gradient(155deg, color-mix(in srgb, var(--surface) 92%, var(--primary-soft) 8%), var(--surface));
    border: 1px solid var(--border);
    box-shadow: 0 20px 48px color-mix(in srgb, var(--bg) 55%, transparent);
}

.editaliza-login-brand {
    font-family: 'Space Grotesk', var(--font-ui, system-ui), sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.editaliza-login-lead {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.45;
    margin: 0 0 22px;
}

.editaliza-login-btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
    font-weight: 700;
    background: var(--surface-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.editaliza-login-btn-google:hover {
    background: color-mix(in srgb, var(--surface-soft) 85%, var(--primary-soft) 15%);
}

.editaliza-login-btn-guest {
    width: 100%;
}

.editaliza-login-error {
    margin: 14px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--danger, #FF5C35);
}

.editaliza-login-error[hidden] {
    display: none !important;
}

.editaliza-login-hint {
    margin: 18px 0 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-soft);
    opacity: 0.92;
}