:root {
    color-scheme: light;
    --surface: #ffffff;
    --surface-muted: #eef4f8;
    --line: #d7e0e8;
    --text: #172536;
    --muted: #64748b;
    --navy: #0b3a6e;
    --navy-deep: #062b51;
    --gold: #ffc20a;
    --gold-deep: #8a5f00;
    --charcoal: #1d2834;
    --teal: #0b3a6e;
    --teal-soft: #dbeafe;
    --amber: #8a5f00;
    --amber-soft: #fff6cf;
    --red: #be123c;
    --red-soft: #ffe4e6;
    --neutral-soft: #e8edf2;
}

html,
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--surface-muted);
    color: var(--text);
}

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

h1:focus {
    outline: none;
}

a {
    color: var(--teal);
}

button,
input {
    font: inherit;
}

input {
    width: 100%;
    min-height: 2.35rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    background: #ffffff;
    color: var(--text);
}

input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(11, 58, 110, 0.15);
    outline: none;
}

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

th,
td {
    padding: 0.72rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: #475569;
    font-size: 0.76rem;
    font-weight: 750;
    text-transform: uppercase;
}

td {
    font-size: 0.9rem;
}

small {
    color: var(--muted);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-header h1 {
    margin-bottom: 0;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    letter-spacing: 0;
}

.eyebrow {
    margin-bottom: 0.25rem;
    color: var(--teal);
    font-weight: 750;
    text-transform: uppercase;
    font-size: 0.76rem;
}

.toolbar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.toolbar label {
    min-width: min(20rem, 100%);
    display: grid;
    gap: 0.25rem;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 650;
}

.button {
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid #bac5d0;
    border-radius: 6px;
    padding: 0.45rem 0.78rem;
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.button:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.button.primary {
    border-color: var(--teal);
    background: linear-gradient(135deg, var(--navy), var(--navy-deep));
    color: #ffffff;
}

.button.primary:hover {
    color: #ffffff;
    border-color: var(--navy-deep);
}

.button.small {
    min-height: 1.95rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.78rem;
}

.button.danger {
    border-color: #fecdd3;
    color: var(--red);
}

.button.danger:hover {
    border-color: var(--red);
    color: #9f1239;
}

.button:disabled {
    cursor: default;
    opacity: 0.62;
}

.metric-grid,
.split-grid {
    display: grid;
    gap: 1rem;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.metric,
.panel,
.loading-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.metric {
    min-height: 7.5rem;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
}

.metric span,
.section-title span {
    color: var(--muted);
    font-size: 0.82rem;
}

.metric strong {
    font-size: 1.65rem;
    line-height: 1.1;
}

.panel {
    margin-bottom: 1rem;
    padding: 1rem;
}

.section-title {
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.section-title h2 {
    margin: 0;
    font-size: 1rem;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.metric-grid > *,
.split-grid > *,
.feature-grid > *,
.timeline-grid > *,
.roadmap-list > *,
.pitch-band > * {
    min-width: 0;
}

.queue-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.queue-flow div {
    min-height: 5.5rem;
    display: grid;
    align-content: center;
    gap: 0.35rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbff;
}

.queue-flow span {
    color: var(--muted);
}

.queue-flow strong {
    font-size: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.form-grid.two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.form-grid.role {
    grid-template-columns: minmax(9rem, 0.8fr) minmax(10rem, 1fr) minmax(14rem, 1.4fr) auto auto;
}

.form-grid.lookup {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 0.8rem;
}

.check-row {
    min-height: 2.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-weight: 650;
}

.check-row input {
    width: 1rem;
    min-height: 1rem;
}

.badge {
    min-height: 1.6rem;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 750;
    white-space: nowrap;
}

.badge.teal {
    background: var(--teal-soft);
    color: var(--navy);
}

.badge.amber {
    background: var(--amber-soft);
    color: var(--amber);
}

.badge.red {
    background: var(--red-soft);
    color: var(--red);
}

.badge.neutral {
    background: var(--neutral-soft);
    color: #475569;
}

.details {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: 0.6rem 0.75rem;
    margin: 0;
}

.details dt {
    color: var(--muted);
    font-weight: 750;
}

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.status-box {
    margin-top: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbff;
}

.result-box {
    display: grid;
    gap: 0.3rem;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #b8cce0;
    background: #f2f7fc;
    overflow-wrap: anywhere;
}

.drop-zone {
    position: relative;
    min-height: 9rem;
    display: grid;
    place-items: center;
    gap: 0.35rem;
    margin-bottom: 0.8rem;
    padding: 1rem;
    border: 1.5px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fbfc;
    text-align: center;
    color: #475569;
    overflow: hidden;
}

.drop-zone strong {
    color: var(--text);
}

.drop-zone span {
    max-width: 34rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.drop-zone:hover {
    border-color: var(--teal);
    background: #eef6ff;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-list {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.file-list div {
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fbfe;
}

.file-list span {
    overflow-wrap: anywhere;
}

.row-actions,
.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.permission-list {
    margin-bottom: 0.8rem;
}

.permission-list span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    background: #f8fbfe;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.loading-panel {
    padding: 1rem;
    color: var(--muted);
}

.loading-panel.compact {
    margin: 0;
}

.institutional-hero {
    min-height: calc(100vh - 8.4rem);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    align-items: center;
    gap: 2rem;
    padding: clamp(1rem, 3vw, 2.4rem) 0;
}

.hero-logo {
    width: min(30rem, 100%);
    display: block;
    margin-bottom: 1rem;
}

.hero-copy h1 {
    max-width: 44rem;
    margin-bottom: 0.8rem;
    color: var(--navy);
    font-size: clamp(2.45rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: 0;
}

.hero-lede {
    max-width: 43rem;
    color: #334155;
    font-size: 1.12rem;
    line-height: 1.55;
}

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

.hero-visual {
    position: relative;
    min-height: 25rem;
    display: grid;
    align-content: center;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 194, 10, 0.18), transparent 38%),
        linear-gradient(180deg, #ffffff, #eaf3f8);
    overflow: hidden;
}

.hero-visual::before {
    content: "";
    position: absolute;
    width: 14rem;
    height: 14rem;
    right: -3.5rem;
    top: -3rem;
    border: 1.6rem solid rgba(255, 194, 10, 0.42);
    border-radius: 999px;
}

.hero-flow {
    position: relative;
    display: grid;
    gap: 0.75rem;
}

.hero-flow span {
    min-height: 3.55rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    color: #24364a;
    font-weight: 800;
}

.hero-flow span::before {
    content: "";
    width: 0.82rem;
    height: 0.82rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 194, 10, 0.18);
}

.hero-proof {
    position: relative;
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    border: 1px solid #c0d1e2;
    border-radius: 8px;
    background: #0b3a6e;
    color: #ffffff;
}

.hero-proof strong {
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 0;
}

.hero-proof span {
    color: #dbeafe;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.feature-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card {
    min-height: 10rem;
    display: grid;
    align-content: start;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
}

.feature-card:hover {
    border-color: #a9bfd5;
    color: var(--text);
}

.feature-card span,
.pitch-band span,
.roadmap-list span {
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.feature-card strong {
    color: #24364a;
    font-size: 1.05rem;
    line-height: 1.35;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.institutional-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.institutional-strip article,
.login-gateway {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.institutional-strip article {
    min-height: 8rem;
    display: grid;
    align-content: start;
    gap: 0.45rem;
    padding: 1rem;
}

.institutional-strip span {
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.institutional-strip strong {
    color: #334155;
    line-height: 1.45;
}

.login-gateway {
    min-height: 18rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1rem, 4vw, 2rem);
}

.login-gateway h1 {
    margin-bottom: 0.45rem;
    font-size: clamp(2rem, 5vw, 3.6rem);
    letter-spacing: 0;
}

.login-gateway p {
    max-width: 42rem;
    color: #475569;
    line-height: 1.5;
}

.pitch-hero,
.pitch-page {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pitch-hero {
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 24rem);
    align-items: center;
    padding: clamp(1rem, 3vw, 1.5rem) 0;
}

.pitch-hero img {
    width: 100%;
}

.pitch-hero h1,
.pitch-page h1 {
    max-width: 56rem;
    margin-bottom: 0.6rem;
    color: var(--navy);
    font-size: clamp(2rem, 4.5vw, 3.8rem);
    line-height: 1.05;
}

.pitch-hero p,
.pitch-page p {
    max-width: 62rem;
    color: #334155;
    font-size: 1.04rem;
    line-height: 1.58;
}

.pitch-band,
.timeline-grid,
.roadmap-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pitch-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pitch-band div,
.timeline-grid article,
.roadmap-list article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 1rem;
}

.pitch-band div {
    display: grid;
    gap: 0.45rem;
}

.pitch-band strong {
    color: #24364a;
    line-height: 1.45;
}

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

.timeline-grid article {
    min-height: 14rem;
    display: grid;
    align-content: start;
    gap: 0.55rem;
}

.timeline-grid article > span {
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy-deep);
    font-weight: 900;
}

.timeline-grid h2,
.roadmap-list h2 {
    margin: 0;
    color: #24364a;
    font-size: 1.05rem;
}

.timeline-grid p,
.roadmap-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

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

.roadmap-list article {
    display: grid;
    gap: 0.5rem;
}

code {
    border: 1px solid #d8e4ef;
    border-radius: 5px;
    padding: 0.05rem 0.25rem;
    background: #f4f8fb;
    color: var(--navy);
    font-size: 0.92em;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff6cf;
    border-top: 1px solid #ffe08a;
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.7rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #d8ded6;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--teal);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Carregando");
}

@media (max-width: 1120px) {
    .metric-grid,
    .split-grid,
    .feature-grid,
    .timeline-grid,
    .roadmap-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pitch-band {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .page-header,
    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid,
    .split-grid,
    .queue-flow,
    .institutional-hero,
    .pitch-hero,
    .feature-grid,
    .timeline-grid,
    .roadmap-list,
    .pitch-band,
    .institutional-strip,
    .form-grid,
    .form-grid.role,
    .form-grid.lookup,
    .form-grid.two {
        grid-template-columns: 1fr;
    }

    .institutional-hero {
        min-height: auto;
    }

    .hero-visual {
        min-height: 18rem;
    }

    .login-gateway {
        align-items: flex-start;
        flex-direction: column;
    }
}
