:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --accent: #f59e0b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --linguagens: #FF6B6B;
    --matematica: #4ECDC4;
    --humanas: #45B7D1;
    --natureza: #96CEB4;
    --redacao: #DDA0DD;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.logo-text { font-size: 1.25rem; font-weight: 700; }
.logo-text span { color: var(--primary); }
nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
nav a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
nav a:hover, nav a.active { color: var(--primary); background: #eff6ff; }
.page-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1.5rem;
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}
.error {
    text-align: center;
    padding: 2rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: var(--danger);
}
/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}
.card:hover { border-color: #cbd5e1; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}
/* Status badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.badge-realizada { background: #d1fae5; color: #065f46; }
.badge-agendada { background: #fef3c7; color: #92400e; }
.badge-prevista { background: #ede9fe; color: #5b21b6; }
.badge-aguardando { background: #fef3c7; color: #92400e; }
.badge-analisada { background: #d1fae5; color: #065f46; }
/* Redações */
.redacao-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.redacao-card .tema {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}
.redacao-card .texto-preview {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.redacao-card .meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.nota-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
}
.nota-badge.high { background: #d1fae5; color: #065f46; }
.nota-badge.medium { background: #fef3c7; color: #92400e; }
.nota-badge.low { background: #fef2f2; color: #991b1b; }
.nota-badge.pending { background: #f1f5f9; color: #64748b; }
/* Provas */
.prova-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.prova-ano {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 70px;
    text-align: center;
}
.prova-info { flex: 1; }
.prova-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.prova-info .meta { font-size: 0.85rem; color: var(--text-muted); }
.prova-stats {
    display: flex;
    gap: 1rem;
    text-align: center;
}
.prova-stat-num { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.prova-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
/* Matérias */
.materia-detail {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.materia-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.materia-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}
.materia-header h2 { font-size: 1.35rem; font-weight: 700; }
.materia-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.assuntos-table {
    width: 100%;
    border-collapse: collapse;
}
.assuntos-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--border);
}
.assuntos-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.assuntos-table tr:last-child td { border-bottom: none; }
.freq-bar {
    display: inline-block;
    height: 8px;
    border-radius: 4px;
    background: var(--primary);
    opacity: 0.7;
    vertical-align: middle;
    margin-right: 0.5rem;
}
.diff-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}
.diff-alta { background: #fef2f2; color: #991b1b; }
.diff-media { background: #fef3c7; color: #92400e; }
.diff-baixa { background: #d1fae5; color: #065f46; }
/* Materias list */
.materia-list-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text);
}
.materia-list-card:hover { border-color: var(--primary); }
.materia-list-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.materia-list-info h3 { font-size: 1rem; font-weight: 600; }
.materia-list-info span { font-size: 0.8rem; color: var(--text-muted); }
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
footer {
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    .header-inner { flex-direction: column; }
    nav { justify-content: center; }
    .card-grid { grid-template-columns: 1fr; }
    .prova-card { flex-direction: column; text-align: center; }
    .prova-stats { justify-content: center; }
    .assuntos-table { font-size: 0.8rem; }
}
