* {
    box-sizing: border-box;
}

:root {
    --primary: #0f6390;
    --primary-strong: #0b4f73;
    --primary-soft: #e7f2f8;
    --navy: #0c2434;
    --background: #f3f7fa;
    --panel: #ffffff;
    --text: #17212b;
    --muted: #687783;
    --border: #dce6ec;
    --shadow: 0 18px 45px rgba(15, 99, 144, 0.08);
}

body.dark {
    --background: #0f1820;
    --panel: #17232d;
    --text: #eef5f8;
    --muted: #a5b6c1;
    --border: #2c3c47;
    --primary-soft: #18374a;
    --shadow: none;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.brand-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 62px;
    padding: 0 10px;
    border: 2px solid currentColor;
    border-radius: 18px 5px 18px 5px;
    font-weight: 900;
    letter-spacing: -2px;
    color: #29a3d4;
}

.brand-symbol.large {
    min-width: 92px;
    height: 92px;
    font-size: 28px;
    border-width: 3px;
}

.brand-symbol.small {
    min-width: 46px;
    height: 46px;
    font-size: 14px;
    border-radius: 13px 4px 13px 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

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

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

.btn.small {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
}

.btn.ghost {
    background: transparent;
}

.btn.full {
    width: 100%;
}

.alert {
    padding: 14px 16px;
    border-radius: 11px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.alert.success {
    background: #e9f8ef;
    color: #17653b;
}

.alert.danger {
    background: #fff0f0;
    color: #8b1f1f;
}

label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 800;
}

input,
select {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 99, 144, 0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.section-title {
    margin: 4px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
    font-weight: 900;
}

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

.help-text {
    font-size: 13px;
}

/* Instalador */

.installer-body {
    min-height: 100vh;
    padding: 32px 18px;
    background:
        radial-gradient(circle at top right, rgba(41, 163, 212, 0.18), transparent 35%),
        linear-gradient(135deg, #eef6fa, #f8fbfd);
}

.installer-wrap {
    width: min(960px, 100%);
    margin: 0 auto;
}

.installer-card {
    overflow: hidden;
    border: 1px solid #dce7ee;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(12, 36, 52, 0.13);
}

.installer-head {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 30px;
    background: linear-gradient(135deg, #0c2434, #0f6390);
    color: #fff;
}

.installer-head h1,
.installer-head p {
    margin: 0;
}

.installer-head p {
    margin-top: 5px;
    opacity: 0.8;
}

.installer-content {
    padding: 30px;
}

.installer-content .section-title:not(:first-child) {
    margin-top: 28px;
}

.installer-content .btn {
    margin-top: 22px;
}

/* Login */

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 18% 18%, rgba(41, 163, 212, 0.25), transparent 30%),
        linear-gradient(135deg, #091c29, #0c2434 45%, #0f6390);
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 440px;
    gap: 54px;
    align-items: center;
}

.login-visual {
    color: #fff;
}

.login-visual h1 {
    margin: 20px 0 7px;
    font-size: 54px;
    letter-spacing: -2px;
}

.login-visual p {
    margin: 0;
    font-size: 20px;
    color: #cfe8f4;
}

.login-visual span {
    display: block;
    line-height: 1.6;
    color: #d4e5ed;
}

.visual-line {
    width: 82px;
    height: 4px;
    margin: 28px 0;
    border-radius: 999px;
    background: #29a3d4;
}

.login-card {
    padding: 34px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.login-card h2 {
    margin: 0;
    font-size: 28px;
}

.login-card label {
    margin-top: 17px;
}

.login-card .btn {
    margin-top: 20px;
}

.mobile-brand {
    display: none;
}

.login-foot {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #788791;
}

/* Aplicação */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: 270px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--navy);
    color: #fff;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.sidebar-brand span,
.sidebar-user span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #a7bdc9;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
    padding: 22px 0;
}

.sidebar-nav a {
    padding: 13px 14px;
    border-radius: 10px;
    color: #dbe7ee;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.sidebar-user a {
    display: inline-block;
    margin-top: 14px;
    color: #8ed9f7;
    font-size: 13px;
}

.main-area {
    flex: 1;
    min-width: 0;
    margin-left: 270px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 74px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 26px;
    border-bottom: 1px solid var(--border);
    background: var(--panel);
}

.topbar-title span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.icon-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}

.menu-toggle {
    display: none;
}

.theme-toggle {
    margin-left: auto;
}

.content-area {
    padding: 28px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0;
    font-size: 30px;
}

.page-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

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

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

.stat-card strong {
    display: block;
    margin-top: 12px;
    font-size: 29px;
}

.stat-card.highlighted {
    background: var(--primary);
    color: #fff;
}

.stat-card.highlighted span {
    color: #d5edf8;
}

.panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.panel-header h2,
.panel-header p {
    margin: 0;
}

.panel-header p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.form-panel {
    padding: 22px;
}

.form-panel .btn {
    margin-top: 20px;
}

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

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

th,
td {
    padding: 15px 17px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.success-badge {
    background: #e7f7ed;
    color: #17653b;
}

.danger-badge {
    background: #f9e8e8;
    color: #922c2c;
}

.action-cell {
    display: flex;
    gap: 7px;
}

.action-cell form {
    margin: 0;
}

@media (max-width: 1050px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .login-shell {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .login-visual {
        display: none;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 25px;
    }
}

@media (max-width: 680px) {
    .installer-body,
    .login-body {
        padding: 14px;
    }

    .installer-content,
    .login-card {
        padding: 22px;
    }

    .form-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .full {
        grid-column: auto;
    }

    .content-area {
        padding: 18px;
    }

    .page-header {
        align-items: flex-start;
    }

    .topbar {
        padding: 0 14px;
    }

    .topbar-title strong {
        font-size: 13px;
    }

    .login-card h2 {
        font-size: 25px;
    }
}


textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    outline: none;
    resize: vertical;
    font: inherit;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 99, 144, 0.12);
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.search-bar input {
    max-width: 520px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.check-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
}

.check-option input {
    width: auto;
    min-height: auto;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.detail-card {
    padding: 22px;
}

.detail-card h2 {
    margin-top: 0;
}

.detail-card dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 18px;
    margin: 0;
}

.detail-card dt {
    color: var(--muted);
    font-weight: 700;
}

.detail-card dd {
    margin: 0;
}

.text-detail {
    margin-bottom: 18px;
}

.text-detail p {
    line-height: 1.65;
    margin-bottom: 0;
}

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

@media (max-width: 760px) {
    .detail-grid,
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .detail-card dl {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .detail-card dd {
        margin-bottom: 10px;
    }

    .search-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .search-bar input {
        max-width: none;
    }
}

/* Logomarca oficial CRT */
.official-logo {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.login-logo {
    width: min(520px, 92%);
    max-height: 210px;
    object-position: left center;
}

.mobile-logo {
    width: 190px;
    max-height: 74px;
    object-position: left center;
}

.sidebar-logo {
    width: 72px;
    height: 50px;
    object-fit: contain;
    object-position: left center;
}

.installer-logo {
    width: 210px;
    max-height: 82px;
    object-position: left center;
}

@media (max-width: 680px) {
    .installer-logo { width: 160px; }
    .mobile-logo { width: 170px; }
}


.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.filter-action {
    padding-bottom: 1px;
}

.filter-bar select {
    max-width: 220px;
}

.timeline {
    padding: 8px 22px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
}

.timeline-date strong {
    font-size: 17px;
}

.timeline-date span {
    margin-top: 5px;
    font-size: 13px;
}

.timeline-content h3 {
    margin: 10px 0 6px;
}

.timeline-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.timeline-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.empty-state {
    padding: 38px 20px;
    color: var(--muted);
    text-align: center;
}

.warning-badge,
.priority-alta {
    background: #fff4d8;
    color: #8a5a00;
}

.info-badge {
    background: #e6f4fb;
    color: #0c648f;
}

.priority-urgente {
    background: #ffe5e5;
    color: #a51f1f;
}

.priority-media {
    background: #edf2f5;
    color: #42515c;
}

.priority-baixa {
    background: #e8f7ed;
    color: #1b6a3e;
}

.row-overdue {
    background: rgba(185, 35, 35, 0.055);
}

.warning-card {
    border-color: #f0d38a;
}

.danger-card {
    border-color: #efb2b2;
}

.danger-card strong {
    color: #b12626;
}

.movement-timeline .timeline-content p {
    color: var(--text);
}

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

    .filter-bar select {
        max-width: none;
    }

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

    .timeline-date {
        align-items: flex-start;
        padding: 12px 14px;
        min-height: auto;
    }
}


.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.report-summary article {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
}

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

.report-summary strong {
    display: block;
    margin-top: 8px;
    font-size: 27px;
    color: var(--primary);
}

.report-section {
    margin-bottom: 18px;
}

@media (max-width: 760px) {
    .report-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-actions {
        justify-content: flex-start;
    }
}


.checkbox-line label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.checkbox-line input {
    width: auto;
}

.success-badge {
    background: #e8f7ed;
    color: #1b6a3e;
}

.danger-badge {
    background: #ffe5e5;
    color: #a51f1f;
}


.forgot-link {
    display: block;
    margin-top: 14px;
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.compact-login {
    max-width: 520px;
    grid-template-columns: 1fr;
}

.temporary-access {
    max-width: 760px;
}

.credential-box {
    padding: 18px;
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--primary-soft);
}

.credential-box span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
}

.temporary-password {
    font-size: 25px;
    letter-spacing: 2px;
    user-select: all;
}

.alert.warning {
    background: #fff7df;
    color: #765300;
    border: 1px solid #efd48b;
}

.alert.success {
    background: #e9f8ee;
    color: #1d653c;
    border: 1px solid #a9dfba;
}


/* Cadastro de processo em abas */
.process-form-panel { padding: 0; overflow: hidden; }
.process-form-panel form { margin: 0; }
.process-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    scrollbar-width: thin;
}
.process-tab {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    padding: 10px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}
.process-tab:hover { color: var(--primary); border-color: var(--primary); }
.process-tab.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(8, 71, 104, .16);
}
.process-tab-content { display: none; padding: 24px; min-height: 310px; }
.process-tab-content.active { display: block; }
.section-heading { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.section-heading h2 { margin: 0 0 5px; font-size: 20px; color: var(--text); }
.section-heading p { margin: 0; color: var(--muted); }
.process-form-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}
.professional-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.professional-option span { display: flex; flex-direction: column; gap: 3px; }
.professional-option small { color: var(--muted); }

@media (max-width: 760px) {
    .process-tabs { padding: 10px; }
    .process-tab { padding: 9px 11px; }
    .process-tab-content { padding: 18px 14px; }
    .professional-grid { grid-template-columns: 1fr; }
    .process-form-footer { padding: 14px; }
}


/* Abas de clientes e grupos */
.client-tabs {
    display: flex;
    gap: 8px;
    margin: -4px 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.client-tab {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}
.client-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.client-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.table-subtitle {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 400;
}
.status.inactive {
    background: #eef2f7;
    color: #64748b;
}
.inline-check {
    display: inline-flex;
    width: auto;
}

@media (max-width: 640px) {
    .client-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}

.group-select-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.group-create-button{white-space:nowrap;min-height:42px}
.group-feedback{min-height:18px;margin-top:5px;font-size:12px}
.group-feedback.success{color:#166534}
.modal-backdrop[hidden]{display:none}
.modal-backdrop{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:20px;background:rgba(5,25,38,.62);backdrop-filter:blur(3px)}
.modal-card{width:min(560px,100%);max-height:calc(100vh - 40px);overflow-y:auto;border-radius:16px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.modal-header{display:flex;justify-content:space-between;gap:20px;padding:22px 24px 16px;border-bottom:1px solid var(--border)}
.modal-header h2{margin:0 0 5px}.modal-header p{margin:0;color:var(--muted)}
.modal-close{width:38px;height:38px;border:0;border-radius:9px;background:#eef2f7;font-size:24px;cursor:pointer}
.modal-card form{padding:22px 24px 24px}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
body.modal-open{overflow:hidden}
@media(max-width:640px){.group-select-row{grid-template-columns:1fr}.group-create-button{width:100%}.modal-actions{flex-direction:column-reverse}.modal-actions .btn{width:100%}}


/* Pesquisa de processo no cadastro de prazo */
.process-search-box {
    position: relative;
}
.process-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .14);
}
.process-search-item {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.process-search-item:last-child {
    border-bottom: 0;
}
.process-search-item:hover {
    background: #f8fafc;
}
.process-search-item strong {
    color: var(--text);
}
.process-search-item small {
    color: var(--muted);
}
.process-search-empty {
    padding: 14px;
    color: var(--muted);
}


/* Relatório jurídico com colunas completas */
.legal-report-table {
    min-width: 1500px;
}
.legal-report-table th {
    white-space: nowrap;
}
.legal-report-table td {
    min-width: 130px;
    vertical-align: top;
}
.legal-report-table td:nth-child(1) {
    min-width: 90px;
}
.legal-report-table td:nth-child(2) {
    min-width: 190px;
}
.legal-report-table td:nth-child(9) {
    min-width: 280px;
}


/* Características especiais do processo */
.process-characteristics-box {
    margin-top: 4px;
}
.process-characteristics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}
.report-process-cell {
    text-align: center !important;
    vertical-align: middle !important;
}
.report-process-cell strong {
    display: block;
    margin-bottom: 5px;
}
.process-flag {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 850px) {
    .process-characteristics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 520px) {
    .process-characteristics-grid {
        grid-template-columns: 1fr;
    }
}


/* Coluna unificada de partes no relatório */
.report-parties-cell {
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: 600;
}

.report-lawyers-cell {
    text-align: center !important;
    vertical-align: middle !important;
}


/* ============================================================
   CRT Jurídico - Processos: tabela ampla, legível e equilibrada
   ============================================================ */

/* A tabela usa toda a área disponível sem esmagar o conteúdo. */
.table-scroll:has(.processes-table-balanced) {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.processes-table-balanced {
    width: 100%;
    min-width: 1180px;
    table-layout: auto;
    border-collapse: collapse;
}

.processes-table-balanced th,
.processes-table-balanced td {
    vertical-align: middle;
    padding: 13px 10px;
    font-size: 13px;
    line-height: 1.3;
    word-break: normal;
    overflow-wrap: normal;
}

/* Processo CNJ: nunca quebra. */
.processes-table-balanced th:nth-child(1),
.processes-table-balanced td:nth-child(1) {
    min-width: 205px;
    width: 205px;
    white-space: nowrap;
    font-weight: 700;
}

/* Cliente */
.processes-table-balanced th:nth-child(2),
.processes-table-balanced td:nth-child(2) {
    min-width: 210px;
    width: 18%;
    white-space: normal;
}

/* Grupo */
.processes-table-balanced th:nth-child(3),
.processes-table-balanced td:nth-child(3) {
    min-width: 155px;
    width: 14%;
    white-space: normal;
}

/* Órgão julgador */
.processes-table-balanced th:nth-child(4),
.processes-table-balanced td:nth-child(4) {
    min-width: 190px;
    width: 17%;
    white-space: normal;
}

/* Instância/Grau */
.processes-table-balanced th:nth-child(5),
.processes-table-balanced td:nth-child(5) {
    min-width: 105px;
    white-space: normal;
}

/* Classe judicial */
.processes-table-balanced th:nth-child(6),
.processes-table-balanced td:nth-child(6) {
    min-width: 190px;
    width: 17%;
    white-space: normal;
}

/* Valor da causa: não quebra. */
.processes-table-balanced th:nth-child(7),
.processes-table-balanced td:nth-child(7) {
    min-width: 115px;
    white-space: nowrap;
}

/* Status: não quebra. */
.processes-table-balanced th:nth-child(8),
.processes-table-balanced td:nth-child(8) {
    min-width: 90px;
    white-space: nowrap;
    text-align: center;
}

/* Ações: botões lado a lado e texto horizontal. */
.processes-table-balanced th:nth-child(9),
.processes-table-balanced td:nth-child(9) {
    min-width: 165px;
    white-space: nowrap;
}

.processes-table-balanced td:nth-child(9) {
    gap: 6px;
}

.processes-table-balanced td:nth-child(9) .btn,
.processes-table-balanced td:nth-child(9) button,
.processes-table-balanced td:nth-child(9) a {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

/* Desktop largo: tenta ocupar toda a tela de maneira confortável. */
@media (min-width: 1450px) {
    .processes-table-balanced {
        min-width: 100%;
    }

    .processes-table-balanced th,
    .processes-table-balanced td {
        font-size: 13px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .processes-table-balanced th:nth-child(1),
    .processes-table-balanced td:nth-child(1) {
        min-width: 195px;
        width: 16%;
    }

    .processes-table-balanced th:nth-child(2),
    .processes-table-balanced td:nth-child(2) {
        min-width: 190px;
        width: 17%;
    }

    .processes-table-balanced th:nth-child(3),
    .processes-table-balanced td:nth-child(3) {
        min-width: 145px;
        width: 13%;
    }

    .processes-table-balanced th:nth-child(4),
    .processes-table-balanced td:nth-child(4) {
        min-width: 175px;
        width: 16%;
    }

    .processes-table-balanced th:nth-child(6),
    .processes-table-balanced td:nth-child(6) {
        min-width: 175px;
        width: 16%;
    }

    .processes-table-balanced th:nth-child(9),
    .processes-table-balanced td:nth-child(9) {
        min-width: 150px;
    }
}

/* Em notebooks, prefere uma pequena rolagem horizontal a deformar os textos. */
@media (max-width: 1449px) {
    .processes-table-balanced {
        min-width: 1250px;
    }
}



/* ============================================================
   CRT Jurídico - Ajuste final da tabela de processos
   Objetivo: exibir todas as colunas na tela em desktop
   sem esmagar os textos.
   ============================================================ */

.table-scroll:has(.processes-table-balanced) {
    overflow-x: hidden !important;
}

.processes-table-balanced {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

.processes-table-balanced th,
.processes-table-balanced td {
    padding: 11px 7px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    vertical-align: middle !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* Processo */
.processes-table-balanced th:nth-child(1),
.processes-table-balanced td:nth-child(1) {
    width: 19% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    font-weight: 700 !important;
}

/* Cliente */
.processes-table-balanced th:nth-child(2),
.processes-table-balanced td:nth-child(2) {
    width: 18% !important;
    min-width: 0 !important;
}

/* Grupo */
.processes-table-balanced th:nth-child(3),
.processes-table-balanced td:nth-child(3) {
    width: 14% !important;
    min-width: 0 !important;
}

/* Órgão julgador */
.processes-table-balanced th:nth-child(4),
.processes-table-balanced td:nth-child(4) {
    width: 17% !important;
    min-width: 0 !important;
}

/* Instância/Grau */
.processes-table-balanced th:nth-child(5),
.processes-table-balanced td:nth-child(5) {
    width: 9% !important;
    min-width: 0 !important;
}

/* Classe */
.processes-table-balanced th:nth-child(6),
.processes-table-balanced td:nth-child(6) {
    width: 11% !important;
    min-width: 0 !important;
}

/* Valor */
.processes-table-balanced th:nth-child(7),
.processes-table-balanced td:nth-child(7) {
    width: 7% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    font-size: 11px !important;
}

/* Status */
.processes-table-balanced th:nth-child(8),
.processes-table-balanced td:nth-child(8) {
    width: 7% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    text-align: center !important;
}

/* Ações */
.processes-table-balanced th:nth-child(9),
.processes-table-balanced td:nth-child(9) {
    width: 9% !important;
    min-width: 0 !important;
    white-space: normal !important;
}

.processes-table-balanced td:nth-child(9) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.processes-table-balanced td:nth-child(9) .btn,
.processes-table-balanced td:nth-child(9) a,
.processes-table-balanced td:nth-child(9) button {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
}

/* Ajuste fino para telas entre notebook e desktop grande */
@media (max-width: 1500px) {
    .processes-table-balanced th,
    .processes-table-balanced td {
        font-size: 11px !important;
        padding: 10px 5px !important;
    }

    .processes-table-balanced th:nth-child(1),
    .processes-table-balanced td:nth-child(1) {
        width: 18% !important;
    }

    .processes-table-balanced th:nth-child(2),
    .processes-table-balanced td:nth-child(2) {
        width: 17% !important;
    }

    .processes-table-balanced th:nth-child(4),
    .processes-table-balanced td:nth-child(4) {
        width: 16% !important;
    }

    .processes-table-balanced th:nth-child(6),
    .processes-table-balanced td:nth-child(6) {
        width: 12% !important;
    }

    .processes-table-balanced th:nth-child(9),
    .processes-table-balanced td:nth-child(9) {
        width: 10% !important;
    }
}

/* Em telas pequenas, volta a permitir rolagem horizontal para não deformar */
@media (max-width: 1100px) {
    .table-scroll:has(.processes-table-balanced) {
        overflow-x: auto !important;
    }

    .processes-table-balanced {
        min-width: 1100px !important;
        table-layout: auto !important;
    }
}



/* ============================================================
   CRT Jurídico - Menu lateral retrátil ao passar o mouse
   ============================================================ */

:root {
    --crt-sidebar-collapsed: 78px;
    --crt-sidebar-expanded: 290px;
}

/* Estado fechado */
.sidebar,
.hover-expand-sidebar {
    width: var(--crt-sidebar-collapsed) !important;
    min-width: var(--crt-sidebar-collapsed) !important;
    transition: width .22s ease, min-width .22s ease, box-shadow .22s ease !important;
    overflow-x: hidden !important;
    z-index: 1000;
}

/* Abre ao passar o mouse */
.sidebar:hover,
.hover-expand-sidebar:hover {
    width: var(--crt-sidebar-expanded) !important;
    min-width: var(--crt-sidebar-expanded) !important;
    box-shadow: 10px 0 28px rgba(0,0,0,.14);
}

/* Conteúdo principal usa quase toda a tela quando o menu está fechado */
.app-main,
.main-content,
.content-wrapper,
.page-content,
main {
    transition: margin-left .22s ease, width .22s ease !important;
}

/* Tenta ajustar shells comuns em layouts flex */
.app-shell,
.layout,
.wrapper,
.dashboard-layout {
    align-items: stretch;
}

/* Esconde textos do menu no estado fechado, mantendo ícones/logotipo */
.sidebar .nav-label,
.sidebar .menu-label,
.sidebar .sidebar-label,
.sidebar .nav-text,
.sidebar .user-meta,
.sidebar .brand-text,
.hover-expand-sidebar .nav-label,
.hover-expand-sidebar .menu-label,
.hover-expand-sidebar .sidebar-label,
.hover-expand-sidebar .nav-text,
.hover-expand-sidebar .user-meta,
.hover-expand-sidebar .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity .15s ease, width .2s ease;
}

/* Mostra os textos quando abre */
.sidebar:hover .nav-label,
.sidebar:hover .menu-label,
.sidebar:hover .sidebar-label,
.sidebar:hover .nav-text,
.sidebar:hover .user-meta,
.sidebar:hover .brand-text,
.hover-expand-sidebar:hover .nav-label,
.hover-expand-sidebar:hover .menu-label,
.hover-expand-sidebar:hover .sidebar-label,
.hover-expand-sidebar:hover .nav-text,
.hover-expand-sidebar:hover .user-meta,
.hover-expand-sidebar:hover .brand-text {
    opacity: 1;
    width: auto;
}

/* Links ficam compactos quando fechado */
.sidebar a,
.hover-expand-sidebar a {
    transition: padding .2s ease, gap .2s ease;
}

/* Compatibilidade com menus onde o texto é nó direto do link */
.sidebar:not(:hover) nav a,
.hover-expand-sidebar:not(:hover) nav a {
    font-size: 0 !important;
    justify-content: center !important;
    gap: 0 !important;
}

.sidebar:hover nav a,
.hover-expand-sidebar:hover nav a {
    font-size: inherit !important;
    justify-content: flex-start !important;
}

/* Ícones continuam visíveis */
.sidebar nav a i,
.sidebar nav a svg,
.sidebar nav a .icon,
.hover-expand-sidebar nav a i,
.hover-expand-sidebar nav a svg,
.hover-expand-sidebar nav a .icon {
    font-size: 20px !important;
    min-width: 24px;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

/* Logo compacta no fechado */
.sidebar .official-logo,
.sidebar .sidebar-logo,
.hover-expand-sidebar .official-logo,
.hover-expand-sidebar .sidebar-logo {
    max-width: 48px !important;
    transition: max-width .22s ease;
}

.sidebar:hover .official-logo,
.sidebar:hover .sidebar-logo,
.hover-expand-sidebar:hover .official-logo,
.hover-expand-sidebar:hover .sidebar-logo {
    max-width: 110px !important;
}

/* Mantém acessível em telas pequenas: menu normal */
@media (max-width: 900px) {
    .sidebar,
    .hover-expand-sidebar,
    .sidebar:hover,
    .hover-expand-sidebar:hover {
        width: var(--crt-sidebar-expanded) !important;
        min-width: var(--crt-sidebar-expanded) !important;
    }

    .sidebar:not(:hover) nav a,
    .hover-expand-sidebar:not(:hover) nav a {
        font-size: inherit !important;
        justify-content: flex-start !important;
    }

    .sidebar .nav-label,
    .sidebar .menu-label,
    .sidebar .sidebar-label,
    .sidebar .nav-text,
    .sidebar .user-meta,
    .sidebar .brand-text,
    .hover-expand-sidebar .nav-label,
    .hover-expand-sidebar .menu-label,
    .hover-expand-sidebar .sidebar-label,
    .hover-expand-sidebar .nav-text,
    .hover-expand-sidebar .user-meta,
    .hover-expand-sidebar .brand-text {
        opacity: 1;
        width: auto;
    }
}



/* ============================================================
   CRT Jurídico - MENU RETRÁTIL CORRIGIDO V2
   Estrutura real: .app-shell > .sidebar + .main-area
   ============================================================ */

@media (min-width: 901px) {
    body.hover-sidebar-layout {
        --sidebar-fechado: 72px;
        --sidebar-aberto: 290px;
    }

    body.hover-sidebar-layout .app-shell {
        display: block !important;
        min-height: 100vh;
    }

    body.hover-sidebar-layout .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;

        width: var(--sidebar-fechado) !important;
        min-width: var(--sidebar-fechado) !important;
        max-width: var(--sidebar-fechado) !important;

        overflow-x: hidden !important;
        overflow-y: auto !important;

        transition:
            width .22s ease,
            min-width .22s ease,
            max-width .22s ease,
            box-shadow .22s ease !important;

        z-index: 2000 !important;
    }

    body.hover-sidebar-layout .sidebar:hover {
        width: var(--sidebar-aberto) !important;
        min-width: var(--sidebar-aberto) !important;
        max-width: var(--sidebar-aberto) !important;
        box-shadow: 10px 0 28px rgba(0,0,0,.18) !important;
    }

    /* A área principal passa a usar o espaço liberado pelo menu fechado. */
    body.hover-sidebar-layout .main-area {
        margin-left: var(--sidebar-fechado) !important;
        width: calc(100% - var(--sidebar-fechado)) !important;
        max-width: none !important;
        min-width: 0 !important;
        transition: margin-left .22s ease, width .22s ease !important;
    }

    body.hover-sidebar-layout .content-area,
    body.hover-sidebar-layout .topbar {
        width: 100% !important;
        max-width: none !important;
    }

    /* Cabeçalho do menu fechado: somente a logo. */
    body.hover-sidebar-layout .sidebar:not(:hover) .sidebar-brand {
        padding: 22px 10px !important;
        justify-content: center !important;
        gap: 0 !important;
    }

    body.hover-sidebar-layout .sidebar:not(:hover) .sidebar-brand > div {
        display: none !important;
    }

    body.hover-sidebar-layout .sidebar:not(:hover) .sidebar-logo,
    body.hover-sidebar-layout .sidebar:not(:hover) .official-logo {
        width: 46px !important;
        max-width: 46px !important;
        margin: 0 auto !important;
    }

    /* Como o menu atual não possui ícones nos links, os nomes ficam ocultos
       quando fechado e surgem normalmente no hover. */
    body.hover-sidebar-layout .sidebar:not(:hover) .sidebar-nav {
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity .12s ease !important;
    }

    body.hover-sidebar-layout .sidebar:hover .sidebar-nav {
        opacity: 1 !important;
        pointer-events: auto !important;
        transition: opacity .18s ease .05s !important;
    }

    body.hover-sidebar-layout .sidebar:not(:hover) .sidebar-user {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    body.hover-sidebar-layout .sidebar:hover .sidebar-user {
        opacity: 1 !important;
        pointer-events: auto !important;
        transition: opacity .18s ease .05s !important;
    }

    /* Botão hamburguer fica desnecessário no desktop com abertura por hover. */
    body.hover-sidebar-layout .menu-toggle {
        display: none !important;
    }

    /* Tabela de processos: preserva ações e status, aproveitando o espaço extra. */
    body.hover-sidebar-layout .processes-table-balanced {
        width: 100% !important;
        min-width: 1180px !important;
    }

    body.hover-sidebar-layout .table-scroll:has(.processes-table-balanced) {
        overflow-x: auto !important;
    }

    body.hover-sidebar-layout .processes-table-balanced th:nth-child(8),
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(8) {
        min-width: 90px !important;
        white-space: nowrap !important;
    }

    body.hover-sidebar-layout .processes-table-balanced th:nth-child(9),
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) {
        min-width: 170px !important;
        width: 170px !important;
        white-space: nowrap !important;
    }

    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) {
        display: table-cell !important;
        text-align: center !important;
    }

    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) a,
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) button,
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) .btn {
        display: inline-block !important;
        white-space: nowrap !important;
        margin: 2px !important;
    }
}

/* Mobile/tablet: mantém comportamento normal do sistema. */
@media (max-width: 900px) {
    body.hover-sidebar-layout .sidebar {
        width: 290px !important;
        min-width: 290px !important;
        max-width: 290px !important;
    }

    body.hover-sidebar-layout .main-area {
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.hover-sidebar-layout .sidebar .sidebar-nav,
    body.hover-sidebar-layout .sidebar .sidebar-user {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}



/* ============================================================
   CRT Jurídico - Ajuste final da coluna AÇÕES
   ============================================================ */

@media (min-width: 901px) {

    /* Redistribui espaço das colunas centrais para as ações */
    body.hover-sidebar-layout .processes-table-balanced th:nth-child(2),
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(2) {
        width: 15% !important;
    }

    body.hover-sidebar-layout .processes-table-balanced th:nth-child(3),
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(3) {
        width: 12% !important;
    }

    body.hover-sidebar-layout .processes-table-balanced th:nth-child(4),
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(4) {
        width: 15% !important;
    }

    body.hover-sidebar-layout .processes-table-balanced th:nth-child(9),
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) {
        width: 205px !important;
        min-width: 205px !important;
        max-width: 205px !important;
        white-space: nowrap !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) {
        display: table-cell !important;
        text-align: center !important;
        vertical-align: middle !important;
    }

    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) .btn,
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) a,
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) button {
        display: inline-block !important;
        white-space: nowrap !important;
        margin: 2px 2px !important;
        padding: 7px 9px !important;
        font-size: 11px !important;
        line-height: 1.1 !important;
    }

    /* Garante que o botão Excluir não seja cortado na borda direita */
    body.hover-sidebar-layout .processes-table-balanced td:nth-child(9) form {
        display: inline-block !important;
        margin: 0 !important;
    }

    body.hover-sidebar-layout .table-scroll:has(.processes-table-balanced) {
        padding-right: 8px !important;
        box-sizing: border-box !important;
    }
}



/* Relatórios: identificação explícita dos polos processuais */
.report-parties-cell { line-height: 1.35; }
.report-parties-cell strong { font-weight: 700; white-space: nowrap; }
@media print {
  .report-parties-cell div + div { margin-top: 3px !important; }
}

/* Número CNJ segmentado — cadastro e pesquisa de processos */
.cnj-segmented {
    display: grid;
    grid-template-columns: minmax(105px, 1.5fr) minmax(66px, .8fr) minmax(72px, 1fr) minmax(48px, .5fr) minmax(60px, .7fr) minmax(74px, 1fr);
    width: min(100%, 580px);
    border: 1px solid #c8d1da;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
}
.cnj-segmented .cnj-part {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 8px;
    border: 0 !important;
    border-right: 1px solid #c8d1da !important;
    border-radius: 0 !important;
    background: #fff;
    color: #374151;
    font-size: 18px;
    text-align: left;
    box-shadow: none !important;
}
.cnj-segmented .cnj-part:last-child { border-right: 0 !important; }
.cnj-segmented .cnj-part:focus {
    position: relative;
    z-index: 1;
    outline: 2px solid #0f6f9f;
    outline-offset: -2px;
    background: #f8fcff;
}
.cnj-search-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.cnj-search-form .cnj-search-fields { flex: 1 1 500px; }
.cnj-search-form label { display:block; margin-bottom:6px; font-weight:700; }
.cnj-search-form .cnj-segmented { width: 100%; max-width: 650px; }
.cnj-search-form .cnj-part { height: 44px; font-size:16px; }
@media (max-width: 620px) {
    .cnj-segmented { grid-template-columns: 1.4fr .75fr .9fr .5fr .65fr .9fr; }
    .cnj-segmented .cnj-part { height: 46px; padding:0 4px; font-size:14px; }
}

/* ============================================================
   CRT Jurídico 2.0 — Fase 1: módulo de processos
   ============================================================ */
.process-filter-panel { margin-bottom: 16px; }
.section-heading.compact { margin-bottom: 14px; }
.process-filter-form { display:grid; grid-template-columns: minmax(260px,2fr) repeat(2,minmax(150px,1fr)); gap:14px; align-items:end; }
.process-filter-form label { display:block; font-weight:700; margin-bottom:6px; }
.process-filter-form .filter-search-wide { grid-column: span 2; }
.process-filter-form .filter-actions { display:flex; gap:8px; align-items:center; }
.process-list-summary { margin: 4px 0 12px; color:#526273; }
.processes-table-v2 { min-width:1180px; }
.processes-table-v2 td { vertical-align:top; }
.processes-table-v2 td small, .process-number-cell small, .table-subtext { display:block; margin-top:5px; color:#6b7b8c; line-height:1.35; }
.process-number-cell a { color:#0b5f8a; text-decoration:none; }
.agenda-counts { display:flex; gap:8px; }
.agenda-counts span { display:inline-flex; align-items:center; justify-content:center; min-width:46px; padding:7px 9px; border-radius:10px; background:#eef6fa; font-weight:700; }
.status-pill { display:inline-flex; align-items:center; border-radius:999px; padding:6px 10px; font-size:12px; font-weight:800; text-transform:capitalize; background:#e9f2f7; color:#0b5f8a; }
.status-pill.status-arquivado { background:#edf0f2; color:#53616d; }
.status-pill.status-suspenso { background:#fff4dc; color:#946200; }
.status-pill.status-ativo { background:#e6f6ef; color:#14734b; }
.empty-state { color:#6b7b8c; padding:18px 0; }
.process-title-line { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.process-title-line h1 { margin:0; }
.process-kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(120px,1fr)); gap:12px; margin-bottom:16px; }
.process-kpi { background:#fff; border:1px solid #dce5eb; border-radius:14px; padding:15px; box-shadow:0 4px 14px rgba(15,67,91,.04); }
.process-kpi span { display:block; color:#687989; font-size:13px; }
.process-kpi strong { display:block; margin-top:5px; font-size:24px; color:#102a3a; }
.process-detail-tabs { display:flex; gap:6px; overflow-x:auto; padding:8px; margin-bottom:16px; background:#fff; border:1px solid #dce5eb; border-radius:14px; }
.process-detail-tabs a { white-space:nowrap; padding:10px 14px; border-radius:9px; text-decoration:none; color:#4e6271; font-weight:700; }
.process-detail-tabs a:hover { background:#eef6fa; }
.process-detail-tabs a.active { background:#0f6f9f; color:#fff; }
.process-summary-grid { margin-bottom:16px; }
.process-highlight-card { margin-bottom:16px; border-left:4px solid #0f6f9f; }
.upcoming-grid { display:grid; grid-template-columns:repeat(3,minmax(220px,1fr)); gap:12px; }
.upcoming-item { border:1px solid #dce5eb; border-radius:12px; padding:14px; }
.upcoming-item span { display:inline-block; font-size:11px; font-weight:800; text-transform:uppercase; color:#0f6f9f; margin-bottom:5px; }
.upcoming-item strong,.upcoming-item small { display:block; }
.upcoming-item small { color:#6b7b8c; margin-top:5px; }
.party-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.party-grid article { padding:16px; border:1px solid #dce5eb; border-radius:12px; background:#fbfdfe; }
.party-grid article span { font-size:12px; font-weight:800; color:#0f6f9f; text-transform:uppercase; }
.text-block { margin-top:16px; padding-top:16px; border-top:1px solid #e2e8ed; }
.professional-cards { display:grid; grid-template-columns:repeat(3,minmax(220px,1fr)); gap:12px; }
.professional-cards article { border:1px solid #dce5eb; border-radius:12px; padding:15px; }
.professional-cards article strong,.professional-cards article span,.professional-cards article small { display:block; }
.professional-cards article span { margin-top:6px; color:#0f6f9f; font-weight:700; }
.professional-cards article small { margin-top:4px; color:#6b7b8c; }
.process-timeline { position:relative; padding-left:24px; }
.process-timeline:before { content:""; position:absolute; left:7px; top:5px; bottom:5px; width:2px; background:#d5e3eb; }
.process-timeline article { position:relative; padding:0 0 24px 18px; }
.timeline-dot { position:absolute; left:-22px; top:5px; width:12px; height:12px; border-radius:50%; background:#0f6f9f; box-shadow:0 0 0 4px #e5f2f8; }
.timeline-content time { color:#6b7b8c; font-size:13px; }
.timeline-content > span { display:inline-block; margin-left:8px; padding:3px 7px; border-radius:99px; background:#eef6fa; color:#0f6f9f; font-size:11px; font-weight:800; text-transform:uppercase; }
.timeline-content h3 { margin:7px 0 5px; }
.timeline-content p { margin:0 0 5px; }
.document-list article { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid #e4ebef; }
.document-list article:last-child { border-bottom:0; }
.document-list article strong,.document-list article span,.document-list article small { display:block; }
.document-list article span,.document-list article small { color:#6b7b8c; margin-top:3px; }
.finance-summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:16px; }
.finance-summary-grid > div { padding:16px; background:#fff; border:1px solid #dce5eb; border-radius:13px; }
.finance-summary-grid span,.finance-summary-grid strong { display:block; }
.finance-summary-grid span { color:#6b7b8c; }
.finance-summary-grid strong { margin-top:5px; font-size:22px; }
@media (max-width:1100px) {
  .process-kpi-grid { grid-template-columns:repeat(3,1fr); }
  .process-filter-form { grid-template-columns:1fr 1fr; }
  .process-filter-form .filter-search-wide { grid-column:1/-1; }
  .upcoming-grid,.professional-cards { grid-template-columns:1fr 1fr; }
}
@media (max-width:700px) {
  .process-kpi-grid { grid-template-columns:repeat(2,1fr); }
  .process-filter-form { grid-template-columns:1fr; }
  .process-filter-form .filter-search-wide { grid-column:auto; }
  .party-grid,.upcoming-grid,.professional-cards,.finance-summary-grid { grid-template-columns:1fr; }
}

/* ============================================================
   CRT Jurídico 2.0 — Fase 2: dashboard operacional
   ============================================================ */
.dashboard-header-v2 { align-items:center; }
.dashboard-eyebrow { display:block; margin-bottom:5px; color:#0f6f9f; font-size:12px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.dashboard-header-actions { display:flex; gap:9px; flex-wrap:wrap; }
.dashboard-kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(140px,1fr)); gap:12px; margin-bottom:16px; }
.dashboard-kpi { display:block; min-height:126px; padding:17px; border:1px solid #dce5eb; border-radius:15px; background:#fff; box-shadow:0 5px 18px rgba(15,67,91,.05); color:inherit; text-decoration:none; transition:.18s ease; }
.dashboard-kpi:hover { transform:translateY(-2px); border-color:#9fc7db; box-shadow:0 9px 25px rgba(15,67,91,.10); }
.dashboard-kpi span,.dashboard-kpi strong,.dashboard-kpi small { display:block; }
.dashboard-kpi span { color:#607586; font-size:13px; font-weight:800; }
.dashboard-kpi strong { margin:8px 0 5px; color:#102a3a; font-size:31px; line-height:1; }
.dashboard-kpi small { color:#718391; }
.dashboard-kpi.warning { border-top:4px solid #d29a20; }
.dashboard-kpi.danger { border-top:4px solid #c34848; }
.dashboard-kpi.highlighted { border-top:4px solid #0f6f9f; }
.dashboard-alert-strip { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.dashboard-alert-strip a { flex:1; min-width:260px; padding:12px 15px; border:1px solid #f1d1d1; border-radius:12px; background:#fff8f8; color:#8a3030; text-decoration:none; }
.dashboard-main-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px; }
.dashboard-panel { margin-bottom:0; }
.text-link { color:#0f6f9f; font-weight:800; text-decoration:none; }
.dashboard-list { display:flex; flex-direction:column; }
.dashboard-list-item { display:grid; grid-template-columns:56px 1fr; gap:12px; padding:14px 0; border-bottom:1px solid #e5ecef; }
.dashboard-list-item:last-child { border-bottom:0; }
.dashboard-date-box { display:flex; min-height:54px; flex-direction:column; align-items:center; justify-content:center; border-radius:11px; background:#eaf4f9; color:#0f6f9f; }
.dashboard-date-box strong { font-size:20px; line-height:1; }
.dashboard-date-box span { margin-top:4px; font-size:10px; font-weight:900; }
.dashboard-date-box.overdue { background:#fdecec; color:#a63434; }
.dashboard-date-box.hearing { background:#eaf2ff; color:#315f9b; }
.dashboard-list-title { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.dashboard-list-content > a { display:block; margin:4px 0; color:#0f6f9f; font-size:13px; font-weight:800; text-decoration:none; }
.dashboard-list-content small { display:block; color:#6d7e8b; line-height:1.35; }
.mini-badge { display:inline-flex; border-radius:99px; padding:3px 7px; font-size:10px; font-weight:900; text-transform:uppercase; }
.mini-badge.info { background:#e8f4fa; color:#0f6f9f; }
.mini-badge.warning { background:#fff3d8; color:#946200; }
.mini-badge.danger { background:#fdeaea; color:#a83232; }
.dashboard-empty { padding:24px 8px; color:#748490; text-align:center; }
.dashboard-movements-panel { margin-bottom:16px; }
.dashboard-timeline { position:relative; padding-left:20px; }
.dashboard-timeline:before { content:""; position:absolute; left:6px; top:8px; bottom:8px; width:2px; background:#d8e5eb; }
.dashboard-timeline article { position:relative; padding:0 0 20px 18px; }
.dashboard-timeline article:last-child { padding-bottom:0; }
.dashboard-timeline-dot { position:absolute; left:-19px; top:5px; width:10px; height:10px; border-radius:50%; background:#0f6f9f; box-shadow:0 0 0 4px #e6f2f8; }
.dashboard-timeline time { color:#6f808d; font-size:12px; }
.dashboard-timeline h3 { margin:6px 0 3px; font-size:16px; }
.dashboard-timeline a { color:#0f6f9f; font-size:13px; font-weight:800; text-decoration:none; }
.dashboard-timeline p { margin:6px 0 0; color:#5f707e; line-height:1.45; }
.dashboard-secondary-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }
.workload-list article { display:grid; grid-template-columns:1fr auto; gap:5px 12px; padding:10px 0; border-bottom:1px solid #e5ecef; }
.workload-list article:last-child { border-bottom:0; }
.workload-list strong,.workload-list small { display:block; }
.workload-list small { margin-top:2px; color:#71818d; }
.workload-list article > span { align-self:center; color:#0f6f9f; font-size:18px; font-weight:900; }
.workload-track { grid-column:1/-1; height:6px; overflow:hidden; border-radius:99px; background:#e8eef2; }
.workload-track i { display:block; height:100%; border-radius:inherit; background:#0f6f9f; }
.status-distribution article { margin-bottom:15px; }
.status-distribution article > div:first-child { display:flex; justify-content:space-between; align-items:center; }
.status-track { height:7px; margin:7px 0 4px; overflow:hidden; border-radius:99px; background:#e8eef2; }
.status-track i { display:block; height:100%; background:#0f6f9f; }
.status-distribution small { color:#72828f; }
.dashboard-mini-summary { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:15px; }
.dashboard-mini-summary div { padding:12px; border-radius:10px; background:#f4f8fa; }
.dashboard-mini-summary span,.dashboard-mini-summary strong { display:block; }
.dashboard-mini-summary span { color:#6d7d89; font-size:12px; }
.dashboard-mini-summary strong { margin-top:3px; font-size:21px; }
.audit-compact-list article { display:grid; grid-template-columns:70px 1fr; gap:10px; padding:10px 0; border-bottom:1px solid #e5ecef; }
.audit-compact-list article:last-child { border-bottom:0; }
.audit-compact-list > article > span { color:#71818d; font-size:11px; }
.audit-compact-list strong,.audit-compact-list small { display:block; }
.audit-compact-list small { margin-top:2px; color:#6a7b88; line-height:1.3; }
@media (max-width:1250px) {
  .dashboard-kpi-grid { grid-template-columns:repeat(3,1fr); }
  .dashboard-secondary-grid { grid-template-columns:1fr 1fr; }
  .dashboard-secondary-grid > :last-child { grid-column:1/-1; }
}
@media (max-width:850px) {
  .dashboard-main-grid,.dashboard-secondary-grid { grid-template-columns:1fr; }
  .dashboard-secondary-grid > :last-child { grid-column:auto; }
  .dashboard-header-actions { width:100%; }
}
@media (max-width:620px) {
  .dashboard-kpi-grid { grid-template-columns:1fr 1fr; }
  .dashboard-kpi { min-height:112px; padding:14px; }
  .dashboard-kpi strong { font-size:26px; }
  .dashboard-list-title { display:block; }
  .dashboard-list-title .mini-badge { margin-top:5px; }
}
/* CRT 2.0 - Fase 4: Linha do tempo processual */
.movement-filter-bar{display:grid;grid-template-columns:2fr 1fr;gap:12px;margin:16px 0}.movement-card{border-left:5px solid #94a3b8}.movement-card.importance-importante{border-left-color:#d97706}.movement-card.importance-urgente{border-left-color:#dc2626}.movement-card.importance-critica{border-left-color:#7f1d1d;background:#fff7f7}.movement-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.source-badge{background:#e0f2fe}.importance-badge{background:#f1f5f9}.reviewed-badge{background:#dcfce7;color:#166534}.movement-summary{background:#f8fafc;border-radius:10px;padding:12px 14px;margin:12px 0}.movement-summary p{margin:5px 0 0}.next-action{padding:10px 12px;background:#fff7ed;border-radius:8px;margin-top:10px}.movement-flags{display:flex;gap:10px;margin-top:10px}.movement-flags a{font-weight:700}.movement-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;padding-top:12px;border-top:1px solid #e5e7eb}.checkbox-row{display:flex;gap:24px;flex-wrap:wrap}.checkbox-row label{display:flex;align-items:center;gap:8px}.btn.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}@media(max-width:700px){.movement-filter-bar{grid-template-columns:1fr}.movement-footer{align-items:flex-start;flex-direction:column}}
/* CRT 2.0 - Fase 5: gestão avançada de prazos e audiências */
.phase5-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:0 0 16px}.phase5-kpi{display:block;padding:17px;border:1px solid #dce7ec;border-top:4px solid #78909c;border-radius:13px;background:#fff;text-decoration:none;color:inherit}.phase5-kpi span,.phase5-kpi strong{display:block}.phase5-kpi span{color:#667987;font-size:13px;font-weight:800}.phase5-kpi strong{margin-top:7px;font-size:28px;color:#183544}.phase5-kpi.danger{border-top-color:#c43f3f}.phase5-kpi.warning{border-top-color:#d79b22}.phase5-kpi.info{border-top-color:#1575a6}.phase5-kpi.success{border-top-color:#27815a}.phase5-filter{display:grid;grid-template-columns:2fr repeat(4,1fr) auto auto;gap:10px;margin-bottom:16px}.phase5-table{min-width:1180px}.phase5-table td small,.phase5-table td p{display:block;margin-top:5px;color:#6f808c}.phase5-actions{display:flex;align-items:flex-start;gap:6px;flex-wrap:wrap}.phase5-actions form{display:inline}.days-chip{display:inline-flex!important;width:max-content;margin-top:7px!important;padding:3px 7px;border-radius:99px;background:#e9f4f8;color:#17648b;font-size:10px!important;font-weight:900}.days-chip.warning{background:#fff1cf;color:#8a5b00}.days-chip.danger{background:#fde4e4;color:#a52e2e}.btn.success{background:#e4f5ec;color:#17633f;border-color:#bfe4d0}@media(max-width:1100px){.phase5-kpis{grid-template-columns:repeat(2,1fr)}.phase5-filter{grid-template-columns:1fr 1fr}}@media(max-width:620px){.phase5-kpis,.phase5-filter{grid-template-columns:1fr}}

/* ==========================================================================
   AJUSTE DE RESPONSIVIDADE DAS TABELAS (evita cortar campos sem diminuir zoom)
   Aplica-se às telas de Processos, Prazos e Monitoramento OAB.
   ========================================================================== */

/* As tabelas largas passam a caber na tela: em vez de forçar 1180px fixos,
   usam a largura disponível e quebram o texto das células. Só quando a tela
   for realmente estreita é que aparece a rolagem horizontal. */
.processes-table-v2,
.phase5-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: fixed;
}

.processes-table-v2 th,
.processes-table-v2 td,
.phase5-table th,
.phase5-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Deixa o padding das células um pouco menor para ganhar espaço horizontal. */
.processes-table-v2 th,
.processes-table-v2 td,
.phase5-table th,
.phase5-table td {
    padding: 11px 12px;
}

/* Larguras proporcionais da tabela de Processos (7 colunas):
   Processo, Partes/Cliente, Órgão e classe, Responsáveis, Agenda, Status, Ações */
.processes-table-v2 th:nth-child(1), .processes-table-v2 td:nth-child(1) { width: 15%; }
.processes-table-v2 th:nth-child(2), .processes-table-v2 td:nth-child(2) { width: 20%; }
.processes-table-v2 th:nth-child(3), .processes-table-v2 td:nth-child(3) { width: 20%; }
.processes-table-v2 th:nth-child(4), .processes-table-v2 td:nth-child(4) { width: 15%; }
.processes-table-v2 th:nth-child(5), .processes-table-v2 td:nth-child(5) { width: 12%; }
.processes-table-v2 th:nth-child(6), .processes-table-v2 td:nth-child(6) { width: 9%; }
.processes-table-v2 th:nth-child(7), .processes-table-v2 td:nth-child(7) { width: 9%; }

/* Monitoramento OAB — tabela "Últimas verificações": a coluna Mensagem é
   longa; deixamos ela quebrar e limitamos a largura das demais. */
.oab-monitor table { table-layout: fixed; width: 100%; }
.oab-monitor table th, .oab-monitor table td {
    word-wrap: break-word; overflow-wrap: break-word; white-space: normal;
    padding: 10px 12px; vertical-align: top;
}
.oab-monitor table th:nth-child(1), .oab-monitor table td:nth-child(1) { width: 14%; }
.oab-monitor table th:nth-child(2), .oab-monitor table td:nth-child(2) { width: 22%; }
.oab-monitor table th:nth-child(3), .oab-monitor table td:nth-child(3) { width: 12%; }
.oab-monitor table th:nth-child(4), .oab-monitor table td:nth-child(4) { width: 52%; }

/* Só ativa rolagem horizontal se a tela for muito estreita (celular). */
@media (max-width: 640px) {
    .processes-table-v2, .phase5-table { min-width: 560px !important; }
}

/* ==========================================================================
   AJUSTE DA "PESQUISA INTELIGENTE" (processos) — evita corte à direita
   ========================================================================== */
/* Grid flexível: os campos se reorganizam para caber sempre na largura da
   tela, sem estourar. Cada campo tem um mínimo pequeno e cresce conforme o
   espaço; quando não cabe, quebra para a linha de baixo automaticamente. */
.process-filter-form {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 14px !important;
    align-items: end;
    width: 100%;
    box-sizing: border-box;
}
.process-filter-form > div,
.process-filter-form .filter-search-wide,
.process-filter-form .filter-actions {
    min-width: 0;                 /* permite o campo encolher sem estourar */
}
.process-filter-form .filter-search-wide {
    grid-column: 1 / -1;          /* o campo de busca ocupa a linha inteira */
}
.process-filter-form input,
.process-filter-form select {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}
.process-filter-form .filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   COR DO TEXTO DO RESUMO E DA PRÓXIMA PROVIDÊNCIA (legibilidade)
   ========================================================================== */
.movement-summary,
.movement-summary p,
.movement-summary strong {
    color: #111827 !important;
}
.next-action,
.next-action strong {
    color: #111827 !important;
}

/* ==========================================================================
   POPUPS DE CRIAR PRAZO/AUDIÊNCIA — garantir que não sejam cortados
   ========================================================================== */
/* Os <details> no rodapé da movimentação abrem um popup posicionado acima.
   Garantimos que os containers não cortem esse popup. */
.timeline-item,
.timeline-item .movement-footer,
.movement-card,
.panel {
    overflow: visible !important;
}
/* O popup em si fica acima de tudo. */
.movement-footer details[open] > div {
    z-index: 200;
}

/* ==========================================================================
   AJUSTE FINAL: tabela de Processos com 3 botões de ação (Abrir/Editar/Excluir)
   cabendo na tela sem rolagem horizontal — botões lado a lado, compactos.
   ========================================================================== */
.action-cell {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
    align-items: center;
    justify-content: flex-start;
}
.action-cell .btn {
    font-size: 11px;
    padding: 5px 8px;
    white-space: nowrap;
}
.action-cell form {
    margin: 0;
    display: inline;
}

/* Rebalanceia as larguras das 7 colunas para dar mais espaço às Ações. */
.processes-table-v2 th:nth-child(1), .processes-table-v2 td:nth-child(1) { width: 12%; }
.processes-table-v2 th:nth-child(2), .processes-table-v2 td:nth-child(2) { width: 17%; }
.processes-table-v2 th:nth-child(3), .processes-table-v2 td:nth-child(3) { width: 15%; }
.processes-table-v2 th:nth-child(4), .processes-table-v2 td:nth-child(4) { width: 12%; }
.processes-table-v2 th:nth-child(5), .processes-table-v2 td:nth-child(5) { width: 9%; }
.processes-table-v2 th:nth-child(6), .processes-table-v2 td:nth-child(6) { width: 8%; }
.processes-table-v2 th:nth-child(7), .processes-table-v2 td:nth-child(7) { width: 27%; }


/* Central de Tribunais */
.tribunal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:18px}.tribunal-card{display:flex;flex-direction:column;gap:16px}.tribunal-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.tribunal-card h2{font-size:18px;margin:5px 0}.tribunal-card p{margin:0}.tribunal-code{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.tribunal-stats{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.tribunal-stats div{padding:10px;border:1px solid var(--border,#dbe2ea);border-radius:10px;text-align:center}.tribunal-stats strong{display:block;font-size:20px}.tribunal-stats span{font-size:11px}.tribunal-actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:760px){.tribunal-grid{grid-template-columns:1fr}.tribunal-stats{grid-template-columns:repeat(2,1fr)}}

/* CRT 12.08.2 — Central de Tribunais responsiva */
.tribunal-page-header { gap:18px; align-items:flex-start; }
.tribunal-header-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.tribunal-header-actions form { margin:0; }
.tribunal-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 18px; }
.tribunal-stat { background:var(--surface,#fff); border:1px solid var(--border); border-radius:16px; padding:16px 18px; min-width:0; }
.tribunal-stat span { display:block; color:var(--muted); font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.tribunal-stat strong { display:block; font-size:28px; line-height:1.15; margin-top:5px; color:var(--text); }
.tribunal-stat small { display:block; color:var(--muted); margin-top:4px; }
.tribunal-filter-form { grid-template-columns:minmax(220px,360px) auto !important; justify-content:start; }
.tribunal-process-list { display:grid; gap:12px; }
.tribunal-process-card { display:grid; grid-template-columns:minmax(300px,1.7fr) minmax(220px,1fr) minmax(160px,.7fr) auto; gap:18px; align-items:center; padding:16px 18px; border:1px solid var(--border); border-radius:14px; background:var(--surface,#fff); }
.tribunal-process-main,.tribunal-process-movement,.tribunal-process-alerts { min-width:0; }
.tribunal-process-title-row { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.tribunal-process-number { font-weight:800; color:var(--text); text-decoration:none; }
.tribunal-process-number:hover { text-decoration:underline; }
.tribunal-degree-badge,.tribunal-sync-badge,.tribunal-alert { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:4px 8px; border-radius:999px; font-size:11px; line-height:1.2; font-weight:800; }
.tribunal-degree-badge { background:var(--soft,#eef5f8); color:var(--text); }
.tribunal-sync-badge.success { background:#e7f7ee; color:#166534; }
.tribunal-sync-badge.error { background:#feecec; color:#991b1b; }
.tribunal-process-parties { margin-top:7px; font-size:14px; color:var(--text); overflow-wrap:anywhere; }
.tribunal-process-meta { display:flex; flex-wrap:wrap; gap:5px 14px; margin-top:7px; color:var(--muted); font-size:12px; }
.tribunal-process-meta span { min-width:0; overflow-wrap:anywhere; }
.tribunal-process-movement { display:flex; flex-direction:column; gap:4px; }
.tribunal-label { color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; }
.tribunal-process-movement strong { font-size:13px; overflow-wrap:anywhere; }
.tribunal-process-movement small,.tribunal-process-alerts small { color:var(--muted); font-size:11px; }
.tribunal-process-alerts { display:flex; flex-direction:column; gap:5px; align-items:flex-start; }
.tribunal-alert.deadline { background:#fff4e5; color:#9a4d00; }
.tribunal-alert.hearing { background:#e8f2ff; color:#155eaa; }
.tribunal-alert.neutral { background:var(--soft,#f2f4f6); color:var(--muted); }
.tribunal-sync-error { color:#991b1b !important; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tribunal-process-actions { display:flex; flex-direction:column; gap:7px; align-items:stretch; }
.tribunal-process-actions form { margin:0; }
.tribunal-process-actions .btn { width:100%; justify-content:center; white-space:nowrap; }
@media (max-width:1250px) {
  .tribunal-process-card { grid-template-columns:minmax(300px,1.5fr) minmax(220px,1fr) auto; }
  .tribunal-process-alerts { grid-column:2; }
  .tribunal-process-actions { grid-column:3; grid-row:1 / span 2; }
}
@media (max-width:900px) {
  .tribunal-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tribunal-process-card { grid-template-columns:1fr; gap:12px; }
  .tribunal-process-alerts,.tribunal-process-actions { grid-column:auto; grid-row:auto; }
  .tribunal-process-actions { flex-direction:row; flex-wrap:wrap; }
  .tribunal-process-actions .btn { width:auto; }
  .tribunal-header-actions { justify-content:flex-start; }
}
@media (max-width:560px) {
  .tribunal-stat-grid { grid-template-columns:1fr; }
  .tribunal-filter-form { grid-template-columns:1fr !important; }
}
