:root {
    --efe-bg: #f3f6fb;
    --efe-surface: #ffffff;
    --efe-surface-soft: #e9eef8;
    --efe-border: #ced8ea;
    --efe-text: #1c2430;
    --efe-muted: #5d6a7d;
    --efe-brand: #0b3d91;
    --efe-brand-strong: #072d6b;
    --efe-accent: #2b7a4b;
    --efe-warn: #b36c00;
    --efe-danger: #8e1b1b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color: var(--efe-text);
    background: radial-gradient(circle at top right, #dde8ff, var(--efe-bg) 45%);
    line-height: 1.5;
}

a {
    color: var(--efe-brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.page-content {
    padding: 2rem 0 3rem;
}

.site-header {
    border-bottom: 1px solid var(--efe-border);
    background: var(--efe-surface);
}

.site-header-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

.brand-link {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--efe-brand-strong);
    letter-spacing: 0.03em;
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--efe-muted);
    font-weight: 600;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.user-badge {
    font-size: 0.85rem;
    color: var(--efe-muted);
}

.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background: var(--efe-brand);
}

.btn-primary:hover {
    background: var(--efe-brand-strong);
}

.btn-secondary {
    color: var(--efe-brand);
    background: #fff;
    border-color: var(--efe-border);
}

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

.btn-link {
    color: var(--efe-brand);
    border: 0;
    background: transparent;
}

.hero {
    background: linear-gradient(130deg, #0e3f95, #1a5cb9 60%, #3a7bd5);
    color: #fff;
    border-radius: 1rem;
    padding: 2.2rem;
    margin-bottom: 1.6rem;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    opacity: 0.9;
}

.hero h1 {
    margin: 0.4rem 0 0.7rem;
    line-height: 1.2;
}

.hero-copy {
    max-width: 720px;
}

.hero-actions {
    margin-top: 1.1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card {
    background: var(--efe-surface);
    border: 1px solid var(--efe-border);
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
}

.section-heading {
    margin: 1.5rem 0 0.85rem;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
}

.section-heading p {
    margin: 0.3rem 0 0;
    color: var(--efe-muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
}

.stat-card .label {
    margin: 0;
    color: var(--efe-muted);
}

.stat-card .value {
    margin: 0.4rem 0 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.9rem;
}

.course-card h2,
.course-card h3 {
    margin: 0.2rem 0 0.6rem;
    font-size: 1.15rem;
}

.course-category {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--efe-brand);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.meta-list {
    margin: 0.7rem 0;
    padding-left: 1.1rem;
    color: var(--efe-muted);
}

.badge {
    display: inline-block;
    border-radius: 0.4rem;
    padding: 0.2rem 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-success {
    color: #0f5f33;
    background: #d9f1e3;
}

.badge-info {
    color: #063774;
    background: #dceaff;
}

.badge-warning {
    color: #7a4c00;
    background: #ffe9c7;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border: 1px solid var(--efe-border);
    padding: 0.55rem;
    text-align: left;
    vertical-align: top;
}

.table th {
    background: var(--efe-surface-soft);
    font-size: 0.9rem;
}

.progress-track {
    height: 8px;
    border-radius: 999px;
    background: #dde5f3;
    overflow: hidden;
    margin: 0.3rem 0;
}

.progress-fill {
    height: 100%;
    background: var(--efe-accent);
}

.module-item {
    border-bottom: 1px solid var(--efe-border);
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
}

.module-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.catalog-toolbar .inline-form {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.catalog-toolbar select,
.stack-form input {
    border: 1px solid var(--efe-border);
    border-radius: 0.4rem;
    padding: 0.45rem 0.55rem;
    background: #fff;
}

.auth-card {
    max-width: 430px;
    margin: 1rem auto;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.error-text {
    color: var(--efe-danger);
}

.site-footer {
    border-top: 1px solid var(--efe-border);
    background: #fff;
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    color: var(--efe-muted);
    font-size: 0.9rem;
}

.site-footer nav {
    display: flex;
    gap: 0.8rem;
}

.flash-stack {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.flash {
    border-radius: 0.45rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--efe-border);
    background: #fff;
}

.flash-error {
    border-color: #efc5c5;
    background: #fff0f0;
}

.flash-success {
    border-color: #bae2ca;
    background: #ebf8f0;
}

.legal-copy h1,
.legal-copy h2 {
    margin-bottom: 0.45rem;
}

.legal-copy p {
    margin-top: 0;
}

@media (max-width: 760px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-actions {
        width: 100%;
        justify-content: space-between;
    }
}
