:root {
    --navy: #0f172a;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --text: #475569;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --page: #f8fafc;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--navy);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

:is(a, button, input, select):focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

.demo-view[hidden] {
    display: none;
}

.shell {
    width: min(1180px, 90%);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    z-index: 10;
    top: -60px;
    left: 12px;
    padding: 9px 14px;
    border-radius: 8px;
    background: var(--navy);
    color: white;
}

.skip-link:focus {
    top: 12px;
}

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

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-inner {
    min-height: 80px;
}

.brand img {
    display: block;
    width: 150px;
    height: auto;
}

.back-link {
    color: var(--blue-dark);
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
    align-items: center;
    gap: 70px;
    padding-block: 80px 62px;
}

.eyebrow,
.view-kicker {
    color: var(--blue-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

.intro h1 {
    max-width: 760px;
    margin: 14px 0 18px;
    font-size: clamp(34px, 4.4vw, 56px);
    line-height: 1.12;
}

.intro p,
.closing p {
    max-width: 680px;
    color: var(--text);
    font-size: 17px;
}

.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 14px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--blue);
    color: white;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.primary-link:hover {
    background: var(--blue-dark);
}

.intro-note {
    display: flex;
    gap: 15px;
    padding: 25px;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: #eff6ff;
}

.intro-note p {
    margin: 6px 0 0;
    font-size: 14px;
}

.note-icon {
    display: grid;
    flex: 0 0 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--blue-dark);
    font-weight: 700;
}

.walkthrough {
    padding-bottom: 64px;
}

.walkthrough h2 {
    margin-bottom: 18px;
    font-size: 25px;
}

.walkthrough-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.walkthrough-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 142px;
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    text-align: left;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.walkthrough-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.1);
}

.walkthrough-card span {
    margin-bottom: 8px;
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
}

.walkthrough-card strong {
    font-size: 17px;
}

.walkthrough-card small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 14px;
}

.demo-section {
    scroll-margin-top: 24px;
}

.demo-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.demo-heading h2 {
    margin: 3px 0 0;
    font-size: 32px;
}

.sample-badge {
    padding: 7px 12px;
    border-radius: 99px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 12px;
    font-weight: 700;
}

.demo-app {
    display: grid;
    grid-template-columns: 196px minmax(0, 1fr);
    overflow: hidden;
    min-height: 600px;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: white;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.demo-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 24px 14px;
    background: var(--navy);
    color: #cbd5e1;
}

.nav-heading {
    margin: 0 12px 12px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 12px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font-weight: 700;
    text-align: left;
}

.nav-button:hover,
.nav-button.is-active {
    background: var(--blue);
    color: white;
}

.demo-nav .nav-button:focus-visible {
    outline-color: white;
    outline-offset: -3px;
}

.nav-button span {
    width: 19px;
    font-size: 19px;
    line-height: 1;
    text-align: center;
}

.nav-footnote {
    margin: auto 12px 0;
    color: #94a3b8;
    font-size: 11px;
}

.demo-content {
    min-width: 0;
    padding: 30px;
    background: #f8fafc;
}

.view-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 23px;
}

.view-heading h3 {
    margin: 4px 0;
    font-size: 27px;
}

.view-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.filter-label,
.search-label {
    display: grid;
    gap: 5px;
    min-width: 200px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.filter-label select,
.search-label input {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    color: var(--navy);
    font-size: 14px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.summary-card,
.panel,
.status-column {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.summary-card {
    padding: 14px;
}

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.summary-card strong {
    font-size: 24px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.85fr);
    align-items: start;
    gap: 16px;
}

.panel {
    min-width: 0;
    padding: 20px;
}

.panel h4,
.status-column h4 {
    margin-bottom: 14px;
    font-size: 16px;
}

.record-list {
    display: grid;
    gap: 8px;
}

.record-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    text-align: left;
}

.record-button:hover,
.record-button[aria-pressed="true"] {
    border-color: #93c5fd;
    background: #eff6ff;
}

.record-main {
    display: grid;
    min-width: 0;
}

.record-main strong {
    font-size: 14px;
}

.record-main small {
    color: var(--muted);
    font-size: 12px;
}

.row-arrow {
    color: var(--blue-dark);
    font-size: 12px;
    font-weight: 700;
}

.badge {
    display: inline-block;
    flex-shrink: 0;
    padding: 5px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}

.badge-programada {
    background: #dbeafe;
    color: #1e40af;
}

.badge-atendida {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelada {
    background: #fee2e2;
    color: #991b1b;
}

.detail-panel {
    min-height: 245px;
}

.empty-state {
    margin: 0;
    padding: 20px 0;
    color: var(--muted);
    font-size: 14px;
}

.detail-name {
    margin: 0 0 16px;
    font-size: 19px;
}

.detail-list {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 10px 12px;
    margin: 16px 0 0;
    font-size: 13px;
}

.detail-list dt {
    color: var(--muted);
}

.detail-list dd {
    margin: 0;
    font-weight: 700;
}

.detail-caption {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.status-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.status-column {
    padding: 17px;
}

.status-column h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.status-count {
    display: grid;
    min-width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--blue-dark);
    font-size: 12px;
}

.status-item {
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-size: 13px;
}

.status-item strong,
.status-item span {
    display: block;
}

.status-item span {
    color: var(--muted);
}

.closing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    margin-block: 80px;
    padding: 36px;
    border-radius: 18px;
    background: linear-gradient(110deg, #eff6ff, #e0f2fe);
}

.closing h2 {
    margin: 8px 0;
    font-size: 30px;
}

.closing p {
    margin-bottom: 0;
}

.closing .primary-link {
    flex-shrink: 0;
    margin-top: 0;
}

.site-footer {
    padding-block: 24px;
    background: var(--navy);
    color: #cbd5e1;
    font-size: 13px;
}

@media (max-width: 1000px) {
    .intro {
        gap: 30px;
    }

    .demo-app {
        grid-template-columns: 155px minmax(0, 1fr);
    }

    .demo-content {
        padding: 22px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .intro {
        grid-template-columns: 1fr;
        padding-block: 54px 44px;
    }

    .walkthrough-grid,
    .status-board {
        grid-template-columns: 1fr;
    }

    .walkthrough-card {
        min-height: auto;
    }

    .demo-heading,
    .view-heading,
    .closing {
        align-items: flex-start;
        flex-direction: column;
    }

    .demo-app {
        grid-template-columns: 1fr;
    }

    .demo-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
    }

    .nav-heading,
    .nav-footnote {
        display: none;
    }

    .nav-button {
        justify-content: center;
        width: auto;
        flex: 1 1 110px;
        padding: 10px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-label,
    .search-label {
        width: 100%;
    }

    .closing {
        margin-block: 60px;
    }

    .closing .primary-link {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .shell {
        width: 92%;
    }

    .brand img {
        width: 125px;
    }

    .back-link {
        font-size: 13px;
    }

    .intro h1 {
        font-size: 34px;
    }

    .intro p {
        font-size: 16px;
    }

    .demo-content {
        padding: 16px;
    }

    .panel {
        padding: 15px;
    }

    .record-button {
        flex-wrap: wrap;
    }

    .closing {
        padding: 25px;
    }

    .closing h2 {
        font-size: 26px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
