@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- RESET & COMPATIBILIDADE --- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body { height: 100%; width: 100%; }

button, input, select, textarea { font-family: inherit; font-size: 100%; line-height: 1.15; margin: 0; }
button, input { overflow: visible; }
button, select { text-transform: none; }
button, [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; }
button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { border-style: none; padding: 0; }

/* --- VARIÁVEIS GLOBAIS --- */
:root {
    --primary: #0066CC;
    --primary-light: #e6f0ff;
    --primary-dark: #004C99;
    --secondary: #10B981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-on-card: #0f172a;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

.container { 
    width: 90%; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1rem; 
}

/* --- COMPONENTE: CARDS --- */
.card {
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.card h1, .card h2, .card h3 { color: var(--text-main); margin-bottom: 1rem; font-weight: 700; }
.card p { color: var(--text-muted); font-size: 1rem; line-height: 1.6; }

/* --- GRADES --- */
.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* --- IMAGENS NOS CARDS --- */
.curso-imagem {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* --- BOTÕES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--secondary); color: white; }
.btn-outline { border: 1.5px solid var(--border-color); color: var(--text-muted); background: transparent; }
.btn-outline:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* --- ESTILOS: INDEX.PHP --- */
.hero {
    background: var(--primary);
    padding: 6rem 2rem;
    border-radius: 24px;
    color: white;
    text-align: center;
    margin: 2rem 0 4rem;
}
.hero h1 { font-size: 3rem; color: white !important; font-weight: 800; }

/* --- ESTILOS: LOGIN.PHP / CADASTRO.PHP --- */
.login-wrapper { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 2rem 0; }
.white-card { 
    background: white; 
    border: 1px solid var(--border-color); 
    max-width: 450px;
    width: 100%;
}
.form-control { 
    width: 100%; 
    padding: 0.8rem 1rem; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    margin-top: 0.5rem; 
    font-size: 1rem;
}
.form-control:focus { border-color: var(--primary); outline: none; }

/* --- ESTILOS: CURSO.PHP (VIEWER) --- */
.aula-atual-container { 
    background: white; 
    border-radius: 20px; 
    padding: 3rem; 
    border: 1px solid var(--border-color); 
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}
.aula-titulo { color: var(--text-main); font-size: 2.2rem; margin-bottom: 1.5rem; font-weight: 700; }
.aula-conteudo { line-height: 1.8; font-size: 1.1rem; }

/* --- ESTILOS: ADMIN --- */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: white; border-radius: 8px; overflow: hidden; }
.admin-table th { background: var(--primary); color: white; padding: 1rem; text-align: left; }
.admin-table td { padding: 1rem; border-bottom: 1px solid var(--border-color); }
.admin-table tr:hover { background-color: #f1f5f9; }
.admin-table a { color: var(--primary); font-weight: 600; text-decoration: none; }
.admin-table strong { color: var(--text-main); }

/* --- ESTILOS DE IMPRESSÃO (PDF) --- */
@media print {
    nav, footer, aside, .hero, .btn, .no-print, .badge { display: none !important; }
    body { background: white !important; color: black !important; padding: 0 !important; }
    .container { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .aula-atual-container { 
        background: white !important; 
        color: black !important; 
        box-shadow: none !important; 
        border: none !important; 
        padding: 0 !important;
    }
    .aula-titulo { color: black !important; border-bottom: 2px solid #eee; padding-bottom: 1rem; }
    .aula-conteudo { color: black !important; }
    .aula-conteudo img { max-width: 500px !important; box-shadow: none !important; }
}
