
.header-logo {
    max-height: 72px;
    width: auto;
    display: block;
    object-fit: contain;
}

:root {
    --bg: #f3f3f5;
    --surface: #ffffff;
    --line: #e3e4ea;
    --line-strong: #cfd1dc;
    --text: #2a3150;
    --muted: #727991;
    --navy: #1f2753;
    --navy-2: #2a3468;
    --badge-bg: #f7ebdd;
    --badge-text: #8c6b40;
    --danger: #cf4242;
    --shadow: 0 8px 28px rgba(28, 36, 74, 0.06);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1240px, calc(100% - 16px));
    margin: 0 auto;
}

.topbar {
    background: #fafafa;
    border-bottom: 1px solid var(--line-strong);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0 18px;
}

h1 {
    margin: 0 0 6px;
    font-size: 34px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.subhead {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.brand-box {
    flex: 0 0 auto;
    width: 136px;
    padding: 16px 12px;
    border-radius: 12px;
    background: var(--navy);
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow);
}

.brand-box__title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.brand-box__subtitle {
    font-size: 10px;
    letter-spacing: 0.08em;
    margin-top: 6px;
}

.main-layout {
    padding: 24px 0 44px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.btn {
    border: 1px solid transparent;
    border-radius: 10px;
    height: 44px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 8px 22px rgba(31, 39, 83, 0.18);
}

.btn-primary:hover {
    background: var(--navy-2);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--line-strong);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #efddc5;
}

.badge-main {
    margin-left: auto;
}

.stepper-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 18px;
    overflow-x: auto;
    overflow-y: hidden;
}

.stepper {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: max-content;
    min-width: 100%;
}

.step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    flex: 0 0 108px;
    min-width: 108px;
}

.step__circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: #eef0f5;
    color: var(--muted);
    border: 1px solid var(--line);
    transition: all 0.2s ease;
}

.step__label {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    min-height: 32px;
}

.step__line {
    flex: 1 1 32px;
    min-width: 20px;
    height: 2px;
    background: var(--line-strong);
    border-radius: 999px;
    margin-top: 19px;
}

.step.blue-circle .step__circle {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(31, 39, 83, 0.08);
}

.step.blue-circle .step__label {
    color: var(--text);
}

.step.active .step__label,
.step.complete .step__label {
    color: var(--text);
}

.accordion-section {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    background: #fff;
    color: var(--text);
    padding: 18px 20px;
    cursor: pointer;
}

.accordion-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-badge {
    height: 28px;
    font-size: 12px;
}

.accordion-icon {
    margin-left: auto;
    font-size: 22px;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.accordion-content {
    border-top: 1px solid var(--line);
    padding: 20px;
    display: none;
}

.accordion-section.open .accordion-content {
    display: block;
}

.accordion-section.open .accordion-icon {
    transform: rotate(0deg);
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.col-span-2 {
    grid-column: span 2;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 14px;
    font-weight: 700;
}

.required-star {
    color: var(--danger);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    min-height: 46px;
    padding: 12px 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

#localidad {
    background: #f8f8fb;
}

.readonly-field {
    background: #f6f7fb;
    color: var(--text);
    cursor: default;
    pointer-events: none;
}

.inline-check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
}

.consent-check-label {
    font-weight: 600;
}

.consent-check-label__text {
    color: #a7acbb;
    transition: color 0.18s ease;
}

.consent-check-label.is-invalid-note .consent-check-label__text,
.consent-check-label.is-invalid-note .required-star {
    color: var(--danger);
}

.inline-check-label input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--navy);
}


input::placeholder,
textarea::placeholder {
    color: #a5a9b9;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(31, 39, 83, 0.09);
}

.is-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(207, 66, 66, 0.08) !important;
    background: #fff9f9;
}

.service-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.service-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--navy-2);
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

.service-tab.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

.service-tab.is-disabled,
.service-tab:disabled {
    color: #aeb4c6;
    cursor: not-allowed;
    opacity: .85;
}

.service-panels {
    margin-top: 18px;
}

.service-panel {
    display: none;
}

.service-panel.active {
    display: block;
}

.service-subtitle {
    margin: 8px 0 14px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.contact-calls-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.call-entry {
    padding-bottom: 2px;
}

.call-entry.is-hidden {
    display: none;
}

.call-entry__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.call-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: -2px;
}

.btn-call-add,
.btn-call-remove {
    min-height: 40px;
    padding: 0 14px;
}

.btn-call-add.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.legal-time-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    min-height: 46px;
}

.switch {
    position: relative;
    width: 50px;
    height: 28px;
    display: inline-block;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
    min-height: 0;
    padding: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: #d5d9e4;
    border-radius: 999px;
    transition: 0.2s ease;
}

.slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.2s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.switch input:checked + .slider {
    background: var(--navy);
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
}

.checkbox-stack {
    justify-content: center;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
}

.checkbox-item input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.section-divider {
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 18px;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    max-width: 380px;
    background: var(--navy);
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(31, 39, 83, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: all 0.2s ease;
    font-weight: 600;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 980px) {
    .topbar__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .badge-main {
        margin-left: 0;
    }

    .stepper-card {
        padding: 16px 14px;
    }

    .stepper {
        gap: 10px;
    }

    .step {
        flex-basis: 92px;
        min-width: 92px;
    }

    .step__label {
        font-size: 12px;
    }

    .form-grid.cols-2,
    .form-grid.cols-3,
    .time-grid {
        grid-template-columns: 1fr;
    }

    .col-span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 760px) {
    .call-entry__head {
        flex-direction: column;
        align-items: flex-start;
    }

    h1 {
        font-size: 28px;
    }

    .accordion-title {
        font-size: 18px;
    }

    .stepper {
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .step__line {
        display: none;
    }

    .step {
        min-width: 96px;
        flex-basis: 96px;
        scroll-snap-align: start;
    }

    .hero-actions {
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}

.bi{
    padding-right: 5px;
}

.page-tools {
    margin-bottom: 14px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    color: var(--navy-2);
}

.record-summary-card,
.search-card,
.search-hero-card,
.results-card,
.search-empty-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.record-summary-card {
    padding: 18px 20px;
    margin-bottom: 18px;
}

.record-summary-card__head,
.search-hero-card,
.results-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.record-summary-card__head h2,
.search-hero-card__copy h2,
.results-head h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.record-summary-card__head p,
.search-hero-card__copy p,
.results-head p {
    margin: 0;
    color: var(--muted);
}

.record-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.summary-label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.search-hero-card {
    padding: 20px;
    margin-bottom: 18px;
}

.search-card {
    padding: 20px;
    margin-bottom: 18px;
}

.search-mode-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.search-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.search-mode-tab:hover {
    transform: translateY(-1px);
    color: var(--navy);
}

.search-mode-tab.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    box-shadow: 0 8px 22px rgba(31, 39, 83, 0.18);
}

.record-summary-grid--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-span-2 {
    grid-column: span 2;
}

.search-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

.btn-linkish {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.results-card {
    padding: 18px 16px;
}

.results-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
}

.results-scroll-top {
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 14px;
    margin-bottom: 12px;
    height: 16px;
}

.results-scroll-top.is-visible {
    display: block;
}

.results-scroll-top__inner {
    height: 1px;
}

.results-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    margin-top: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.results-table-wrap::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
    table-layout: fixed;
}

.results-table--siniestros {
    min-width: 1060px;
}

.results-table--unidades {
    min-width: 1420px;
}

.results-table th,
.results-table td {
    padding: 10px 6px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 12.5px;
    line-height: 1.35;
}

.results-table th {
    position: sticky;
    top: 0;
    background: var(--surface);
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    z-index: 1;
}

.results-table .allow-wrap,
.results-table .allow-wrap-wide {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.results-table .allow-wrap,
.results-table .allow-wrap-wide {
    min-width: 0;
}

.results-table .col-code {
    width: 84px;
}

.results-table .col-short {
    width: 92px;
}

.results-table .col-date {
    width: 96px;
}

.results-table .col-series {
    width: 136px;
}

.results-table .col-name {
    width: 208px;
}

.results-table .allow-wrap-wide {
    width: 220px;
}

.results-table tbody tr:hover {
    background: #fafbff;
}

.results-table--siniestros th:nth-child(2),
.results-table--siniestros td:nth-child(2) {
    width: 215px;
}

.results-table--siniestros th:nth-child(3),
.results-table--siniestros td:nth-child(3) {
    width: 92px;
}

.results-table--siniestros th:nth-child(4),
.results-table--siniestros td:nth-child(4) {
    width: 98px;
}

.results-table--siniestros th:nth-child(5),
.results-table--siniestros td:nth-child(5) {
    width: 128px;
}

.results-table--siniestros th:nth-child(6),
.results-table--siniestros td:nth-child(6) {
    width: 102px;
}

.results-table--siniestros th:nth-child(7),
.results-table--siniestros td:nth-child(7) {
    width: 104px;
}

.results-table--siniestros th:nth-child(8),
.results-table--siniestros td:nth-child(8) {
    width: 82px;
}

.results-table--siniestros th:nth-child(9),
.results-table--siniestros td:nth-child(9) {
    width: 84px;
}

.results-table--siniestros th:nth-child(10),
.results-table--siniestros td:nth-child(10) {
    width: 126px;
}

.actions-col {
    width: 126px;
    min-width: 126px;
    white-space: nowrap;
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--surface);
    box-shadow: -10px 0 12px -12px rgba(31, 39, 83, 0.24);
    overflow: visible;
}

.actions-col--head {
    z-index: 3;
}

.actions-col .btn-sm-inline {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
}

.stage-badge {
    min-width: 76px;
    justify-content: center;
    text-transform: capitalize;
    white-space: nowrap;
    padding: 0 10px;
    font-size: 12px;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.pagination-link.active {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

.pagination-link.disabled {
    pointer-events: none;
    opacity: .45;
}

.btn-sm-inline {
    height: 38px;
    min-width: 100px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    font-size: 12px;
}

.search-empty-card {
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-empty-card i {
    font-size: 28px;
    color: var(--navy);
}

.search-empty-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.search-empty-card p {
    margin: 0;
    color: var(--muted);
}

.search-empty-card--error i {
    color: var(--danger);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

@media (max-width: 900px) {
    .record-summary-grid,
    .record-summary-grid--wide,
    .search-form-grid {
        grid-template-columns: 1fr;
    }

    .summary-span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 760px) {
    .record-summary-card__head,
    .search-hero-card,
    .results-head {
        flex-direction: column;
    }

    .search-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-actions .btn {
        width: 100%;
    }

    .record-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .results-table--siniestros {
        min-width: 1000px;
    }

    .results-table--unidades {
        min-width: 1260px;
    }

    .actions-col {
        right: 0;
    }
}

@media (max-width: 980px) {
    .results-head {
        align-items: stretch;
    }

    .results-meta {
        justify-content: flex-start;
    }

    .results-table--siniestros {
        min-width: 1020px;
    }

    .results-table--unidades {
        min-width: 1360px;
    }
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(460px, 100%);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 28px;
}

.auth-card--narrow {
    width: min(460px, 100%);
}

.auth-card__brand {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
    justify-items: start;
}

.auth-card .header-logo {
    max-height: 62px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-submit {
    width: 100%;
}

.auth-alert {
    margin-bottom: 16px;
}

.auth-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}

.portal-tools,
.page-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.inline-logout-form {
    display: inline-flex;
    margin: 0;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.portal-card-link {
    text-decoration: none;
    color: inherit;
}

.portal-card {
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 24px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.portal-card:hover {
    transform: translateY(-2px);
    border-color: var(--navy);
    box-shadow: 0 16px 36px rgba(31, 39, 83, 0.12);
}

.portal-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(31, 39, 83, 0.08);
    color: var(--navy);
    font-size: 24px;
    margin-bottom: 18px;
}

.portal-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.portal-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.user-admin-card {
    margin-bottom: 18px;
}

.user-create-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-span-full {
    grid-column: 1 / -1;
}

.permissions-box {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #fafafa;
}

.permissions-box__title {
    font-weight: 700;
    color: var(--text);
}

.permission-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
}

.permission-check input {
    width: 18px;
    height: 18px;
}

.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    min-width: 1120px;
    table-layout: fixed;
}

.users-col--username {
    width: 130px;
}

.users-col--name {
    width: var(--portal-sidebar-width);
}

.users-col--perm {
    width: 120px;
}

.users-col--lastlogin {
    width: 160px;
}

.users-col--action {
    width: 140px;
}

.users-table__th,
.users-table__cell {
    vertical-align: middle;
}

.users-table__th--center,
.users-table__cell--center,
.users-table__th--action,
.users-table__cell--action {
    text-align: center;
}

.users-table__th--lastlogin,
.users-table__cell--lastlogin {
    text-align: left;
}

.users-table__cell--name {
    padding-top: 10px;
    padding-bottom: 10px;
}

.table-inline-input {
    width: 100%;
    min-width: 190px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    padding: 0 12px;
}

.permission-check--table {
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 0;
}

.users-table td form {
    margin: 0;
}

.users-table .btn-sm-inline {
    justify-content: center;
    min-width: 108px;
}

@media (max-width: 860px) {
    .user-create-grid {
        grid-template-columns: 1fr;
    }

    .permissions-box {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Lada autocomplete */
.lada-autocomplete {
    position: relative;
}

.lada-autocomplete input {
    width: 100%;
}

.lada-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--stroke);
    border-radius: 14px;
    box-shadow: 0 18px 34px rgba(31, 39, 83, 0.14);
    max-height: 220px;
    overflow-y: auto;
    z-index: 30;
    padding: 6px;
}

.lada-suggestion {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text-main);
}

.lada-suggestion:hover,
.lada-suggestion:focus-visible,
.lada-suggestion.active {
    background: rgba(31, 39, 83, 0.08);
    outline: none;
}

.lada-suggestion strong {
    font-size: 0.98rem;
    color: var(--text-main);
}

.lada-suggestion span {
    font-size: 0.88rem;
    color: var(--text-soft);
}

/* Time fields in 24h text format */
input.time-24h {
    font-variant-numeric: tabular-nums;
}


.btn.is-disabled,
.btn[aria-disabled="true"] {
    opacity: .55;
    pointer-events: none;
}

.results-table--consulta {
    min-width: 980px;
}

.results-table--consulta th:nth-child(1),
.results-table--consulta td:nth-child(1) {
    width: 120px;
}

.results-table--consulta th:nth-child(2),
.results-table--consulta td:nth-child(2) {
    width: 84px;
}

.results-table--consulta th:nth-child(3),
.results-table--consulta td:nth-child(3) {
    width: 96px;
}

.results-table--consulta th:nth-child(4),
.results-table--consulta td:nth-child(4) {
    width: 90px;
}

.results-table--consulta th:nth-child(5),
.results-table--consulta td:nth-child(5) {
    width: 420px;
}

.results-table--consulta th:nth-child(6),
.results-table--consulta td:nth-child(6) {
    width: 170px;
}

.results-controls-form {
    justify-content: flex-start;
    margin-bottom: 14px;
}

.field-inline-compact {
    min-width: 220px;
    max-width: 260px;
}

.field-inline-compact label {
    margin-bottom: 6px;
}



.field-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.delito-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
}

.delito-builder__select {
    min-width: 0;
}

.delito-builder__add {
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow);
}

.delito-builder__add:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

.delito-builder__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.delito-chip {
    border: 1px solid rgba(31, 39, 83, 0.14);
    border-radius: 999px;
    background: #f7f8fc;
    color: var(--navy);
    min-height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.delito-chip i {
    font-size: 11px;
}

@media (max-width: 640px) {
    .delito-builder {
        grid-template-columns: 1fr;
    }

    .delito-builder__add {
        height: 44px;
    }
}

/* Portal sidebar + assigned siniestros */
.portal-shell {
    --portal-sidebar-width: clamp(240px, 20vw, 300px);
    --portal-content-max: 1080px;
    min-height: 100vh;
    overflow-x: hidden;
}

.portal-topbar-copy {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.portal-menu-btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    font-size: 22px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    flex: 0 0 auto;
    box-shadow: var(--shadow);
}

.portal-menu-btn i {
    line-height: 1;
}

.portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--portal-sidebar-width);
    max-width: calc(100vw - 32px);
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(31, 39, 83, 0.16);
    padding: 24px 20px;
    transform: translateX(-110%);
    transition: transform .22s ease;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portal-sidebar.is-open {
    transform: translateX(0);
}

.portal-sidebar__head {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-sidebar__close {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--navy);
    cursor: pointer;
}

.portal-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    background: #f7f8fc;
    border: 1px solid var(--line);
}

.portal-user__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: .04em;
}

.portal-user strong,
.portal-user span {
    display: block;
}

.portal-user span {
    color: var(--muted);
    font-size: 13px;
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
}

.portal-nav__item:hover {
    background: #f7f8fc;
    color: var(--navy);
    border-color: var(--line);
}

.portal-sidebar__footer {
    margin-top: auto;
}

.portal-logout-form,
.portal-logout-form .btn {
    width: 100%;
}

.portal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 22, 53, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 1100;
}

.portal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.portal-main {
    padding-top: 28px;
}

.portal-content-shell {
    width: 100%;
    max-width: var(--portal-content-max, 1080px);
    margin: 0 auto;
}

.assigned-card {
    margin: 8px auto 0;
}

.assigned-table-wrap .results-table {
    min-width: 920px;
}

.results-table--assigned .col-action {
    min-width: 140px;
}

.portal-shell .topbar__inner,
.portal-shell .main-layout {
    width: auto;
    max-width: none;
    margin-left: 24px;
    margin-right: 24px;
}

.portal-shell .topbar__inner {
    justify-content: space-between;
}

@media (max-width: 980px) {
    .portal-topbar-copy {
        width: 100%;
    }

    .portal-shell .topbar__inner,
    .portal-shell .main-layout {
        width: auto;
        margin-left: 12px;
        margin-right: 12px;
    }

    .portal-content-shell {
        max-width: 100%;
    }
}

/* Bitácora upload */
.upload-dropzone {
    min-height: 154px;
    border: 2px dashed #c9cede;
    border-radius: 14px;
    background: #fbfbfe;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 22px 18px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragging {
    border-color: var(--navy);
    background: #f5f7fe;
    transform: translateY(-1px);
}

.upload-dropzone input[type="file"] {
    display: none;
}

.upload-dropzone__icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(31, 39, 83, 0.08);
    color: var(--navy);
    display: grid;
    place-items: center;
    font-size: 24px;
}

.upload-dropzone strong {
    font-size: 16px;
}

.upload-dropzone span:last-child {
    color: var(--muted);
    font-size: 13px;
}

.upload-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.upload-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 8px 0 12px;
    border-radius: 999px;
    background: #f7f8fc;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.upload-file-pill__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
}

.upload-file-pill__remove {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease, color .18s ease;
}

.upload-file-pill__remove:hover {
    background: rgba(31, 39, 83, 0.08);
    color: #b42318;
}

.upload-file-pill--existing.is-removed {
    display: none;
}

/* Form helpers */
.btn-linkish.is-disabled {
    opacity: .55;
    pointer-events: none;
}

@media (min-width: 981px) {
    .portal-menu-btn,
    .portal-sidebar__close,
    .portal-overlay {
        display: none;
    }

    .portal-shell {
        padding-left: var(--portal-sidebar-width);
    }

    .portal-sidebar {
        transform: translateX(0);
    }

    .portal-shell .topbar__inner,
    .portal-shell .main-layout {
        width: min(var(--portal-content-max), calc(100vw - var(--portal-sidebar-width) - 56px));
        max-width: min(var(--portal-content-max), calc(100vw - var(--portal-sidebar-width) - 56px));
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }

    .portal-shell .topbar__inner {
        gap: 24px;
    }

    .portal-topbar-copy {
        min-width: 0;
        flex: 1 1 auto;
    }

    .portal-content-shell,
    .assigned-card {
        width: 100%;
        max-width: 100%;
    }

    .assigned-table-wrap {
        width: 100%;
    }
}


@media (max-width: 980px) {
    .portal-shell {
        padding-left: 0;
    }

    .portal-topbar-copy {
        width: 100%;
    }

    .portal-sidebar {
        transform: translateX(-110%);
    }

    .portal-sidebar.is-open {
        transform: translateX(0);
    }

    .portal-shell .topbar__inner,
    .portal-shell .main-layout {
        width: min(100%, calc(100vw - 24px));
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }

    .portal-content-shell,
    .assigned-card {
        width: 100%;
        max-width: 100%;
    }
}

.stepper-card::-webkit-scrollbar {
    height: 8px;
}

.stepper-card::-webkit-scrollbar-thumb {
    background: rgba(31, 39, 83, 0.18);
    border-radius: 999px;
}

@media (max-width: 760px) {
    .stepper-card {
        padding-bottom: 12px;
    }
}
