:root {
    --ink: #1f2a33;
    --muted: #667684;
    --line: #d6dee5;
    --surface: #ffffff;
    --accent: #1d5f99;
    --accent-dark: #164a78;
    --success-soft: #e8f5ed;
}

html,
body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #eef2f5;
}

a,
.btn-link {
    color: var(--accent);
}

.btn {
    border-radius: 4px;
    font-weight: 700;
}

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

.btn-primary:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.18rem rgba(29, 95, 153, 0.18);
    border-color: var(--accent);
}

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

h1:focus {
    outline: none;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        linear-gradient(rgba(238, 242, 245, 0.90), rgba(238, 242, 245, 0.95)),
        url("/favicon.png") center 18% / 9rem no-repeat;
}

.login-panel {
    width: min(100%, 430px);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 18px 45px rgba(31, 42, 51, 0.16);
    padding: 1.75rem;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.brand-mark {
    width: 3.4rem;
    height: 3.4rem;
    display: grid;
    place-items: center;
    background: #24313c;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 800;
}

.brand-block h1 {
    font-size: 1.75rem;
    margin-bottom: 0.15rem;
}

.brand-block p,
.login-note {
    color: var(--muted);
    margin-bottom: 0;
}

.login-panel form {
    display: grid;
    gap: 0.8rem;
}

.login-panel label,
.form-grid label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #40515f;
}

.login-button {
    margin-top: 0.35rem;
    height: 2.55rem;
}

.login-note {
    margin-top: 1rem;
    font-size: 0.82rem;
}

.login-error {
    background: #fdecec;
    border: 1px solid #f5c2c7;
    color: #8a1f2d;
    border-radius: 4px;
    padding: 0.65rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.validation-message {
    color: #b32121;
    font-size: 0.82rem;
}

.dashboard,
.module-page {
    display: grid;
    gap: 1rem;
}

.home-background {
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 5.25rem);
    margin: -1.25rem -1.5rem -2rem;
    background: transparent;
}

.dashboard-home-shell {
    min-height: calc(100vh - 5.25rem);
    margin: -1.25rem -1.5rem -2rem;
    padding: 0.85rem;
    background: #e6f0f6;
}

.dashboard-home-frame {
    position: relative;
    min-height: calc(100vh - 6.95rem);
    overflow: hidden;
    border: 1px solid #b8cedb;
    background: #dfeef4;
}

.dashboard-home-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/fondo-multapol.png") center / cover no-repeat;
    opacity: 0.34;
    filter: grayscale(10%) saturate(58%) brightness(128%) contrast(78%);
}

.dashboard-home-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(236, 247, 251, 0.58), rgba(236, 247, 251, 0.70)),
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.26), transparent 34%);
    pointer-events: none;
}

.dashboard-home-tools {
    position: relative;
    z-index: 1;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin: 0.55rem 0 0 0.65rem;
    padding: 0.28rem 0.45rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(167, 190, 204, 0.75);
    box-shadow: 0 4px 10px rgba(59, 82, 97, 0.08);
}

.dashboard-home-tools span {
    width: 1.05rem;
    height: 1.05rem;
    border: 1px solid #a4bfce;
    border-radius: 2px;
    background:
        linear-gradient(90deg, transparent 44%, rgba(29, 95, 153, 0.8) 44% 56%, transparent 56%),
        linear-gradient(#ffffff, #d9ecf6);
}

.dashboard-home-tools span:nth-child(3n) {
    background:
        linear-gradient(#e8c84f 0 32%, transparent 32%),
        linear-gradient(90deg, transparent 44%, #0c62a8 44% 56%, transparent 56%),
        #f7fbfe;
}

.dashboard-home-watermark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: calc(100vh - 13.5rem);
    opacity: 0.42;
}

.dashboard-home-watermark img {
    width: min(28vw, 320px);
    min-width: 180px;
    height: auto;
    filter: grayscale(18%) brightness(112%);
}

.dashboard-home-status {
    position: absolute;
    z-index: 1;
    left: 1.6rem;
    right: 1.6rem;
    bottom: 1.2rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.45rem 0.65rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 6px 18px rgba(48, 74, 91, 0.12);
}

.dashboard-home-status div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2rem;
    padding: 0.2rem 0.65rem;
    border: 1px solid #bfd0dc;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.72);
}

.dashboard-home-status span {
    color: #536a7d;
}

.dashboard-home-status strong {
    color: #001a35;
    font-size: 1.05rem;
}

.multa-login-shell {
    background:
        linear-gradient(rgba(10, 24, 38, 0.74), rgba(10, 24, 38, 0.82)),
        url("/fondo-multapol.png") center / cover no-repeat;
}

.login-fixed-background {
    background:
        linear-gradient(rgba(238, 246, 252, 0.74), rgba(238, 246, 252, 0.82)),
        url("/fondo-multapol.png");
    background-size: cover;
    background-position: center;
    filter: saturate(45%) contrast(70%) brightness(118%);
}

.login-fixed-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.34);
    pointer-events: none;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.eyebrow {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.page-heading h1 {
    font-size: 1.65rem;
    line-height: 1.15;
    margin-bottom: 0;
}

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

.metric-card,
.work-surface,
.record-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(31, 42, 51, 0.06);
}

.workflow-form-surface {
    display: grid;
    gap: 1rem;
}

.workflow-form-toolbar {
    align-items: center;
    justify-content: flex-start;
    padding: 0.65rem;
    border: 1px solid #d6e1ea;
    border-radius: 4px;
    background: #eef6fb;
}

.workflow-form-toolbar .btn {
    min-height: 2.35rem;
}

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

.workflow-form-grid label {
    display: grid;
    gap: 0.35rem;
    color: #233848;
    font-size: 0.84rem;
    font-weight: 800;
}

.workflow-form-grid .wide {
    grid-column: span 2;
}

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

.workflow-check {
    align-content: end;
}

.workflow-check input {
    width: 1.2rem;
    height: 1.2rem;
}

.workflow-notes {
    min-height: 9rem;
    resize: vertical;
}

.workflow-color-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.1rem;
    gap: 0.35rem;
}

.workflow-color-field input[type="color"] {
    width: 3.1rem;
    min-height: 2.35rem;
    padding: 0.1rem;
    border: 1px solid #cbd5dd;
    border-radius: 4px;
    background: #ffffff;
}

.workflow-audit {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    color: #526678;
    font-size: 0.82rem;
}

.workflow-grid tbody tr td {
    background-color: inherit;
}

.workflow-grid tbody tr {
    border-left: 0.35rem solid var(--row-reference-color, transparent);
}

.workflow-grid tbody tr:hover td {
    background-color: color-mix(in srgb, var(--row-reference-color, #eef6fc) 34%, #ffffff);
}

.workflow-grid tbody tr.selected td {
    background-color: color-mix(in srgb, var(--row-reference-color, #dceeff) 45%, #dceeff);
}

.metric-card {
    padding: 1rem;
    display: grid;
    gap: 0.25rem;
}

.metric-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.metric-card strong {
    font-size: 1.8rem;
}

.work-surface,
.record-card {
    padding: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

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

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

.activity-list {
    display: grid;
    gap: 0.55rem;
}

.activity-list div {
    display: grid;
    grid-template-columns: 9rem 1fr 7rem;
    gap: 1rem;
    align-items: center;
    padding: 0.65rem 0;
    border-top: 1px solid #edf1f4;
}

.activity-list em {
    justify-self: end;
    color: #2f6f48;
    background: var(--success-soft);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-style: normal;
    font-size: 0.8rem;
}

.button-row,
.filter-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-row {
    margin-bottom: 0.85rem;
}

.filter-row .form-control {
    min-width: 260px;
    flex: 1;
}

.filter-row .form-select {
    width: 210px;
}

.split-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 1rem;
    align-items: start;
}

.data-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-grid th {
    text-align: left;
    background: #f0f4f7;
    color: #40515f;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.data-grid th,
.data-grid td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #e6ecef;
    vertical-align: middle;
}

.data-grid tbody tr {
    cursor: pointer;
}

.data-grid tbody tr:hover,
.data-grid tbody tr.selected {
    background: #eef6fc;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    border-radius: 999px;
    background: #edf4fa;
    color: #1d5f99;
    padding: 0 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.record-card {
    position: sticky;
    top: 4.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-grid .wide,
.record-actions {
    grid-column: 1 / -1;
}

.form-grid textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.empty-state,
.placeholder-module p {
    color: var(--muted);
}

.placeholder-module {
    min-height: 14rem;
}

.grid-page {
    gap: 0.75rem;
    height: calc(100vh - 5.8rem);
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

.grid-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.grid-tool {
    min-height: 2.25rem;
    padding: 0 0.7rem;
    border: 1px solid #aebdca;
    border-radius: 4px;
    color: #17212b;
    background: linear-gradient(#ffffff, #dfe8ef);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-size: 0.78rem;
    font-weight: 800;
}

.grid-tool:hover {
    background: linear-gradient(#ffffff, #cfe0ec);
    border-color: #7f9bae;
}

.tool-new:hover,
.tool-new:focus-visible,
.tool-filter:hover,
.tool-filter:focus-visible,
.tool-search:hover,
.tool-search:focus-visible,
.tool-clear:hover,
.tool-clear:focus-visible,
.tool-close:hover,
.tool-close:focus-visible {
    color: #111827;
}

.tool-new {
    color: #ffffff;
    background: linear-gradient(#2d8a55, #17603c);
    border-color: #17603c;
}

.tool-filter,
.tool-search {
    color: #ffffff;
    background: linear-gradient(#2d73a9, #174a7e);
    border-color: #174a7e;
}

.tool-clear,
.tool-close {
    color: #ffffff;
    background: linear-gradient(#c94f44, #8f1c13);
    border-color: #8f1c13;
}

.tool-config,
.tool-list,
.tool-help {
    color: #20303d;
    background: linear-gradient(#fff7da, #e5c66c);
    border-color: #c7a440;
}

.grid-help,
.grid-filter-panel,
.grid-config-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(31, 42, 51, 0.06);
}

.grid-help {
    padding: 0.8rem 1rem;
    color: #43576a;
    font-size: 0.9rem;
}

.grid-filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px;
    gap: 0.75rem;
    padding: 0.85rem;
}

.grid-filter-panel label,
.grid-config-panel label {
    display: grid;
    gap: 0.35rem;
    color: #40515f;
    font-size: 0.84rem;
    font-weight: 800;
}

.grid-config-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    padding: 0.85rem;
}

.grid-config-panel label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.grid-page {
    height: calc(100vh - 4.25rem);
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
}

.grid-surface {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.grid-status-row {
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.75rem;
    border-bottom: 1px solid #dce5ec;
    background: #f7fafc;
    color: #5c6d7a;
    font-size: 0.82rem;
    font-weight: 700;
}

.facilges-grid {
    font-size: 0.86rem;
}

.facilges-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-right: 1px solid #cfd8e1;
    background: linear-gradient(#edf4f8, #d9e6ee);
    color: #263846;
    white-space: nowrap;
}

.facilges-grid td {
    border-right: 1px solid #edf1f4;
}

.facilges-grid tbody tr:nth-child(even) {
    background: #fbfdfe;
}

.facilges-grid tbody tr:hover,
.facilges-grid tbody tr.selected {
    outline: 1px solid #6aa6d8;
    outline-offset: -1px;
    background: #dceeff;
}

.grid-table-wrap,
.config-table-wrap {
    width: 100%;
    overflow: auto;
    max-width: 100%;
}

.grid-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-x: scroll;
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
}

.grid-page .grid-table-wrap {
    height: auto;
}

.traffic-grid {
    table-layout: fixed;
}

.grid-surface {
    min-width: 0;
    overflow: hidden;
}

.traffic-grid th,
.traffic-grid td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grid-edit-column,
.grid-delete-column {
    width: 64px;
    min-width: 64px;
    text-align: center !important;
}

.edit-row-button,
.delete-row-button {
    width: 2rem;
    height: 1.85rem;
    overflow: hidden;
    border: 1px solid #9ab1c3;
    border-radius: 4px;
    background: #fff7da;
    color: transparent;
    position: relative;
}

.edit-row-button::before,
.delete-row-button::before {
    content: "";
    position: absolute;
    inset: 0;
}

.edit-row-button::before {
    background: #174a7e;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 17.25V20h2.75L17.8 8.95l-2.75-2.75L4 17.25Zm15.9-10.4a1 1 0 0 0 0-1.42l-1.33-1.33a1 1 0 0 0-1.42 0l-1.04 1.04 2.75 2.75 1.04-1.04Z'/%3E%3C/svg%3E") center / 1.15rem 1.15rem no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 17.25V20h2.75L17.8 8.95l-2.75-2.75L4 17.25Zm15.9-10.4a1 1 0 0 0 0-1.42l-1.33-1.33a1 1 0 0 0-1.42 0l-1.04 1.04 2.75 2.75 1.04-1.04Z'/%3E%3C/svg%3E") center / 1.15rem 1.15rem no-repeat;
}

.delete-row-button {
    border-color: #d9a8a8;
    background: #fff1f1;
}

.delete-row-button::before {
    background: #a61f1f;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3h6l1 2h4v2H4V5h4l1-2Zm-2 6h10l-.7 11.2A2 2 0 0 1 14.3 22H9.7a2 2 0 0 1-2-1.8L7 9Zm3 2v8h2v-8h-2Zm4 0v8h2v-8h-2Z'/%3E%3C/svg%3E") center / 1.12rem 1.12rem no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3h6l1 2h4v2H4V5h4l1-2Zm-2 6h10l-.7 11.2A2 2 0 0 1 14.3 22H9.7a2 2 0 0 1-2-1.8L7 9Zm3 2v8h2v-8h-2Zm4 0v8h2v-8h-2Z'/%3E%3C/svg%3E") center / 1.12rem 1.12rem no-repeat;
}

.grid-pager {
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-top: 1px solid #dce5ec;
    background: #f7fafc;
}

.grid-pager button {
    min-height: 2rem;
    border: 1px solid #aebdca;
    border-radius: 4px;
    background: linear-gradient(#ffffff, #dfe8ef);
    font-size: 0.78rem;
    font-weight: 800;
}

.grid-loading {
    padding: 2rem;
}

.complaint-form-surface {
    padding: 1rem;
}

.complaint-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 0.75rem;
}

.complaint-form-grid label {
    display: grid;
    gap: 0.35rem;
    color: #40515f;
    font-size: 0.82rem;
    font-weight: 800;
}

.complaint-form-grid label.wide {
    grid-column: span 2;
}

.complaint-form-grid textarea {
    min-height: 3rem;
    resize: vertical;
}

.grid-config-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(9, 22, 35, 0.5);
}

.grid-config-dialog {
    width: min(1420px, 96vw);
    height: min(880px, 90vh);
    max-height: 90vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    background: #ffffff;
    border: 1px solid #b9c7d3;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    padding: 1rem;
}

.config-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.config-font-panel {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 90px minmax(180px, 1fr);
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #dce5ec;
    border-radius: 6px;
    background: #f7fafc;
}

.config-font-panel label {
    display: grid;
    gap: 0.35rem;
    color: #40515f;
    font-size: 0.84rem;
    font-weight: 800;
}

.font-preview {
    min-height: 2.4rem;
    display: grid;
    place-items: center;
    border: 1px solid #cbd7e1;
    border-radius: 4px;
    background: #ffffff;
    color: #17212b;
}

.config-table-wrap {
    border: 1px solid #dce5ec;
    min-height: 0;
}

.config-grid th,
.config-grid td {
    white-space: nowrap;
    padding: 0.4rem 0.55rem;
}

.config-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.config-check-cell {
    text-align: center;
}

.config-input {
    min-width: 160px;
}

.config-number {
    width: 90px;
}

.config-toolbar-bottom {
    justify-content: space-between;
    margin: 0.85rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid #dce5ec;
}

.facilges-filter-dialog {
    width: min(820px, calc(100vw - 2rem));
    max-height: 90vh;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #b9c7d3;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    padding: 1rem;
}

.app-message-dialog {
    width: min(460px, calc(100vw - 2rem));
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 1.1rem;
    border: 1px solid #b9c7d3;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    color: #17212b;
}

.app-message-dialog h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 800;
}

.app-message-dialog p {
    margin: 0;
    color: #40515f;
    font-size: 0.92rem;
}

.app-message-icon {
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.app-message-icon.danger {
    background: #fde7e7;
    color: #a61f1f;
    border: 1px solid #efb8b8;
}

.app-message-icon.success {
    background: #e8f5ed;
    color: #17603c;
    border: 1px solid #9bd0ad;
}

.app-message-icon.neutral {
    background: #e8f2fb;
    color: #0d3154;
    border: 1px solid #9ab1c3;
}

.app-message-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    padding-top: 0.85rem;
}

.filter-dialog-head,
.filter-dialog-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.55fr) minmax(160px, 1fr) minmax(120px, 0.8fr) minmax(110px, 0.7fr);
    gap: 0.7rem;
    align-items: center;
}

.filter-dialog-head {
    margin-top: 0.6rem;
    padding: 0 0.25rem 0.35rem;
    color: #334858;
    font-size: 0.82rem;
    font-weight: 800;
}

.filter-dialog-rows {
    display: grid;
    gap: 0.55rem;
    min-height: 0;
    overflow: auto;
}

.filter-dialog-row .form-select,
.filter-dialog-row .form-control {
    min-height: 2.2rem;
    font-size: 0.86rem;
}

.login-checks {
    display: grid;
    gap: 0.45rem;
}

.login-checks label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #263846;
    font-size: 0.84rem;
    font-weight: 700;
}

.login-checks a {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 800;
}

.print-listing {
    display: none;
}

.print-listing-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
    color: #0f172a;
    font-size: 7pt;
}

.print-listing-header strong {
    font-size: 8pt;
    font-weight: 700;
    text-align: center;
}

.print-listing-header span:last-child {
    text-align: right;
}

.print-listing-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: #0f172a;
    font-size: 6.5pt;
}

.print-listing-grid th,
.print-listing-grid td {
    border: 1px solid #cbd5e1;
    padding: 0.1rem 0.16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.print-listing-grid th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.print-listing-grid tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.print-listing-footer {
    display: none;
}

.templates-page {
    height: calc(100vh - 3.4rem);
    margin: -1.25rem -1.5rem -2rem;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    background: #dfe9f3;
    color: #001a35;
}

.templates-titlebar {
    min-height: 4.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid #b6c7d8;
    background: #eef4fb;
}

.templates-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.templates-title h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 900;
}

.template-title-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: linear-gradient(#ffffff, #d8e3ec);
    border: 1px solid #9db0c0;
    position: relative;
}

.template-title-icon::before {
    content: "";
    position: absolute;
    inset: 0.35rem;
    background: #7b8792;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6V2Zm8 1.5V8h4.5L14 3.5ZM8 11h9v1.5H8V11Zm0 4h9v1.5H8V15Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v15H6V2Zm8 1.5V8h4.5L14 3.5ZM8 11h9v1.5H8V11Zm0 4h9v1.5H8V15Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

.template-action {
    min-height: 1.95rem;
    padding: 0 0.9rem;
    border: 1px solid #8aa5bc;
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
}

.template-action:hover,
.template-action:focus-visible {
    color: #111827;
    background: linear-gradient(#ffffff, #d8e7f2) !important;
}

.action-new { background: #54afe3; }
.action-open { background: #f28a2e; }
.action-save { background: #1fac5a; }
.action-preview { background: #743ddd; }
.action-delete { background: #e87670; }
.action-list { background: #ee8429; }
.action-close { background: #dc1f26; }
.action-help { background: #285bd7; min-width: 2.25rem; }

.template-message {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #c5d4e2;
    background: #fff8d7;
    color: #384b5a;
    font-weight: 700;
}

.template-editor-shell {
    min-height: 0;
    overflow: hidden;
    display: block;
}

.template-action-cell {
    width: 42px;
    min-width: 42px;
    text-align: center !important;
}

.template-workspace {
    min-width: 0;
    min-height: 0;
    display: grid;
    height: 100%;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.template-meta {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(360px, 1fr);
    gap: 1.4rem;
    align-items: end;
    padding: 1rem 1.4rem;
    background: #f5f8fb;
    border-bottom: 1px solid #c4d2df;
}

.template-meta label,
.template-formatbar label {
    display: grid;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.template-formatbar {
    min-height: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-bottom: 1px solid #c4d2df;
    background: #eaf2fb;
}

.compact-select {
    min-width: 7.5rem;
    min-height: 1.8rem;
    padding-block: 0.15rem;
}

.compact-number {
    width: 7.2rem;
    min-height: 1.8rem;
    padding-block: 0.15rem;
}

.header-footer-number {
    width: 4.6rem;
}

.format-button,
.image-input-button {
    min-height: 1.95rem;
    padding: 0 0.65rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid #9ab1c3;
    border-radius: 4px;
    background: linear-gradient(#ffffff, #dbe8f2);
    color: #0d3154;
    font-size: 0.78rem;
    font-weight: 900;
}

.format-button.strong { font-weight: 900; }
.format-button.italic { font-style: italic; }
.format-button.underline { text-decoration: underline; }

.align-button {
    width: 2.25rem;
    padding-inline: 0;
}

.align-icon {
    display: block;
    width: 1.15rem;
    height: 0.95rem;
    background:
        linear-gradient(#0d3154, #0d3154) left 0 top 0 / var(--line-1, 100%) 2px no-repeat,
        linear-gradient(#0d3154, #0d3154) left var(--line-left-2, 0) top 5px / var(--line-2, 72%) 2px no-repeat,
        linear-gradient(#0d3154, #0d3154) left 0 bottom 0 / var(--line-3, 100%) 2px no-repeat;
}

.align-left-icon {
    --line-1: 100%;
    --line-2: 68%;
    --line-3: 86%;
}

.align-center-icon {
    --line-1: 100%;
    --line-2: 68%;
    --line-3: 86%;
    --line-left-2: 16%;
}

.align-right-icon {
    --line-1: 100%;
    --line-2: 68%;
    --line-3: 86%;
    background-position:
        right 0 top 0,
        right 0 top 5px,
        right 0 bottom 0;
}

.align-justify-icon {
    --line-1: 100%;
    --line-2: 100%;
    --line-3: 100%;
}

.merge-code-button {
    width: 2.25rem;
    padding-inline: 0;
}

.barcode-icon,
.qr-icon,
.table-icon {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
}

.barcode-icon {
    background:
        linear-gradient(90deg,
            #0d3154 0 10%,
            transparent 10% 18%,
            #0d3154 18% 25%,
            transparent 25% 34%,
            #0d3154 34% 43%,
            transparent 43% 49%,
            #0d3154 49% 53%,
            transparent 53% 62%,
            #0d3154 62% 74%,
            transparent 74% 82%,
            #0d3154 82% 88%,
            transparent 88% 100%);
}

.qr-icon {
    border: 2px solid #0d3154;
    background:
        linear-gradient(#0d3154, #0d3154) 3px 3px / 4px 4px no-repeat,
        linear-gradient(#0d3154, #0d3154) calc(100% - 3px) 3px / 4px 4px no-repeat,
        linear-gradient(#0d3154, #0d3154) 3px calc(100% - 3px) / 4px 4px no-repeat,
        repeating-linear-gradient(90deg, transparent 0 3px, #0d3154 3px 5px);
}

.table-icon {
    border: 2px solid #0d3154;
    background:
        linear-gradient(#0d3154, #0d3154) 0 33% / 100% 1px no-repeat,
        linear-gradient(#0d3154, #0d3154) 0 66% / 100% 1px no-repeat,
        linear-gradient(#0d3154, #0d3154) 33% 0 / 1px 100% no-repeat,
        linear-gradient(#0d3154, #0d3154) 66% 0 / 1px 100% no-repeat;
}

.table-tool-button {
    padding-inline: 0.5rem;
}

.table-color-button {
    min-height: 1.95rem;
    padding: 0 0.65rem;
    display: inline-grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid #9ab1c3;
    border-radius: 4px;
    background: var(--selected-color, #fff2cc);
    color: var(--selected-color-text, #001a35);
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}

.table-color-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.template-merge-code {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

.template-edit-table {
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0.35rem 0;
    min-width: 120px;
}

.template-edit-table td,
.template-edit-table th {
    min-width: 44px;
    height: 1.6rem;
    padding: 0.25rem 0.35rem;
    border: 1px solid #526577;
    vertical-align: top;
}

.template-edit-table .template-table-cell-selected {
    outline: 2px solid #1d5f99;
    outline-offset: -2px;
    background-color: rgba(114, 176, 229, 0.25);
}

.image-input-button {
    position: relative;
    overflow: hidden;
    background: #5ab3e6;
    color: #001a35;
}

.image-input-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.template-body {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
}

.template-fields {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 0.75rem;
    border-right: 1px solid #b8c8d6;
    background: #f7fafc;
}

.template-fields h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 900;
}

.template-fields p {
    margin: 0 0 0.7rem;
    color: #40515f;
    font-size: 0.78rem;
}

.template-fields-list {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    align-content: start;
    gap: 0.15rem;
}

.template-fields-list button {
    min-height: 1.8rem;
    padding: 0 0.25rem;
    border: 0;
    background: transparent;
    color: #001a35;
    text-align: left;
    font-size: 0.9rem;
}

.template-fields-list button:hover {
    background: #d9ecfb;
}

.template-document-zone {
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: auto;
    padding: 2rem;
    background: #dfe9f3;
}

.template-page-canvas {
    --paper-width: 210mm;
    --paper-height: 297mm;
    --ruler-size: 7mm;
    width: calc(var(--paper-width) + var(--ruler-size));
    min-height: calc(var(--paper-height) + var(--ruler-size));
    display: grid;
    grid-template-columns: var(--ruler-size) var(--paper-width);
    grid-template-rows: var(--ruler-size) var(--paper-height);
    margin: 0 auto;
}

.template-page-canvas.paper-letter {
    --paper-width: 216mm;
    --paper-height: 279mm;
}

.template-ruler-corner {
    grid-column: 1;
    grid-row: 1;
    background: #edf4fa;
    border-right: 1px solid #aebdca;
    border-bottom: 1px solid #aebdca;
}

.template-ruler-horizontal,
.template-ruler-vertical {
    position: relative;
    background-color: #edf4fa;
}

.template-ruler-horizontal {
    grid-column: 2;
    grid-row: 1;
    height: var(--ruler-size);
    border-bottom: 1px solid #aebdca;
    background-image:
        repeating-linear-gradient(to right, #9fb4c4 0 1px, transparent 1px 1mm),
        repeating-linear-gradient(to right, transparent 0 4.8mm, #7891a4 4.8mm 5mm),
        repeating-linear-gradient(to right, transparent 0 9.7mm, #31516a 9.7mm 10mm);
}

.template-ruler-horizontal span {
    position: absolute;
    top: 1.4mm;
    color: #486176;
    font-size: 0.62rem;
    line-height: 1;
    transform: translateX(-1mm);
}

.template-ruler-vertical {
    grid-column: 1;
    grid-row: 2;
    width: var(--ruler-size);
    height: var(--paper-height);
    border-right: 1px solid #aebdca;
    background-image:
        repeating-linear-gradient(to bottom, #9fb4c4 0 1px, transparent 1px 1mm),
        repeating-linear-gradient(to bottom, transparent 0 4.8mm, #7891a4 4.8mm 5mm),
        repeating-linear-gradient(to bottom, transparent 0 9.7mm, #31516a 9.7mm 10mm);
}

.template-ruler-vertical span {
    position: absolute;
    left: 1.25mm;
    color: #486176;
    font-size: 0.62rem;
    line-height: 1;
    writing-mode: vertical-rl;
    transform: translateY(-1mm);
}

.template-paper,
.template-preview-paper {
    background: #ffffff;
    color: #17212b;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

.template-paper {
    grid-column: 2;
    grid-row: 2;
    width: var(--paper-width);
    min-height: var(--paper-height);
    box-sizing: border-box;
    display: grid;
    grid-template-rows: minmax(var(--header-height, 24mm), auto) minmax(0, 1fr) minmax(var(--footer-height, 18mm), auto);
    gap: 4mm;
}

.template-preview-paper.paper-a4,
.paper-a4:not(.template-page-canvas) {
    width: 210mm;
    min-height: 297mm;
}

.template-preview-paper.paper-letter,
.paper-letter:not(.template-page-canvas) {
    width: 216mm;
    min-height: 279mm;
}

.template-editor {
    outline: none;
    color: #17212b;
    font-size: 11pt;
}

.template-editor-region {
    outline: none;
    color: #17212b;
    font-size: 11pt;
}

.template-header-editor,
.template-footer-editor {
    border: 1px dashed #c6d2dc;
    color: #526577;
}

.template-header-editor {
    min-height: var(--header-height, 24mm);
}

.template-footer-editor {
    min-height: var(--footer-height, 18mm);
}

.template-editor {
    min-height: 165mm;
}

.template-editor-region:focus {
    outline: 2px solid rgba(29, 95, 153, 0.22);
    outline-offset: 2px;
}

.template-editor-region img.template-resizable-image {
    max-width: 100%;
    height: auto;
}

.template-editor-region img.template-image-selected {
    outline: 2px solid #1d5f99;
    outline-offset: 3px;
}

.template-editor-region img.template-image-selected::selection {
    background: transparent;
}

.template-header-editor:empty::before {
    content: "Cabecera";
    color: #8a9bb2;
}

.template-editor:empty::before {
    content: "Disene aqui la plantilla del documento";
    color: #8a9bb2;
}

.template-footer-editor:empty::before {
    content: "Pie";
    color: #8a9bb2;
}

.template-preview-paper {
    box-sizing: border-box;
    display: grid;
    grid-template-rows: minmax(var(--header-height, 24mm), auto) minmax(0, 1fr) minmax(var(--footer-height, 18mm), auto);
    gap: 4mm;
}

.template-preview-header,
.template-preview-body,
.template-preview-footer {
    color: #17212b;
    font-size: 11pt;
}

.template-preview-header,
.template-preview-footer {
    color: #526577;
}

.template-preview-dialog {
    width: min(980px, 96vw);
    max-height: 92vh;
    overflow: auto;
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #b9c7d3;
    border-radius: 6px;
    background: #e5eef7;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.template-preview-dialog header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.template-preview-dialog h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
}

.template-open-dialog {
    width: min(760px, 94vw);
    max-height: 86vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #b9c7d3;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.template-open-dialog header,
.template-open-dialog footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

.template-open-dialog header h2 {
    margin: 0 auto 0 0;
    font-size: 1.15rem;
    font-weight: 900;
}

.template-open-grid {
    min-width: 100%;
    font-size: 0.82rem;
}

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

    .complaint-form-grid label.wide {
        grid-column: auto;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 9mm;
    }

    body {
        background: #ffffff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .no-print,
    .sidebar,
    .app-toolbar,
    .grid-config-overlay {
        display: none !important;
    }

    .print-listing,
    .print-listing * {
        visibility: visible !important;
    }

    .print-listing {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        background: #ffffff !important;
    }

    .page,
    main,
    .app-content,
    .module-page,
    .work-surface {
        display: block !important;
        min-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .print-area {
        overflow: visible !important;
    }

    .grid-table-wrap {
        overflow: visible !important;
    }

    .data-grid {
        font-size: 8pt !important;
    }

    .print-listing-footer {
        display: flex;
        justify-content: space-between;
        margin-top: 0.3rem;
        color: #334155;
        font-size: 6pt;
    }
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Se ha producido un error.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

@media (max-width: 900px) {
    .metric-grid,
    .split-workspace {
        grid-template-columns: 1fr;
    }

    .record-card {
        position: static;
    }

    .activity-list div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .activity-list em {
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-row .form-control,
    .filter-row .form-select {
        min-width: 100%;
        width: 100%;
    }

    .data-grid {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.multa-login-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 2.5rem);
}

.multa-login-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 27, 42, 0.30), rgba(11, 27, 42, 0.08) 45%, rgba(11, 27, 42, 0.24)),
        radial-gradient(circle at 48% 42%, rgba(255, 255, 255, 0.05), transparent 36%);
    opacity: 1;
    pointer-events: none;
}

.multa-login-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #ffffff;
}

.multa-login-panel .login-brand {
    display: grid;
    justify-items: start;
    gap: clamp(1rem, 3vw, 1.6rem);
}

.multa-login-panel .login-logo {
    width: clamp(9rem, 22vw, 13.5rem);
    height: auto;
    filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .34));
}

.multa-login-panel .eyebrow {
    margin: 0 0 .4rem;
    color: #d8b64c;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08rem;
    text-transform: uppercase;
}

.multa-login-panel h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.3rem, 7vw, 5.4rem);
    font-weight: 900;
    line-height: .95;
}

.multa-login-panel .login-copy {
    max-width: 34rem;
    margin: 1rem 0 0;
    color: rgba(255,255,255,.78);
    font-size: 1.05rem;
}

.multa-login-panel .login-form {
    display: grid;
    gap: 1rem;
    padding: clamp(1.1rem, 3vw, 1.45rem);
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0,0,0,.28);
    color: #17212b;
}

.field-group {
    display: grid;
    gap: .4rem;
}

.field-group label {
    font-size: .86rem;
    font-weight: 800;
}

.multa-login-panel .form-control {
    min-height: 3rem;
    border-radius: 6px;
}

.inline-button-field {
    position: relative;
}

.inline-button-field.password-field .form-control {
    padding-right: 3.7rem;
}

.inline-field-button {
    position: absolute;
    top: 50%;
    right: .35rem;
    display: inline-grid;
    place-items: center;
    min-height: 2.15rem;
    border: 0;
    border-radius: 6px;
    transform: translateY(-50%);
}

.password-toggle-button {
    width: 2.75rem;
    min-width: 2.75rem;
    background: #174a80;
}

.password-toggle-button::before {
    content: "";
    width: 1.18rem;
    height: .78rem;
    border: 2px solid #fff;
    border-radius: 999px / 760px;
}

.password-toggle-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: .38rem;
    height: .38rem;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.password-toggle-button.is-visible::after {
    width: 1.45rem;
    height: 2px;
    border-radius: 0;
    transform: translate(-50%, -50%) rotate(-35deg);
}

.primary-action {
    min-height: 3.1rem;
    border: 0;
    border-radius: 6px;
    color: #ffffff;
    background: #14532d;
    font-weight: 800;
}

.primary-action:hover {
    background: #0f3f22;
}

.primary-action:disabled {
    opacity: .72;
}

.multa-login-panel .login-error {
    background: #fdecec;
    border: 1px solid #f5c2c7;
    color: #8a1f2d;
    border-radius: 4px;
    padding: 0.65rem 0.75rem;
    font-size: 0.86rem;
    font-weight: 800;
}

@media (max-width: 900px) {
    .multa-login-panel {
        grid-template-columns: 1fr;
        max-width: 430px;
    }

    .multa-login-panel h1 {
        font-size: 3rem;
    }

    .multa-login-shell::after {
        opacity: 1;
    }
}

.template-table-dialog {
    min-width: 420px;
}

.table-dialog-fields {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.table-dialog-fields label {
    display: grid;
    gap: 0.25rem;
    font-weight: 800;
    color: #17324d;
}

.tool-excel {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    overflow: hidden;
    color: #0c5b27;
    background: linear-gradient(#f3fff6, #bfe9cc);
    border-color: #2d8c4b;
}

.tool-excel:hover {
    color: #000;
}

.tool-excel input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.excel-icon {
    display: inline-grid;
    place-items: center;
    width: 1rem;
    height: 1rem;
    color: #fff;
    background: #16823d;
    border: 1px solid #0f642e;
    border-radius: 2px;
    font-size: .62rem;
    font-weight: 900;
}

.excel-icon::before {
    content: "X";
}

.ordinance-direct-filters {
    grid-template-columns: minmax(260px, 2fr) repeat(6, minmax(130px, 1fr));
}

.ordinance-form-surface {
    display: grid;
    gap: 1rem;
}

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

.ordinance-form-grid label {
    display: grid;
    gap: .35rem;
    margin: 0;
    color: #203746;
    font-size: .84rem;
    font-weight: 800;
}

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

.ordinance-legal-text {
    min-height: 12rem;
    resize: vertical;
}

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