*{box-sizing:border-box}
body{margin:0;font-family:Arial,sans-serif;background:#f6f7fb;color:#111827}
.container{width:min(1120px,92%);margin:0 auto}

/* TOPO - NÃO ALTERADO */
.site-header{background:#fff;border-bottom:1px solid #e5e7eb}
.header-flex{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.logo{font-weight:900;font-size:24px;color:#111827;text-decoration:none}
nav{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
nav a{color:#374151;text-decoration:none;font-weight:800}

/* BOTÕES GERAIS */
.btn-login,.btn-primary,.btn-secondary{display:inline-block;padding:12px 18px;border-radius:12px;text-decoration:none;font-weight:900;border:0;cursor:pointer}
.btn-login,.btn-primary{background:#111827;color:#fff}
.btn-secondary{background:#fff;color:#111827;border:1px solid #d1d5db}

/* BOTÃO EXCLUIR */
.btn-danger{
    display:inline-block;
    background:#dc2626;
    color:#fff;
    border:none;
    padding:12px 18px;
    border-radius:12px;
    font-weight:900;
    cursor:pointer;
    text-decoration:none;
    transition:.2s ease;
}
.btn-danger:hover{background:#b91c1c}
.btn-danger:active{transform:scale(.97)}

/* HOME */
.hero{padding:100px 0;text-align:center}
.hero h1{max-width:860px;margin:0 auto;font-size:52px;line-height:1.05}
.hero p{max-width:700px;margin:24px auto;font-size:20px;color:#4b5563}
.hero-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:30px}

/* ELEMENTOS BASE */
.badge{display:inline-block;background:#e5e7eb;padding:8px 14px;border-radius:999px;font-weight:900;margin-bottom:22px}
.page-container{padding:36px 0}

/* AUTENTICAÇÃO */
.auth-page{min-height:calc(100vh - 76px);display:flex;align-items:center;justify-content:center;padding:44px 16px}
.auth-card,.dashboard-card{background:#fff;border-radius:24px;box-shadow:0 24px 70px rgba(0,0,0,.08);padding:34px}
.auth-card{width:100%;max-width:480px}
.auth-card h1{font-size:38px;margin:0 0 10px}
.auth-card p{color:#6b7280;line-height:1.5}
.auth-links{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:20px}
.auth-links a{font-weight:800;color:#111827;text-decoration:none}

/* FORMULÁRIOS */
label{display:block;margin-top:18px;font-weight:900}
input,select,textarea{width:100%;margin-top:8px;padding:14px;border:1px solid #d1d5db;border-radius:12px;font-family:inherit;font-size:16px}
.full{width:100%;margin-top:20px;text-align:center}

/* ALERTAS */
.alert{padding:13px;border-radius:12px;margin:18px 0;font-weight:700}
.alert-error{background:#fee2e2;color:#991b1b}
.alert-success{background:#dcfce7;color:#166534}

/* PROGRESSO */
.progress-wrapper{margin-top:18px}
.progress-track{width:100%;height:12px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin:8px 0}
.progress-fill{height:100%;background:#111827;transition:width .2s ease}
.progress-text,.progress-percent{font-size:13px;font-weight:900;color:#374151}
.recaptcha-box{margin-top:18px}

/* DASHBOARD / CARDS */
.dashboard-card h1{margin-top:0}
.dashboard-stats{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
    margin:22px 0 28px;
}
.dash-stat-card{
    background:#fff;
    border-radius:24px;
    box-shadow:0 24px 70px rgba(0,0,0,.08);
    padding:28px;
}
.dash-stat-card span{
    display:block;
    color:#6b7280;
    font-weight:900;
    margin-bottom:10px;
}
.dash-stat-card strong{
    display:block;
    font-size:34px;
    line-height:1;
}

/* CABEÇALHO DE PÁGINA */
.page-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:22px;
    margin-bottom:24px;
}
.page-head h1{
    margin:0 0 12px;
    font-size:38px;
    line-height:1.05;
}
.page-head p{
    margin:0;
    color:#374151;
    font-size:17px;
    line-height:1.5;
}

/* LISTAGEM MEUS TCCS */
.tcc-list-page{
    display:grid;
    gap:18px;
    margin-top:24px;
}
.tcc-list-item{
    display:grid;
    grid-template-columns:1fr auto;
    gap:24px;
    align-items:center;
    background:#fff;
    border-radius:24px;
    padding:28px;
    box-shadow:0 24px 70px rgba(0,0,0,.08);
    border:1px solid #eef2f7;
}
.tcc-list-main h2{
    margin:10px 0 10px;
    font-size:26px;
    line-height:1.15;
}
.tcc-list-main p{
    margin:0 0 14px;
    color:#374151;
    line-height:1.5;
}
.tcc-list-meta{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    color:#374151;
    font-size:14px;
    margin-top:12px;
}
.tcc-list-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}
.tcc-list-actions form,
.form-excluir-tcc{
    display:inline-block;
    margin:0;
}

/* STATUS */
.status-pill{
    display:inline-block;
    background:#e0f2fe;
    color:#075985;
    padding:6px 12px;
    border-radius:999px;
    font-size:13px;
    font-weight:700;
}

/* BARRAS */
.big-progress,.mini-progress{
    width:100%;
    height:12px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
    margin:14px 0;
}
.big-progress div,.mini-progress div{
    height:100%;
    background:#111827;
    border-radius:999px;
}

/* TELA DO TCC / ETAPAS */
.stats-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
    margin:22px 0;
}
.stat-card{
    background:#fff;
    border-radius:24px;
    box-shadow:0 24px 70px rgba(0,0,0,.08);
    padding:24px;
}
.stat-card strong{
    display:block;
    font-size:30px;
    line-height:1;
}
.stat-card span{
    color:#6b7280;
    font-weight:800;
}
.section-title{
    margin:30px 0 18px;
}
.section-title h2{
    margin:0 0 8px;
    font-size:28px;
}
.section-title p{
    margin:0;
    color:#374151;
}
.steps-list{
    display:grid;
    gap:14px;
}
.step-row{
    display:grid;
    grid-template-columns:48px 1fr auto;
    gap:16px;
    align-items:center;
    background:#fff;
    border-radius:20px;
    padding:18px;
    text-decoration:none;
    color:#111827;
    box-shadow:0 14px 38px rgba(0,0,0,.04);
    border:1px solid #eef2f7;
}
.step-number{
    width:42px;
    height:42px;
    border-radius:999px;
    background:#111827;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
}
.step-info strong{
    display:block;
    font-size:18px;
}
.step-info span{
    display:block;
    color:#6b7280;
    margin-top:4px;
}
.step-meta{
    text-align:right;
}
.step-meta small{
    display:block;
    color:#6b7280;
    margin-top:6px;
}

/* EDITOR */
.editor-layout{
    display:grid;
    grid-template-columns:1fr 320px;
    gap:22px;
}
.form-card,.empty-card,.tips-card{
    background:#fff;
    border-radius:24px;
    box-shadow:0 24px 70px rgba(0,0,0,.08);
    padding:28px;
}
.editor-card textarea{
    line-height:1.7;
}
.tips-card{
    align-self:start;
}
.tips-card p{
    color:#4b5563;
    line-height:1.6;
}
.mini-stats{
    padding:16px;
    border-radius:14px;
    background:#f3f4f6;
    margin-top:12px;
}
.mini-stats strong{
    display:block;
    font-size:26px;
}
.mini-stats span{
    color:#6b7280;
}
.button-row{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:20px;
}

/* IA */
.ia-response{
    margin-top:22px;
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:24px;
    line-height:1.7;
    color:#111827;
}
.ia-response h2{margin-top:0}

.check-validacao input {
    display: none;
}

.check-validacao span {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.check-validacao input:checked + span {
    background: #16a34a;
    border-color: #16a34a;
}

.check-validacao input:checked + span::after {
    content: "✓";
    color: #fff;
    font-weight: 800;
    font-size: 18px;
}

/* RESPONSIVO */
@media(max-width:900px){
    .dashboard-stats,
    .stats-grid,
    .editor-layout{
        grid-template-columns:1fr;
    }

    .page-head,
    .header-flex{
        align-items:flex-start;
        flex-direction:column;
    }

    .tcc-list-item{
        grid-template-columns:1fr;
    }

    .tcc-list-actions{
        justify-content:flex-start;
    }

    .step-row{
        grid-template-columns:1fr;
    }

    .step-meta{
        text-align:left;
    }
}

@media(max-width:800px){
    .header-flex{padding:18px 0}
    .hero h1{font-size:36px}
    .auth-links{flex-direction:column}
}
