/* =====================================================================
   THEME 2026 — Design System único para todo o projeto
   (site do aluno + painel administrativo)

   Como usar:
   - Salve este arquivo em /assets/theme-2026.css na raiz do projeto.
   - Nas páginas da raiz:        <link rel="stylesheet" href="assets/theme-2026.css">
   - Nas páginas dentro de /admin: <link rel="stylesheet" href="../assets/theme-2026.css">
   - Carregue DEPOIS dos CSS antigos (base_packaged.css, geral.css, etc.)
     para que estas regras tenham prioridade e o visual antigo não conflite.
   - Este arquivo NÃO depende de nenhum framework externo (sem Bootstrap,
     sem Tailwind) — é CSS puro com variáveis, então funciona em qualquer
     página PHP existente sem precisar de build step.
   ===================================================================== */

:root {
    /* Paleta — cores oficiais extraídas do site principal (profdaviconcursos.com.br) */
    --brand-50:  #eaf2fb;
    --brand-100: #d3e4f7;
    --brand-200: #a7c9ef;
    --brand-500: #235db4; /* azul do cabeçalho/logo */
    --brand-600: #1c4a90;
    --brand-700: #163a70;

    --accent-500: #f4b942; /* amarelo/dourado do botão "Acessar Meu Curso" */
    --accent-600: #e0a52e;
    --accent-ink: #5a3d05; /* texto escuro legível sobre o amarelo */

    --highlight-500: #9b2920; /* vermelho-tijolo do banner/destaque */
    --highlight-600: #7f211a;

    --ink-900: #10182b;
    --ink-700: #37415a;
    --ink-500: #667085;
    --ink-300: #98a2b3;
    --ink-100: #e4e7ec;
    --ink-50:  #f8f9fc;

    --success-500: #16a34a;
    --success-100: #dcfce7;
    --danger-500:  #e02424;
    --danger-100:  #fee2e2;
    --warning-500: #d97706;
    --warning-100: #fef3c7;

    --surface: #ffffff;
    --bg-app:  #f4f6fb;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 43, 0.06);
    --shadow-md: 0 4px 16px rgba(16, 24, 43, 0.08);
    --shadow-lg: 0 12px 32px rgba(16, 24, 43, 0.12);

    --font-sans: -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

    --sidebar-w: 264px;
    --topbar-h: 64px;
}

/* ---------- Reset leve (não conflita com o CSS antigo, só normaliza) ---------- */
.t26, .t26 * {
    box-sizing: border-box;
}

.t26 {
    font-family: var(--font-sans);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
}

.t26 a { color: inherit; text-decoration: none; }
.t26 ul { list-style: none; margin: 0; padding: 0; }
.t26 img { max-width: 100%; display: block; }
.t26 h1, .t26 h2, .t26 h3, .t26 h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }

body.t26-body {
    background: var(--bg-app);
    margin: 0;
}

/* =====================================================================
   BOTÕES
   ===================================================================== */
.btn26 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s ease;
    line-height: 1.2;
}

.btn26-primary   { background: var(--brand-500); color: #fff; }
.btn26-primary:hover   { background: var(--brand-600); }

.btn26-outline   { background: var(--surface); color: var(--ink-700); border-color: var(--ink-100); }
.btn26-outline:hover   { border-color: var(--brand-500); color: var(--brand-600); }

.btn26-danger    { background: var(--danger-500); color: #fff; }
.btn26-danger:hover { opacity: .9; }

.btn26-accent {
    background: var(--accent-500);
    color: var(--accent-ink);
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: .01em;
}
.btn26-accent:hover { background: var(--accent-600); }

.btn26-ghost     { background: transparent; color: var(--ink-500); }
.btn26-ghost:hover { background: var(--ink-50); color: var(--ink-900); }

.btn26-sm { padding: 6px 12px; font-size: 13px; }
.btn26-block { width: 100%; }

/* =====================================================================
   CARDS
   ===================================================================== */
.card26 {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--ink-100);
    padding: 20px;
}

.card26-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    transition: all .18s ease;
}

/* Card de estatística (dashboard) */
.stat26 {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.stat26-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    background: var(--brand-50);
    color: var(--brand-600);
}

.stat26-icon.green  { background: var(--success-100); color: var(--success-500); }
.stat26-icon.orange { background: var(--warning-100); color: var(--warning-500); }
.stat26-icon.red    { background: var(--danger-100);  color: var(--danger-500); }

.stat26-value { font-size: 24px; font-weight: 800; line-height: 1.1; color: var(--ink-900); }
.stat26-label { font-size: 13px; color: var(--ink-500); margin-top: 2px; }

/* =====================================================================
   BADGES / TAGS
   ===================================================================== */
.badge26 {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ink-50);
    color: var(--ink-700);
}
.badge26-brand   { background: var(--brand-50); color: var(--brand-600); }
.badge26-success { background: var(--success-100); color: var(--success-500); }
.badge26-danger  { background: var(--danger-100); color: var(--danger-500); }

/* =====================================================================
   TABELAS MODERNAS
   ===================================================================== */
.table26-wrap {
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table.table26 {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table.table26 th {
    text-align: left;
    background: var(--ink-50);
    color: var(--ink-500);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ink-100);
}

table.table26 td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ink-100);
    color: var(--ink-900);
    vertical-align: middle;
}

table.table26 tr:last-child td { border-bottom: none; }
table.table26 tr:hover td { background: var(--ink-50); }

/* =====================================================================
   FORMULÁRIOS
   ===================================================================== */
.field26 { margin-bottom: 16px; }

.field26 label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: 6px;
}

.input26,
select.input26,
textarea.input26 {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-900);
    transition: border-color .15s ease;
}

.input26:focus,
select.input26:focus,
textarea.input26:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--brand-50);
}

/* =====================================================================
   LAYOUT PÚBLICO (site do aluno)
   ===================================================================== */

/* Barra fininha de contato/redes, acima do cabeçalho principal */
.t26-topcontact {
    background: var(--brand-700);
    color: rgba(255,255,255,.85);
    font-size: 12px;
}
.t26-topcontact-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.t26-topcontact-social { display: flex; gap: 14px; }
.t26-topcontact-social a { color: rgba(255,255,255,.85); font-weight: 600; }
.t26-topcontact-social a:hover { color: #fff; }

.t26-public-topbar {
    /* A logo é clara/branca (feita para fundo azul) — por isso o topbar usa
       a cor de marca real como fundo, igual ao site original. */
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    border-bottom: 1px solid var(--brand-700);
    position: sticky;
    top: 0;
    z-index: 40;
}

.t26-public-topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.t26-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #fff; }
.t26-brand img { height: 44px; width: auto; }

.t26-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.t26-nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,.85);
}
.t26-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.t26-nav a.active { background: rgba(255,255,255,.18); color: #fff; }

@media (max-width: 900px) {
    .t26-brand { order: 1; }
    .t26-public-topbar .btn26-accent { order: 3; }
    .t26-nav {
        order: 4;
        width: 100%;
        justify-content: center;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,.15);
        margin-top: 10px;
    }
    .t26-nav a { padding: 8px 10px; font-size: 13px; }
}

.t26-hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 20px 8px;
}

.t26-hero h1 { font-size: 26px; margin-bottom: 6px; }
.t26-hero p  { color: var(--ink-500); font-size: 15px; margin: 0; }

.t26-search {
    max-width: 1120px;
    margin: 18px auto 0;
    padding: 0 20px;
    position: relative;
}

.t26-search::before {
    content: "🔎";
    position: absolute;
    left: 38px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    pointer-events: none;
    opacity: .6;
}

.t26-search input {
    width: 100%;
    padding: 14px 18px 14px 46px;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    font-size: 15px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.t26-search input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px var(--brand-50);
}

.t26-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* Grid de categorias em cards */
.t26-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.t26-cat-card {
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.t26-cat-card summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink-900);
}
.t26-cat-card summary::-webkit-details-marker { display: none; }
.t26-cat-card summary .chev { transition: transform .15s ease; color: var(--ink-300); }
.t26-cat-card[open] summary .chev { transform: rotate(90deg); }

.t26-cat-card .t26-sub-list { border-top: 1px solid var(--ink-100); }

.t26-cat-card .t26-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 18px;
    font-size: 14px;
    color: var(--ink-700);
    border-bottom: 1px solid var(--ink-50);
    cursor: pointer;
}
.t26-cat-card .t26-sub-item:last-child { border-bottom: none; }
.t26-cat-card .t26-sub-item:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---------- Rodapé institucional completo ---------- */
.t26-footer {
    background: var(--ink-900);
    color: rgba(255,255,255,.65);
    font-size: 13px;
}

.t26-footer-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 28px;
}

.t26-footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 14px;
    letter-spacing: .02em;
}

.t26-footer-col ul li { margin-bottom: 8px; line-height: 1.5; }
.t26-footer-col ul li a { color: rgba(255,255,255,.65); }
.t26-footer-col ul li a:hover { color: #fff; }

.t26-footer-social { display: flex; gap: 10px; margin-top: 4px; }
.t26-footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #fff;
}
.t26-footer-social a:hover { background: var(--brand-500); }

.t26-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
}
.t26-footer-bottom-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
}
.t26-footer-bottom a { color: rgba(255,255,255,.7); }
.t26-footer-bottom a:hover { color: #fff; }
.t26-footer-lgpd { display: flex; gap: 16px; flex-wrap: wrap; }

/* =====================================================================
   QUESTÕES DO SIMULADO (executa-teste-ajax.php / executa-correcao-teste-ajax.php)
   ===================================================================== */
.t26-quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.t26-quiz-header h2 { font-size: 17px; }

.t26-question-card {
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
    margin-bottom: 16px;
}

.t26-question-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.t26-question-text {
    display: flex;
    gap: 10px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-900);
    margin-bottom: 16px;
}
.t26-question-text .q-num {
    flex-shrink: 0;
    font-weight: 800;
    color: var(--brand-600);
}

.t26-alt-list { display: flex; flex-direction: column; gap: 8px; }

.t26-alt-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--ink-700);
    transition: background .12s ease, border-color .12s ease;
}
.t26-alt-item:hover { background: var(--brand-50); border-color: var(--brand-200); }
.t26-alt-item input[type="radio"] { margin-top: 3px; accent-color: var(--brand-500); flex-shrink: 0; }
.t26-alt-item .alt-letter { font-weight: 700; flex-shrink: 0; }

/* Resultado da correção */
.t26-alt-item.is-correct { background: var(--success-100); border-color: var(--success-500); color: #14532d; }
.t26-alt-item.is-wrong   { background: var(--danger-100);  border-color: var(--danger-500);  color: #7f1d1d; }
.t26-alt-item.is-pointer::after {
    content: "👉 correta";
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--success-500);
}

.t26-status-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}
.t26-status-badge.ok    { background: var(--success-100); color: var(--success-500); }
.t26-status-badge.fail  { background: var(--danger-100); color: var(--danger-500); }
.t26-status-badge.blank { background: var(--warning-100); color: var(--warning-500); }

.t26-score-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.t26-score-value { font-size: 40px; font-weight: 800; line-height: 1; }
.t26-score-label { font-size: 13px; opacity: .85; margin-top: 4px; }

.t26-quiz-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 8px;
}
.t26-quiz-controls select { flex: 1; min-width: 220px; }

/* =====================================================================
   MOBILE "APP-LIKE": menu inferior fixo + FAB WhatsApp + botão instalar
   ===================================================================== */
.t26-fab-whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 70;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    transition: transform .15s ease;
}
.t26-fab-whatsapp:hover { transform: scale(1.08); }

/* =====================================================================
   LAYOUT ADMIN (topbar fixa + sidebar + conteúdo)
   ===================================================================== */
.t26-admin {
    display: flex;
    min-height: 100vh;
}

.t26-sidebar {
    width: var(--sidebar-w);
    background: var(--ink-900);
    color: #fff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 18px 14px;
}

.t26-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 20px;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 14px;
}
.t26-sidebar-brand img { height: 32px; width: 32px; border-radius: 8px; }

.t26-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,.72);
    margin-bottom: 2px;
}
.t26-sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.t26-sidebar nav a.active { background: var(--brand-500); color: #fff; }
.t26-sidebar nav a.disabled { opacity: .35; pointer-events: none; }

.t26-sidebar .t26-sidebar-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.35);
    padding: 16px 12px 6px;
}

.t26-main { flex: 1; min-width: 0; }

.t26-topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--ink-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.t26-topbar-title { font-size: 16px; font-weight: 700; }
.t26-topbar-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-500); }
.t26-topbar-user .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand-500); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}

.t26-admin-content { padding: 24px; }

.t26-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.t26-page-header h1 { font-size: 20px; }
.t26-page-header p { color: var(--ink-500); font-size: 14px; margin: 4px 0 0; }

.t26-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.t26-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.t26-quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.t26-quick-card .icon {
    width: 42px; height: 42px; border-radius: var(--radius-sm);
    background: var(--brand-50); color: var(--brand-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}

.t26-quick-card h3 { font-size: 15px; margin-bottom: 2px; }
.t26-quick-card p { font-size: 13px; color: var(--ink-500); margin: 0; }

/* Sidebar mobile (off-canvas) */
.t26-burger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--ink-700);
}

@media (max-width: 900px) {
    .t26-sidebar {
        position: fixed;
        left: 0; top: 0;
        transform: translateX(-100%);
        z-index: 50;
        box-shadow: var(--shadow-lg);
        transition: transform .2s ease;
    }
    .t26-sidebar.open { transform: translateX(0); }
    .t26-burger { display: inline-flex; }
    .t26-admin-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(16,24,43,.4);
        z-index: 45;
    }
    .t26-admin-overlay.open { display: block; }
}

@media (max-width: 640px) {
    .t26-topbar { padding: 0 14px; }
    .t26-admin-content { padding: 16px; }
    .t26-hero h1 { font-size: 21px; }
}
