:root {
    --bg: #f5f7fb;
    --text: #18212f;
    --muted: #667084;
    --card: #ffffff;
    --line: #d9e1ec;
    --primary: #0f3b82;
    --primary-strong: #07162f;
    --primary-soft: #e8f0ff;
    --accent: #c89b3c;
    --success: #0b7a39;
    --danger: #ab1e1e;
    --shadow: 0 10px 30px rgba(15, 34, 58, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: linear-gradient(135deg, var(--primary-strong) 0%, var(--primary) 100%);
    color: #fff;
    padding: 24px 0;
    box-shadow: var(--shadow);
}

.institutional-topbar {
    position: relative;
    overflow: hidden;
}

.institutional-topbar::after {
    content: '';
    position: absolute;
    inset: auto -80px -80px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
}

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

.topbar-grid {
    align-items: flex-start;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    width: min(100%, 280px);
    height: auto;
    display: block;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 8px;
}

.brand-block {
    max-width: 560px;
}

.brand-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
}

.brand-subtitle {
    margin-top: 8px;
    font-size: 15px;
    opacity: 0.94;
    line-height: 1.5;
}

.nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-public {
    max-width: 540px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.is-active,
.user-chip {
    background: rgba(255, 255, 255, 0.16);
}

.user-chip {
    border: 1px solid rgba(255,255,255,0.24);
}

.main-content {
    padding: 32px 0 42px;
}

.hero,
.grid-two,
.grid-three {
    display: grid;
    gap: 20px;
}

.hero {
    grid-template-columns: 1.45fr 1fr;
    align-items: stretch;
}

.hero-institutional {
    margin-bottom: 20px;
}

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

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

.stats-grid {
    margin-bottom: 20px;
}

.highlights-grid {
    margin-top: 20px;
}

.section-gap {
    margin-top: 20px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.emphasis-card {
    border-top: 4px solid var(--accent);
}

.status-card {
    align-self: start;
}

.metric-card {
    text-align: center;
    padding: 28px 20px;
}

.metric-number {
    font-size: 38px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.metric-label {
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

.badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 14px;
}

.actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.actions-spread {
    justify-content: space-between;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
}

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

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

.check-list,
.status-list,
.ordered-list {
    padding-left: 18px;
    margin: 0;
}

.check-list li,
.status-list li,
.ordered-list li {
    margin-bottom: 10px;
    line-height: 1.55;
}

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

.footer-inner {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted);
}

.footer-grid > div {
    min-width: 220px;
}

.notice {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.notice-success {
    background: #eaf7ef;
    color: var(--success);
    border: 1px solid #c6e7d1;
}

.notice-error {
    background: #fff2f2;
    color: var(--danger);
    border: 1px solid #f1c7c7;
}

.table-wrap {
    overflow-x: auto;
}

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

.table th,
.table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table-full th {
    white-space: nowrap;
}

.panel-header {
    margin-bottom: 20px;
}

.page-hero {
    margin-bottom: 20px;
}

.compact-hero h2,
.hero h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 34px;
    line-height: 1.18;
}

.compact-hero p,
.hero p,
.institutional-content p,
.institutional-content li,
.card p {
    line-height: 1.65;
}

.institutional-content h3,
.institutional-content h4 {
    margin-top: 22px;
    margin-bottom: 10px;
    color: var(--primary);
}

.institutional-content ul,
.institutional-content ol {
    padding-left: 20px;
}

.institutional-content p:first-child {
    margin-top: 0;
}

.muted-text {
    color: var(--muted);
}

.form-stack {
    display: grid;
    gap: 14px;
}

.form-label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.form-label span {
    font-size: 14px;
}

.form-control {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15,59,130,0.14);
}

code {
    background: #eef2f7;
    padding: 2px 6px;
    border-radius: 6px;
}

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

@media (max-width: 1100px) {
    .brand-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-logo {
        width: 240px;
    }
}

@media (max-width: 980px) {
    .topbar-inner,
    .hero,
    .grid-two,
    .grid-three {
        grid-template-columns: 1fr;
        display: grid;
    }

    .nav {
        justify-content: flex-start;
    }

    .actions-spread {
        align-items: flex-start;
        flex-direction: column;
    }
}

.form-control-code {
    letter-spacing: 0.24em;
    font-size: 22px;
    text-align: center;
    font-weight: 700;
}

.qr-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.qr-box img {
    width: 220px;
    height: 220px;
    display: block;
}

.secret-box {
    background: var(--primary-soft);
    border: 1px dashed var(--primary);
    border-radius: 12px;
    padding: 14px;
    font-size: 18px;
    font-weight: 700;
    word-break: break-all;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.checkbox-row input {
    margin-top: 4px;
}


.table-wrap {
    overflow-x: auto;
    margin-top: 18px;
}

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

.table th,
.table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.table thead th {
    background: #f8fbff;
    color: var(--primary-strong);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.muted-text {
    color: var(--muted);
    line-height: 1.5;
}

.detail-box {
    background: #f8fbff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    line-height: 1.6;
}

.checkbox-line {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    line-height: 1.5;
}

.checkbox-line input {
    margin-top: 3px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: #fff4da;
    color: #8b5e00;
}

.status-under_review {
    background: #e8f0ff;
    color: var(--primary);
}

.status-approved {
    background: #e7f7ed;
    color: var(--success);
}

.status-rejected {
    background: #fdeaea;
    color: var(--danger);
}

@media (max-width: 920px) {
    .nav-public {
        max-width: none;
    }

    .grid-two,
    .grid-three,
    .hero {
        grid-template-columns: 1fr;
    }
}


.filters-card {
    margin-bottom: 24px;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e6e8ef;
    text-align: left;
    vertical-align: top;
}

.data-table thead th {
    color: #4c5673;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8f9fc;
}

.table-empty {
    text-align: center;
    color: #6d7691;
    padding: 30px 16px;
}

.inline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-neutral {
    background: #eef1f6;
    color: #4f5b7a;
}

.badge-warning {
    background: #fff2d6;
    color: #8a5b00;
}

.badge-info {
    background: #deefff;
    color: #0b5ea8;
}

.badge-success {
    background: #ddf8e7;
    color: #0f6b34;
}

.badge-primary {
    background: rgba(37, 99, 235, 0.12);
    color: #204db8;
}

.badge-dark {
    background: #e7e9f1;
    color: #2f3852;
}

.table-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.section-divider {
    margin: 8px 0 6px;
    border-top: 1px solid #e7eaf2;
    padding-top: 10px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
    font-size: 14px;
}

.checkbox-inline input {
    width: auto;
    margin: 0;
}

.stakeholder-card {
    background: #f8f9fc;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}

.case-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e6e8ef;
}

.case-list li:last-child {
    border-bottom: 0;
}

.case-list a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: inherit;
}

.case-list small {
    color: #6d7691;
}

.admin-link {
    color: #20335f;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 960px) {
    .filters-form {
        grid-template-columns: 1fr;
    }
}


.filters-card { margin-bottom: 20px; }
.documents-list { display: grid; gap: 16px; }
.document-card { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; }
.document-topline { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.document-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin-top: 14px; }
.document-notes { margin-top: 14px; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.hash-code { display: inline-block; max-width: 100%; white-space: normal; word-break: break-all; font-size: 12px; background: #f3f6fb; padding: 4px 6px; border-radius: 6px; }
.badge-muted { background: #eef2f7; color: var(--primary-strong); }
@media (max-width: 860px) {
    .document-meta-grid { grid-template-columns: 1fr; }
}


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

.timeline-list {
    position: relative;
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 1.2rem 1fr;
    gap: 1rem;
    align-items: flex-start;
}

.timeline-marker {
    width: 0.85rem;
    height: 0.85rem;
    margin-top: 0.4rem;
    border-radius: 999px;
    background: #0f5fa8;
    box-shadow: 0 0 0 6px rgba(15, 95, 168, 0.12);
}

.timeline-content {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    background: #fff;
}

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

.timeline-description {
    margin: 0.65rem 0 0.9rem;
    color: #334155;
}

.timeline-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.timeline-transition {
    margin-top: 0.9rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    display: grid;
    gap: 0.45rem;
}

.badge-primary {
    background: rgba(15, 95, 168, 0.12);
    color: #0f5fa8;
}

.badge-info {
    background: rgba(14, 116, 144, 0.14);
    color: #0e7490;
}

.badge-success {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.badge-warning {
    background: rgba(217, 119, 6, 0.16);
    color: #b45309;
}

@media (max-width: 1100px) {
    .grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .timeline-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .grid-four {
        grid-template-columns: 1fr;
    }

    .timeline-topline {
        flex-direction: column;
    }
}


.grid-four {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.note-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.notes-list .note-card p {
    margin: 10px 0 6px;
}

@media (max-width: 980px) {
    .grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .grid-four {
        grid-template-columns: 1fr;
    }
}


/* Pacote 12 - portal das partes e advogados */
.case-list-portal,
.stakeholder-grid,
.notes-list,
.documents-list {
    display: grid;
    gap: 1rem;
}

.case-portal-card,
.notice-card,
.stakeholder-card-soft {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.92);
}

.stakeholder-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: end;
    margin-top: 0.75rem;
}

.checkbox-field {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.95rem;
}

.notice-card p {
    margin: 0.75rem 0;
}


.arbitrator-highlight {
    border-left: 4px solid #1f4e79;
}

.decision-card {
    border: 1px solid #d7deea;
    border-radius: 12px;
    padding: 1rem;
    background: #fbfcff;
    margin-bottom: 1rem;
}

.section-gap-sm {
    margin-top: 1rem;
}
