:root {
    --bg: #f4f1ea;
    --bg-soft: #fdfbf7;
    --surface: #ffffff;
    --ink: #1f2a2b;
    --muted: #5b6768;
    --primary: #0b6b53;
    --primary-2: #2f9d72;
    --accent: #c86e2a;
    --line: #d9dfd8;
    --shadow: 0 18px 40px rgba(17, 42, 36, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 8%, #d9ece2 0, rgba(217, 236, 226, 0) 35%),
        radial-gradient(circle at 85% 92%, #f4ddca 0, rgba(244, 221, 202, 0) 32%),
        var(--bg);
    line-height: 1.6;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
    background: rgba(253, 251, 247, 0.88);
    border-bottom: 1px solid var(--line);
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.95rem 0;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--primary);
    text-decoration: none;
}

.menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.menu a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.button {
    display: inline-block;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 10px 24px rgba(11, 107, 83, 0.22);
}

.button-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.hero {
    padding: 4.5rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.hero p {
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    margin: 1.1rem 0 1.8rem;
    max-width: 62ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 20px;
    padding: 1.4rem;
    animation: rise 620ms ease both;
}

.hero-card h2 {
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
}

.hero-card ul {
    margin: 0;
    padding-left: 1.1rem;
}

.hero-card li+li {
    margin-top: 0.45rem;
}

.section {
    padding: 1.4rem 0 4rem;
}

.section h2,
.section h3 {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    margin: 0 0 0.8rem;
}

.section-intro {
    color: var(--muted);
    max-width: 70ch;
    margin-bottom: 1.8rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.1rem;
    transform: translateY(10px);
    opacity: 0;
    animation: rise 580ms ease forwards;
}

.card:nth-child(2) {
    animation-delay: 110ms;
}

.card:nth-child(3) {
    animation-delay: 220ms;
}

.card strong {
    display: block;
    margin-bottom: 0.45rem;
    color: #173f32;
}

.card-action {
    margin-top: 0.9rem;
}

.card-action .button {
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
}

.how-it-works .card {
    border-top: 6px solid transparent;
}

.how-it-works .card:nth-child(1) {
    border-top-color: #0f7a5f;
}

.how-it-works .card:nth-child(2) {
    border-top-color: #c86e2a;
}

.how-it-works .card:nth-child(3) {
    border-top-color: #2f4f8f;
}

.cta {
    background: linear-gradient(145deg, #173f32, #0d6f54);
    color: #f3fff9;
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 4rem;
}

.cta h4 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.cta p {
    margin: 0.45rem 0 0;
    opacity: 0.9;
}

.page {
    padding: 3rem 0 4rem;
}

.page-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: clamp(1.1rem, 3vw, 2rem);
}

.page-content p {
    color: var(--muted);
}

.dashboard-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--line);
}

.dashboard-panel-header h2,
.dashboard-panel-header p {
    margin: 0;
}

.dashboard-panel-header p,
.dashboard-empty-state {
    color: var(--muted);
    font-size: 0.88rem;
}

.dashboard-empty-state {
    margin: 0;
    padding: 1.2rem 1.15rem;
}

.dashboard-table-wrap {
    background: var(--surface);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-table {
    width: 100%;
    background: var(--surface);
    border-collapse: collapse;
}

.dashboard-table th {
    padding: 0.6rem 0.7rem;
    text-align: left;
    background: #f4f7f5;
    color: var(--muted);
    font-size: 0.78rem;
    border-bottom: 1px solid var(--line);
}

.dashboard-table td {
    padding: 0.7rem;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.dashboard-table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-table-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    min-width: 140px;
}

.dashboard-turmas-table {
    min-width: 820px;
}

.profile-cards .profile-card {
    min-height: 220px;
}

.mini-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.compact-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(17, 42, 36, 0.08);
    overflow: hidden;
}

.accordion-card summary {
    list-style: none;
    cursor: pointer;
    padding: 0.8rem 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-card summary::-webkit-details-marker {
    display: none;
}

.accordion-card .plus {
    display: inline-flex;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 800;
}

.accordion-card[open] .plus {
    transform: rotate(45deg);
}

.accordion-content {
    padding: 0 1rem 1rem;
}

.found-preview {
    border: 1px solid #c7e6da;
    background: #f4fbf7;
    border-radius: 12px;
    padding: 0.8rem;
}

.etapas-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.etapa-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    border: 1px solid color-mix(in srgb, var(--etapa-color) 45%, #ffffff);
    background: color-mix(in srgb, var(--etapa-color) 18%, #ffffff);
    color: #1f2a2b;
}

.etapa-chip::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--etapa-color);
}

.tabs-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.tab-btn {
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.tab-btn.is-active {
    border-color: color-mix(in srgb, var(--tab-color) 70%, #ffffff);
    background: color-mix(in srgb, var(--tab-color) 20%, #ffffff);
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.etapa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid color-mix(in srgb, var(--etapa-color) 30%, #d9dfd8);
    padding-bottom: 0.8rem;
    margin-bottom: 0.8rem;
}

.etapa-header h2 {
    margin: 0;
}

.curr-tree {
    font-size: 0.95rem;
}

.curr-list {
    margin: 0.2rem 0 0.5rem 1rem;
    padding-left: 0.7rem;
}

.curr-list li {
    margin: 0.25rem 0;
}

.curr-key {
    font-weight: 700;
    color: #2c3c3d;
}

.curr-value {
    color: #354445;
}

.curr-empty {
    color: #7f8a8b;
    font-style: italic;
}

.footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.95rem;
    padding: 1.2rem 0 2.4rem;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 920px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .mini-tools {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .topbar .container {
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .menu {
        display: flex;
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.55rem 0.8rem;
        padding-top: 0.35rem;
    }

    .menu a,
    .menu button {
        font-size: 0.88rem;
    }

    .menu .button {
        padding: 0.45rem 0.75rem;
    }

    .hero {
        padding-top: 3.2rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}