:root {
    --ruta-primary: #124734;
    --ruta-blue: #1f5da8;
    --ruta-muted: #f4f7f6;
    --ruta-line: rgba(18, 71, 52, 0.14);
    --ruta-soft-blue: #eef6ff;
}

body {
    background: var(--ruta-muted);
}

.public-form-hero {
    align-items: center;
    background: #fff;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.25rem;
}

.public-form-hero h1 {
    color: #07172f;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0.15rem 0;
}

.public-form-hero p {
    color: #52657d;
    margin: 0;
}

.eyebrow {
    color: var(--ruta-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-badges {
    display: grid;
    gap: 0.45rem;
    justify-items: end;
}

.hero-badges span {
    background: var(--ruta-soft-blue);
    border: 1px solid #cfe2f7;
    border-radius: 999px;
    color: #24599a;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.38rem 0.7rem;
    white-space: nowrap;
}

.bg-primary-ruta {
    background: var(--ruta-primary);
}

.app-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
    min-width: 0;
}

.app-brand-logo {
    background: #fff;
    border-radius: 6px;
    height: 50px;
    object-fit: contain;
    padding: 0.08rem;
    width: auto;
}

.app-brand span {
    overflow-wrap: anywhere;
}

.card {
    border: 1px solid var(--ruta-line);
    border-radius: 8px;
}

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0d3627;
    border-color: #0d3627;
}

.section-title {
    border-bottom: 1px solid var(--ruta-line);
    color: #42534c;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

.label-value {
    background: #fff;
    border: 1px solid var(--ruta-line);
    border-radius: 8px;
    min-height: 72px;
    padding: 0.75rem;
}

.label-value span {
    color: #6c757d;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
}

.label-value strong {
    display: block;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.timeline {
    border-left: 2px solid var(--ruta-line);
    margin-left: 0.35rem;
    padding-left: 1rem;
}

.timeline-item {
    margin-bottom: 1rem;
    position: relative;
}

.timeline-item::before {
    background: var(--ruta-primary);
    border-radius: 50%;
    content: "";
    height: 0.65rem;
    left: -1.42rem;
    position: absolute;
    top: 0.35rem;
    width: 0.65rem;
}

.wizard-head {
    background: #f8fbff;
}

.wizard-progress {
    height: 0.7rem;
}

.wizard-progress .progress-bar {
    background: var(--ruta-blue);
    transition: width 0.2s ease;
}

.wizard-steps {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.wizard-stepper {
    align-items: center;
    background: #fff;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    color: #627086;
    display: flex;
    flex: 0 0 170px;
    gap: 0.7rem;
    min-height: 58px;
    padding: 0.65rem;
    text-align: left;
}

.wizard-number {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    height: 2rem;
    justify-content: center;
    transition: all 0.2s ease;
    width: 2rem;
}

.wizard-label {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    min-height: 0;
}

.wizard-stepper.active {
    border-color: #b9d8f5;
    box-shadow: 0 8px 18px rgba(31, 93, 168, 0.08);
    color: #07172f;
}

.wizard-stepper.active .wizard-number {
    background: var(--ruta-blue);
    color: #fff;
}

.wizard-stepper.completed {
    color: #198754;
}

.wizard-stepper.completed .wizard-number {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.wizard-stepper.locked {
    cursor: not-allowed;
    opacity: 0.5;
}

.wizard-pane {
    display: none;
    min-height: 300px;
}

.wizard-pane.active {
    display: block;
}

.solicitud-wizard .label-value {
    background: #f8faf9;
}

.solicitud-wizard .form-control,
.solicitud-wizard .form-select {
    border-color: #c9d6e5;
    border-radius: 8px;
    min-height: 40px;
}

.solicitud-wizard .form-control:focus,
.solicitud-wizard .form-select:focus {
    border-color: var(--ruta-blue);
    box-shadow: 0 0 0 0.2rem rgba(31, 93, 168, 0.12);
}

.form-side-card {
    position: sticky;
    top: 1rem;
}

.side-step-list {
    display: grid;
    gap: 0.5rem;
}

.side-step {
    align-items: center;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    display: flex;
    gap: 0.7rem;
    padding: 0.6rem;
}

.side-step span {
    align-items: center;
    background: #e7eef7;
    border-radius: 999px;
    color: #435166;
    display: inline-flex;
    flex: 0 0 1.8rem;
    font-size: 0.8rem;
    font-weight: 800;
    height: 1.8rem;
    justify-content: center;
}

.side-step strong,
.side-step small {
    display: block;
    line-height: 1.2;
}

.side-step strong {
    color: #172239;
    font-size: 0.85rem;
}

.side-step small {
    color: #69788f;
    font-size: 0.75rem;
    margin-top: 0.12rem;
}

.side-step.active {
    background: #f4f9ff;
    border-color: #b9d8f5;
}

.side-step.active span {
    background: var(--ruta-blue);
    color: #fff;
}

.side-step.completed span {
    background: #198754;
    color: #fff;
}

.pending-box {
    background: #fff8e8;
    border: 1px solid #f0cf7a;
    border-radius: 8px;
    color: #7a4b13;
    font-size: 0.82rem;
    padding: 0.75rem;
}

.pending-box.pending-box-complete {
    background: #f0fbf6;
    border-color: #a9dec5;
    color: #0f5132;
}

.pending-box.pending-box-complete [data-pending-count] {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.summary-row {
    align-items: start;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.65rem 0;
}

.summary-row span {
    color: #607087;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.summary-row strong {
    color: #172239;
    font-size: 0.85rem;
    max-width: 58%;
    overflow-wrap: anywhere;
    text-align: right;
}

.review-table {
    border-color: transparent;
}

.review-table > :not(caption) > * > * {
    border-bottom-color: transparent;
    padding: 0.28rem 0.5rem 0.28rem 0;
}

.review-table th {
    color: #172239;
    font-weight: 750;
    width: 34%;
}

.review-table td {
    color: #172239;
    overflow-wrap: anywhere;
}

.review-table-group th {
    color: #172239;
    font-size: 0.82rem;
    font-weight: 800;
    padding-top: 1rem;
    text-transform: uppercase;
}

.review-table-group:first-child th {
    padding-top: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 0.18s ease;
}

.sidebar-collapsed .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar {
    background: #102c23;
    color: #fff;
    padding: 1rem;
    transition: width 0.18s ease, padding 0.18s ease;
}

.sidebar-head {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.sidebar-brand {
    align-items: center;
    color: #fff;
    display: flex;
    gap: 0.65rem;
    font-weight: 700;
    min-width: 0;
    text-decoration: none;
}

.sidebar-brand i {
    flex: 0 0 1.35rem;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 2rem;
    height: 2rem;
    justify-content: center;
    padding: 0;
    width: 2rem;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
    background: rgba(255, 255, 255, 0.16);
}

.app-brand-internal {
    color: #102c23;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.internal-topbar-brand {
    align-items: center;
    display: flex;
    gap: 1.45rem;
    min-width: 0;
}

.internal-topbar-brand .fw-semibold {
    color: #102c23;
    font-size: 1.18rem;
    line-height: 1.2;
}

.sidebar-nav {
    display: grid;
    gap: 0.35rem;
}

.sidebar-section {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.72rem;
    font-weight: 800;
    margin-top: 0.7rem;
    padding: 0.35rem 0.75rem 0.1rem;
    text-transform: uppercase;
}

.sidebar-section:first-child {
    margin-top: 0;
}

.sidebar-nav a {
    align-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.82);
    display: flex;
    gap: 0.7rem;
    padding: 0.65rem 0.75rem;
    text-decoration: none;
}

.sidebar-nav a i {
    flex: 0 0 1.2rem;
    font-size: 1rem;
    text-align: center;
}

.sidebar-nav a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-collapsed .sidebar {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.sidebar-collapsed .sidebar-head {
    justify-content: center;
}

.sidebar-collapsed .sidebar-brand span,
.sidebar-collapsed .sidebar-section,
.sidebar-collapsed .sidebar-nav a span {
    display: none;
}

.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.app-main {
    min-width: 0;
}

.internal-topbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--ruta-line);
    display: flex;
    justify-content: space-between;
    min-height: 64px;
    padding: 0.75rem 1.5rem;
    position: relative;
}

.internal-wide-body {
    background: #f4f7f6;
}

.internal-wide-container {
    margin-left: auto;
    margin-right: auto;
    max-width: 1840px;
    width: min(100% - 2rem, 1840px);
}

.internal-wide-topbar {
    background: #fff;
    border-bottom: 1px solid var(--ruta-line);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
    min-height: 64px;
}

.internal-wide-topbar-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-bottom: 0.65rem;
    padding-top: 0.65rem;
    position: relative;
}

.internal-page-title {
    background: #f8faf9;
    border: 1px solid var(--ruta-line);
    border-radius: 6px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    color: #102c23;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: 0;
    left: 50%;
    max-width: min(44vw, 640px);
    overflow: hidden;
    padding: 0.42rem 1rem;
    position: absolute;
    text-align: center;
    text-overflow: ellipsis;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

.internal-wide-main {
    padding-bottom: 1.5rem;
    padding-top: 1rem;
}

.panel-hero {
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #eef6ff 54%, #f4fbf7 100%);
    border: 1px solid var(--ruta-line);
    border-radius: 8px;
    box-shadow: 0 0.45rem 1.25rem rgba(15, 23, 42, 0.06);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.2rem 1.35rem;
}

.panel-hero h1 {
    color: #102c23;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0.1rem 0;
}

.panel-hero p {
    color: #5d6b7a;
    margin: 0;
}

.panel-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.panel-kpi-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.panel-kpi {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--ruta-line);
    border-left: 5px solid #1f5da8;
    border-radius: 8px;
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.045);
    display: flex;
    gap: 0.75rem;
    min-height: 126px;
    padding: 1rem;
}

.panel-kpi.is-green {
    border-left-color: #1f8f5f;
}

.panel-kpi.is-amber {
    border-left-color: #d68a10;
}

.panel-kpi.is-teal {
    border-left-color: #16828f;
}

.panel-kpi.is-rose {
    border-left-color: #c2415d;
}

.panel-kpi.is-muted {
    border-left-color: #8b98a8;
}

.panel-kpi-icon {
    align-items: center;
    background: #f4f7fb;
    border: 1px solid #dfe8f4;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 2.5rem;
    font-size: 1.3rem;
    height: 2.5rem;
    justify-content: center;
    line-height: 1;
    width: 2.5rem;
}

.panel-kpi-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.panel-kpi-value {
    color: #102c23;
    font-size: 2rem;
    font-weight: 850;
    line-height: 1.05;
    margin-top: 0.2rem;
}

.panel-kpi-detail {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.25;
    margin-top: 0.35rem;
}

.panel-section {
    background: #fff;
    border: 1px solid var(--ruta-line);
    border-radius: 8px;
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.045);
    padding: 1rem;
}

.panel-section-head {
    align-items: flex-start;
    border-bottom: 1px solid var(--ruta-line);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
}

.panel-section-head h2 {
    color: #102c23;
    font-size: 1.02rem;
    font-weight: 800;
    margin: 0;
}

.panel-section-head p {
    color: #6b7786;
    font-size: 0.86rem;
    margin: 0.15rem 0 0;
}

.panel-chip {
    background: #f5f8fb;
    border: 1px solid #dae6f2;
    border-radius: 999px;
    color: #36546f;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    white-space: nowrap;
}

.panel-toll-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-toll {
    background: #fff;
    border: 1px solid #dde7f1;
    border-radius: 8px;
    padding: 0.85rem;
}

.panel-toll-title {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.panel-toll-title span {
    color: #21342d;
    font-size: 0.92rem;
    font-weight: 800;
}

.panel-toll-title strong {
    color: #102c23;
    font-size: 1.25rem;
    line-height: 1;
}

.panel-progress {
    background: #edf2f7;
    border-radius: 999px;
    height: 0.48rem;
    margin: 0.75rem 0;
    overflow: hidden;
}

.panel-progress span {
    background: #1f5da8;
    border-radius: inherit;
    display: block;
    height: 100%;
}

.panel-toll.tone-green .panel-progress span {
    background: #1f8f5f;
}

.panel-toll.tone-amber .panel-progress span {
    background: #d68a10;
}

.panel-toll.tone-rose .panel-progress span {
    background: #c2415d;
}

.panel-toll-metrics {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-toll-metrics span {
    background: #f8fafc;
    border: 1px solid #e6edf4;
    border-radius: 6px;
    color: #4b5f70;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.45rem;
}

.panel-focus-list,
.panel-module-list,
.panel-alert-list {
    display: grid;
    gap: 0.65rem;
}

.panel-focus-item,
.panel-module-row,
.panel-alert-item {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e6edf4;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
}

.panel-focus-icon {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe8f4;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 2.25rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

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

.panel-focus-item strong {
    color: #102c23;
    font-size: 0.92rem;
}

.panel-focus-item span {
    color: #627387;
    font-size: 0.82rem;
}

.panel-module-order {
    align-items: center;
    background: #102c23;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 2.4rem;
    font-weight: 800;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
}

.panel-module-main {
    min-width: 0;
}

.panel-module-main strong,
.panel-module-main span {
    display: block;
}

.panel-module-main strong {
    color: #102c23;
    font-size: 0.9rem;
}

.panel-module-main span {
    color: #66788a;
    font-size: 0.8rem;
}

.panel-module-total {
    color: #102c23;
    font-size: 1.1rem;
    font-weight: 850;
    margin-left: auto;
}

.panel-alert-item {
    justify-content: space-between;
}

.panel-alert-item span {
    color: #4b5f70;
    font-weight: 700;
}

.panel-alert-item strong {
    background: #fff4e5;
    border: 1px solid #f4d3a1;
    border-radius: 999px;
    color: #8a4d0b;
    min-width: 2.5rem;
    padding: 0.2rem 0.55rem;
    text-align: center;
}

.panel-state-toolbar {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e6edf4;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    padding: 0.75rem;
}

.panel-state-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.panel-state-tabs a {
    background: #f8fafc;
    border: 1px solid #dfe8f4;
    border-radius: 8px;
    color: #52657d;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 0.42rem 0.75rem;
    text-decoration: none;
}

.panel-state-tabs a.is-active {
    background: #102c23;
    border-color: #102c23;
    color: #fff;
}

.panel-source-tabs {
    background: #fff;
    border: 1px solid var(--ruta-line);
    border-radius: 8px;
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.045);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.45rem;
}

.panel-source-tabs a {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-height: 64px;
}

.panel-source-tabs a span {
    font-size: 0.92rem;
}

.panel-source-tabs a small {
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
    opacity: 0.72;
}

.panel-state-toolbar label {
    color: #52657d;
    font-size: 0.82rem;
    font-weight: 800;
    margin: 0;
}

.panel-state-toolbar .form-select {
    max-width: 340px;
}

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

.panel-state-item {
    background: #fff;
    border: 1px solid #dde7f1;
    border-radius: 8px;
    padding: 0.85rem;
}

.panel-state-head {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.panel-state-head strong,
.panel-state-head span {
    display: block;
}

.panel-state-head strong {
    color: #102c23;
    font-size: 0.92rem;
    font-weight: 800;
}

.panel-state-head span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    margin-top: 0.15rem;
    text-transform: uppercase;
}

.panel-state-total {
    color: #102c23;
    font-size: 1.4rem;
    font-weight: 850;
    line-height: 1;
}

.panel-state-share {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
}

.panel-state-item.tone-green .panel-progress span {
    background: #1f8f5f;
}

.panel-state-item.tone-amber .panel-progress span {
    background: #d68a10;
}

.panel-state-item.tone-rose .panel-progress span {
    background: #c2415d;
}

.panel-empty {
    background: #f8fafc;
    border: 1px dashed #cfdbe8;
    border-radius: 8px;
    color: #64748b;
    padding: 1rem;
    text-align: center;
}

.expediente-header {
    align-items: center;
    background: #fff;
    border: 1px solid var(--ruta-line);
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.85rem rgba(15, 23, 42, 0.04);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.expediente-view-hero {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--ruta-line);
    border-radius: 8px;
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.05);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
}

.expediente-view-title h1 {
    color: #07172f;
    font-size: 1.5rem;
    font-weight: 850;
    margin: 0.15rem 0 0.55rem;
}

.expediente-view-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.expediente-view-badges span {
    background: #f8fafc;
    border: 1px solid #d8e5f3;
    border-radius: 999px;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 750;
    padding: 0.34rem 0.65rem;
}

.expediente-view-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.expediente-section {
    margin-bottom: 1rem;
}

.expediente-section .card-header {
    padding-bottom: 0.65rem;
    padding-top: 0.65rem;
}

.expediente-section .card-body,
.expediente-summary-card .card-body {
    padding: 0.85rem 1rem;
}

.expediente-summary-card .card-header {
    padding-bottom: 0.65rem;
    padding-top: 0.65rem;
}

.expediente-side-panel {
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
    position: sticky;
    top: 0.75rem;
}

.expediente-index-nav {
    display: grid;
    gap: 0.35rem;
}

.expediente-index-nav a {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 750;
    padding: 0.55rem 0.65rem;
    text-decoration: none;
}

.expediente-index-nav a:hover,
.expediente-index-nav a:focus {
    background: #eef6ff;
    border-color: #b9d8f5;
    color: var(--ruta-blue);
}

.expediente-mini-list {
    display: grid;
    gap: 0.35rem;
}

.expediente-mini-list dt {
    color: #5b6677;
    font-size: 0.72rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
}

.expediente-mini-list dd {
    border-bottom: 1px solid #edf0f2;
    font-size: 0.86rem;
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere;
    padding-bottom: 0.35rem;
}

.expediente-data-grid {
    display: grid;
    gap: 0.42rem 1.15rem;
}

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

.expediente-data-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.expediente-subtitle {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.expediente-data-item {
    border-bottom: 1px solid #edf0f2;
    min-height: 38px;
    padding-bottom: 0.35rem;
}

.expediente-data-item span {
    color: #64748b;
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 0.05rem;
    text-transform: uppercase;
}

.expediente-data-item strong {
    color: #111827;
    display: block;
    font-size: 0.86rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.expediente-field-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.expediente-field-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.expediente-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 72px;
    padding: 0.75rem;
}

.expediente-field span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.expediente-field strong {
    color: #111827;
    display: block;
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.expediente-step-track {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.expediente-step {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    display: flex;
    gap: 0.65rem;
    min-height: 82px;
    padding: 0.7rem;
}

.expediente-step-number {
    align-items: center;
    background: #eef2f7;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    flex: 0 0 2rem;
    font-size: 0.82rem;
    font-weight: 800;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.expediente-step-title {
    color: #111827;
    font-size: 0.86rem;
    font-weight: 800;
}

.expediente-step-caption {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.25;
}

.expediente-step-status {
    font-size: 0.72rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

.expediente-step.is-current {
    background: #eef6ff;
    border-color: #9cc4f1;
    box-shadow: inset 4px 0 0 var(--ruta-blue);
}

.expediente-step.is-current .expediente-step-number {
    background: var(--ruta-blue);
    color: #fff;
}

.expediente-step.is-current .expediente-step-status {
    color: #1f5da8;
}

.expediente-step.is-complete {
    background: #f0fbf5;
    border-color: #b8e2c8;
}

.expediente-step.is-complete .expediente-step-number {
    background: #198754;
    color: #fff;
}

.expediente-step.is-complete .expediente-step-status {
    color: #146c43;
}

.expediente-step.is-pending {
    opacity: 0.78;
}

.expediente-timeline {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    position: relative;
}

.expediente-timeline::before {
    background: #d8e1ec;
    content: "";
    height: 2px;
    left: 6%;
    position: absolute;
    right: 6%;
    top: 1.05rem;
}

.expediente-timeline-item {
    min-width: 0;
    position: relative;
    text-align: center;
    z-index: 1;
}

.expediente-timeline-dot {
    align-items: center;
    background: #fff;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 800;
    height: 1.95rem;
    justify-content: center;
    margin-bottom: 0.35rem;
    width: 1.95rem;
}

.expediente-timeline-title {
    color: #111827;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.15;
}

.expediente-timeline-caption {
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.2;
    margin-top: 0.15rem;
}

.expediente-timeline-status {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

.expediente-timeline-item.is-complete .expediente-timeline-dot {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.expediente-timeline-item.is-complete .expediente-timeline-status {
    color: #146c43;
}

.expediente-timeline-item.is-current .expediente-timeline-dot {
    background: var(--ruta-blue);
    border-color: var(--ruta-blue);
    box-shadow: 0 0 0 4px #e8f2ff;
    color: #fff;
}

.expediente-timeline-item.is-current .expediente-timeline-title,
.expediente-timeline-item.is-current .expediente-timeline-status {
    color: #1f5da8;
}

.expediente-timeline-item.is-pending {
    opacity: 0.82;
}

.expediente-support-grid {
    display: grid;
    gap: 0.9rem;
}

.expediente-support-card {
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
    padding: 1rem;
}

.expediente-support-card.is-highlight-success {
    border-color: #9fd7b5;
    box-shadow: inset 4px 0 0 #198754;
}

.expediente-support-card.is-highlight-warning {
    border-color: #f0c36d;
    box-shadow: inset 4px 0 0 #d39e00;
}

.expediente-support-head {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.expediente-support-head h3 {
    color: #111827;
    font-size: 0.98rem;
    margin: 0;
}

.expediente-support-meta {
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.35rem 0.75rem;
    margin-top: 0.2rem;
}

.expediente-file-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.expediente-observation-grid {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.expediente-observation-box {
    background: #fff8e6;
    border: 1px solid #f0d38a;
    border-radius: 8px;
    color: #4f3c00;
    font-size: 0.85rem;
    padding: 0.75rem;
}

.expediente-observation-box strong {
    display: block;
    margin-bottom: 0.2rem;
}

.expediente-review-panel {
    background: #fbfdff;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    margin-top: 0.9rem;
    padding: 0.85rem;
}

.expediente-info-card {
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    padding: 0.7rem;
}

.expediente-info-card h3 {
    color: #111827;
    font-size: 0.98rem;
    font-weight: 800;
    margin: 0;
}

.expediente-compact-record {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem;
}

.expediente-stage-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.expediente-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    font-size: 0.85rem;
    margin-top: 0.65rem;
    padding: 0.65rem;
}

.expediente-note strong {
    display: block;
    margin-bottom: 0.15rem;
}

.expediente-support-table {
    border: 1px solid #e2e8f0;
}

.expediente-support-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.5rem 0.65rem;
    text-transform: uppercase;
}

.expediente-support-table tbody td {
    padding: 0.45rem 0.65rem;
}

.expediente-support-table tr.is-highlight-success td {
    background: #f0fbf5;
}

.expediente-support-table tr.is-highlight-warning td {
    background: #fff8e6;
}

.expediente-documentos-table th:nth-child(1),
.expediente-documentos-table td:nth-child(1) {
    min-width: 230px;
    width: 24%;
}

.expediente-documentos-table th:nth-child(2),
.expediente-documentos-table td:nth-child(2) {
    min-width: 360px;
    width: 52%;
}

.expediente-documentos-table th:nth-child(3),
.expediente-documentos-table td:nth-child(3) {
    text-align: center;
    width: 72px;
}

.expediente-documentos-table th:nth-child(4),
.expediente-documentos-table td:nth-child(4) {
    width: 130px;
}

.validacion-paste-zone {
    background: #fff;
    border: 1px solid #c9d6e5;
    border-radius: 8px;
    color: #172239;
    cursor: text;
    font-size: 0.85rem;
    min-height: 84px;
    padding: 0.7rem 0.8rem;
}

.validacion-paste-zone:focus,
.validacion-paste-zone:hover {
    background: #f8fbff;
    border-color: var(--ruta-blue);
    outline: none;
}

.validacion-paste-placeholder {
    color: #52657d;
    display: block;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.validacion-paste-zone-ok {
    background: #edf8f2;
    border-color: #198754;
    color: #0f5132;
}

.validacion-paste-zone-disabled {
    background: #eef1f4;
    border-color: #d6dce2;
    color: #7a8492;
    cursor: not-allowed;
    opacity: 0.75;
}

.validacion-paste-zone-disabled:hover,
.validacion-paste-zone-disabled:focus {
    background: #eef1f4;
    border-color: #d6dce2;
}

.status-dependency-badge {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.28rem 0.52rem;
}

.status-dependency-internal {
    background: #fdecec;
    border-color: #f3b6b6;
    color: #8f1f1f;
}

.status-dependency-external {
    background: #eaf7ef;
    border-color: #a8dfbd;
    color: #146c43;
}

.status-dependency-caption-internal {
    color: #8f1f1f;
}

.status-dependency-caption-external {
    color: #146c43;
}

.deadline-pill {
    border: 1px solid transparent;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.32rem 0.58rem;
    white-space: nowrap;
}

.deadline-verde {
    background: #eaf7ef;
    border-color: #a8dfbd;
    color: #146c43;
}

.deadline-amarillo {
    background: #fff6d7;
    border-color: #f0d276;
    color: #7a5600;
}

.deadline-rojo {
    background: #fdecec;
    border-color: #f3b6b6;
    color: #8f1f1f;
}

.deadline-gris {
    background: #f1f3f5;
    border-color: #d7dce2;
    color: #626b75;
}

.deadline-table th {
    color: #52657d;
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.deadline-row td {
    border-left: 4px solid transparent;
}

.deadline-row-verde td:first-child {
    border-left-color: #2f9e67;
}

.deadline-row-amarillo td:first-child {
    border-left-color: #d6a900;
}

.deadline-row-rojo td:first-child {
    border-left-color: #c44747;
}

.deadline-row-gris td:first-child {
    border-left-color: #a7b0ba;
}

.benefit-search {
    background: #fff;
    border: 1px solid var(--ruta-line);
    border-radius: 8px;
    box-shadow: 0 0.25rem 0.85rem rgba(15, 23, 42, 0.04);
    padding: 1rem;
}

.benefit-search-form {
    align-items: end;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: minmax(260px, 1fr) minmax(210px, 280px) auto;
}

.benefit-search-actions {
    display: flex;
    justify-content: flex-end;
}

.benefit-search-input {
    text-transform: uppercase;
}

.benefit-search-status {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 650;
    margin-top: 0.65rem;
}

.benefit-summary {
    border-top: 1px solid #edf0f2;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
    padding-top: 1rem;
}

.benefit-summary div {
    background: #f8faf9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
}

.benefit-summary span {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.benefit-summary strong {
    color: #102c23;
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
    margin-top: 0.2rem;
}

.benefit-table th {
    color: #52657d;
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.validation-alert {
    background: #fff;
    border: 1px solid #d9e1e8;
    border-left: 5px solid #9aa7b3;
    border-radius: 8px;
    height: 100%;
    padding: 0.9rem;
}

.validation-alert-high {
    background: #fff5f5;
    border-color: #efb9b9;
    border-left-color: #c44747;
}

.validation-alert-medium {
    background: #fff9e8;
    border-color: #ead18a;
    border-left-color: #d6a900;
}

.validation-alert-low {
    background: #eef8fb;
    border-color: #b8dbe5;
    border-left-color: #25869a;
}

.validation-alert-neutral {
    background: #f7f9fb;
    border-color: #d9e1e8;
    border-left-color: #9aa7b3;
}

.support-card-optional {
    background: #fff8dc;
    border-color: #e7c765 !important;
    box-shadow: inset 4px 0 0 #d6a900;
}

.support-card-optional .form-text,
.support-card-optional .text-muted {
    color: #6f5a17 !important;
}

.support-badge-optional {
    background: #f5d76e;
    border: 1px solid #c99c00;
    color: #4f3c00;
}

.support-download-callout {
    background: #eef7ff;
    border: 1px solid #9dccf3;
    border-left: 5px solid var(--ruta-blue);
    border-radius: 8px;
    color: #17476f;
    padding: 0.75rem 0.85rem;
}

.support-download-callout .btn {
    background: #fff;
    border-color: var(--ruta-blue);
    color: var(--ruta-blue);
    font-weight: 700;
}

.support-download-callout .btn:hover,
.support-download-callout .btn:focus {
    background: var(--ruta-blue);
    color: #fff;
}

.support-condition-field {
    background: #f5f9ff;
    border: 1px solid #b8cbe2;
    border-radius: 6px;
    padding: 1rem;
}

.support-alternative-card {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.support-alternative-card.is-selected {
    border-color: #2f6da3 !important;
    box-shadow: inset 4px 0 0 #2f6da3;
}

.support-alternative-card .support-condition-panel {
    margin-top: 0.75rem;
}

.support-card-conditional {
    background: #fff8dc;
    border-color: #d8b64c !important;
    box-shadow: inset 4px 0 0 #c89900;
}

.saving-overlay {
    align-items: center;
    background: rgba(7, 23, 47, 0.58);
    bottom: 0;
    display: none;
    justify-content: center;
    left: 0;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 2000;
}

.saving-overlay.is-visible {
    display: flex;
}

.saving-overlay-box {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(18, 71, 52, 0.18);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(7, 23, 47, 0.22);
    display: grid;
    gap: 0.85rem;
    justify-items: center;
    max-width: 320px;
    padding: 1.5rem;
    text-align: center;
    width: 100%;
}

.saving-spinner {
    animation: saving-spin 0.8s linear infinite;
    border: 4px solid #d8e5f3;
    border-radius: 999px;
    border-top-color: var(--ruta-primary);
    height: 44px;
    width: 44px;
}

.saving-overlay-title {
    color: #07172f;
    font-weight: 800;
}

.saving-overlay-text {
    color: #52657d;
    font-size: 0.9rem;
}

@keyframes saving-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1199.98px) {
    .panel-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .panel-toll-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 991.98px) {
    .panel-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel-hero-actions {
        justify-content: flex-start;
    }

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

    .internal-wide-container {
        width: min(100% - 1rem, 1840px);
    }

    .internal-wide-topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .internal-topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .internal-page-title {
        left: auto;
        max-width: 100%;
        order: 2;
        position: static;
        transform: none;
        white-space: normal;
        width: 100%;
    }

    .expediente-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .expediente-view-hero,
    .expediente-view-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .expediente-data-grid-2 {
        grid-template-columns: 1fr;
    }

    .expediente-timeline {
        gap: 0.65rem;
        grid-template-columns: 1fr;
    }

    .expediente-timeline::before {
        bottom: 0.7rem;
        height: auto;
        left: 1.05rem;
        right: auto;
        top: 0.7rem;
        width: 2px;
    }

    .expediente-timeline-item {
        display: grid;
        gap: 0.1rem 0.65rem;
        grid-template-columns: 2.15rem 1fr;
        text-align: left;
    }

    .expediente-timeline-dot {
        grid-row: span 3;
        margin-bottom: 0;
    }

    .expediente-side-panel {
        max-height: none;
        overflow: visible;
        position: static;
    }

    .expediente-support-head,
    .expediente-file-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .benefit-search-form,
    .benefit-summary {
        grid-template-columns: 1fr;
    }

    .public-form-hero,
    .hero-badges {
        align-items: start;
        justify-items: start;
    }

    .public-form-hero {
        display: grid;
    }

    .form-side-card {
        position: static;
    }

    .app-shell {
        display: block;
    }

    .sidebar-collapsed .app-shell {
        display: block;
    }

    .sidebar {
        padding: 0.75rem;
    }

    .sidebar-brand {
        margin-bottom: 0.75rem;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
    }

    .sidebar-collapsed .sidebar-brand span,
    .sidebar-collapsed .sidebar-nav a span {
        display: inline;
    }

    .sidebar-collapsed .sidebar-section {
        display: inline-block;
    }

    .sidebar-collapsed .sidebar-toggle {
        display: inline-flex;
    }
}

@media (max-width: 575.98px) {
    .panel-kpi-grid,
    .panel-source-tabs,
    .panel-state-grid,
    .panel-toll-metrics {
        grid-template-columns: 1fr;
    }

    .panel-section-head {
        flex-direction: column;
    }

    .panel-kpi,
    .panel-focus-item,
    .panel-module-row,
    .panel-alert-item,
    .panel-state-head {
        align-items: flex-start;
    }
}
