:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-muted: #eef3f7;
    --text: #1c2733;
    --muted: #657386;
    --line: #d8e0e8;
    --primary: #155e75;
    --primary-strong: #0e4960;
    --danger: #b42318;
    --success: #087443;
    --warning: #915930;
    --focus: #2563eb;
    --sidebar-width: 304px;
    --sidebar-collapsed-width: 92px;
    --topbar-height: 74px;
}

.back-to-top-button {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 80;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #0f766e;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease, background-color 160ms ease;
}

.back-to-top-button.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-button:hover,
.back-to-top-button:focus-visible {
    background: #115e59;
}

.back-to-top-button:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.35);
    outline-offset: 3px;
}

.back-to-top-button img {
    display: block;
    width: 24px;
    height: 24px;
    pointer-events: none;
}

@media (max-width: 640px) {
    .back-to-top-button {
        right: 14px;
        bottom: 14px;
        width: 44px;
        height: 44px;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--bg);
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    background: #102338;
    border-right: 1px solid rgba(174, 205, 226, 0.18);
    box-shadow: 12px 0 28px rgba(21, 37, 56, 0.18);
    color: #ffffff;
    transition: width 0.2s ease;
    z-index: 20;
}

.sidebar-brand {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(140, 184, 222, 0.18);
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    font-weight: 700;
}

.brand:hover,
.brand:focus {
    text-decoration: none;
}

.brand-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
    padding: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}

.brand-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.brand-text strong,
.brand-text small {
    overflow-wrap: anywhere;
    white-space: normal;
}

.brand-text small {
    color: rgba(218, 234, 248, 0.78);
    font-size: 12px;
    font-weight: 400;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 6px;
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
    padding: 14px 12px 18px;
    overflow-y: auto;
}

.sidebar-section-title {
    margin: 14px 10px 5px;
    color: rgba(232, 242, 251, 0.48);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

.sidebar-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px 10px;
    color: rgba(232, 242, 251, 0.86);
    font-weight: 700;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(143, 190, 230, 0.13);
    border-color: rgba(174, 205, 226, 0.16);
    color: #ffffff;
    text-decoration: none;
    transform: translateX(1px);
}

.sidebar-link.is-active {
    background: #ffffff;
    border-color: rgba(255, 255, 255, 0.68);
    color: #102338;
    box-shadow: 0 10px 22px rgba(3, 18, 33, 0.22);
}

.sidebar-link.is-disabled {
    color: rgba(218, 234, 248, 0.42);
    cursor: not-allowed;
}

.nav-initial {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(232, 242, 251, 0.24);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-size: 12px;
    font-weight: 800;
}

.nav-label {
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.nav-badge {
    margin-left: auto;
    border: 1px solid rgba(218, 234, 248, 0.22);
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
}

.app-content {
    min-width: 0;
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    min-height: var(--topbar-height);
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.topbar-left,
.user-area {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-left {
    flex: 1 1 auto;
}

.user-area {
    flex: 0 1 min(460px, 44vw);
    justify-content: flex-end;
}

.menu-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    gap: 4px;
    padding: 10px;
    background: var(--surface-muted);
    color: var(--text);
    border: 1px solid var(--line);
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: #dfeaf1;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    background: currentColor;
    border-radius: 999px;
}

.institution-title {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.institution-title strong,
.institution-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.institution-title strong {
    color: var(--text);
    font-size: 16px;
}

.institution-title span {
    color: var(--muted);
    font-size: 13px;
}

.user-summary {
    min-width: 0;
    max-width: 100%;
    display: grid;
    justify-items: end;
}

.user-summary strong,
.user-summary span {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: right;
    white-space: normal;
}

.user-summary strong {
    display: -webkit-box;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.user-summary span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
}

.logout-button {
    min-height: 38px;
    padding: 8px 12px;
    background: #8f2d24;
}

.logout-button:hover,
.logout-button:focus {
    background: var(--danger);
}

.public-brand {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 8px;
    padding: 9px 13px;
    color: var(--primary-strong);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.public-brand:hover,
.public-brand:focus {
    border-color: rgba(21, 94, 117, 0.32);
    color: #ffffff;
    background: var(--primary);
    text-decoration: none;
}

.topbar:has(.public-brand) {
    min-height: 82px;
    padding: 14px 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 248, 248, 0.96) 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.topbar:has(.public-brand) .institution-title {
    min-height: 64px;
    display: grid;
    grid-template-columns: 72px minmax(0, auto);
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    justify-content: start;
    padding-left: 0;
}

.public-header-logo {
    grid-row: 1 / 3;
    width: 72px;
    height: 58px;
    object-fit: contain;
    background: transparent;
}

.topbar:has(.public-brand) .institution-title strong {
    grid-column: 2;
    color: var(--primary-strong);
    font-size: 16px;
    line-height: 1.18;
}

.topbar:has(.public-brand) .institution-title span {
    grid-column: 2;
    color: #587083;
    font-size: 13px;
    font-weight: 800;
}

.topbar:not(:has(.user-area)) {
    min-height: 82px;
    justify-content: flex-start;
    padding: 14px 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 248, 248, 0.96) 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.topbar:not(:has(.user-area)) .topbar-left {
    width: 100%;
}

.topbar:not(:has(.user-area)) .institution-title {
    min-height: 64px;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-items: center;
    justify-content: start;
}

.topbar:not(:has(.user-area)) .institution-title strong,
.topbar:not(:has(.user-area)) .institution-title span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.topbar:not(:has(.user-area)) .institution-title strong {
    grid-column: 2;
    color: var(--primary-strong);
    font-size: 16px;
    line-height: 1.18;
}

.topbar:not(:has(.user-area)) .institution-title span {
    grid-column: 2;
    color: #587083;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.is-sidebar-collapsed .sidebar,
.sidebar-collapsed-initial .sidebar {
    width: var(--sidebar-collapsed-width);
}

.is-sidebar-collapsed .brand-text,
.is-sidebar-collapsed .nav-label,
.is-sidebar-collapsed .nav-badge,
.is-sidebar-collapsed .sidebar-section-title,
.sidebar-collapsed-initial .brand-text,
.sidebar-collapsed-initial .nav-label,
.sidebar-collapsed-initial .nav-badge,
.sidebar-collapsed-initial .sidebar-section-title {
    display: none;
}

.is-sidebar-collapsed .sidebar-brand,
.sidebar-collapsed-initial .sidebar-brand {
    justify-content: center;
    padding-inline: 12px;
}

.is-sidebar-collapsed .sidebar-link,
.sidebar-collapsed-initial .sidebar-link {
    justify-content: center;
    padding: 8px;
}

.is-sidebar-collapsed .sidebar-nav,
.sidebar-collapsed-initial .sidebar-nav {
    padding-inline: 14px;
}

.is-sidebar-collapsed .nav-initial,
.sidebar-collapsed-initial .nav-initial {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.inline-form {
    margin: 0;
}

.main {
    width: min(1880px, calc(100% - 36px));
    margin: 28px auto;
    flex: 1;
}

.main:has(.ops-dashboard-page) {
    width: min(1880px, calc(100% - 36px));
    margin: 22px auto 28px;
}

.main:has(.report-page) {
    width: min(1880px, calc(100% - 36px));
}

.main:has(.recomecar-analysis-page) {
    width: min(1880px, calc(100% - 36px));
}

.main:has(.auth-login-page) {
    width: min(1480px, calc(100% - 36px));
    margin: 18px auto 24px;
}

.app-footer {
    width: min(1880px, calc(100% - 36px));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-direction: column;
    flex-wrap: wrap;
    margin: 8px auto 20px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.app-footer span {
    display: block;
    width: 100%;
}

.auth-shell {
    width: 100%;
    min-width: 0;
    min-height: calc(100vh - 128px);
    display: grid;
    align-items: center;
    justify-items: center;
}

.auth-login-page {
    align-items: stretch;
}

.auth-login-layout {
    width: 100%;
    min-height: min(760px, calc(100vh - 170px));
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
    gap: 18px;
}

.auth-login-hero,
.auth-login-panel {
    min-width: 0;
    border: 1px solid rgba(21, 94, 117, 0.14);
    border-radius: 8px;
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.1);
}

.auth-login-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: space-between;
    gap: 28px;
    padding: clamp(24px, 3.2vw, 46px);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(10, 80, 96, 0.94) 0%, rgba(21, 94, 117, 0.9) 45%, rgba(7, 84, 63, 0.88) 100%),
        url("../images/logo-cadastro-emergencial-app.png") center / cover no-repeat;
}

.auth-login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: 0.42;
}

.auth-login-hero > * {
    position: relative;
    z-index: 1;
}

.auth-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-login-logo {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    padding: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.auth-login-brand div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.auth-login-brand span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-login-brand strong {
    color: #ffffff;
    font-size: clamp(20px, 2.3vw, 30px);
    line-height: 1.08;
}

.auth-login-hero-copy {
    max-width: 760px;
    display: grid;
    gap: 14px;
}

.auth-login-hero-copy .eyebrow {
    color: #d8fbf1;
}

.auth-login-hero-copy h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: 1.02;
}

.auth-login-hero-copy p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.55;
}

.auth-login-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.auth-login-highlights span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 8px 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 900;
}

.auth-panel {
    min-width: 0;
    max-width: 100%;
    width: min(460px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.08);
}

.auth-login-panel {
    width: 100%;
    display: grid;
    align-content: center;
    padding: clamp(22px, 3vw, 42px);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.auth-login-panel-header {
    margin-bottom: 26px;
}

.auth-login-app-logo {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
    background: transparent;
    box-shadow: none;
}

.auth-login-heading {
    margin-bottom: 20px;
}

.auth-login-heading h2 {
    margin-bottom: 7px;
    color: var(--text);
    font-size: clamp(25px, 2.3vw, 34px);
    line-height: 1.08;
}

.auth-login-form {
    gap: 15px;
}

.auth-login-field input {
    min-height: 52px;
    border-color: #bfd0dd;
    background: #ffffff;
    font-weight: 800;
}

.auth-login-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.password-input-shell {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.field .password-input-shell input {
    padding-right: 48px;
}

.password-toggle-button {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    cursor: pointer;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.password-toggle-button:hover,
.password-toggle-button:focus {
    border-color: transparent;
    background: transparent;
    color: #334155;
    outline: 0;
}

.password-toggle-button:focus-visible {
    box-shadow: none;
}

.password-eye-icon {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.password-toggle-button:hover .password-eye-icon,
.password-toggle-button:focus-visible .password-eye-icon {
    opacity: 0.78;
    transform: scale(1.04);
}

.password-toggle-button::after {
    content: "";
    position: absolute;
    width: 31px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0;
    transform: rotate(-42deg) scaleX(0.76);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.password-input-shell.is-password-visible .password-toggle-button::after {
    opacity: 1;
    transform: rotate(-42deg) scaleX(1);
}

.auth-login-submit {
    min-height: 54px;
    margin-top: 4px;
    font-size: 15px;
}

.auth-login-secondary {
    margin-top: 20px;
}

.auth-login-footnote {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
}

.auth-register-panel {
    width: min(840px, 100%);
}

.auth-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
}

.auth-brand-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(28, 39, 51, 0.12));
}

.auth-brand-title {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.auth-brand-title strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1.2;
}

.auth-brand-title strong,
.auth-brand-title span {
    overflow-wrap: anywhere;
}

.auth-brand-title span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.auth-secondary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.auth-secondary-action span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.auth-submit-button {
    width: 100%;
    min-height: 48px;
    border-radius: 8px;
    box-shadow: 0 10px 18px rgba(21, 94, 117, 0.18);
}

.auth-secondary-button {
    min-width: 166px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: rgba(21, 94, 117, 0.24);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--primary);
    background: #ffffff;
    font-weight: 800;
}

.auth-secondary-button:hover,
.auth-secondary-button:focus {
    border-color: rgba(21, 94, 117, 0.38);
    color: var(--primary-strong);
    background: #eef7f9;
    text-decoration: none;
}

.qr-register-panel {
    width: min(840px, 100%);
    padding: 24px;
}

.qr-register-brand {
    margin-bottom: 18px;
}

.qr-register-heading {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.qr-register-heading h1 {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.qr-action-summary {
    display: grid;
    gap: 3px;
    border: 1px solid rgba(21, 94, 117, 0.2);
    border-radius: 8px;
    padding: 12px;
    background: #eef7f9;
}

.qr-action-summary span,
.qr-action-summary small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.qr-action-summary strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.qr-register-form {
    min-width: 0;
    gap: 14px;
}

.qr-register-block {
    min-width: 0;
    display: grid;
    gap: 14px;
    border: 1px solid rgba(216, 224, 232, 0.92);
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
}

.qr-register-block .field,
.qr-register-block .form-grid {
    min-width: 0;
}

.qr-register-block-heading {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef3f7;
}

.qr-register-block-heading h2 {
    min-width: 0;
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.qr-register-block-heading .access-profile-badge {
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(21, 94, 117, 0.2);
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--primary);
    background: #f5fafb;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    justify-self: end;
}

.section-heading {
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 8px;
    font-size: 28px;
    line-height: 1.15;
}

h2 {
    font-size: 20px;
}

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

.form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
    font-weight: 400;
    background: #ffffff;
}

.field input[type="date"] {
    max-width: 100%;
    min-width: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--focus);
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.field-error {
    color: var(--danger);
    font-weight: 400;
}

.field-hint {
    color: var(--muted);
    font-weight: 400;
}

.field:has(:is(input, select, textarea)[required]:not([disabled])) > span::after,
.field:has(:is(input, select, textarea)[required]:not([disabled])) > label::after,
.choice-field:has(input[required]) legend::after,
.completion-check:has(input[required]:not([disabled])) span::after {
    content: " *";
    color: #dc2626;
    font-weight: 900;
}

.smart-field {
    position: relative;
}

.smart-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(28, 39, 51, 0.14);
    z-index: 12;
}

.smart-suggestions[hidden],
.photo-preview[hidden] {
    display: none;
}

.smart-suggestions button {
    min-height: 38px;
    justify-content: flex-start;
    border: 0;
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--text);
    background: #ffffff;
    font-weight: 700;
    text-align: left;
}

.smart-suggestions button:hover,
.smart-suggestions button:focus {
    background: var(--surface-muted);
}

.file-input-native {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.photo-upload {
    position: relative;
}

.photo-dropzone {
    min-height: 136px;
    display: grid;
    place-items: center;
    gap: 6px;
    border: 2px dashed #b8c7d5;
    border-radius: 8px;
    padding: 18px;
    color: var(--text);
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.photo-dropzone::before {
    content: "+";
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(21, 94, 117, 0.2);
    border-radius: 999px;
    color: var(--primary);
    background: #ffffff;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.photo-dropzone strong,
.photo-dropzone span {
    display: block;
}

.photo-dropzone span {
    max-width: 460px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.photo-dropzone:hover,
.photo-dropzone:focus,
.photo-dropzone.is-dragging,
.photo-dropzone.has-file {
    border-color: var(--primary);
    background: #eef7f9;
    outline: none;
    transform: translateY(-1px);
}

.photo-dropzone.is-disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.photo-dropzone.is-limit-reached {
    border-color: rgba(185, 28, 28, 0.78);
    background: rgba(220, 38, 38, 0.1);
}

.photo-dropzone.has-file::before {
    content: "OK";
    width: 46px;
    color: #ffffff;
    background: var(--success);
    border-color: var(--success);
    font-size: 14px;
}

.photo-preview {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
    box-shadow: 0 8px 18px rgba(28, 39, 51, 0.08);
}

.photo-preview img {
    width: 132px;
    height: 96px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--surface-muted);
}

.photo-preview-info {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 0;
}

.photo-preview-info span {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
}

.photo-preview-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-preview-button {
    width: fit-content;
    min-height: 38px;
    padding: 8px 12px;
}

.danger-outline-button {
    border-color: rgba(180, 35, 24, 0.32);
    color: var(--danger);
    background: #fff7f5;
}

.danger-outline-button:hover,
.danger-outline-button:focus {
    border-color: rgba(180, 35, 24, 0.58);
    color: var(--danger);
    background: #fff0ed;
}

.extra-residence-photos {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(216, 224, 232, 0.9);
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
}

.extra-residence-photos.is-limit-reached {
    border-color: rgba(185, 28, 28, 0.72);
    background: rgba(220, 38, 38, 0.08);
}

.extra-residence-photos.is-limit-reached [data-extra-photos-status] {
    color: #991b1b;
    font-weight: 800;
}

.extra-residence-photos-toggle {
    min-width: 0;
}

.extra-residence-photos-fields {
    display: grid;
    gap: 10px;
}

.extra-residence-photos-fields[hidden],
.extra-photo-list[hidden] {
    display: none;
}

.extra-photo-list {
    display: grid;
    gap: 10px;
}

.existing-extra-photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.extra-photo-item {
    margin-top: 0;
}

.photo-preview-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 22, 35, 0.86);
    z-index: 200;
}

.photo-preview-modal[hidden] {
    display: none;
}

.photo-preview-modal img {
    max-width: min(1080px, 100%);
    max-height: min(82vh, 900px);
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.photo-preview-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 8px;
    padding: 9px 13px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.photo-preview-modal-close:hover,
.photo-preview-modal-close:focus {
    background: rgba(255, 255, 255, 0.2);
}

.is-photo-preview-open {
    overflow: hidden;
}

.quantity-stepper {
    width: min(260px, 100%);
    min-width: 0;
    display: grid;
    grid-template-columns: 48px minmax(76px, 1fr) 48px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.quantity-stepper input {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-inline: 1px solid var(--line);
    border-radius: 0;
    padding: 8px;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    appearance: textfield;
}

.quantity-stepper input::-webkit-outer-spin-button,
.quantity-stepper input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.quantity-stepper-button {
    width: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: var(--primary);
    background: #f8fafc;
    font-size: 22px;
    font-weight: 900;
}

button,
.primary-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.button:hover,
.primary-button:hover,
button:focus,
.primary-button:focus {
    background: var(--primary-strong);
    text-decoration: none;
}

a.primary-button,
a.secondary-button,
a.danger-button,
a.primary-link-button,
a.auth-secondary-button,
a.action-card-button,
a.residence-action-button,
a[class*="-button"] {
    text-decoration: none;
}

a.primary-button:hover,
a.primary-button:focus,
a.secondary-button:hover,
a.secondary-button:focus,
a.danger-button:hover,
a.danger-button:focus,
a.primary-link-button:hover,
a.primary-link-button:focus,
a.auth-secondary-button:hover,
a.auth-secondary-button:focus,
a.action-card-button:hover,
a.action-card-button:focus,
a.residence-action-button:hover,
a.residence-action-button:focus,
a[class*="-button"]:hover,
a[class*="-button"]:focus {
    text-decoration: none;
}

.quantity-stepper-button:hover {
    width: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: var(--primary);
    background: #f8fafc;
}

.quantity-stepper-button:active,
.quantity-stepper-button:focus-visible {
    width: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: #ffffff;
    background: var(--primary);
    outline: none;
}

.quantity-stepper [data-quantity-decrement] {
    grid-column: 1;
}

.quantity-stepper [data-quantity-input] {
    grid-column: 2;
}

.quantity-stepper [data-quantity-increment] {
    grid-column: 3;
}

.quantity-stepper .quantity-stepper-button {
    position: relative;
    z-index: 1;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    min-height: 48px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.secondary-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 14px;
    color: var(--text);
    background: var(--surface-muted);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.secondary-button:hover,
.secondary-button:focus {
    background: #dfeaf1;
    text-decoration: none;
}

button:disabled,
.primary-button:disabled {
    cursor: wait;
    opacity: 0.78;
}

.button-spinner {
    width: 16px;
    height: 16px;
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

.is-processing .button-spinner {
    display: inline-block;
}

.alert {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    border-radius: 6px;
    padding: 12px 14px;
    background: var(--surface);
}

.alert-error {
    border-left-color: var(--danger);
    color: var(--danger);
}

.alert-success {
    border-left-color: var(--success);
    color: var(--success);
}

.alert-warning {
    border-left-color: var(--warning);
    color: var(--warning);
}

.signature-notice-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-left-width: 0;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.06);
}

.signature-notice-alert.alert-warning {
    border-color: #f1d28b;
    background: #fffaf0;
}

.signature-notice-alert.alert-success {
    border-color: #b7dfca;
    background: #f0faf4;
}

.signature-alert-action {
    min-height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid currentColor;
    border-radius: 6px;
    padding: 8px 13px;
    color: inherit;
    background: rgba(255, 255, 255, 0.74);
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.signature-alert-action::after {
    content: ">";
    font-weight: 900;
}

.signature-alert-action:hover,
.signature-alert-action:focus {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}

.signature-alert-action-strong {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.signature-alert-action-strong:hover,
.signature-alert-action-strong:focus {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

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

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.indicator,
.module-list,
.table-panel,
.panel-form,
.public-action,
.error-page {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.indicator {
    min-height: 142px;
}

.indicator span,
.indicator small {
    display: block;
    color: var(--muted);
}

.indicator strong {
    display: block;
    margin: 8px 0;
    font-size: 34px;
}

.module-list {
    margin-top: 18px;
}

.module-list ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.ops-dashboard-page {
    display: grid;
    gap: 20px;
    min-width: 0;
    container-type: inline-size;
}

.ops-hero,
.ops-filter-panel,
.ops-map-panel,
.ops-panel-card {
    min-width: 0;
    border: 1px solid rgba(21, 94, 117, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.ops-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    padding: clamp(18px, 2.2vw, 30px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 247, 249, 0.94) 55%, rgba(250, 252, 252, 0.96) 100%),
        radial-gradient(circle at 88% 18%, rgba(22, 163, 74, 0.13), transparent 32%),
        radial-gradient(circle at 5% 100%, rgba(220, 38, 38, 0.1), transparent 28%);
}

.ops-hero h1,
.ops-panel-head h2,
.ops-map-head h2,
.ops-filter-heading h2 {
    margin-bottom: 6px;
}

.ops-hero p,
.ops-map-head p {
    max-width: 880px;
    margin-bottom: 0;
    color: var(--muted);
}

.ops-hero-status {
    width: min(100%, 330px);
    display: grid;
    gap: 7px;
    border: 1px solid rgba(21, 94, 117, 0.14);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.ops-hero-status span,
.ops-hero-status small {
    color: var(--muted);
}

.ops-hero-status strong {
    color: var(--primary-strong);
    font-size: 20px;
}

.ops-filter-panel {
    padding: clamp(14px, 1.6vw, 22px);
}

.ops-filter-heading,
.ops-map-head,
.ops-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.ops-filter-heading small {
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--primary-strong);
    background: #f3fafb;
    font-weight: 900;
    white-space: nowrap;
}

.ops-filter-form .ops-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.report-filter-modern-form.ops-filter-form {
    grid-template-columns: repeat(16, minmax(0, 1fr));
}

.ops-filter-form .report-filter-field-wide {
    grid-column: span 5;
}

.ops-filter-form .report-filter-field-compact,
.ops-filter-form .report-filter-field-date {
    grid-column: span 2;
}

.ops-filter-form .ops-filter-actions {
    grid-column: 1 / -1;
}

.ops-filter-actions .primary-button,
.ops-filter-actions .secondary-button {
    width: auto;
    min-width: 150px;
}

.ops-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 14px;
}

.ops-kpi-card {
    min-width: 0;
    display: grid;
    gap: 9px;
    border: 1px solid rgba(21, 94, 117, 0.14);
    border-radius: 8px;
    padding: clamp(14px, 1.35vw, 20px);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.055);
}

.ops-kpi-card-critical {
    border-color: rgba(185, 28, 28, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
}

.ops-kpi-card span,
.ops-kpi-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.ops-kpi-card strong {
    color: #1f2937;
    font-size: clamp(27px, 2.7vw, 44px);
    line-height: 1;
}

.ops-map-panel {
    overflow: hidden;
}

.ops-map-head {
    padding: clamp(18px, 1.8vw, 26px) clamp(18px, 1.8vw, 26px) 0;
}

.ops-map-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.ops-map-legend span,
.ops-condition-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ops-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
    background: #64748b;
}

.ops-dot-perda_total {
    background: #dc2626;
}

.ops-dot-perda_parcial {
    background: #d97706;
}

.ops-dot-nao_atingida {
    background: #16a34a;
}

.ops-dot-sem_condicao {
    background: #64748b;
}

.ops-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
    gap: 0;
    min-width: 0;
}

.ops-map-stage {
    position: relative;
    min-width: 0;
    min-height: clamp(560px, 62vh, 780px);
    border-top: 1px solid rgba(21, 94, 117, 0.12);
    background:
        radial-gradient(circle at 15% 20%, rgba(14, 116, 144, 0.08), transparent 28%),
        linear-gradient(180deg, #eef7f9 0%, #f8fbfb 100%);
}

.ops-map-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(rgba(21, 94, 117, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 94, 117, 0.07) 1px, transparent 1px),
        radial-gradient(circle at 18% 22%, rgba(22, 163, 74, 0.14), transparent 24%),
        radial-gradient(circle at 84% 72%, rgba(220, 38, 38, 0.1), transparent 22%),
        linear-gradient(135deg, #e7f2f4 0%, #f8fbfb 100%);
    background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.ops-map-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    pointer-events: none;
    background:
        linear-gradient(rgba(21, 94, 117, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 94, 117, 0.075) 1px, transparent 1px),
        radial-gradient(circle at 18% 22%, rgba(22, 163, 74, 0.16), transparent 24%),
        radial-gradient(circle at 84% 72%, rgba(220, 38, 38, 0.12), transparent 22%),
        linear-gradient(135deg, #e0eef1 0%, #f4fafb 100%);
    background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.ops-map-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.52) 48%, transparent 100%);
    animation: opsMapLoading 1.15s ease-in-out infinite;
    transform: translateX(-100%);
}

.ops-map-placeholder > div {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 6px;
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 8px;
    padding: 14px 18px;
    color: #334155;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.ops-map-placeholder strong {
    color: var(--primary-strong);
    font-size: 14px;
}

.ops-map-placeholder span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ops-map-stage.is-map-ready .ops-map-placeholder {
    display: none;
}

.ops-leaflet-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    min-height: clamp(560px, 62vh, 780px);
    background: transparent !important;
}

.ops-leaflet-canvas.leaflet-container {
    background: transparent !important;
}

.ops-map-stage:not(.is-map-ready) .leaflet-tile-pane {
    opacity: 0;
}

.ops-map-stage.is-map-ready .leaflet-tile-pane {
    opacity: 1;
    transition: opacity 0.22s ease;
}

.ops-leaflet-canvas .leaflet-control-zoom,
.ops-leaflet-canvas .leaflet-control-layers {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    overflow: hidden;
}

.ops-leaflet-canvas .leaflet-control-zoom a {
    border: 0;
    color: var(--primary-strong);
    background: rgba(255, 255, 255, 0.96);
}

.ops-leaflet-canvas .leaflet-control-layers-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.96);
    background-position: center;
    background-size: 22px 22px;
}

.ops-leaflet-canvas .leaflet-control-zoom a:hover {
    color: #ffffff;
    background: var(--primary);
}

.ops-leaflet-canvas .leaflet-control-layers-toggle:hover {
    background-color: #e6f5f7;
}

.ops-leaflet-canvas .leaflet-control-layers-expanded {
    border: 0;
    border-radius: 8px;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    font-weight: 800;
}

.ops-leaflet-marker {
    background: transparent;
    border: 0;
}

.ops-leaflet-house {
    width: 22px;
    height: 20px;
    position: relative;
    display: block;
    filter: drop-shadow(0 6px 4px rgba(15, 23, 42, 0.2));
}

.ops-leaflet-house::before {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0, 100% 38%, 82% 38%, 82% 100%, 18% 100%, 18% 38%, 0 38%);
    background: #64748b;
    border: 1px solid #ffffff;
}

.ops-leaflet-house span {
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 6px;
    height: 10px;
    border-radius: 2px 2px 0 0;
    background: rgba(255, 255, 255, 0.76);
    transform: translateX(-50%);
}

.ops-leaflet-house-perda_total::before {
    background: #dc2626;
}

.ops-leaflet-house-perda_parcial::before {
    background: #d97706;
}

.ops-leaflet-house-nao_atingida::before {
    background: #16a34a;
}

.ops-leaflet-house-sem_condicao::before {
    background: #64748b;
}

.ops-map-popup-shell .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2);
}

.ops-map-popup-shell .leaflet-popup-content {
    margin: 12px;
}

.ops-map-popup {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.ops-map-popup strong {
    color: #1f2937;
    font-size: 15px;
}

.ops-map-popup span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.ops-map-popup dl {
    display: grid;
    gap: 5px;
    margin: 0;
}

.ops-map-popup dl div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 8px;
}

.ops-map-popup dt,
.ops-map-popup dd {
    margin: 0;
    font-size: 12px;
}

.ops-map-popup dt {
    color: var(--muted);
    font-weight: 900;
}

.ops-map-popup dd {
    color: #1f2937;
    font-weight: 800;
}

.ops-map-popup a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 8px 10px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 900;
    text-decoration: none;
}

.ops-map-empty {
    position: absolute;
    inset: 50%;
    z-index: 3;
    width: min(420px, calc(100% - 32px));
    transform: translate(-50%, -50%);
    display: grid;
    gap: 6px;
    border: 1px dashed rgba(21, 94, 117, 0.3);
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.88);
    text-align: center;
}

.ops-map-empty strong {
    color: #334155;
}

.ops-map-empty[hidden] {
    display: none;
}

.ops-map-sidebar {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 14px;
    border-top: 1px solid rgba(21, 94, 117, 0.12);
    border-left: 1px solid rgba(21, 94, 117, 0.12);
    padding: clamp(14px, 1.25vw, 20px);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.ops-map-details {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(21, 94, 117, 0.14);
    border-radius: 8px;
    padding: 14px;
    background: #f8fbfb;
}

.ops-map-details h3 {
    margin-bottom: 0;
}

.ops-map-details p {
    margin-bottom: 0;
    color: var(--muted);
}

.ops-map-details dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.ops-map-details dl div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px;
}

.ops-map-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.ops-map-details dd {
    min-width: 0;
    margin: 0;
    color: #1f2937;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.ops-map-list,
.ops-recent-list,
.ops-ranking-list,
.ops-condition-list {
    display: grid;
    gap: 9px;
}

.ops-map-list-item,
.ops-recent-item,
.ops-ranking-item,
.ops-condition-row {
    min-width: 0;
    display: grid;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(21, 94, 117, 0.12);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.ops-map-list-item,
.ops-recent-item {
    grid-template-columns: auto minmax(0, 1fr);
    color: inherit;
    text-align: left;
    text-decoration: none;
}

.ops-map-list-item {
    font: inherit;
    cursor: pointer;
}

.ops-map-list-item:hover,
.ops-map-list-item:focus,
.ops-map-list-item.is-active,
.ops-recent-item:hover,
.ops-recent-item:focus {
    border-color: rgba(21, 94, 117, 0.34);
    background: #f3fafb;
    text-decoration: none;
}

.ops-map-list-item strong,
.ops-recent-item strong,
.ops-ranking-item strong {
    display: block;
    min-width: 0;
    color: #1f2937;
    overflow-wrap: anywhere;
}

.ops-map-list-item small,
.ops-recent-item small,
.ops-ranking-item small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ops-mini-house {
    width: 26px;
    height: 24px;
    display: inline-block;
    clip-path: polygon(50% 0, 100% 38%, 83% 38%, 83% 100%, 17% 100%, 17% 38%, 0 38%);
    background: #64748b;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.ops-mini-house-perda_total {
    background: #dc2626;
}

.ops-mini-house-perda_parcial {
    background: #d97706;
}

.ops-mini-house-nao_atingida {
    background: #16a34a;
}

.ops-mini-house-sem_condicao {
    background: #64748b;
}

.ops-intel-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(280px, 0.9fr) minmax(360px, 1.35fr);
    gap: 14px;
    min-width: 0;
}

.ops-panel-card {
    padding: clamp(14px, 1.4vw, 22px);
}

.ops-condition-row {
    grid-template-columns: minmax(0, 1fr) minmax(42px, auto) minmax(86px, auto);
}

.ops-condition-row strong,
.ops-ranking-item em {
    color: #1f2937;
    font-size: 20px;
    font-style: normal;
    font-weight: 900;
}

.ops-condition-row small {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.ops-ranking-item {
    grid-template-columns: 34px minmax(0, 1fr) minmax(42px, auto);
}

.ops-ranking-item > span {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: var(--primary-strong);
    background: #e6f5f7;
    font-weight: 900;
}

.ops-recent-card {
    min-width: 0;
}

.primary-link-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 700;
}

.primary-link-button:hover,
.primary-link-button:focus {
    background: var(--primary-strong);
    text-decoration: none;
}

.danger-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f3c0ba;
    border-radius: 6px;
    padding: 9px 12px;
    color: var(--danger);
    background: #fff4f2;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.danger-button:hover,
.danger-button:focus {
    border-color: var(--danger);
    background: #fde4e0;
    text-decoration: none;
}

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

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.responsive-table {
    width: 100%;
    overflow-x: auto;
}

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

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

.responsive-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

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

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

.data-table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.actions-column {
    width: 96px;
    white-space: nowrap;
}

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

.form-shell {
    max-width: 920px;
}

.action-form-page {
    width: min(960px, 100%);
}

.action-form-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.action-form-header h1 {
    margin-bottom: 8px;
}

.action-form-header p {
    max-width: 620px;
    margin-bottom: 0;
}

.action-back-link {
    min-width: 172px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-color: #b8c7d5;
    border-radius: 8px;
    padding: 10px 14px;
    color: #1c2733;
    background: #ffffff;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(28, 39, 51, 0.07);
}

.action-back-link::before {
    content: "←";
    font-weight: 800;
}

.action-back-link::before {
    content: "";
    width: 8px;
    height: 8px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(45deg);
}

.action-back-link:hover,
.action-back-link:focus {
    border-color: var(--primary);
    color: var(--primary);
    background: #f7fbfd;
    text-decoration: none;
    transform: translateX(-1px);
}

.action-form-card {
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: var(--surface);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.08);
}

.form-block {
    display: grid;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfd;
}

.compact-form-block {
    gap: 0;
}

.form-block-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-block-heading > span {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.form-block-heading h2 {
    margin-bottom: 3px;
    font-size: 18px;
}

.form-block-heading p {
    margin-bottom: 0;
    font-size: 14px;
}

.action-location-grid {
    grid-template-columns: minmax(180px, 0.45fr) minmax(260px, 1fr);
}

.styled-field {
    gap: 8px;
}

.styled-field > span {
    color: #2b3948;
    font-size: 14px;
}

.styled-field input,
.styled-field select,
.styled-field textarea {
    min-height: 48px;
    border-color: #cbd7e3;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 1px 0 rgba(28, 39, 51, 0.03);
}

.styled-field select {
    padding-right: 40px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #546478 50%),
        linear-gradient(135deg, #546478 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 21px,
        calc(100% - 14px) 21px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.styled-field input:hover,
.styled-field select:hover,
.styled-field textarea:hover {
    border-color: #aebdcc;
}

.styled-field input:focus,
.styled-field select:focus,
.styled-field textarea:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: 0;
}

.action-link-field {
    border-style: dashed;
    background: #f5f9fb;
}

.action-form-actions {
    position: sticky;
    bottom: 0;
    margin: 0 -18px -18px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 8px 8px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.actions-page {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.actions-index-page {
    min-width: 0;
}

.action-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 1fr) repeat(4, minmax(130px, 0.75fr));
    gap: 12px;
    align-items: end;
}

.action-filter-modern-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.action-filter-modern-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.action-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.action-filter-field-wide {
    grid-column: span 6;
}

.action-filter-field-medium {
    grid-column: span 4;
}

.action-filter-field-compact,
.action-filter-field-date {
    grid-column: span 2;
}

.action-filter-modern-form .action-filter-actions {
    grid-column: 1 / -1;
}

.action-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.action-filter-field input,
.action-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.action-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.action-filter-field input:focus,
.action-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.action-filter-field-date input[type="date"],
.action-form-card input[type="date"] {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.action-search-field {
    min-width: 0;
}

.action-filter-actions {
    grid-column: span 2;
}

.action-empty-panel,
.action-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.action-empty-panel {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 22px;
}

.action-empty-panel h2,
.action-empty-panel p {
    margin-bottom: 0;
}

.action-card-grid {
    display: grid;
    gap: 14px;
}

.action-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
    gap: 16px;
    padding: 16px;
}

.action-card-main {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.action-card-title {
    min-width: 0;
    display: grid;
    justify-items: start;
    gap: 6px;
}

.action-card-title h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.action-card-title p {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.action-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.action-card-meta div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbfcfd;
}

.action-card-meta dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.action-card-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.action-qr-state {
    min-width: 0;
    display: grid;
    gap: 9px;
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 8px;
    padding: 12px;
    background: #f5fafb;
}

.action-qr-state > div:first-child {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.action-qr-state span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.action-qr-state strong,
.action-qr-state small {
    overflow-wrap: anywhere;
}

.action-qr-state strong {
    color: var(--primary);
    font-size: 16px;
}

.action-qr-state small {
    color: var(--muted);
}

.action-qr-state-blocked {
    border-color: rgba(100, 116, 139, 0.2);
    background: #f8fafc;
}

.action-qr-state-blocked strong {
    color: #64748b;
}

.action-qr-state-blocked .record-progress span {
    background: #94a3b8;
}

.action-card-actions {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
    align-content: start;
    gap: 8px;
    border-left: 1px solid #eef3f7;
    padding-left: 16px;
}

.action-card-button,
.action-qr-button {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 800;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.action-qr-button {
    border-color: #b8c7d5;
    background: #ffffff;
}

.action-card-disabled {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px;
    color: #64748b;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.aid-types-page {
    min-width: 0;
}

.aid-type-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 0.55fr) minmax(160px, 0.75fr) minmax(180px, 0.7fr);
    gap: 12px;
    align-items: end;
}

.aid-type-filter-modern-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.aid-type-filter-modern-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.aid-type-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.aid-type-filter-field-wide {
    grid-column: span 6;
}

.aid-type-filter-field-medium {
    grid-column: span 4;
}

.aid-type-filter-field-compact {
    grid-column: span 2;
}

.aid-type-filter-modern-form .aid-type-filter-actions {
    grid-column: 1 / -1;
}

.aid-type-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aid-type-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.aid-type-filter-field input,
.aid-type-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.aid-type-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.aid-type-filter-field input:focus,
.aid-type-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.aid-type-search-field {
    min-width: 0;
}

.aid-type-filter-actions {
    min-width: 0;
}

.aid-type-form-page {
    width: min(920px, 100%);
}

.aid-type-form-card {
    overflow: hidden;
}

.aid-type-form-block {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.aid-type-fields-grid {
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.55fr);
}

.aid-type-status-field {
    max-width: 320px;
}

.aid-type-card-list {
    display: grid;
    gap: 14px;
}

.aid-type-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.18fr);
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.aid-type-main {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.aid-type-title {
    min-width: 0;
    display: grid;
    justify-items: start;
    gap: 6px;
}

.aid-type-title h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.aid-type-title p {
    margin-bottom: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.aid-type-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.aid-type-meta div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbfcfd;
}

.aid-type-meta dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.aid-type-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.aid-type-actions {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    border-left: 1px solid #eef3f7;
    padding-left: 16px;
}

.aid-type-actions .secondary-button {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    border-radius: 8px;
    text-align: center;
    white-space: normal;
}

.users-page,
.user-form-page {
    min-width: 0;
}

.users-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(130px, 0.65fr)) minmax(180px, 0.7fr);
    gap: 12px;
    align-items: end;
}

.users-filter-modern-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.users-filter-modern-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.users-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.users-filter-field-wide {
    grid-column: span 6;
}

.users-filter-field-compact {
    grid-column: span 2;
}

.users-filter-modern-form .users-filter-actions {
    grid-column: 1 / -1;
}

.users-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.users-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.users-filter-field input,
.users-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.users-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.users-filter-field input:focus,
.users-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.users-search-field {
    min-width: 0;
}

.user-card-list {
    display: grid;
    gap: 14px;
}

.user-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.2fr);
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.user-card-main,
.user-card-title {
    min-width: 0;
    display: grid;
}

.user-card-main {
    gap: 14px;
}

.user-card-title {
    justify-items: start;
    gap: 6px;
}

.user-card-title h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.user-card-title p {
    margin-bottom: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.user-card-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.user-card-meta div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbfcfd;
}

.user-card-meta dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.user-card-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.user-card-actions {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    border-left: 1px solid #eef3f7;
    padding-left: 16px;
}

.user-card-actions .secondary-button,
.user-card-actions .action-card-button {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    border-radius: 8px;
    text-align: center;
    white-space: normal;
}

.user-form-page {
    width: min(980px, 100%);
}

.user-form-card {
    overflow: hidden;
}

.user-form-block {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.account-password-page {
    width: min(860px, 100%);
}

.account-password-card {
    overflow: hidden;
}

.account-password-block {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.account-password-current {
    max-width: 420px;
}

.qr-modal {
    width: min(92vw, 460px);
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.qr-modal::backdrop {
    background: rgba(16, 35, 56, 0.58);
}

.qr-modal-close-form {
    position: absolute;
    top: 10px;
    right: 10px;
}

.qr-modal-close {
    width: 38px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    color: var(--text);
    background: #ffffff;
    font-size: 24px;
    line-height: 1;
}

.qr-modal-content {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.qr-modal-content h2,
.qr-modal-content p {
    margin-bottom: 0;
}

.qr-modal-image {
    width: min(260px, 100%);
    height: auto;
    justify-self: center;
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

.qr-modal-link-field {
    display: grid;
    gap: 6px;
}

.qr-modal-link-field span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.qr-modal-link-field input {
    min-width: 0;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    color: var(--text);
    background: #f8fafc;
    font: inherit;
}

.qr-modal-rule {
    border-left: 3px solid var(--primary);
    padding: 10px 12px;
    color: var(--muted);
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.qr-modal-copy-status {
    min-height: 20px;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.qr-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.records-page {
    min-width: 0;
    display: grid;
    gap: 18px;
}

.records-header {
    margin-bottom: 0;
}

.records-header > div {
    min-width: 0;
}

.records-header h1,
.records-header p {
    overflow-wrap: break-word;
}

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

.records-summary-card {
    min-width: 0;
    display: grid;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.05);
}

.records-summary-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.records-summary-card strong {
    color: var(--text);
    font-size: 25px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.records-summary-card small {
    color: var(--muted);
    line-height: 1.35;
}

.records-filter-panel {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.05);
}

.records-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(5, minmax(130px, 0.7fr));
    gap: 12px;
    align-items: end;
}

.cadastro-filter-modern-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.cadastro-filter-modern-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.cadastro-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.cadastro-filter-field-wide {
    grid-column: span 6;
}

.cadastro-filter-field-compact,
.cadastro-filter-field-date {
    grid-column: span 2;
}

.cadastro-filter-modern-form .cadastro-filter-actions {
    grid-column: 1 / -1;
}

.cadastro-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cadastro-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.cadastro-filter-field input,
.cadastro-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.cadastro-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.cadastro-filter-field input:focus,
.cadastro-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.cadastro-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.records-search-field {
    min-width: 0;
}

.records-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.records-filter-actions .primary-button,
.records-filter-actions .secondary-button {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.action-card-actions .inline-form {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.records-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}

.records-active-filters span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(21, 94, 117, 0.2);
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--primary);
    background: #f5fafb;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
}

.records-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.records-list-toolbar strong {
    color: var(--text);
}

.records-card-grid {
    display: grid;
    gap: 14px;
}

.record-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.28fr);
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.record-card-main {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.record-card-title {
    min-width: 0;
    display: grid;
    justify-items: start;
    gap: 6px;
}

.record-protocol {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(21, 94, 117, 0.22);
    border-radius: 999px;
    padding: 4px 10px;
    color: var(--primary);
    background: #f5fafb;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    overflow-wrap: anywhere;
    white-space: normal;
}

.record-card-title h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.record-card-title p {
    margin-bottom: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.record-card-meta {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 0.5fr));
    gap: 10px;
    margin: 0;
}

.record-card-meta div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbfcfd;
}

.record-card-meta dt,
.record-family-meter span,
.record-card-date span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.record-card-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.record-condition {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    color: #244151;
    background: #edf4f7;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.3;
}

.record-condition-perda-total {
    color: #9f231d;
    background: #fff0ed;
}

.record-condition-perda-parcial {
    color: #8a5400;
    background: #fff7dc;
}

.record-condition-nao-atingida {
    color: #176240;
    background: #ecfdf4;
}

.record-card-side {
    display: grid;
    align-content: start;
    gap: 12px;
    border-left: 1px solid #eef3f7;
    padding-left: 16px;
}

.record-family-meter,
.record-card-date {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfd;
}

.record-family-meter > div:first-child {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.record-family-meter > div:first-child > * {
    min-width: 0;
}

.record-family-meter strong,
.record-card-date strong {
    color: var(--text);
    font-size: 16px;
    overflow-wrap: anywhere;
}

.record-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #dde7ee;
}

.record-progress span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--primary);
}

.record-open-button {
    width: 100%;
    min-height: 42px;
    border-radius: 8px;
    font-weight: 800;
}

.family-index-page {
    min-width: 0;
}

.family-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.family-filter-modern-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.family-filter-modern-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.family-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.family-filter-field-wide {
    grid-column: span 4;
}

.family-filter-field-compact,
.family-filter-field-date {
    grid-column: span 2;
}

.family-filter-modern-form .family-filter-actions {
    grid-column: 1 / -1;
}

.family-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.family-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.family-filter-field input,
.family-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.family-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.family-filter-field input:focus,
.family-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.family-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.family-search-field {
    grid-column: span 2;
    min-width: 0;
}

.family-filter-modern-form .family-search-field,
.family-filter-modern-form .family-filter-field-wide {
    grid-column: span 4;
}

.family-filter-actions {
    grid-column: span 2;
}

.family-card-list {
    display: grid;
    gap: 14px;
}

.family-index-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(175px, 0.22fr);
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.family-index-main {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.family-index-title {
    min-width: 0;
    display: grid;
    justify-items: start;
    gap: 6px;
}

.family-index-title h2 {
    margin-bottom: 0;
    font-size: 22px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.family-index-title p {
    margin-bottom: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.family-index-statuses {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.family-status-pill {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 999px;
    padding: 5px 10px;
    color: #334155;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.family-status-delivered,
.family-status-reviewed {
    border-color: rgba(22, 101, 52, 0.2);
    color: #166534;
    background: #ecfdf4;
}

.family-status-pending,
.family-status-open {
    border-color: rgba(180, 83, 9, 0.24);
    color: #92400e;
    background: #fff7ed;
}

.family-status-desabrigado {
    border-color: rgba(185, 28, 28, 0.2);
    color: #991b1b;
    background: #fef2f2;
}

.family-status-desalojado,
.family-status-aluguel_social {
    border-color: rgba(180, 83, 9, 0.22);
    color: #92400e;
    background: #fff7dc;
}

.family-status-permanece_residencia {
    border-color: rgba(21, 94, 117, 0.2);
    color: var(--primary);
    background: #f0f9fb;
}

.family-index-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.family-index-meta div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #fbfcfd;
}

.family-pending-fields {
    min-width: 0;
    display: grid;
    gap: 4px;
    border: 1px solid rgba(180, 83, 9, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    color: #7c2d12;
    background: #fff7ed;
}

.family-pending-fields span {
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.family-pending-fields strong {
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.family-index-card .family-pending-fields,
.residence-family-card .family-pending-fields,
.family-detail-page > .family-pending-fields {
    border-left: 4px solid #f59e0b;
    box-shadow: 0 8px 18px rgba(146, 64, 14, 0.08);
}

.family-index-card .family-pending-fields {
    margin-top: 2px;
}

.family-index-meta dt,
.family-delivery-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.family-index-meta dd {
    margin: 4px 0 0;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.family-delivery-summary {
    min-width: 0;
    display: grid;
    gap: 5px;
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 8px;
    padding: 12px;
    background: #f5fafb;
}

.family-delivery-summary strong,
.family-delivery-summary small {
    overflow-wrap: anywhere;
}

.family-delivery-summary strong {
    color: var(--text);
    line-height: 1.35;
}

.family-delivery-summary small {
    color: var(--muted);
}

.family-index-actions {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
    border-left: 1px solid #eef3f7;
    padding-left: 16px;
}

.family-index-actions .primary-link-button,
.family-index-actions .secondary-button {
    width: 100%;
    justify-content: center;
    min-height: 42px;
    border-radius: 8px;
    text-align: center;
    white-space: normal;
}

.residence-open-page {
    gap: 18px;
}

.residence-open-page,
.residence-open-page .records-header,
.residence-open-page .header-actions,
.residence-open-page .records-summary-grid,
.residence-open-page .records-summary-card,
.residence-open-page .record-card,
.residence-family-panel,
.residence-family-list,
.residence-family-card {
    min-width: 0;
    max-width: 100%;
}

.residence-open-page .header-actions > * {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.residence-edit-page {
    gap: 18px;
}

.residence-edit-page .records-summary-card strong {
    font-size: 22px;
}

.residence-edit-form {
    display: grid;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.residence-edit-page .existing-photo-preview {
    background: #ffffff;
}

.existing-extra-photo-list .photo-preview {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.existing-extra-photo-list .photo-preview img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
}

.existing-extra-photo-list .photo-preview-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.existing-extra-photo-list .photo-preview-button {
    width: 100%;
}

.residence-open-card .record-card-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.residence-media-grid {
    align-items: start;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
}

.residence-media-grid .residence-photo-panel {
    min-width: 0;
}

.residence-main-photo-panel {
    align-self: start;
}

.residence-main-photo-panel .residence-photo-preview img {
    aspect-ratio: 16 / 9;
}

.residence-extra-photo-panel {
    display: grid;
    gap: 14px;
}

.residence-media-grid .residence-extra-photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.residence-media-grid .residence-extra-photo-grid .residence-photo-preview {
    min-height: 0;
}

.residence-media-grid .residence-extra-photo-grid .residence-photo-preview img {
    aspect-ratio: 16 / 10;
}

.records-pagination {
    display: grid;
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr) minmax(110px, auto);
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.05);
}

.pagination-pages {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-number,
.pagination-ellipsis {
    min-height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 11px;
    color: var(--text);
    background: #ffffff;
    font-weight: 800;
    line-height: 1;
}

.pagination-link:hover,
.pagination-link:focus,
.pagination-number:hover,
.pagination-number:focus {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}

.pagination-number.is-active {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.pagination-link.is-disabled {
    color: #9aa8b5;
    background: #f3f6f8;
    pointer-events: none;
}

.pagination-ellipsis {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.panel-form {
    padding: 20px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.inline-action-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface-muted);
}

.inline-action-panel span {
    color: var(--muted);
    font-size: 14px;
}

.offline-sync-panel {
    display: grid;
    gap: 8px;
    border: 1px solid #b8c7d5;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 12px;
    background: #f5f9fb;
}

.offline-sync-panel[hidden] {
    display: none;
}

.offline-sync-panel.is-warning {
    border-color: #f0d0b2;
    border-left-color: var(--warning);
    background: #fff8f1;
}

.offline-sync-panel strong,
.offline-sync-panel span {
    display: block;
}

.offline-sync-panel span {
    color: var(--muted);
    font-size: 14px;
}

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

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

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

.compact-heading {
    margin: 4px 0 0;
}

.compact-heading h2 {
    margin-bottom: 0;
}

.checkbox-panel {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.checkbox-panel legend {
    padding: 0 6px;
    color: var(--muted);
    font-weight: 700;
}

.checkbox-panel label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.residence-choice-grid {
    align-items: start;
    grid-template-columns: 1fr;
    gap: 16px;
}

.residence-form-block {
    min-width: 0;
    display: grid;
    gap: 16px;
    border: 1px solid rgba(216, 224, 232, 0.92);
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(28, 39, 51, 0.05);
}

.residence-form-block .form-block-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef3f7;
}

.residence-form-block .form-block-heading h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
}

.compact-residence-block {
    padding: 14px 18px;
}

.location-fields-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(260px, 1.2fr);
    align-items: end;
}

.location-fields-grid .inline-action-panel {
    min-height: 70px;
}

.choice-field {
    min-width: 0;
    display: grid;
    gap: 9px;
    border: 0;
    padding: 0;
    margin: 0;
}

.choice-field legend {
    padding: 0;
    color: var(--text);
    font-weight: 700;
}

.choice-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.choice-option {
    position: relative;
    min-width: 0;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 9px;
    background: #ffffff;
    color: var(--text);
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.choice-option:hover {
    border-color: rgba(21, 94, 117, 0.42);
    background: #f7fbfc;
    transform: translateY(-1px);
}

.choice-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.choice-option span {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
}

.choice-option::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #a6b5c3;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 4px #ffffff;
}

.choice-option:has(input:checked) {
    border-color: var(--primary);
    background: #eef7f9;
    box-shadow: 0 0 0 3px rgba(21, 94, 117, 0.12);
}

.choice-option:has(input:checked)::before {
    border-color: var(--primary);
    background: var(--primary);
}

.choice-option:has(input:focus-visible) {
    outline: 3px solid rgba(37, 99, 235, 0.14);
    outline-offset: 2px;
}

.family-form-shell {
    max-width: 920px;
}

.family-edit-page {
    max-width: 1120px;
}

.family-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.family-edit-form {
    gap: 16px;
}

.family-form-header p {
    margin-bottom: 0;
}

.family-form {
    gap: 16px;
}

.family-form-block {
    min-width: 0;
    overflow: hidden;
    display: grid;
    gap: 16px;
    border: 1px solid rgba(216, 224, 232, 0.9);
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.06);
}

.family-form-block .form-block-heading,
.representative-toggle,
.military-toggle {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.representative-toggle > div,
.military-toggle > div {
    min-width: 0;
    max-width: 100%;
}

.family-form-block .form-block-heading {
    padding-bottom: 10px;
    border-bottom: 1px solid #eef3f7;
}

.family-form-block .form-block-heading > span,
.representative-toggle span,
.military-toggle span {
    width: auto;
    height: auto;
    flex: initial;
    display: block;
    padding: 0;
    color: var(--primary);
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.family-form-block .form-block-heading strong,
.representative-toggle strong,
.military-toggle strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

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

.vulnerability-picker label {
    min-height: 52px;
    position: relative;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.vulnerability-picker input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vulnerability-picker span {
    color: var(--text);
    font-weight: 800;
    text-align: center;
}

.vulnerability-picker label:has(input:checked) {
    border-color: rgba(21, 94, 117, 0.38);
    background: #eef7f9;
    box-shadow: inset 0 0 0 1px rgba(21, 94, 117, 0.12);
}

.completion-check {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.completion-check input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    accent-color: var(--primary);
}

.completion-check span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.family-conclusion-block textarea {
    resize: vertical;
}

.family-edit-form select[name="responsavel_sexo"],
.family-edit-form select[name="representante_sexo"],
.family-edit-form select[name="renda_familiar"],
.family-edit-form select[name="situacao_familia"] {
    appearance: none;
    min-height: 48px;
    border-color: #cbd8e3;
    border-radius: 8px;
    padding-right: 42px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #155e75 50%),
        linear-gradient(135deg, #155e75 50%, transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
    background-position:
        calc(100% - 21px) 21px,
        calc(100% - 15px) 21px,
        0 0;
    background-size:
        6px 6px,
        6px 6px,
        100% 100%;
    background-repeat: no-repeat;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.family-edit-form select[name="responsavel_sexo"]:hover,
.family-edit-form select[name="representante_sexo"]:hover,
.family-edit-form select[name="renda_familiar"]:hover,
.family-edit-form select[name="situacao_familia"]:hover,
.family-edit-form textarea[name="perdas_bens_moveis"]:hover,
.family-edit-form textarea[name="conclusao_observacoes"]:hover,
.completion-check:hover {
    border-color: rgba(21, 94, 117, 0.45);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.family-edit-form textarea[name="perdas_bens_moveis"],
.family-edit-form textarea[name="conclusao_observacoes"] {
    min-height: 108px;
    border-color: #cbd8e3;
    border-radius: 8px;
    line-height: 1.45;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.family-edit-form textarea[name="conclusao_observacoes"] {
    min-height: 132px;
}

.completion-check {
    border-color: #cbd8e3;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.completion-check:has(input:checked) {
    border-color: rgba(21, 94, 117, 0.55);
    background: #eef8f9;
    box-shadow: inset 0 0 0 1px rgba(21, 94, 117, 0.16), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.switch-control {
    width: 66px;
    min-width: 66px;
    min-height: 42px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px;
    background: #ffffff;
    cursor: pointer;
}

.switch-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-control::before {
    content: "";
    position: absolute;
    left: 5px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #b8c7d5;
    transition: transform 0.15s ease, background 0.15s ease;
}

.switch-control:has(input:checked) {
    border-color: rgba(21, 94, 117, 0.35);
    background: #eef7f9;
}

.switch-control:has(input:checked)::before {
    background: var(--primary);
    transform: translateX(24px);
}

.military-fields,
.family-benefit-fields,
.representative-fields {
    display: grid;
    gap: 16px;
    padding-top: 2px;
}

.military-fields[hidden],
.family-benefit-fields[hidden],
.representative-fields[hidden] {
    display: none;
}

.family-doc-upload {
    display: grid;
    gap: 10px;
}

.family-doc-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.family-doc-upload-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.representative-doc-upload {
    padding-bottom: 4px;
}

.family-doc-dropzone {
    min-height: 128px;
}

.family-doc-dropzone span {
    max-width: 520px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.family-doc-list {
    display: grid;
    gap: 8px;
}

.family-doc-list[hidden] {
    display: none;
}

.family-doc-list > div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.family-existing-docs {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dbe6ee;
    border-radius: 8px;
    background: #f8fafc;
}

.family-existing-docs-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.family-existing-docs-heading span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.family-existing-docs-heading strong {
    color: var(--text);
    font-size: 14px;
}

.family-existing-doc-list > div {
    border-color: #dbe6ee;
}

.family-existing-doc-item.is-marked-for-removal {
    border-color: #f3c0ba;
    background: #fff7f5;
    opacity: 0.74;
}

.family-existing-doc-actions {
    display: grid;
    gap: 8px;
    justify-items: stretch;
}

.family-doc-view-link {
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(21, 94, 117, 0.25);
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--primary);
    background: #ecfeff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.family-doc-view-link:hover,
.family-doc-view-link:focus {
    border-color: var(--primary);
    color: #0f4c5c;
}

.family-doc-remove-action {
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #f3c0ba;
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--danger);
    background: #fff4f2;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.family-doc-remove-action input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.family-doc-remove-action:has(input:checked) {
    border-color: var(--danger);
    color: #ffffff;
    background: var(--danger);
}

.family-doc-preview {
    width: 96px;
    height: 72px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    background: #f8fafc;
}

.family-doc-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.family-doc-preview-icon {
    width: 56px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(21, 94, 117, 0.2);
    border-radius: 6px;
    color: var(--primary);
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.family-birth-grid {
    min-width: 0;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.date-field {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.date-field input[type="date"] {
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.family-doc-info {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.family-doc-info span {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.family-doc-info small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.family-doc-list > div > button {
    min-height: 34px;
    border: 1px solid #f3c0ba;
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--danger);
    background: #fff4f2;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.family-doc-editor-modal {
    width: min(1040px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.family-doc-editor-modal::backdrop {
    background: rgba(15, 23, 42, 0.64);
}

.family-doc-editor-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100vh - 28px);
}

.family-doc-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.family-doc-editor-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
}

.family-doc-editor-close {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 12px;
    color: var(--muted);
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.family-doc-editor-stage {
    min-height: 0;
    padding: 14px;
    background: #edf3f7;
}

.family-doc-editor-stage canvas {
    width: 100%;
    max-height: min(64vh, 640px);
    display: block;
    border: 1px solid #cfdae3;
    border-radius: 8px;
    background: #eef4f8;
    touch-action: none;
}

.family-doc-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.readonly-field {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-muted);
    overflow-wrap: anywhere;
}

.readonly-field span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    background: var(--surface-muted);
    color: var(--muted);
}

.status-open,
.status-aberta {
    background: #e7f6ed;
    color: var(--success);
}

.status-closed,
.status-encerrada {
    background: #eef3f7;
    color: var(--muted);
}

.status-cancelada {
    background: #fdecec;
    color: var(--danger);
}

.action-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.action-summary div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface-muted);
}

.action-summary span,
.action-summary strong {
    display: block;
}

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

.action-summary strong {
    margin-top: 6px;
    font-size: 20px;
}

.registration-app {
    width: min(520px, 100%);
    display: grid;
    gap: 14px;
    margin: 0 auto;
}

.registration-app-header,
.registration-app-panel,
.registration-app-summary div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.registration-app-header {
    display: grid;
    justify-items: start;
    gap: 8px;
    padding: 22px;
}

.registration-app-header h1,
.registration-app-header p,
.registration-app-panel h2,
.registration-app-panel p {
    margin-bottom: 0;
}

.registration-app-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.registration-app-summary div {
    padding: 16px;
}

.registration-app-summary span,
.registration-app-summary strong {
    display: block;
}

.registration-app-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.registration-app-summary strong {
    margin-top: 6px;
    overflow-wrap: anywhere;
}

.registration-app-panel {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.registration-app-button {
    width: 100%;
}

.registration-app-panel small {
    color: var(--muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.residence-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 16px;
    margin-bottom: 18px;
}

.residence-summary-grid.residence-media-grid {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
}

.residence-hero-panel,
.residence-photo-panel {
    min-width: 0;
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.08);
}

.residence-card-heading {
    display: grid;
    gap: 4px;
}

.residence-card-heading span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.residence-card-heading strong {
    min-width: 0;
    color: var(--text);
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.residence-hero-panel p {
    min-width: 0;
    margin-bottom: 0;
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.residence-hero-panel small {
    color: var(--muted);
    font-weight: 700;
}

.residence-meta-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 0;
}

.residence-meta-list div {
    min-width: 0;
    border: 1px solid rgba(216, 224, 232, 0.86);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.residence-meta-list dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.residence-meta-list dd {
    min-width: 0;
    margin: 0;
    color: var(--text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.residence-photo-preview {
    width: 100%;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: #f8fafc;
    cursor: pointer;
}

.residence-photo-preview img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
}

.residence-photo-preview:hover,
.residence-photo-preview:focus {
    border-color: rgba(21, 94, 117, 0.42);
    text-decoration: none;
}

.residence-photo-button {
    width: 100%;
}

.residence-extra-photos-panel {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(216, 224, 232, 0.9);
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.06);
}

.residence-extra-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.residence-action-button {
    min-width: 150px;
    min-height: 44px;
    border: 1px solid rgba(21, 94, 117, 0.28);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--primary-strong);
    background: #ffffff;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(28, 39, 51, 0.08);
}

.residence-action-button:hover,
.residence-action-button:focus {
    border-color: rgba(21, 94, 117, 0.42);
    color: var(--primary-strong);
    background: #eef7f9;
    box-shadow: 0 10px 22px rgba(28, 39, 51, 0.12);
    text-decoration: none;
}

.residence-photo-empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    border: 1px dashed #b8c7d5;
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    background: #f8fafc;
    font-weight: 700;
    text-align: center;
}

.residence-detail-grid {
    margin-bottom: 18px;
}

.detail-panel {
    min-width: 0;
    min-height: 132px;
    border: 1px solid rgba(216, 224, 232, 0.86);
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.06);
}

.detail-panel h2 {
    margin-bottom: 10px;
}

.detail-panel p {
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.family-detail-page {
    display: grid;
    gap: 16px;
}

.family-detail-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.5fr);
    gap: 14px;
}

.family-detail-profile,
.family-detail-status,
.family-detail-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.06);
}

.family-detail-profile {
    display: grid;
    gap: 8px;
}

.family-detail-profile h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.family-detail-profile p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.family-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.family-detail-tags span {
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--primary);
    background: #eef8fb;
    font-size: 12px;
    font-weight: 900;
}

.family-detail-status {
    display: grid;
    align-content: center;
    gap: 8px;
}

.family-detail-status span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.family-detail-status strong {
    font-size: 24px;
    line-height: 1.15;
}

.family-detail-status em {
    width: fit-content;
    max-width: 100%;
    font-style: normal;
    overflow-wrap: anywhere;
}

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

.family-detail-card {
    display: grid;
    gap: 12px;
}

.family-detail-card-wide {
    grid-column: 1 / -1;
}

.family-detail-card-heading {
    display: grid;
    gap: 4px;
}

.family-detail-card-heading span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.family-detail-card-heading strong {
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

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

.family-detail-list-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.family-detail-complementary-list {
    grid-template-columns: 1fr;
}

.family-detail-list div {
    min-width: 0;
    border: 1px solid #eef3f7;
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, 0.72);
}

.family-detail-list dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.family-detail-list dd {
    margin: 3px 0 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.family-detail-pending {
    margin-bottom: 16px;
}

.family-detail-page > .family-detail-pending {
    margin-top: -2px;
    margin-bottom: 18px;
}

.family-detail-documents {
    gap: 14px;
}

.family-detail-documents-empty {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.family-detail-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.family-detail-doc-item {
    min-width: 0;
    display: grid;
    gap: 10px;
    align-content: start;
    border: 1px solid #dbe6ee;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.family-detail-doc-preview {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    padding: 0;
    background: #f8fafc;
    cursor: pointer;
}

.family-detail-doc-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.family-detail-doc-preview:hover,
.family-detail-doc-preview:focus {
    border-color: rgba(21, 94, 117, 0.42);
    outline: 2px solid rgba(21, 94, 117, 0.16);
    outline-offset: 2px;
}

.receipt-pending-lines {
    border-left: 3px solid #111111;
    padding-left: 8px;
}

.status-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--primary-strong);
    background: #eef7f9;
    font-size: 12px;
    font-weight: 800;
}

.status-aberta {
    color: var(--success);
    background: #eaf8f0;
}

.status-encerrada {
    color: var(--muted);
    background: #eef3f7;
}

.status-cancelada {
    color: var(--danger);
    background: #fff4f2;
}

.status-pendente {
    color: #945b00;
    background: #fff7df;
}

.status-autorizado {
    color: var(--success);
    background: #eaf8f0;
}

.status-negado {
    color: var(--danger);
    background: #fff4f2;
}

.table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.signature-alert-panel,
.signature-flow-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #f1d28b;
    border-radius: 8px;
    padding: 16px;
    background: #fffaf0;
}

.signature-alert-panel h2,
.signature-flow-panel h2 {
    margin: 4px 0 4px;
    color: #3b2f16;
    font-size: 20px;
}

.signature-alert-panel p,
.signature-flow-panel p {
    margin: 0;
    color: #6c5a2e;
    font-weight: 700;
}

.signature-flow-action {
    min-height: 44px;
    flex: 0 0 auto;
    border-color: rgba(21, 94, 117, 0.28);
    color: var(--primary-strong);
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(21, 94, 117, 0.12);
    font-weight: 900;
    text-decoration: none;
}

.signature-flow-action::after {
    content: ">";
    font-weight: 900;
}

.signature-flow-action:hover,
.signature-flow-action:focus {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}

.signatures-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.signatures-filter-panel {
    gap: 14px;
}

.signatures-filter-modern-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.signatures-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.signatures-filter-modern-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.signatures-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.signatures-filter-field-wide {
    grid-column: span 6;
}

.signatures-filter-field-medium {
    grid-column: span 4;
}

.signatures-filter-field-compact,
.signatures-filter-field-date {
    grid-column: span 2;
}

.signatures-filter-modern-form .signatures-filter-actions {
    grid-column: 1 / -1;
}

.signatures-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.signatures-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.signatures-filter-field input,
.signatures-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.signatures-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.signatures-filter-field input:focus,
.signatures-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.signatures-filter-form .field,
.signatures-filter-form input,
.signatures-filter-form select {
    min-width: 0;
}

.signatures-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.signatures-filter-actions {
    grid-template-columns: 1fr 1fr;
    grid-column: span 2;
    min-width: 0;
}

.signatures-filter-actions .primary-button,
.signatures-filter-actions .secondary-button {
    min-width: 0;
    white-space: normal;
}

.signatures-list-panel {
    display: grid;
    gap: 14px;
    overflow: visible;
}

.signatures-list {
    display: grid;
    gap: 12px;
}

.signature-list-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(148px, 0.18fr);
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 15px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(28, 39, 51, 0.05);
}

.signature-list-main {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.signature-list-title {
    min-width: 0;
    display: grid;
    justify-items: start;
    gap: 6px;
}

.signature-list-title h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.signature-list-title p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.signature-action-reference {
    min-width: 0;
    display: grid;
    gap: 7px;
    border: 1px solid #badbe4;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 10px 12px;
    background: #eef7f9;
}

.signature-action-reference > span,
.signature-action-reference small {
    display: block;
    color: #44606f;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.25;
    text-transform: uppercase;
}

.signature-action-reference strong {
    display: block;
    color: #123044;
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.signature-action-reference > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.signature-action-reference small {
    border: 1px solid rgba(21, 94, 117, 0.18);
    border-radius: 999px;
    padding: 5px 8px;
    background: #ffffff;
}

.signature-list-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.signature-list-meta div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
}

.signature-list-meta span,
.signature-list-meta small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.signature-list-meta strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.signature-list-actions {
    min-width: 0;
    display: grid;
    align-content: start;
    justify-items: stretch;
    gap: 10px;
}

.signature-list-actions .status-pill,
.signature-list-actions .secondary-button {
    width: 100%;
}

.signatures-empty-panel {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 22px;
    background: #f8fafc;
    text-align: center;
}

.signatures-empty-panel h2 {
    margin: 0 0 6px;
    color: var(--text);
}

.signatures-empty-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.signature-detail-page {
    width: 100%;
    max-width: 1480px;
    margin-inline: auto;
    gap: 18px;
}

.signature-detail-hero,
.signature-request-panel,
.signature-document-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.06);
}

.signature-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 18px;
}

.signature-detail-hero h1 {
    margin: 4px 0 6px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.signature-detail-hero p {
    max-width: 860px;
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.signature-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.signature-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.signature-context-grid article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(28, 39, 51, 0.05);
}

.signature-context-grid span,
.signature-context-grid small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.signature-context-grid strong {
    display: block;
    margin: 6px 0;
    color: var(--text);
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.14;
    overflow-wrap: anywhere;
}

.signature-request-panel,
.signature-document-panel {
    padding: 18px;
    overflow: visible;
}

.signature-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.signature-panel-heading h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: clamp(20px, 2vw, 28px);
}

.signature-request-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 14px;
    align-items: stretch;
}

.signature-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin: 0;
}

.signature-data-grid div,
.signature-status-panel {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.signature-data-grid dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.signature-data-grid dd {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.signature-data-grid .signature-data-wide {
    grid-column: 1 / -1;
}

.signature-status-panel {
    display: grid;
    align-content: start;
    gap: 8px;
    background: #eef7f9;
}

.signature-status-panel h3 {
    margin: 0;
    color: var(--primary-strong);
    font-size: 18px;
}

.signature-status-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.signature-document-signers {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 14px;
}

.signature-document-signers .signature-panel-heading h2 {
    font-size: 18px;
}

.signature-signer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.signature-signer-grid article {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
}

.signature-signer-grid span,
.signature-signer-grid small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.signature-signer-grid strong {
    display: block;
    margin: 4px 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.signature-action-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.6fr) minmax(280px, 1fr);
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 14px;
}

.signature-action-panel form {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.signature-return-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    margin-top: 14px;
}

.signature-return-panel h3 {
    margin: 4px 0;
    color: var(--text);
    font-size: 20px;
}

.signature-return-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.signature-print-ready-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #b7dfca;
    border-radius: 8px;
    padding: 14px;
    margin-top: 14px;
    background: #f0faf4;
}

.signature-print-ready-panel h3 {
    margin: 4px 0;
    color: var(--success);
    font-size: 20px;
}

.signature-print-ready-panel p {
    margin: 0;
    color: #355b46;
    font-weight: 700;
}

.signature-document-stage {
    width: min(100%, 1160px);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    margin-inline: auto;
    background: #eef3f7;
}

.recomecar-delivery-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.recomecar-delivery-status.is-delivered {
    border: 1px solid #a7f3d0;
    background: #dcfce7;
    color: #166534;
}

.recomecar-delivery-status.is-pending {
    border: 1px solid #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

.recomecar-list-table tr.recomecar-row-pending td {
    background: #fff7ed;
}

.recomecar-document-viewport {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    display: grid;
    justify-items: center;
}

.recomecar-document {
    width: 1123px;
    max-width: none;
    transform-origin: top center;
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

.recomecar-document .accountability-page-sheet {
    width: 297mm;
    min-width: 297mm;
    max-width: 297mm;
    min-height: 210mm;
}

.recomecar-list-table {
    font-size: 10px;
    table-layout: fixed;
}

.recomecar-list-table .recomecar-col-number {
    width: 4%;
}

.recomecar-list-table .recomecar-col-protocol {
    width: 13%;
}

.recomecar-list-table .recomecar-col-name {
    width: 25%;
}

.recomecar-list-table .recomecar-col-sex {
    width: 7%;
}

.recomecar-list-table .recomecar-col-birth {
    width: 10%;
}

.recomecar-list-table .recomecar-col-cpf {
    width: 12%;
}

.recomecar-list-table .recomecar-col-rg {
    width: 8%;
}

.recomecar-list-table .recomecar-col-org {
    width: 9%;
}

.recomecar-list-table .recomecar-col-status {
    width: 11%;
}

.recomecar-list-table th,
.recomecar-list-table td {
    padding: 5px 4px;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
}

.recomecar-list-table thead th {
    font-size: 9px;
    line-height: 1.15;
    font-weight: 800;
    white-space: normal;
    overflow-wrap: anywhere;
}

.accountability-list-table.recomecar-list-table th:nth-child(1),
.accountability-list-table.recomecar-list-table td:nth-child(1) {
    width: 4%;
}

.accountability-list-table.recomecar-list-table th:nth-child(2),
.accountability-list-table.recomecar-list-table td:nth-child(2) {
    width: 13%;
}

.accountability-list-table.recomecar-list-table th:nth-child(3),
.accountability-list-table.recomecar-list-table td:nth-child(3) {
    width: 25%;
}

.accountability-list-table.recomecar-list-table th:nth-child(4),
.accountability-list-table.recomecar-list-table td:nth-child(4) {
    width: 7%;
}

.accountability-list-table.recomecar-list-table th:nth-child(5),
.accountability-list-table.recomecar-list-table td:nth-child(5) {
    width: 10%;
}

.accountability-list-table.recomecar-list-table th:nth-child(6),
.accountability-list-table.recomecar-list-table td:nth-child(6) {
    width: 12%;
}

.accountability-list-table.recomecar-list-table th:nth-child(7),
.accountability-list-table.recomecar-list-table td:nth-child(7) {
    width: 8%;
}

.accountability-list-table.recomecar-list-table th:nth-child(8),
.accountability-list-table.recomecar-list-table td:nth-child(8) {
    width: 10%;
}

.accountability-list-table.recomecar-list-table th:nth-child(9),
.accountability-list-table.recomecar-list-table td:nth-child(9) {
    width: 11%;
}

.recomecar-list-table th:nth-child(1),
.recomecar-list-table td:nth-child(1),
.recomecar-list-table th:nth-child(4),
.recomecar-list-table td:nth-child(4),
.recomecar-list-table th:nth-child(5),
.recomecar-list-table td:nth-child(5),
.recomecar-list-table th:nth-child(6),
.recomecar-list-table td:nth-child(6),
.recomecar-list-table th:nth-child(7),
.recomecar-list-table td:nth-child(7),
.recomecar-list-table th:nth-child(8),
.recomecar-list-table td:nth-child(8),
.recomecar-list-table th:nth-child(9),
.recomecar-list-table td:nth-child(9) {
    text-align: center;
}

.recomecar-list-table td:nth-child(5),
.recomecar-list-table td:nth-child(6),
.recomecar-list-table td:nth-child(7) {
    white-space: nowrap;
}

.recomecar-list-table th:nth-child(3),
.recomecar-list-table td:nth-child(3) {
    text-align: left;
    overflow-wrap: break-word;
}

.document-embed-body .recomecar-document {
    width: 1123px;
}

.document-embed-body .recomecar-document .accountability-page-sheet {
    width: 297mm;
    min-width: 297mm;
    max-width: 297mm;
    min-height: 210mm;
}

.recomecar-list-table .recomecar-delivery-status {
    min-width: 0;
    width: 100%;
    padding: 3px 4px;
    font-size: 8.5px;
}

.recomecar-analysis-page {
    position: relative;
}

.recomecar-analysis-page:has(.recomecar-docs-drawer[open]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: 18px;
    align-items: start;
}

.recomecar-analysis-page:has(.recomecar-docs-drawer[open]) > :not(.recomecar-docs-drawer) {
    grid-column: 1;
}

.recomecar-analysis-section {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.recomecar-analysis-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.recomecar-analysis-table-wrap {
    width: 100%;
    min-width: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.recomecar-analysis-table {
    display: block;
    min-width: 0;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.recomecar-analysis-table thead {
    display: none;
}

.recomecar-analysis-table tbody {
    display: grid;
    gap: 12px;
}

.recomecar-analysis-table tr.recomecar-analysis-card-row {
    display: block;
}

.recomecar-analysis-table tr.recomecar-analysis-edit-row {
    display: block;
    margin-top: -8px;
}

.recomecar-analysis-table tr.recomecar-docs-inline-row {
    display: block;
}

.recomecar-analysis-table tr.recomecar-docs-inline-row[hidden] {
    display: none;
}

.recomecar-analysis-table tr.recomecar-analysis-edit-row > td,
.recomecar-analysis-table tr.recomecar-analysis-card-row > td,
.recomecar-analysis-table tr.recomecar-docs-inline-row > td {
    display: block;
    width: 100%;
}

.recomecar-analysis-table th,
.recomecar-analysis-table td {
    display: block;
    border: 0;
    padding: 0;
    vertical-align: top;
}

.recomecar-family-card {
    position: relative;
    display: grid;
    gap: 14px;
    border: 1px solid #dbe6ef;
    border-left: 5px solid #0284c7;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.recomecar-analysis-card-row.is-apta .recomecar-family-card {
    border-left-color: #16a34a;
}

.recomecar-analysis-card-row.is-inapta .recomecar-family-card {
    border-left-color: #d97706;
}

.recomecar-analysis-card-row.is-analysis-done .recomecar-family-card {
    border-color: #bbf7d0;
    border-left-color: #16a34a;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.recomecar-family-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.recomecar-family-card-title {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.recomecar-family-card-id {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 46px;
    height: 46px;
    min-width: 46px;
    padding: 0;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.recomecar-family-card-id-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
}

.recomecar-family-card-title strong,
.recomecar-family-card-title span,
.recomecar-family-card-info strong,
.recomecar-family-card-info span,
.recomecar-family-card-info small {
    display: block;
    overflow-wrap: anywhere;
}

.recomecar-family-card-title strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.25;
}

.recomecar-family-card-title span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.recomecar-family-card-title .recomecar-family-card-id-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    color: #0369a1;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.recomecar-family-card-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.recomecar-family-card-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 1.05fr) minmax(200px, 0.95fr) minmax(220px, 1fr);
    gap: 10px;
}

.recomecar-family-card-info {
    min-width: 0;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.recomecar-family-card-info > span {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.recomecar-family-card-info strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

.recomecar-family-card-info small {
    margin-top: 5px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.4;
}

.recomecar-family-pending-panel {
    display: grid;
    gap: 8px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 12px;
    background: #fff7ed;
}

.recomecar-family-pending-panel strong {
    color: #9a3412;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.recomecar-family-pending-panel div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recomecar-family-pending-panel span {
    display: inline-flex;
    border: 1px solid #fdba74;
    border-radius: 999px;
    padding: 5px 9px;
    background: #ffffff;
    color: #9a3412;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
}

.recomecar-family-pending-panel.is-clear {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.recomecar-family-pending-panel.is-clear strong,
.recomecar-family-pending-panel.is-clear span {
    color: #166534;
}

.recomecar-family-pending-panel.is-clear span {
    border-color: #86efac;
}

.recomecar-analysis-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.recomecar-analysis-actions .secondary-button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    padding-inline: 10px;
}

.recomecar-analysis-actions .secondary-button.is-active {
    border-color: #0f766e;
    color: #ffffff;
    background: #0f766e;
}

.recomecar-analysis-edit-row > td {
    padding: 0;
    background: transparent;
}

.recomecar-analysis-edit-panel[hidden] {
    display: none;
}

.recomecar-analysis-edit-panel {
    border: 1px solid #d8e2ec;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #f8fafc;
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.05);
}

.recomecar-analysis-form,
.recomecar-analysis-mark-form {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.recomecar-analysis-form {
    border-bottom: 1px solid var(--line);
}

.recomecar-analysis-edit-sections {
    display: grid;
    gap: 14px;
}

.recomecar-analysis-edit-section {
    display: grid;
    gap: 14px;
    border: 1px solid #dbe6ef;
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.recomecar-analysis-edit-section > header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #eef3f7;
    padding-bottom: 12px;
}

.recomecar-analysis-edit-section > header > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.recomecar-analysis-edit-section h3,
.recomecar-analysis-edit-section p {
    margin: 0;
}

.recomecar-analysis-edit-section h3 {
    color: var(--text);
    font-size: 16px;
    line-height: 1.3;
}

.recomecar-analysis-edit-section p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.recomecar-section-toggle {
    min-height: 36px;
    padding: 8px 12px;
    white-space: nowrap;
}

.recomecar-representative-section [data-analysis-representative-panel][hidden] {
    display: none;
}

.recomecar-analysis-edit-section .field {
    border: 1px solid #e5edf5;
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
}

.recomecar-analysis-edit-section .field.is-analysis-pending-field,
.recomecar-analysis-map-card.is-analysis-pending-field {
    border-color: #fb923c;
    background: #fff7ed;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12);
}

.recomecar-analysis-edit-section .field.is-analysis-pending-field > span::after {
    content: "Pendente";
    display: inline-flex;
    margin-left: 8px;
    border-radius: 999px;
    padding: 2px 6px;
    background: #fed7aa;
    color: #9a3412;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    vertical-align: middle;
}

.recomecar-analysis-edit-section .field > span {
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.recomecar-analysis-edit-section input,
.recomecar-analysis-edit-section select,
.recomecar-analysis-edit-section textarea {
    margin-top: 6px;
    background: #ffffff;
}

.recomecar-analysis-locked {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recomecar-analysis-locked span {
    display: inline-flex;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 5px 10px;
    background: #ffffff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.recomecar-analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
}

.recomecar-analysis-grid .field,
.recomecar-analysis-mark-form .field {
    min-width: 0;
}

.recomecar-analysis-grid input,
.recomecar-analysis-grid select,
.recomecar-analysis-grid textarea,
.recomecar-analysis-mark-form textarea {
    width: 100%;
    box-sizing: border-box;
}

.recomecar-analysis-wide {
    grid-column: span 2;
}

.recomecar-analysis-map-card {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
    border: 1px solid #cfe0ef;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

.recomecar-analysis-map-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.recomecar-analysis-map-head strong,
.recomecar-analysis-map-head span {
    display: block;
    overflow-wrap: anywhere;
}

.recomecar-analysis-map-head strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

.recomecar-analysis-map-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.recomecar-analysis-map-head > span {
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.recomecar-analysis-map {
    width: 100%;
    min-height: 320px;
    border: 1px solid #dbe6ef;
    border-radius: 8px;
    overflow: hidden;
    background: #eef6fb;
}

.recomecar-analysis-map.leaflet-container {
    font: inherit;
}

.recomecar-analysis-map .leaflet-control-zoom a {
    color: #0f172a;
}

.recomecar-analysis-textarea-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.recomecar-analysis-textarea-field {
    min-width: 0;
    align-self: start;
}

.recomecar-analysis-textarea-field textarea {
    display: block;
    width: 100%;
    min-height: 150px;
    max-height: 420px;
    resize: vertical;
    overflow: auto;
    box-sizing: border-box;
}

.recomecar-analysis-grid-flags {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    align-items: end;
}

.recomecar-analysis-benefit-section {
    display: grid;
    gap: 10px;
}

.recomecar-benefit-toggle-card {
    border-color: #bae6fd;
    background: #f0f9ff;
}

.recomecar-benefit-toggle-card input:checked + span {
    color: #0369a1;
}

.recomecar-benefit-panel[hidden] {
    display: none;
}

.recomecar-benefit-panel {
    display: grid;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
}

.recomecar-benefit-panel .field {
    background: #ffffff;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--text);
    font-weight: 800;
}

.checkbox-card input {
    width: 16px;
    height: 16px;
}

.recomecar-analysis-form-actions {
    display: flex;
    justify-content: flex-end;
}

.recomecar-analysis-mark-form {
    display: block;
    padding-top: 0;
}

.recomecar-analysis-mark-card {
    display: grid;
    gap: 12px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.recomecar-analysis-mark-head {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.recomecar-analysis-mark-head strong,
.recomecar-analysis-mark-head small,
.recomecar-analysis-mark-actions small {
    display: block;
    overflow-wrap: anywhere;
}

.recomecar-analysis-mark-head strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1.3;
}

.recomecar-analysis-mark-head small,
.recomecar-analysis-mark-actions small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.recomecar-analysis-mark-card .field {
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.recomecar-analysis-mark-card textarea {
    min-height: 120px;
    resize: vertical;
}

.recomecar-analysis-mark-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #bbf7d0;
    padding-top: 12px;
}

.recomecar-analysis-mark-actions .primary-button {
    min-width: 220px;
}

.recomecar-assignment-panel,
.recomecar-assignment-notice {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    border: 1px solid #dbe6ef;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.recomecar-user-queue-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr) minmax(220px, auto);
    gap: 14px;
    align-items: center;
    margin-top: 18px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    background: #f0fdf4;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.recomecar-user-queue-panel h2,
.recomecar-user-queue-panel p {
    margin: 0;
}

.recomecar-user-queue-panel h2 {
    color: var(--text);
    font-size: 18px;
}

.recomecar-user-queue-panel p,
.recomecar-user-queue-action small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.recomecar-user-queue-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.recomecar-user-queue-metrics span {
    display: grid;
    gap: 2px;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.recomecar-user-queue-metrics strong {
    color: #14532d;
    font-size: 20px;
}

.recomecar-user-queue-action {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.recomecar-assignment-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.recomecar-assignment-head h2,
.recomecar-assignment-head p,
.recomecar-assignment-notice strong,
.recomecar-assignment-notice span {
    margin: 0;
}

.recomecar-assignment-head h2 {
    color: var(--text);
    font-size: 18px;
}

.recomecar-assignment-head p,
.recomecar-assignment-notice span,
.recomecar-assignment-actions small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.recomecar-assignment-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.recomecar-assignment-metrics span {
    display: inline-flex;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    padding: 6px 10px;
    background: #f0f9ff;
    color: #0369a1;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.recomecar-assignment-form {
    display: grid;
    gap: 12px;
}

.recomecar-managed-queue {
    display: grid;
    gap: 10px;
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

.recomecar-managed-queue-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.recomecar-managed-queue-head strong {
    color: var(--text);
    font-size: 14px;
}

.recomecar-managed-queue-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.recomecar-assignment-history-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.recomecar-assignment-history-action span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.recomecar-managed-queue-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.recomecar-managed-queue-item {
    display: grid;
    gap: 10px;
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.recomecar-managed-queue-item.is-done {
    border-color: #86efac;
    background: #f0fdf4;
}

.recomecar-managed-queue-item header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.recomecar-managed-queue-item strong {
    color: var(--text);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.recomecar-managed-queue-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.recomecar-managed-queue-item header span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.recomecar-managed-queue-item.is-done header span {
    background: #dcfce7;
    color: #166534;
}

.recomecar-managed-queue-item div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recomecar-managed-queue-item small {
    border-radius: 999px;
    padding: 4px 8px;
    background: #ffffff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.recomecar-assignment-config {
    display: grid;
    gap: 12px;
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
}

.recomecar-assignment-strategy {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
    gap: 12px;
    align-items: end;
}

.recomecar-assignment-scope {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 0.8fr);
    gap: 12px;
    align-items: end;
}

.recomecar-assignment-period-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.recomecar-assignment-rule-note {
    min-height: 46px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.4;
}

.recomecar-assignment-preview {
    display: grid;
    gap: 10px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.recomecar-assignment-preview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.recomecar-assignment-preview-head strong {
    color: var(--text);
    font-size: 14px;
}

.recomecar-assignment-preview-head span {
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 900;
}

.recomecar-assignment-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.recomecar-assignment-preview-item {
    display: grid;
    gap: 4px;
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.recomecar-assignment-preview-item strong {
    color: var(--text);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.recomecar-assignment-preview-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.recomecar-assignment-picker {
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    padding: 12px;
    background: #f8fbfd;
}

.recomecar-assignment-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.recomecar-docs-inline-host {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0 0 12px;
}

.recomecar-docs-inline-host .recomecar-docs-drawer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.recomecar-docs-drawer {
    position: sticky;
    top: 16px;
    z-index: 20;
    grid-column: 2;
    grid-row: 1 / span 20;
    display: grid;
    grid-template-rows: auto auto minmax(150px, 28vh) minmax(0, 1fr);
    width: 100%;
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.recomecar-docs-drawer[hidden] {
    display: none;
}

.recomecar-docs-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.recomecar-docs-drawer-header h2 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 20px;
    line-height: 1.2;
}

.recomecar-docs-close {
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.recomecar-docs-close:hover,
.recomecar-docs-close:focus {
    border-color: #0284c7;
    color: #075985;
    background: #f0f9ff;
}

.recomecar-docs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 10px 18px;
    background: #ffffff;
}

.recomecar-docs-toolbar span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.recomecar-docs-external {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.recomecar-docs-drawer-body {
    min-height: 0;
    overflow: auto;
    border-bottom: 1px solid var(--line);
    padding: 12px 18px;
    background: #f8fafc;
}

.recomecar-docs-list {
    display: grid;
    gap: 8px;
}

.recomecar-docs-list a {
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 12px;
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.recomecar-docs-list a.is-active,
.recomecar-docs-list a:focus,
.recomecar-docs-list a:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.14);
    outline: 0;
}

.recomecar-docs-list strong {
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.25;
}

.recomecar-docs-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.recomecar-docs-preview {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: #e5edf5;
}

.recomecar-docs-drawer iframe,
.recomecar-docs-drawer img[data-recomecar-docs-image] {
    width: 100%;
    height: 100%;
    border: 0;
    background: #f8fafc;
}

.recomecar-docs-drawer img[data-recomecar-docs-image] {
    display: block;
    object-fit: contain;
    object-position: center center;
    padding: 10px;
    box-sizing: border-box;
    background: #e5edf5;
}

.recomecar-docs-drawer iframe[hidden] {
    display: none;
}

.recomecar-docs-drawer img[data-recomecar-docs-image][hidden] {
    display: none;
}

.recomecar-docs-placeholder {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    min-height: 100%;
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

.recomecar-docs-placeholder[hidden] {
    display: none;
}

.recomecar-docs-placeholder strong {
    color: var(--text);
    font-size: 16px;
}

.recomecar-docs-placeholder span {
    max-width: 300px;
    font-size: 13px;
    line-height: 1.45;
}

.recomecar-analysis-modal {
    width: min(820px, 94vw);
    max-height: 92vh;
    border: 0;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    color: var(--text);
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.recomecar-analysis-modal[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.recomecar-analysis-modal::backdrop {
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
}

.recomecar-history-modal {
    width: min(920px, 94vw);
}

.recomecar-distribution-history-modal {
    width: min(1080px, 96vw);
}

.recomecar-validation-modal {
    width: min(660px, 94vw);
}

.recomecar-analysis-modal-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    border-bottom: 1px solid #e5edf5;
    padding: 18px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.recomecar-analysis-modal-header .eyebrow {
    margin-bottom: 4px;
    color: #0369a1;
}

.recomecar-analysis-modal-header h3,
.recomecar-analysis-modal-header p {
    margin: 0;
}

.recomecar-analysis-modal-header h3 {
    font-size: 20px;
    line-height: 1.25;
}

.recomecar-analysis-modal-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.recomecar-analysis-modal-icon {
    position: relative;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.recomecar-history-modal .recomecar-analysis-modal-icon {
    font-size: 0;
}

.recomecar-history-modal .recomecar-analysis-modal-icon::before {
    content: "H";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0369a1;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.recomecar-analysis-modal-icon-warning {
    background: #fef2f2;
    color: #b91c1c;
}

.recomecar-analysis-modal-close {
    min-height: 36px;
    border: 1px solid #dbe6ef;
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
}

.recomecar-analysis-modal-close:hover {
    border-color: #0284c7;
    background: #0284c7;
    color: #ffffff;
}

.recomecar-analysis-modal-close:focus {
    border-color: #0284c7;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.recomecar-analysis-modal-close:focus-visible {
    border-color: #0284c7;
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
    outline: none;
}

.recomecar-analysis-modal-body {
    min-height: 0;
    overflow: auto;
    padding: 18px 20px;
    background: #f8fafc;
}

.recomecar-analysis-modal-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.recomecar-distribution-history-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(160px, 0.35fr) minmax(190px, 0.45fr);
    gap: 12px;
    margin-bottom: 14px;
}

.recomecar-distribution-history-list {
    display: grid;
    gap: 12px;
}

.recomecar-distribution-history-item {
    display: grid;
    gap: 12px;
    border: 1px solid #dbe7ef;
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
}

.recomecar-distribution-history-item[hidden] {
    display: none;
}

.recomecar-distribution-history-item header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.recomecar-distribution-history-item header div {
    display: grid;
    gap: 4px;
}

.recomecar-distribution-history-item header strong {
    color: var(--text);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.recomecar-distribution-history-item header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.recomecar-distribution-history-item header em {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.recomecar-distribution-history-item header em.is-open {
    background: #fef3c7;
    color: #92400e;
}

.recomecar-distribution-history-item header em.is-done {
    background: #dcfce7;
    color: #166534;
}

.recomecar-distribution-history-metrics,
.recomecar-distribution-history-analysts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recomecar-distribution-history-metrics span {
    border-radius: 999px;
    padding: 5px 9px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.recomecar-distribution-history-analysts div {
    display: grid;
    gap: 3px;
    min-width: 190px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
}

.recomecar-distribution-history-analysts strong {
    color: var(--text);
    font-size: 12px;
}

.recomecar-distribution-history-analysts span,
.recomecar-distribution-history-analysts small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.recomecar-validation-modal-body {
    display: grid;
    gap: 14px;
}

.recomecar-validation-modal-body p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.45;
}

.recomecar-validation-modal-body ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recomecar-validation-modal-body li {
    position: relative;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 11px 12px 11px 38px;
    background: #fff7f7;
    color: #991b1b;
    font-weight: 900;
    line-height: 1.35;
}

.recomecar-validation-modal-body li::before {
    content: "!";
    position: absolute;
    left: 12px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.recomecar-analysis-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-top: 1px solid #e5edf5;
    padding: 14px 20px;
    background: #ffffff;
}

.recomecar-analysis-modal-footer span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.recomecar-history-list {
    position: relative;
    display: grid;
    gap: 12px;
}

.recomecar-history-list article {
    position: relative;
    display: grid;
    gap: 12px;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    padding: 14px 14px 14px 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.recomecar-history-list article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: #0284c7;
}

.recomecar-history-list header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    align-items: start;
    gap: 12px;
}

.recomecar-history-list header strong {
    color: var(--text);
    font-size: 15px;
    line-height: 1.3;
}

.recomecar-history-list header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.35;
    text-align: right;
}

.recomecar-history-list p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.45;
}

.recomecar-history-list ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.recomecar-history-list li {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    border: 1px solid #e5edf5;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
}

.recomecar-history-list li strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.recomecar-history-list li span {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .recomecar-analysis-modal {
        width: 96vw;
        max-height: 94vh;
    }

    .recomecar-analysis-modal-header {
        grid-template-columns: 38px minmax(0, 1fr);
        padding: 14px;
    }

    .recomecar-analysis-modal-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .recomecar-analysis-modal-close {
        grid-column: 1 / -1;
        width: 100%;
    }

    .recomecar-analysis-modal-body {
        padding: 14px;
    }

    .recomecar-distribution-history-filters {
        grid-template-columns: 1fr;
    }

    .recomecar-distribution-history-item header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .recomecar-distribution-history-analysts div {
        min-width: 100%;
    }

    .recomecar-analysis-modal-footer {
        display: grid;
        grid-template-columns: 1fr;
        padding: 12px 14px;
    }

    .recomecar-analysis-modal-footer span {
        text-align: center;
    }

    .recomecar-analysis-modal-footer .primary-button,
    .recomecar-analysis-modal-footer .secondary-button {
        width: 100%;
        justify-content: center;
    }

    .recomecar-history-list header,
    .recomecar-history-list li {
        grid-template-columns: 1fr;
    }

    .recomecar-history-list header span {
        text-align: left;
    }
}

@media (max-width: 1460px) {
    .recomecar-family-card-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 1180px) {
    .recomecar-analysis-page:has(.recomecar-docs-drawer[open]) {
        grid-template-columns: minmax(0, 1fr);
    }

    .recomecar-analysis-page:has(.recomecar-docs-drawer[open]) > .recomecar-docs-drawer {
        grid-column: 1;
        grid-row: auto;
    }

    .recomecar-docs-drawer {
        position: static;
        scroll-margin-top: 16px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        grid-template-rows: auto auto minmax(110px, 170px) minmax(220px, 1fr);
        height: min(72vh, 620px);
        min-height: 420px;
        max-height: none;
        margin-top: -6px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .recomecar-docs-drawer-body {
        max-height: 170px;
    }
}

@media (max-width: 900px) {
    .recomecar-family-card-main,
    .recomecar-family-card-grid {
        grid-template-columns: 1fr;
    }

    .recomecar-family-card-status {
        justify-content: flex-start;
    }

    .recomecar-analysis-actions {
        grid-template-columns: 1fr;
    }

    .recomecar-analysis-grid,
    .recomecar-analysis-grid-flags,
    .recomecar-analysis-textarea-section {
        grid-template-columns: 1fr;
    }

    .recomecar-analysis-wide {
        grid-column: auto;
    }

    .recomecar-analysis-mark-form {
        grid-template-columns: 1fr;
    }

    .recomecar-analysis-mark-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .recomecar-analysis-mark-actions .primary-button {
        width: 100%;
        min-width: 0;
    }

    .recomecar-assignment-head {
        grid-template-columns: 1fr;
    }

    .recomecar-user-queue-panel {
        grid-template-columns: 1fr;
    }

    .recomecar-user-queue-action {
        justify-items: stretch;
    }

    .recomecar-user-queue-action .primary-button {
        width: 100%;
    }

    .recomecar-assignment-metrics {
        justify-content: flex-start;
    }

    .recomecar-assignment-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .recomecar-assignment-strategy {
        grid-template-columns: 1fr;
    }

    .recomecar-assignment-scope {
        grid-template-columns: 1fr;
    }

    .recomecar-assignment-period-fields {
        grid-template-columns: 1fr;
    }

    .recomecar-assignment-actions .primary-button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .recomecar-family-card {
        padding: 12px;
    }

    .recomecar-family-card-title {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .recomecar-family-card-id {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .recomecar-analysis-edit-section {
        padding: 12px;
    }

    .recomecar-analysis-edit-section > header {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .recomecar-analysis-edit-section > header > span {
        width: 36px;
        height: 36px;
    }

    .recomecar-section-toggle {
        grid-column: 1 / -1;
        width: 100%;
    }

    .recomecar-analysis-map {
        min-height: 260px;
    }

    .recomecar-docs-drawer {
        grid-template-rows: auto auto minmax(96px, 138px) minmax(190px, 1fr);
        height: min(74vh, 520px);
        min-height: 360px;
        max-height: none;
    }

    .recomecar-docs-drawer-header,
    .recomecar-docs-toolbar,
    .recomecar-docs-drawer-body {
        padding-right: 12px;
        padding-left: 12px;
    }

    .recomecar-docs-drawer-header {
        align-items: flex-start;
        gap: 8px;
    }

    .recomecar-docs-drawer-header h2 {
        font-size: 17px;
    }

    .recomecar-docs-drawer-body {
        max-height: 138px;
    }

    .recomecar-docs-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .recomecar-docs-external {
        width: 100%;
        justify-content: center;
    }

    .recomecar-docs-close {
        min-width: 76px;
        min-height: 34px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .recomecar-docs-list a {
        padding: 9px 10px;
    }

    .recomecar-docs-drawer img[data-recomecar-docs-image] {
        padding: 6px;
    }

}

.signature-document-stage iframe {
    width: 100%;
    min-height: 1120px;
    display: block;
    border: 0;
    margin: 0 auto;
    background: #eef3f7;
    overflow: hidden;
}

.signature-document-stage.is-inline-document {
    display: grid;
    justify-items: center;
}

.signature-document-stage.is-inline-document .dti-preview-page {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.signature-document-stage.is-inline-document .dti-document {
    width: 100%;
    max-width: 100%;
}

.signature-document-stage.is-inline-document .dti-page,
.signature-document-stage.is-inline-document .accountability-page-sheet {
    box-sizing: border-box;
}

.document-embed-body {
    margin: 0;
    background: #eef3f7;
    overflow: hidden;
}

.document-embed-body {
    display: grid;
    justify-items: center;
}

.document-print-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border-bottom: 1px solid #c8d6e4;
    box-shadow: 0 8px 20px rgba(28, 39, 51, 0.12);
}

.document-print-toolbar span {
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.document-print-toolbar .primary-button,
.document-print-toolbar .secondary-button {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
}

.document-embed-body .records-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.document-embed-body .dti-document {
    margin: 0 auto;
    width: 794px;
    justify-items: center;
    gap: 18px;
}

.document-embed-body .dti-page {
    width: 210mm;
    min-width: 210mm;
    max-width: 210mm;
    min-height: 297mm;
    padding: 18mm 16mm 16mm;
    box-shadow: none;
}

.document-embed-body .accountability-page-sheet {
    width: 210mm;
    min-width: 210mm;
    max-width: 210mm;
    padding: 18mm 16mm 16mm;
}

.document-embed-body .dti-institutional-header {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    text-align: left;
}

.document-embed-body .dti-page-heading,
.document-embed-body .dti-page-footer {
    display: flex;
    flex-direction: row;
}

.document-embed-body .dti-table,
.document-embed-body .accountability-list-table {
    display: table;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.document-embed-body .dti-table caption,
.document-embed-body .accountability-list-table caption {
    display: table-caption;
}

.document-embed-body .dti-table thead,
.document-embed-body .accountability-list-table thead {
    display: table-header-group;
}

.document-embed-body .dti-table tbody,
.document-embed-body .accountability-list-table tbody {
    display: table-row-group;
}

.document-embed-body .dti-table tr,
.document-embed-body .accountability-list-table tr {
    display: table-row;
    border: 0;
}

.document-embed-body .dti-table th,
.document-embed-body .dti-table td,
.document-embed-body .accountability-list-table th,
.document-embed-body .accountability-list-table td {
    display: table-cell;
    width: auto;
    border: 1px solid #b9c6d2;
}

.document-embed-body .dti-table th {
    width: 22%;
}

.document-embed-body .accountability-info-table th {
    width: 18%;
}

.document-embed-body .accountability-info-table td {
    width: 32%;
}

.print-only {
    display: none;
}

.table-heading h2 {
    margin-bottom: 0;
}

.table-heading span {
    color: var(--muted);
    font-size: 14px;
}

.attachments-panel {
    margin-bottom: 18px;
}

.residence-record-panel {
    overflow-x: visible;
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.06);
}

.residence-record-table {
    min-width: 0;
}

.residence-record-table th,
.residence-record-table td {
    overflow-wrap: anywhere;
}

.residence-family-panel {
    overflow-x: hidden;
}

.residence-family-list {
    display: grid;
    gap: 10px;
}

.residence-family-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    grid-template-areas:
        "main status"
        "meta meta"
        "pending pending"
        "actions actions";
    gap: 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfd;
}

.residence-family-card.has-delivery {
    border-color: #86b7a4;
    background: #f0faf5;
}

.residence-family-main,
.residence-family-meta,
.residence-family-actions {
    min-width: 0;
}

.residence-family-main {
    grid-area: main;
    display: grid;
    gap: 4px;
}

.residence-family-main strong,
.residence-family-main small,
.residence-family-meta strong {
    overflow-wrap: anywhere;
}

.residence-family-main strong {
    font-size: 16px;
    line-height: 1.35;
}

.residence-family-main small {
    color: var(--muted);
    font-weight: 800;
}

.residence-family-status {
    grid-area: status;
    min-width: 0;
    max-width: 100%;
    display: grid;
    justify-items: center;
    gap: 2px;
    border-radius: 8px;
    padding: 9px 10px;
    color: #07543f;
    background: #d9f5e7;
    font-weight: 900;
    text-align: center;
}

.residence-family-card.without-delivery .residence-family-status {
    color: #7a4a00;
    background: #fff3cf;
}

.residence-family-status span {
    font-size: 11px;
    text-transform: uppercase;
}

.residence-family-status strong {
    font-size: 22px;
    line-height: 1;
}

.residence-family-meta {
    grid-area: meta;
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 0.45fr) minmax(0, 1fr);
    gap: 10px;
}

.residence-family-pending {
    grid-area: pending;
    max-width: 100%;
}

.residence-family-meta span {
    min-width: 0;
    display: grid;
    gap: 3px;
    border: 1px solid #eef3f7;
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, 0.68);
}

.residence-family-meta small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.residence-family-meta strong {
    font-size: 13px;
    line-height: 1.35;
}

.residence-family-actions {
    grid-area: actions;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
    gap: 8px;
}

.residence-family-actions .secondary-button,
.residence-family-actions .primary-link-button,
.residence-family-actions .danger-button,
.residence-family-actions .inline-form {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.table-action-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(21, 94, 117, 0.22);
    border-radius: 6px;
    padding: 7px 10px;
    color: var(--primary);
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.table-action-link:hover,
.table-action-link:focus {
    border-color: rgba(21, 94, 117, 0.38);
    background: #eef7f9;
    text-decoration: none;
}

.muted-action {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.family-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(104px, 1fr));
    gap: 6px;
}

.family-row-actions .inline-form,
.family-row-actions .table-action-link,
.family-row-actions .table-danger-button {
    width: 100%;
}

.table-danger-button {
    min-height: 34px;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
}

.limit-reached-pill {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8b26f;
    border-radius: 8px;
    padding: 10px 14px;
    color: #8a4f0a;
    background: #fff7e8;
    font-size: 13px;
    font-weight: 900;
}

.residence-image-modal {
    width: min(1120px, calc(100% - 28px));
    max-width: none;
    max-height: calc(100vh - 28px);
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: transparent;
}

.residence-image-modal::backdrop {
    background: rgba(10, 22, 35, 0.86);
}

.residence-image-modal-content {
    display: grid;
    gap: 12px;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.residence-image-modal-content h2 {
    margin-bottom: 0;
    padding-right: 112px;
    font-size: 18px;
}

.residence-image-modal-content img {
    width: 100%;
    max-height: calc(100vh - 140px);
    border-radius: 6px;
    object-fit: contain;
    background: #f8fafc;
}

.residence-image-modal-close-form {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
}

.residence-image-modal-close {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(21, 94, 117, 0.22);
    border-radius: 8px;
    padding: 8px 13px;
    color: var(--primary-strong);
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(28, 39, 51, 0.12);
    cursor: pointer;
}

.residence-image-modal-close:hover,
.residence-image-modal-close:focus {
    border-color: rgba(21, 94, 117, 0.42);
    background: #eef7f9;
}

.family-doc-modal {
    width: min(1120px, calc(100% - 28px));
    max-width: none;
    max-height: calc(100vh - 28px);
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: transparent;
}

.family-doc-modal::backdrop {
    background: rgba(10, 22, 35, 0.86);
}

.family-doc-modal-content {
    display: grid;
    gap: 12px;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.family-doc-modal-content h2 {
    margin-bottom: 0;
    padding-right: 112px;
    font-size: 18px;
}

.family-doc-modal-content img,
.family-doc-modal-content iframe {
    width: 100%;
    max-height: calc(100vh - 140px);
    border: 0;
    border-radius: 6px;
    background: #f8fafc;
}

.family-doc-modal-content img {
    object-fit: contain;
}

.family-doc-modal-content iframe {
    min-height: calc(100vh - 160px);
}

.family-doc-modal-close-form {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
}

.family-doc-modal-close {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(21, 94, 117, 0.22);
    border-radius: 8px;
    padding: 8px 13px;
    color: var(--primary-strong);
    background: #ffffff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(28, 39, 51, 0.12);
    cursor: pointer;
}

.family-doc-modal-close:hover,
.family-doc-modal-close:focus {
    border-color: rgba(21, 94, 117, 0.42);
    background: #eef7f9;
}

.report-page {
    min-width: 0;
    gap: 18px;
}

.report-hero {
    align-items: flex-start;
    border: 1px solid rgba(21, 94, 117, 0.14);
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #eef7f9 100%);
    box-shadow: 0 14px 34px rgba(28, 39, 51, 0.08);
}

.report-hero h1 {
    margin-bottom: 8px;
}

.report-hero p {
    max-width: 760px;
    margin-bottom: 0;
}

.report-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

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

.report-filter-modern-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.report-filter-form,
.report-filter-modern-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.report-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.report-filter-field-wide {
    grid-column: span 6;
}

.report-filter-field-medium {
    grid-column: span 4;
}

.report-filter-field-compact,
.report-filter-field-date {
    grid-column: span 2;
}

.report-filter-actions {
    grid-column: 1 / -1;
}

.report-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.report-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.report-filter-field input,
.report-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.report-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.report-filter-field input:focus,
.report-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.report-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.report-document {
    min-width: 0;
}

.print-heading {
    margin-bottom: 18px;
}

.print-heading h1 {
    margin-bottom: 6px;
}

.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.report-kpi-card,
.report-insight-card,
.report-metric-panel {
    min-width: 0;
    border: 1px solid rgba(21, 94, 117, 0.14);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.05);
}

.report-kpi-card {
    display: grid;
    gap: 7px;
    padding: 14px;
    align-content: start;
}

.report-kpi-card span,
.report-insight-card span {
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.report-kpi-card strong {
    min-width: 0;
    color: var(--primary-strong);
    font-size: clamp(23px, 2.2vw, 31px);
    line-height: 1;
    overflow-wrap: anywhere;
}

.report-kpi-card small,
.report-insight-card small {
    min-width: 0;
    color: var(--muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.report-insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.report-insight-card {
    display: grid;
    gap: 8px;
    padding: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbfc 100%);
}

.report-insight-card strong {
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.report-panel-grid,
.report-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.report-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.report-section {
    overflow: hidden;
}

.report-data-table {
    min-width: 0;
    table-layout: fixed;
}

.report-data-table th,
.report-data-table td {
    overflow-wrap: anywhere;
}

.report-mini-tables {
    display: grid;
    gap: 14px;
}

.report-mini-tables .compact-table,
.report-section .compact-table {
    min-width: 0;
}

.report-metric-panel {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 15px;
}

.report-metric-panel h2 {
    margin-bottom: 4px;
    font-size: 17px;
}

.report-meter-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(58px, auto);
    align-items: center;
    gap: 10px;
    border: 1px solid #e4ebf2;
    border-radius: 8px;
    padding: 9px 10px;
    background: #f8fafc;
}

.report-meter-row span {
    min-width: 0;
    color: #42546a;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.report-meter-row strong {
    min-width: 0;
    color: var(--primary-strong);
    font-size: 15px;
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}

.report-meter-row small {
    display: inline-block;
    color: var(--muted);
    font-size: 11px;
}

.compact-table {
    min-width: 520px;
}

.signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 64px;
    margin-top: 44px;
}

.signature-grid span {
    display: block;
    border-top: 1px solid var(--text);
}

.signature-grid p {
    margin-top: 8px;
    text-align: center;
}

.receipt-page {
    background: #eef3f7;
}

.receipt-main {
    width: min(100% - 24px, 520px);
    margin: 24px auto;
}

.receipt-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.receipt-preview-shell {
    display: grid;
    justify-items: center;
    gap: 16px;
    width: 100%;
}

.receipt-preview-header {
    margin-bottom: 10px;
}

.receipt-share-status {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.receipt-ticket {
    width: min(100%, 360px);
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
    color: #111111;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
    line-height: 1.35;
    box-shadow: 0 18px 44px rgba(28, 39, 51, 0.13);
}

.receipt-paper-edge {
    height: 9px;
    margin: -9px -18px 12px;
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(135deg, transparent 7px, #ffffff 0) left,
        linear-gradient(225deg, transparent 7px, #ffffff 0) right;
    background-size: 14px 9px;
    background-repeat: repeat-x;
}

.receipt-header,
.receipt-footer {
    display: grid;
    gap: 3px;
    text-align: center;
}

.receipt-header strong {
    font-size: 16px;
    text-transform: uppercase;
}

.receipt-separator {
    border-top: 1px dashed #555555;
    margin: 12px 0;
}

.receipt-lines {
    display: grid;
    gap: 7px;
    margin: 0;
}

.receipt-lines div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
}

.receipt-lines dt {
    color: #333333;
    font-weight: 700;
}

.receipt-lines dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.receipt-items {
    width: 100%;
    border-collapse: collapse;
}

.receipt-items th,
.receipt-items td {
    border-bottom: 1px dashed #999999;
    padding: 6px 0;
    text-align: left;
    vertical-align: top;
}

.receipt-items th:last-child,
.receipt-items td:last-child {
    text-align: right;
}

.receipt-item-note {
    display: block;
    margin-top: 3px;
    color: #333333;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.receipt-note {
    margin-bottom: 0;
    color: #111111;
    overflow-wrap: anywhere;
}

.receipt-signature {
    margin-top: 38px;
}

.receipt-signature span {
    display: block;
    border-top: 1px solid #111111;
}

.receipt-signature p {
    margin: 6px 0 0;
    color: #111111;
    text-align: center;
}

.receipt-footer {
    margin-top: 16px;
    font-size: 11px;
}

.receipt-qr {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.receipt-qr canvas {
    width: 38mm;
    height: 38mm;
    max-width: 100%;
    display: block;
    image-rendering: pixelated;
}

.receipt-qr strong {
    font-size: 12px;
    overflow-wrap: anywhere;
}

.receipt-qr span {
    color: #111111;
    font-size: 11px;
}

.dti-preview-page {
    display: grid;
    gap: 18px;
}

.dti-screen-header .header-actions {
    align-items: center;
}

.dti-document {
    display: grid;
    gap: 18px;
    justify-items: center;
}

.dti-signature-setup {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(28, 39, 51, 0.07);
}

.dti-signature-setup h2 {
    margin: 4px 0 6px;
    font-size: 22px;
    line-height: 1.2;
}

.dti-signature-setup p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.dti-signature-setup form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.dti-primary-signer,
.dti-cosigner-panel {
    display: grid;
    gap: 6px;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.dti-primary-signer > span,
.dti-cosigner-panel > span,
.dti-cosigner-list > span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dti-primary-signer strong,
.dti-primary-signer small {
    overflow-wrap: anywhere;
}

.dti-primary-signer small {
    color: var(--muted);
    font-weight: 800;
}

.dti-cosigner-picker {
    display: grid;
    gap: 10px;
}

.dti-cosigner-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 42px;
    border: 1px dashed #b9c6d2;
    border-radius: 8px;
    padding: 8px;
    background: #ffffff;
}

.dti-cosigner-selected > span:not(.dti-cosigner-chip) {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.dti-cosigner-hint {
    border: 1px solid #e4ebf2;
    border-radius: 8px;
    padding: 9px 10px;
    color: var(--muted);
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.dti-cosigner-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    border: 1px solid rgba(21, 94, 117, 0.2);
    border-radius: 999px;
    padding: 6px 7px 6px 10px;
    background: #eef8fb;
    color: var(--primary);
}

.dti-cosigner-chip strong {
    min-width: 0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.dti-cosigner-chip button {
    border: 0;
    border-radius: 999px;
    padding: 4px 7px;
    color: #ffffff;
    background: var(--danger);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.dti-cosigner-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow: auto;
    padding-right: 2px;
}

.dti-cosigner-options button {
    display: grid;
    min-width: 0;
    border: 1px solid #e4ebf2;
    border-radius: 8px;
    padding: 9px;
    background: #ffffff;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.dti-cosigner-options button:hover,
.dti-cosigner-options button:focus {
    border-color: rgba(21, 94, 117, 0.35);
    background: #eef8fb;
}

.dti-cosigner-options button[hidden] {
    display: none;
}

.dti-cosigner-options strong,
.dti-cosigner-options small,
.dti-cosigner-options span {
    display: block;
    overflow-wrap: anywhere;
}

.dti-cosigner-options small,
.dti-cosigner-options span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.dti-page {
    position: relative;
    width: min(100%, 210mm);
    min-height: 297mm;
    padding: 18mm 16mm 16mm;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    color: #172033;
    overflow-wrap: anywhere;
}

.dti-institutional-header {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 2px solid #155e75;
    margin-bottom: 18px;
}

.dti-institutional-header img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.dti-institutional-header strong,
.dti-page-heading strong {
    display: block;
    color: #123044;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.dti-institutional-header span,
.dti-page-heading span {
    display: block;
    color: #526174;
    font-size: 12px;
    font-weight: 700;
}

.dti-institutional-header h2 {
    margin: 8px 0 0;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.15;
}

.dti-page-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #155e75;
    margin-bottom: 16px;
}

.dti-section {
    margin-bottom: 16px;
}

.dti-section h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.dti-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.dti-table caption {
    padding: 7px 8px;
    background: #eaf4f7;
    border: 1px solid #b9ced8;
    border-bottom: 0;
    color: #0f3c4c;
    font-weight: 900;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dti-table th,
.dti-table td {
    border: 1px solid #b9c6d2;
    padding: 7px 8px;
    vertical-align: top;
}

.dti-table th {
    width: 22%;
    background: #f3f7fa;
    color: #28384a;
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.dti-wrap-value {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.dti-neighborhood-value {
    line-height: 1.35;
}

.dti-table th.dti-neighborhood-label {
    font-size: 10px;
    letter-spacing: 0;
    white-space: nowrap;
}

.dti-family-table {
    max-width: 100%;
    min-width: 0;
    margin-bottom: 12px;
    page-break-inside: avoid;
    break-inside: avoid;
}

.dti-empty,
.dti-signature-pending {
    border: 1px dashed #aebdcc;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
    color: #526174;
    font-size: 13px;
    font-weight: 700;
}

.dti-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}

.dti-photo-grid figure {
    margin: 0;
    border: 1px solid #b9c6d2;
    background: #ffffff;
    page-break-inside: avoid;
    break-inside: avoid;
}

.dti-photo-frame {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e5ebf0;
}

.dti-photo-grid .dti-photo-image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    background: #e5ebf0;
}

.dti-residence-photo-grid .dti-photo-image {
    object-fit: contain;
    object-position: center;
}

.dti-photo-grid figcaption {
    display: grid;
    gap: 3px;
    padding: 7px 8px;
    font-size: 11px;
}

.dti-photo-grid figcaption strong {
    color: #172033;
}

.dti-photo-grid figcaption span {
    color: #526174;
}

.dti-signature-section {
    margin-top: 16px;
}

.dti-signature-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border: 2px solid #155e75;
    border-radius: 8px;
    padding: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f5fbfc 100%);
}

.dti-signature-card img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.dti-signature-card .dti-signature-logo {
    width: 66px;
    height: 66px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.dti-signature-card span {
    color: #155e75;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.dti-signature-card strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.dti-signature-card p {
    margin: 3px 0 0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.dti-cosigner-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.dti-cosigner-list div {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
}

.dti-cosigner-list strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.dti-cosigner-list p {
    margin: 3px 0 0;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.dti-page-footer {
    position: absolute;
    right: 16mm;
    bottom: 8mm;
    left: 16mm;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #b9c6d2;
    padding-top: 6px;
    color: #526174;
    font-size: 10px;
    font-weight: 800;
}

.accountability-page {
    gap: 18px;
}

.accountability-header {
    gap: 12px;
}

.accountability-header > div {
    min-width: 0;
}

.accountability-header h1,
.accountability-header p {
    overflow-wrap: break-word;
}

.accountability-filter-panel {
    padding: 18px;
}

.accountability-filter-panel .table-heading {
    align-items: flex-start;
    gap: 10px;
}

.accountability-filter-panel .table-heading span {
    max-width: 760px;
}

.accountability-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
    gap: 14px;
    align-items: stretch;
}

.accountability-filter-main {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
    gap: 12px;
    align-items: end;
}

.accountability-filter-side {
    display: grid;
    gap: 12px;
    align-content: space-between;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

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

.accountability-filter-form .field {
    min-width: 0;
}

.accountability-filter-form input {
    min-width: 0;
}

.accountability-filter-actions {
    display: flex;
    justify-content: stretch;
    gap: 8px;
    min-width: 0;
}

.accountability-filter-actions .primary-button,
.accountability-filter-actions .secondary-button {
    flex: 1 1 0;
    min-width: 0;
}

.accountability-filter-form .accountability-filter-actions .primary-button,
.accountability-filter-form .accountability-filter-actions .secondary-button {
    flex: 1 1 0;
    min-width: 0;
}

.prestacao-filter-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.prestacao-filter-form {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
}

.prestacao-filter-main {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.prestacao-filter-field {
    grid-column: span 4;
    min-width: 0;
}

.prestacao-filter-field-wide {
    grid-column: span 6;
}

.prestacao-filter-field-medium {
    grid-column: span 6;
}

.prestacao-filter-field-date {
    grid-column: auto;
}

.prestacao-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.prestacao-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.prestacao-filter-field input,
.prestacao-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.prestacao-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.prestacao-filter-field input:focus,
.prestacao-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.prestacao-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.prestacao-filter-side {
    border-color: rgba(21, 94, 117, 0.14);
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.recomecar-filter-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.recomecar-filter-form {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
}

.recomecar-filter-main {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.recomecar-page .recomecar-filter-main,
.recomecar-analysis-page .recomecar-filter-main {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
}

.recomecar-filter-group {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.recomecar-filter-group-search .recomecar-filter-field-query {
    grid-column: span 3;
}

.recomecar-filter-group-search .recomecar-filter-field-action {
    grid-column: span 5;
}

.recomecar-filter-group-search .recomecar-filter-field-location {
    grid-column: span 4;
}

.recomecar-filter-group-status .recomecar-filter-field-status {
    grid-column: span 4;
}

.recomecar-filter-field {
    grid-column: span 4;
    min-width: 0;
}

.recomecar-filter-field-wide {
    grid-column: span 6;
}

.recomecar-filter-field-medium,
.recomecar-filter-field-compact {
    grid-column: span 4;
}

.recomecar-filter-field-date {
    grid-column: auto;
}

.recomecar-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.recomecar-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.recomecar-filter-field input,
.recomecar-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.recomecar-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.recomecar-filter-field input:focus,
.recomecar-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.recomecar-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.recomecar-filter-side {
    border-color: rgba(21, 94, 117, 0.14);
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.accountability-document {
    margin-top: 4px;
    width: 100%;
    min-width: 0;
    overflow: visible;
    padding: 0;
}

.accountability-page-sheet {
    width: min(100%, 210mm);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-bottom: 20mm;
    overflow-wrap: normal;
}

.accountability-section {
    page-break-inside: avoid;
    break-inside: avoid;
}

.accountability-table-wrap {
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.accountability-info-table th {
    width: 18%;
}

.accountability-info-table td {
    width: 32%;
}

.accountability-info-value {
    overflow-wrap: break-word;
    word-break: normal;
}

.accountability-email-value,
.accountability-code-value {
    font-size: 11px;
    line-height: 1.35;
}

.accountability-long-value {
    line-height: 1.35;
}

.accountability-list-table {
    font-size: 11px;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.accountability-list-table th,
.accountability-list-table td {
    vertical-align: middle;
    overflow-wrap: break-word;
    word-break: normal;
}

.accountability-list-table thead th {
    background: #eaf4f7;
    color: #0f3c4c;
    text-align: center;
}

.accountability-list-table th:nth-child(1),
.accountability-list-table td:nth-child(1) {
    width: 8%;
    text-align: center;
    white-space: nowrap;
}

.accountability-list-table th:nth-child(2),
.accountability-list-table td:nth-child(2) {
    width: 32%;
}

.accountability-list-table th:nth-child(3),
.accountability-list-table td:nth-child(3) {
    width: 17%;
    white-space: nowrap;
}

.accountability-list-table th:nth-child(4),
.accountability-list-table td:nth-child(4) {
    width: 19%;
    text-align: center;
}

.accountability-list-table th:nth-child(5),
.accountability-list-table td:nth-child(5) {
    width: 24%;
}

.manual-signature-cell {
    height: 34px;
    background: #ffffff;
}

.accountability-signature-sheet .dti-signature-card {
    width: min(100%, 540px);
    margin-inline: auto;
    margin-bottom: 14px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.accountability-signature-section {
    display: grid;
    gap: 12px;
    justify-items: center;
    text-align: center;
}

.accountability-signature-section > h3,
.accountability-signature-section .dti-signature-pending,
.accountability-signature-sheet .dti-cosigner-list {
    width: min(100%, 540px);
}

.accountability-signature-sheet .dti-cosigner-list {
    margin-inline: auto;
    justify-items: stretch;
    text-align: center;
}

.delivery-qr-panel {
    display: grid;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.05);
}

.delivery-qr-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.delivery-qr-heading h2 {
    margin-bottom: 0;
    font-size: 20px;
}

.delivery-qr-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.delivery-qr-video {
    width: min(100%, 420px);
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0f172a;
    object-fit: cover;
}

.delivery-qr-status {
    margin-bottom: 0;
    color: var(--muted);
    font-weight: 700;
}

.delivery-qr-manual-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.delivery-summary-grid {
    margin-bottom: 16px;
}

.delivery-section-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.delivery-section-nav a {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 14px;
    color: var(--text);
    background: var(--surface);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.delivery-section-nav a.is-active {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.delivery-filter-panel,
.delivery-batch-panel,
.delivery-entry-panel {
    display: grid;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.05);
}

.delivery-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(130px, 0.8fr)) minmax(170px, 0.7fr);
    gap: 12px;
    align-items: end;
}

.delivery-history-filter-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.delivery-history-filter-form > .field {
    min-width: 0;
}

.delivery-history-filter-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.delivery-history-filter-field {
    grid-column: span 3;
    min-width: 0;
}

.delivery-history-filter-field-wide {
    grid-column: span 6;
}

.delivery-history-filter-field-medium {
    grid-column: span 4;
}

.delivery-history-filter-field-compact,
.delivery-history-filter-field-date {
    grid-column: span 2;
}

.delivery-history-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.delivery-history-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.delivery-history-filter-field input,
.delivery-history-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.delivery-history-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.delivery-history-filter-field input:focus,
.delivery-history-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.delivery-history-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.delivery-history-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.delivery-history-filter-actions .primary-button,
.delivery-history-filter-actions .secondary-button {
    flex: 0 1 180px;
    min-width: 140px;
}

.delivery-filter-form > *,
.delivery-batch-form > *,
.delivery-entry-panel > * {
    min-width: 0;
}

.delivery-batch-filter {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) repeat(2, minmax(130px, 0.6fr)) minmax(170px, 0.7fr);
}

.delivery-batch-filter-form {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.delivery-batch-filter-panel {
    border-color: rgba(21, 94, 117, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
    box-shadow: 0 14px 32px rgba(28, 39, 51, 0.07);
}

.delivery-batch-filter-panel .table-heading {
    align-items: flex-start;
}

.delivery-batch-filter-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.delivery-batch-filter-grid > * {
    min-width: 0;
}

.delivery-batch-filter-field {
    grid-column: span 4;
    min-width: 0;
}

.delivery-batch-filter-field-wide {
    grid-column: span 6;
}

.delivery-batch-filter-field-compact,
.delivery-batch-filter-field-date {
    grid-column: span 2;
}

.delivery-batch-filter-field > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.delivery-batch-filter-field > span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.1);
}

.delivery-batch-filter-field input,
.delivery-batch-filter-field select {
    min-height: 52px;
    border-color: #bfd0dd;
    background-color: #ffffff;
    font-weight: 800;
}

.delivery-batch-filter-field input::placeholder {
    color: #7b8b9d;
    font-weight: 700;
}

.delivery-batch-filter-field input:focus,
.delivery-batch-filter-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(21, 94, 117, 0.13);
}

.delivery-batch-filter-field-date input[type="date"] {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.delivery-batch-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    padding-top: 2px;
}

.delivery-batch-filter-actions .primary-button,
.delivery-batch-filter-actions .secondary-button {
    flex: 0 1 190px;
    min-width: 150px;
}

[class*="-filter-panel"],
[class*="-filter-panel"] *,
[class*="-filter-form"],
[class*="-filter-grid"],
[class*="-filter-field"] {
    box-sizing: border-box;
    min-width: 0;
}

[class*="-filter-panel"],
[class*="-filter-form"],
[class*="-filter-grid"],
[class*="-filter-field"],
[class*="-filter-field"] input,
[class*="-filter-field"] select {
    max-width: 100%;
}

[class*="-filter-panel"] input[type="date"],
[class*="-filter-field"] input[type="date"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
}

[class*="-filter-panel"] input[type="date"]::-webkit-date-and-time-value,
[class*="-filter-field"] input[type="date"]::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

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

.delivery-batch-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.delivery-batch-toolbar span {
    color: var(--muted);
    font-weight: 800;
}

.delivery-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    align-items: start;
    gap: 10px;
}

.delivery-type-option,
.delivery-family-card {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfd;
}

.delivery-type-option {
    align-content: start;
    align-self: start;
}

.delivery-type-option:has(input:checked),
.delivery-family-card:has(input:checked) {
    border-color: var(--primary);
    background: #eef8fb;
}

.delivery-family-card.is-delivered {
    border-color: #86b7a4;
    background: #f0faf5;
}

.delivery-family-card.is-pending {
    border-color: #d7e0ea;
}

.delivery-type-option span,
.delivery-family-card span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.delivery-type-check {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.delivery-type-option strong,
.delivery-family-card strong {
    overflow-wrap: anywhere;
}

.delivery-type-option small,
.delivery-family-card small,
.delivery-family-card em {
    color: var(--muted);
    font-style: normal;
    overflow-wrap: anywhere;
}

.delivery-family-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.delivery-family-status {
    align-self: start;
    border-radius: 999px;
    padding: 5px 8px;
    color: #07543f;
    background: #d9f5e7;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
}

.delivery-family-card.is-pending .delivery-family-status {
    color: #7a4a00;
    background: #fff3cf;
}

.delivery-family-items {
    color: #0f5132 !important;
    font-weight: 800;
}

.delivery-batch-empty {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    background: #fbfcfd;
    font-weight: 700;
    text-align: center;
}

.smart-search-field input[type="search"] {
    padding-right: 34px;
}

.delivery-family-list {
    max-height: 520px;
    display: grid;
    gap: 8px;
    overflow: auto;
    padding-right: 4px;
}

.delivery-family-card input,
.delivery-type-option input {
    margin-top: 3px;
}

.delivery-batch-inputs {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) minmax(220px, 1fr);
    gap: 12px;
}

.delivery-type-option-with-fields {
    grid-template-columns: minmax(0, 1fr);
}

.delivery-type-item-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    border-top: 1px solid rgba(100, 116, 139, 0.16);
    padding-top: 10px;
    min-width: 0;
}

.delivery-type-item-fields[hidden] {
    display: none;
}

.delivery-type-item-fields .field {
    min-width: 0;
}

.delivery-type-item-fields input {
    width: 100%;
    min-width: 0;
}

.delivery-form-page {
    display: grid;
    gap: 16px;
}

.delivery-family-alert {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(28, 39, 51, 0.05);
}

.delivery-family-alert.is-delivered {
    border-color: #86b7a4;
    background: #f0faf5;
}

.delivery-family-alert.is-clear {
    border-color: #d7e0ea;
    background: #fbfcfd;
}

.delivery-family-alert-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.delivery-family-alert-heading h2 {
    margin: 2px 0 4px;
    font-size: 20px;
    line-height: 1.25;
}

.delivery-family-alert-heading p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.delivery-family-alert-status {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 7px 10px;
    color: #07543f;
    background: #d9f5e7;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.delivery-family-alert.is-clear .delivery-family-alert-status {
    color: #7a4a00;
    background: #fff3cf;
}

.delivery-family-alert-list {
    display: grid;
    gap: 8px;
}

.delivery-family-alert-list article {
    display: grid;
    gap: 3px;
    border: 1px solid rgba(7, 84, 63, 0.16);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.72);
}

.delivery-family-alert-list strong,
.delivery-family-alert-list span,
.delivery-family-alert-more {
    overflow-wrap: anywhere;
}

.delivery-family-alert-list span,
.delivery-family-alert-more {
    color: var(--muted);
    font-weight: 700;
}

.delivery-data-table td,
.delivery-data-table th {
    overflow-wrap: anywhere;
}

.delivery-table-panel {
    overflow-x: hidden;
}

.delivery-record-list {
    display: grid;
    gap: 10px;
}

.delivery-record-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr) auto;
    grid-template-areas:
        "code family action"
        "items items items"
        "meta meta meta";
    gap: 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfd;
}

.delivery-record-code,
.delivery-record-family,
.delivery-record-items,
.delivery-record-meta {
    min-width: 0;
}

.delivery-record-code {
    grid-area: code;
}

.delivery-record-family {
    grid-area: family;
}

.delivery-record-items {
    grid-area: items;
}

.delivery-record-meta {
    grid-area: meta;
}

.delivery-record-code,
.delivery-record-family,
.delivery-record-items {
    display: grid;
    gap: 4px;
}

.delivery-record-code strong,
.delivery-record-family strong,
.delivery-record-family small,
.delivery-record-items p,
.delivery-record-meta strong,
.delivery-record-meta em {
    overflow-wrap: anywhere;
}

.delivery-record-code strong,
.delivery-record-family strong {
    font-size: 14px;
    line-height: 1.35;
}

.delivery-record-family small,
.delivery-record-meta em {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.delivery-record-items p {
    margin: 0;
    border-top: 1px solid #eef3f7;
    padding-top: 10px;
    font-weight: 800;
    line-height: 1.45;
}

.delivery-record-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.delivery-record-meta span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.delivery-record-meta small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.delivery-record-meta strong {
    font-size: 13px;
    line-height: 1.35;
}

.delivery-record-action {
    grid-area: action;
    align-self: center;
    white-space: nowrap;
}

.delivery-family-history-panel {
    overflow-x: hidden;
}

.delivery-family-history-list {
    display: grid;
    gap: 10px;
}

.delivery-family-history-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "main action"
        "items items"
        "meta meta";
    gap: 12px;
    align-items: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfd;
}

.delivery-family-history-main,
.delivery-family-history-items,
.delivery-family-history-meta {
    min-width: 0;
}

.delivery-family-history-main {
    grid-area: main;
}

.delivery-family-history-items {
    grid-area: items;
}

.delivery-family-history-meta {
    grid-area: meta;
}

.delivery-family-history-main,
.delivery-family-history-items {
    display: grid;
    gap: 4px;
}

.delivery-family-history-main strong,
.delivery-family-history-items p,
.delivery-family-history-meta strong {
    overflow-wrap: anywhere;
}

.delivery-family-history-main strong {
    font-size: 14px;
    line-height: 1.35;
}

.delivery-family-history-items p {
    margin: 0;
    color: var(--text);
    font-weight: 800;
    line-height: 1.45;
}

.delivery-family-history-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.delivery-family-history-meta span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.delivery-family-history-meta small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.delivery-family-history-meta strong {
    font-size: 13px;
    line-height: 1.35;
}

.delivery-family-history-action {
    grid-area: action;
    align-self: center;
    white-space: nowrap;
}

.delivery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.delivery-pagination .secondary-button.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.delivery-pagination .pagination-pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.delivery-pagination .pagination-pages a,
.delivery-pagination .pagination-pages span {
    min-width: 38px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
}

.delivery-pagination .pagination-pages a {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--text);
    background: #ffffff;
    font-weight: 800;
    text-decoration: none;
}

.delivery-pagination .pagination-pages a.is-active {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.delivery-pagination .pagination-pages span {
    color: var(--muted);
    font-weight: 800;
}

.error-page {
    max-width: 620px;
}

.secondary-link {
    font-weight: 700;
}

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

@keyframes opsMapLoading {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

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

    .records-filter-form,
    .action-filter-form,
    .aid-type-filter-form,
    .users-filter-form,
    .family-filter-form,
    .delivery-filter-form,
    .delivery-batch-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cadastro-filter-modern-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .cadastro-filter-field,
    .cadastro-filter-field-compact,
    .cadastro-filter-field-date {
        grid-column: span 3;
    }

    .cadastro-filter-field-wide,
    .cadastro-filter-modern-form .cadastro-filter-actions {
        grid-column: 1 / -1;
    }

    .cadastro-filter-field-date,
    .cadastro-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .report-filter-modern-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .report-filter-modern-form.ops-filter-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .report-filter-field,
    .report-filter-field-compact,
    .report-filter-field-date {
        grid-column: span 3;
    }

    .report-filter-field-date,
    .report-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .ops-filter-form .report-filter-field-wide,
    .ops-filter-form .report-filter-field-medium,
    .ops-filter-form .ops-filter-actions {
        grid-column: 1 / -1;
    }

    .ops-filter-form .report-filter-field,
    .ops-filter-form .report-filter-field-compact,
    .ops-filter-form .report-filter-field-date {
        grid-column: span 3;
    }

    .report-filter-field-wide,
    .report-filter-field-medium,
    .report-filter-modern-form .report-filter-actions {
        grid-column: 1 / -1;
    }

    .report-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }

    .report-insight-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

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

    .report-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

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

    .ops-map-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ops-map-sidebar {
        border-left: 0;
    }

    .delivery-history-filter-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .delivery-history-filter-field,
    .delivery-history-filter-field-compact,
    .delivery-history-filter-field-date {
        grid-column: span 3;
    }

    .delivery-history-filter-field-wide,
    .delivery-history-filter-field-medium {
        grid-column: 1 / -1;
    }

    .delivery-history-filter-field-date,
    .delivery-history-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .delivery-batch-filter-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .delivery-batch-filter-field,
    .delivery-batch-filter-field-compact,
    .delivery-batch-filter-field-date {
        grid-column: span 3;
    }

    .delivery-batch-filter-field-wide {
        grid-column: 1 / -1;
    }

    .action-filter-modern-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .action-filter-field,
    .action-filter-field-compact,
    .action-filter-field-date {
        grid-column: span 3;
    }

    .action-filter-field-date,
    .action-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .action-filter-field-wide,
    .action-filter-field-medium,
    .action-filter-modern-form .action-filter-actions {
        grid-column: 1 / -1;
    }

    .aid-type-filter-modern-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .aid-type-filter-field,
    .aid-type-filter-field-compact,
    .aid-type-filter-field-medium {
        grid-column: span 3;
    }

    .aid-type-filter-field-wide,
    .aid-type-filter-modern-form .aid-type-filter-actions {
        grid-column: 1 / -1;
    }

    .users-filter-modern-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .users-filter-field,
    .users-filter-field-compact {
        grid-column: span 3;
    }

    .users-filter-field-wide,
    .users-filter-modern-form .users-filter-actions {
        grid-column: 1 / -1;
    }

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

    .signatures-filter-modern-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .signatures-filter-field,
    .signatures-filter-field-compact,
    .signatures-filter-field-date {
        grid-column: span 3;
    }

    .signatures-filter-field-wide,
    .signatures-filter-field-medium,
    .signatures-filter-modern-form .signatures-filter-actions {
        grid-column: 1 / -1;
    }

    .signatures-filter-form .records-search-field,
    .signatures-filter-actions {
        grid-column: 1 / -1;
    }

    .signatures-filter-field-date,
    .signatures-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .signature-list-card {
        grid-template-columns: 1fr;
    }

    .signature-list-meta {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }

    .signature-list-actions {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        border-top: 1px solid #eef3f7;
        padding-top: 12px;
    }

    .signature-list-actions .status-pill,
    .signature-list-actions .secondary-button {
        width: auto;
        min-width: 150px;
    }

    .accountability-filter-form {
        grid-template-columns: 1fr;
    }

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

    .prestacao-filter-main {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .recomecar-filter-main {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .recomecar-page .recomecar-filter-main,
    .recomecar-analysis-page .recomecar-filter-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .recomecar-filter-group {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .recomecar-filter-group-search .recomecar-filter-field-query,
    .recomecar-filter-group-search .recomecar-filter-field-location {
        grid-column: span 3;
    }

    .recomecar-filter-group-search .recomecar-filter-field-action,
    .recomecar-filter-group-status .recomecar-filter-field-status {
        grid-column: 1 / -1;
    }

    .prestacao-filter-field,
    .prestacao-filter-field-wide,
    .prestacao-filter-field-medium,
    .prestacao-filter-field-date {
        grid-column: 1 / -1;
    }

    .prestacao-filter-field-date,
    .prestacao-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .recomecar-filter-field,
    .recomecar-filter-field-wide,
    .recomecar-filter-field-medium,
    .recomecar-filter-field-compact,
    .recomecar-filter-field-date {
        grid-column: 1 / -1;
    }

    .recomecar-filter-field-date,
    .recomecar-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .accountability-filter-side {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
        align-items: end;
    }

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

    .records-search-field,
    .action-search-field,
    .aid-type-search-field,
    .users-search-field,
    .family-search-field,
    .records-filter-actions {
        grid-column: 1 / -1;
    }

    .cadastro-filter-field,
    .cadastro-filter-field-wide,
    .cadastro-filter-field-compact,
    .cadastro-filter-field-date,
    .cadastro-filter-modern-form .records-search-field,
    .cadastro-filter-modern-form .cadastro-filter-actions {
        grid-column: 1 / -1;
    }

    .cadastro-filter-modern-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .action-filter-actions {
        grid-column: 1 / -1;
    }

    .aid-type-filter-actions {
        grid-column: 1 / -1;
    }

    .aid-type-filter-field,
    .aid-type-filter-field-wide,
    .aid-type-filter-field-medium,
    .aid-type-filter-field-compact,
    .aid-type-filter-modern-form .aid-type-filter-actions {
        grid-column: 1 / -1;
    }

    .users-filter-actions {
        grid-column: 1 / -1;
    }

    .users-filter-field,
    .users-filter-field-wide,
    .users-filter-field-compact,
    .users-filter-modern-form .users-filter-actions {
        grid-column: 1 / -1;
    }

    .family-filter-actions {
        grid-column: 1 / -1;
    }

    .family-filter-modern-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .family-filter-field,
    .family-filter-field-compact,
    .family-filter-field-date {
        grid-column: span 3;
    }

    .family-filter-modern-form .family-search-field,
    .family-filter-modern-form .family-filter-field-wide,
    .family-filter-modern-form .family-filter-actions {
        grid-column: 1 / -1;
    }

    .family-filter-field-date,
    .family-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .delivery-history-filter-actions {
        grid-column: 1 / -1;
    }

    .record-card {
        grid-template-columns: 1fr;
    }

    .action-card {
        grid-template-columns: 1fr;
    }

    .aid-type-card {
        grid-template-columns: 1fr;
    }

    .user-card {
        grid-template-columns: 1fr;
    }

    .user-card-actions {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        padding-top: 14px;
        padding-left: 0;
    }

    .aid-type-actions {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        padding-top: 14px;
        padding-left: 0;
    }

    .action-card-actions {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        grid-template-columns: minmax(0, 1fr);
        padding-top: 14px;
        padding-left: 0;
    }

    .family-index-card {
        grid-template-columns: 1fr;
    }

    .family-index-actions {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        padding-top: 14px;
        padding-left: 0;
    }

    .family-detail-summary,
    .family-detail-grid {
        grid-template-columns: 1fr;
    }

    .family-detail-list-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .delivery-family-history-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "main"
            "items"
            "meta"
            "action";
    }

    .delivery-record-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "code"
            "family"
            "items"
            "meta"
            "action";
    }

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

    .delivery-record-meta span:nth-child(3) {
        grid-column: 1 / -1;
    }

    .delivery-record-action {
        width: 100%;
        white-space: normal;
    }

    .delivery-family-history-action {
        width: 100%;
        white-space: normal;
    }

    .delivery-family-history-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .delivery-family-history-meta span:nth-child(3) {
        grid-column: 1 / -1;
    }

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

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

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

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

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

    .record-card-side {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        padding-top: 14px;
        padding-left: 0;
    }

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

    .residence-family-meta span:nth-child(3) {
        grid-column: 1 / -1;
    }

    .residence-record-panel {
        overflow-x: visible;
    }

    .residence-record-table {
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .residence-record-table thead {
        display: none;
    }

    .residence-record-table,
    .residence-record-table tbody,
    .residence-record-table tr,
    .residence-record-table td {
        display: block;
    }

    .residence-record-table tr {
        border: 1px solid rgba(216, 224, 232, 0.9);
        border-radius: 8px;
        padding: 10px;
        background: #ffffff;
        box-shadow: 0 8px 18px rgba(28, 39, 51, 0.06);
    }

    .residence-record-table td {
        min-width: 0;
        border-bottom: 0;
        padding: 8px 0;
        overflow-wrap: anywhere;
    }

    .residence-record-table td + td {
        border-top: 1px solid #eef3f7;
    }

    .residence-record-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .residence-record-table td.actions-column {
        width: auto;
        white-space: normal;
    }

    .residence-record-table td.actions-column::before {
        margin-bottom: 8px;
    }

    .residence-record-table .empty-state {
        text-align: left;
        white-space: normal;
    }

    .residence-record-table .empty-state::before {
        content: "";
        display: none;
    }

    .residence-open-page .records-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .residence-open-page .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .residence-open-page .records-summary-grid,
    .residence-open-card .record-card-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .residence-summary-grid.residence-media-grid {
        grid-template-columns: 1fr;
    }

    .residence-main-photo-panel {
        max-width: 560px;
    }

    .residence-media-grid .residence-extra-photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .signatures-page {
        max-width: 100%;
    }

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

    .signatures-filter-panel,
    .signatures-list-panel,
    .signature-request-panel,
    .signature-document-panel {
        padding: 14px;
    }

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

    .signature-list-card {
        padding: 12px;
    }

    .signature-list-title h2 {
        font-size: 18px;
        line-height: 1.2;
    }

    .signature-list-title p {
        font-size: 13px;
        line-height: 1.35;
    }

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

    .signature-list-meta div {
        padding: 9px;
    }

    .signature-list-meta strong {
        font-size: 12px;
    }

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

    .signature-request-body {
        grid-template-columns: 1fr;
    }

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

    .signature-detail-hero {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .signature-detail-hero h1 {
        font-size: 24px;
        line-height: 1.15;
    }

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

    .three-columns,
    .aid-type-fields-grid,
    .family-doc-upload-grid {
        grid-template-columns: 1fr;
    }

    .residence-open-page {
        gap: 14px;
    }

    .residence-open-page .header-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .residence-open-page .header-actions .primary-link-button,
    .residence-open-page .header-actions .secondary-button,
    .residence-open-page .header-actions .limit-reached-pill {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .residence-open-page .records-summary-grid,
    .residence-open-card .record-card-meta,
    .residence-media-grid .residence-extra-photo-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .residence-open-card {
        grid-template-columns: 1fr;
    }

    .residence-open-card .record-card-side {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        padding-top: 14px;
        padding-left: 0;
    }

    .residence-main-photo-panel {
        max-width: none;
    }

    .residence-main-photo-panel .residence-photo-preview img,
    .residence-media-grid .residence-extra-photo-grid .residence-photo-preview img {
        aspect-ratio: 16 / 10;
    }

    .residence-open-page .record-family-meter > div:first-child {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .dti-screen-header .header-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .dti-screen-header .header-actions .primary-button,
    .dti-screen-header .header-actions .secondary-button,
    .dti-screen-header .header-actions .primary-link-button,
    .dti-screen-header .header-actions .inline-form,
    .dti-screen-header .header-actions .danger-button,
    .dti-screen-header .header-actions .limit-reached-pill {
        width: 100%;
        justify-content: center;
    }

    .dti-signature-setup,
    .dti-cosigner-options {
        grid-template-columns: 1fr;
    }

    .dti-page {
        min-height: 0;
        padding: 18px;
    }

    .accountability-document {
        justify-items: start;
    }

    .accountability-page-sheet {
        width: 100%;
        min-width: 0;
    }

    .accountability-info-table,
    .accountability-info-table tbody,
    .accountability-info-table tr,
    .accountability-info-table th,
    .accountability-info-table td {
        display: block;
        width: 100%;
    }

    .accountability-info-table tr {
        border: 1px solid #b9c6d2;
    }

    .accountability-info-table th,
    .accountability-info-table td {
        border: 0;
    }

    .accountability-info-table td + th {
        border-top: 1px solid #d8e1ea;
    }

    .dti-table,
    .dti-table tbody,
    .dti-table caption,
    .dti-table tr,
    .dti-table th,
    .dti-table td {
        display: block;
        width: 100%;
    }

    .dti-table tr {
        border: 1px solid #b9c6d2;
    }

    .dti-table th,
    .dti-table td {
        border: 0;
    }

    .dti-table td + th {
        border-top: 1px solid #d8e1ea;
    }

    .accountability-list-table,
    .accountability-list-table tbody,
    .accountability-list-table caption,
    .accountability-list-table tr,
    .accountability-list-table th,
    .accountability-list-table td {
        display: table-cell;
    }

    .accountability-list-table {
        display: table;
        width: 100%;
        table-layout: fixed;
        min-width: 0;
        font-size: 10px;
    }

    .accountability-list-table thead {
        display: table-header-group;
    }

    .accountability-list-table tbody {
        display: table-row-group;
    }

    .accountability-list-table tr {
        display: table-row;
        border: 0;
    }

    .accountability-list-table th,
    .accountability-list-table td {
        display: table-cell;
        border: 1px solid #b9c6d2;
        padding: 5px 4px;
        overflow-wrap: break-word;
    }

    .dti-page-footer {
        position: static;
        margin-top: 18px;
    }
}

@media (max-width: 760px) {
    [class*="-filter-panel"] [class*="-filter-form"],
    [class*="-filter-panel"] [class*="-filter-grid"],
    [class*="-filter-form"],
    [class*="-filter-grid"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    [class*="-filter-panel"] .field,
    [class*="-filter-panel"] [class*="-filter-field"],
    [class*="-filter-panel"] [class*="-filter-actions"],
    [class*="-filter-field"],
    [class*="-filter-actions"] {
        grid-column: 1 / -1 !important;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    [class*="-filter-panel"] input[type="date"],
    [class*="-filter-field"] input[type="date"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 16px;
    }

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

    .accountability-header .inline-form,
    .accountability-header .primary-button,
    .accountability-header .secondary-button,
    .accountability-header .danger-button,
    .accountability-header .limit-reached-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .accountability-filter-form {
        grid-template-columns: 1fr;
    }

    .accountability-filter-main,
    .accountability-filter-side {
        grid-template-columns: minmax(0, 1fr);
    }

    .recomecar-page .recomecar-filter-main,
    .recomecar-analysis-page .recomecar-filter-main,
    .recomecar-filter-group {
        grid-template-columns: minmax(0, 1fr);
    }

    .recomecar-filter-group-search .recomecar-filter-field-query,
    .recomecar-filter-group-search .recomecar-filter-field-action,
    .recomecar-filter-group-search .recomecar-filter-field-location,
    .recomecar-filter-group-status .recomecar-filter-field-status {
        grid-column: 1 / -1;
    }

    .prestacao-filter-field,
    .prestacao-filter-field-wide,
    .prestacao-filter-field-medium,
    .prestacao-filter-field-date {
        grid-column: 1 / -1;
    }

    .recomecar-filter-field,
    .recomecar-filter-field-wide,
    .recomecar-filter-field-medium,
    .recomecar-filter-field-compact,
    .recomecar-filter-field-date {
        grid-column: 1 / -1;
    }

    .recomecar-filter-field-date,
    .recomecar-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .report-filter-modern-form.ops-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .ops-filter-form .report-filter-field,
    .ops-filter-form .report-filter-field-wide,
    .ops-filter-form .report-filter-field-medium,
    .ops-filter-form .report-filter-field-compact,
    .ops-filter-form .report-filter-field-date,
    .ops-filter-form .ops-filter-actions {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .ops-filter-form .report-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .accountability-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .accountability-filter-actions .primary-button,
    .accountability-filter-actions .secondary-button {
        width: 100%;
        min-width: 0;
    }

    .accountability-document {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
    }

    .accountability-page-sheet {
        width: 100%;
        min-width: 0;
        padding: 14px 10px;
    }

    .accountability-list-table {
        font-size: 9px;
    }

    .accountability-list-table th,
    .accountability-list-table td {
        padding: 4px 3px;
    }

    .accountability-list-table th:nth-child(1),
    .accountability-list-table td:nth-child(1) {
        width: 9%;
    }

    .accountability-list-table th:nth-child(2),
    .accountability-list-table td:nth-child(2) {
        width: 31%;
    }

    .accountability-list-table th:nth-child(3),
    .accountability-list-table td:nth-child(3) {
        width: 18%;
        white-space: normal;
    }

    .accountability-list-table th:nth-child(4),
    .accountability-list-table td:nth-child(4) {
        width: 18%;
    }

    .accountability-list-table th:nth-child(5),
    .accountability-list-table td:nth-child(5) {
        width: 24%;
    }

    .accountability-signature-sheet {
        min-width: 0;
    }

    .accountability-signature-sheet .dti-signature-card {
        grid-template-columns: 1fr;
    }

    .delivery-section-nav {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        overflow-x: visible;
    }

    .delivery-section-nav a {
        width: 100%;
        min-width: 0;
        white-space: normal;
        text-align: center;
    }

    .delivery-filter-form,
    .delivery-batch-filter,
    .delivery-batch-filter-grid,
    .delivery-batch-inputs,
    .delivery-type-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .delivery-batch-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .delivery-batch-filter-actions .primary-button,
    .delivery-batch-filter-actions .secondary-button {
        width: 100%;
        min-width: 0;
    }

    .delivery-batch-filter-field,
    .delivery-batch-filter-field-wide,
    .delivery-batch-filter-field-compact,
    .delivery-batch-filter-field-date {
        grid-column: 1 / -1;
    }

    .delivery-batch-filter-field-date,
    .delivery-batch-filter-field-date input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .delivery-history-filter-field,
    .delivery-history-filter-field-wide,
    .delivery-history-filter-field-medium,
    .delivery-history-filter-field-compact,
    .delivery-history-filter-field-date {
        grid-column: 1 / -1;
    }

    .delivery-history-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .delivery-history-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .delivery-history-filter-actions .primary-button,
    .delivery-history-filter-actions .secondary-button {
        width: 100%;
        min-width: 0;
    }

    .delivery-batch-toolbar,
    .delivery-qr-actions,
    .receipt-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .delivery-batch-toolbar .secondary-button,
    .delivery-qr-actions .primary-button,
    .delivery-qr-actions .secondary-button,
    .delivery-pagination .secondary-button,
    .receipt-actions .primary-button,
    .receipt-actions .secondary-button {
        width: 100%;
    }

    .delivery-family-alert-heading {
        display: grid;
    }

    .delivery-family-alert-status {
        justify-self: start;
        white-space: normal;
    }

    .delivery-family-history-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .delivery-family-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .delivery-family-card em {
        grid-column: 2;
    }

    .delivery-family-status {
        justify-self: start;
        white-space: normal;
    }

    .family-detail-header .header-actions,
    .family-detail-header .secondary-button,
    .family-detail-header .primary-link-button {
        width: 100%;
    }

    .family-detail-list,
    .family-detail-list-wide {
        grid-template-columns: 1fr;
    }

    .signature-alert-panel,
    .signature-flow-panel,
    .signature-detail-hero,
    .signature-request-body,
    .signature-action-panel {
        grid-template-columns: 1fr;
    }

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

    .signature-alert-panel,
    .signature-flow-panel,
    .signature-return-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .signature-print-ready-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .signature-alert-panel .primary-button,
    .signature-flow-panel .secondary-button,
    .signature-hero-actions .secondary-button,
    .signature-hero-actions .primary-button,
    .signature-action-panel .primary-button,
    .signature-action-panel .danger-button,
    .signature-return-panel .primary-button,
    .signature-return-panel form,
    .signature-print-ready-panel .primary-button {
        width: 100%;
    }

    .signatures-filter-form,
    .signature-list-meta,
    .signature-context-grid,
    .signature-data-grid,
    .signature-signer-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .signatures-filter-field,
    .signatures-filter-field-wide,
    .signatures-filter-field-medium,
    .signatures-filter-field-compact,
    .signatures-filter-field-date,
    .signatures-filter-modern-form .records-search-field,
    .signatures-filter-modern-form .signatures-filter-actions {
        grid-column: 1 / -1;
    }

    .signature-list-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .signature-list-actions .status-pill,
    .signature-list-actions .secondary-button {
        width: 100%;
    }

    .signatures-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .signatures-filter-actions .primary-button,
    .signatures-filter-actions .secondary-button {
        width: 100%;
    }

    .report-hero,
    .report-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .report-hero-actions .primary-link-button,
    .report-hero-actions .secondary-button {
        width: 100%;
    }

    .report-filter-field,
    .report-filter-field-wide,
    .report-filter-field-medium,
    .report-filter-field-compact,
    .report-filter-field-date,
    .report-filter-modern-form .report-filter-actions {
        grid-column: 1 / -1;
    }

    .report-filter-modern-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-kpi-grid,
    .report-insight-grid,
    .report-panel-grid,
    .report-card-grid {
        grid-template-columns: 1fr;
    }

    .report-kpi-card,
    .report-insight-card,
    .report-metric-panel {
        padding: 13px;
    }

    .report-section {
        overflow: visible;
        padding: 13px;
    }

    .report-section .table-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .report-data-table,
    .report-data-table tbody,
    .report-data-table tr,
    .report-data-table td {
        display: block;
        width: 100%;
    }

    .report-data-table {
        min-width: 0;
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0;
    }

    .report-data-table thead {
        display: none;
    }

    .report-data-table tr {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 10px;
        background: #ffffff;
    }

    .report-data-table tr:last-child {
        margin-bottom: 0;
    }

    .report-data-table td {
        min-width: 0;
        border: 0;
        padding: 7px 0;
        overflow-wrap: anywhere;
    }

    .report-data-table td:not(.empty-state)::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .report-data-table td.empty-state {
        padding: 4px 0;
        white-space: normal;
    }

    .report-mini-tables {
        gap: 12px;
    }

    .report-meter-row {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 5px;
    }

    .report-meter-row strong {
        justify-self: start;
        text-align: left;
        white-space: normal;
    }

    .ops-hero,
    .ops-filter-heading,
    .ops-map-head,
    .ops-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .ops-hero-status,
    .ops-filter-heading small {
        width: 100%;
    }

    .ops-kpi-grid,
    .ops-intel-grid {
        grid-template-columns: 1fr;
    }

    .ops-panel-card {
        padding: 14px;
    }

    .ops-filter-form .ops-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .ops-filter-actions .primary-button,
    .ops-filter-actions .secondary-button {
        width: 100%;
        min-width: 0;
    }

    .ops-map-stage {
        min-height: 420px;
    }

    .ops-leaflet-canvas {
        min-height: 420px;
    }

    .ops-map-details dl div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .ops-condition-row,
    .ops-ranking-item {
        align-items: start;
        gap: 8px;
    }

    .ops-condition-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .ops-ranking-item {
        grid-template-columns: 32px minmax(0, 1fr) auto;
    }

    .ops-condition-row strong {
        justify-self: end;
        font-size: 18px;
    }

    .ops-condition-row small,
    .ops-ranking-item em {
        grid-column: 1 / -1;
        justify-self: start;
        white-space: normal;
    }

    .ops-ranking-item em {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
        font-size: 18px;
    }

    .ops-condition-label {
        align-items: flex-start;
        line-height: 1.25;
    }

    .ops-ranking-item > span {
        width: 32px;
        height: 32px;
    }

    .ops-ranking-item strong,
    .ops-ranking-item small {
        line-height: 1.25;
    }

    .ops-condition-list,
    .ops-ranking-list {
        gap: 8px;
    }

    .dti-institutional-header,
    .dti-signature-card {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .dti-page-heading,
    .dti-page-footer {
        flex-direction: column;
    }

    .dti-photo-grid {
        grid-template-columns: 1fr;
    }

    .residence-family-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "main"
            "status"
            "meta"
            "pending"
            "actions";
    }

    .residence-family-status {
        min-width: 0;
        width: 100%;
        justify-items: start;
        text-align: left;
    }

    .residence-family-actions {
        grid-template-columns: 1fr;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: static;
    }

    .is-sidebar-collapsed .sidebar,
    .sidebar-collapsed-initial .sidebar {
        width: 100%;
    }

    .is-sidebar-collapsed .sidebar-nav,
    .sidebar-collapsed-initial .sidebar-nav {
        display: none;
    }

    .is-sidebar-collapsed .brand-text,
    .sidebar-collapsed-initial .brand-text {
        display: grid;
    }

    .topbar {
        position: static;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        min-height: 56px;
        gap: 8px;
        padding: 8px 10px;
    }

    .topbar:has(.public-brand) {
        min-height: 68px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 9px 10px;
    }

    .topbar-left {
        display: contents;
    }

    .topbar:has(.public-brand) .topbar-left {
        display: flex;
        grid-column: 1;
        min-width: 0;
    }

    .topbar:has(.public-brand) .institution-title {
        grid-column: auto;
        min-height: 50px;
        grid-template-columns: 54px minmax(0, 1fr);
        column-gap: 9px;
        padding-left: 0;
    }

    .public-header-logo {
        width: 54px;
        height: 46px;
    }

    .topbar:has(.public-brand) .institution-title strong {
        font-size: 12.5px;
        line-height: 1.15;
    }

    .topbar:has(.public-brand) .public-brand {
        grid-column: 2;
        min-height: 34px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .topbar:not(:has(.user-area)) {
        min-height: 68px;
        display: flex;
        padding: 9px 10px;
    }

    .topbar:not(:has(.user-area)) .topbar-left {
        display: flex;
        min-width: 0;
    }

    .topbar:not(:has(.user-area)) .institution-title {
        min-height: 50px;
        grid-template-columns: 54px minmax(0, 1fr);
        column-gap: 9px;
    }

    .topbar:not(:has(.user-area)) .institution-title strong {
        font-size: 12.5px;
        line-height: 1.15;
    }

    .topbar:not(:has(.user-area)) .institution-title span {
        display: block;
        font-size: 11.5px;
        line-height: 1.15;
    }

    .user-area {
        grid-column: 3;
        width: auto;
        max-width: min(46vw, 230px);
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .menu-toggle {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 9px;
    }

    .institution-title {
        grid-column: 2;
        min-width: 0;
        gap: 0;
    }

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

    .institution-title span {
        display: none;
    }

    .user-summary {
        justify-items: start;
        min-width: 0;
        max-width: 150px;
    }

    .user-summary strong,
    .user-summary span {
        text-align: left;
    }

    .user-summary strong {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }

    .user-summary span {
        display: none;
    }

    .logout-button {
        min-height: 34px;
        padding: 7px 9px;
    }

    .main {
        width: min(100% - 18px, 1880px);
        margin: 18px auto;
    }

    .main:has(.ops-dashboard-page) {
        width: min(100% - 18px, 1880px);
        margin: 12px auto 18px;
    }

    .main:has(.report-page) {
        width: min(100% - 18px, 1880px);
        margin: 12px auto 18px;
    }

    .main:has(.recomecar-analysis-page) {
        width: min(100% - 18px, 1880px);
        margin: 12px auto 18px;
    }

    .main:has(.auth-login-page) {
        width: min(100% - 18px, 1480px);
        margin: 10px auto 18px;
    }

    .app-footer {
        width: min(100% - 18px, 1880px);
        align-items: center;
    }

    .auth-panel {
        padding: 22px;
    }

    .auth-login-layout {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-login-hero {
        min-height: 360px;
        padding: 22px;
    }

    .auth-login-hero-copy h1 {
        font-size: clamp(28px, 9vw, 40px);
    }

    .auth-login-panel {
        padding: 22px;
    }

    .auth-login-panel-header {
        align-items: center;
    }

    .auth-login-highlights {
        display: grid;
        grid-template-columns: 1fr;
    }

    .qr-register-panel {
        width: 100%;
        padding: 14px;
    }

    .qr-register-heading h1 {
        font-size: 24px;
        line-height: 1.15;
    }

    .auth-brand-header {
        align-items: flex-start;
    }

    .qr-register-block {
        padding: 12px;
    }

    .qr-register-block-heading {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .qr-register-block-heading .access-profile-badge {
        justify-self: start;
    }

    .auth-secondary-action,
    .auth-secondary-button {
        width: 100%;
    }

    .auth-submit-button {
        white-space: normal;
        text-align: center;
    }

    .auth-submit-button .button-label {
        min-width: 0;
        overflow-wrap: anywhere;
    }

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

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions .primary-link-button,
    .header-actions .secondary-button,
    .header-actions .limit-reached-pill {
        width: 100%;
    }

    .photo-preview {
        grid-template-columns: 1fr;
    }

    .photo-preview img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .photo-preview-button {
        width: 100%;
    }

    .residence-extra-photo-grid {
        grid-template-columns: 1fr;
    }

    .photo-preview-modal {
        padding: 14px;
    }

    .photo-preview-modal img {
        max-height: 78vh;
    }

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

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

    .records-filter-form,
    .action-filter-form,
    .aid-type-filter-form,
    .users-filter-form,
    .family-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .records-search-field,
    .action-search-field,
    .aid-type-search-field,
    .users-search-field,
    .family-search-field,
    .records-filter-actions {
        grid-column: 1 / -1;
    }

    .action-filter-actions {
        grid-column: 1 / -1;
    }

    .aid-type-filter-actions {
        grid-column: 1 / -1;
    }

    .users-filter-actions {
        grid-column: 1 / -1;
    }

    .family-filter-actions {
        grid-column: 1 / -1;
    }

    .family-filter-field,
    .family-filter-field-wide,
    .family-filter-field-compact,
    .family-filter-field-date,
    .family-filter-modern-form .family-search-field,
    .family-filter-modern-form .family-filter-actions {
        grid-column: 1 / -1;
    }

    .family-filter-modern-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .record-card {
        grid-template-columns: 1fr;
    }

    .action-card {
        grid-template-columns: 1fr;
    }

    .aid-type-card {
        grid-template-columns: 1fr;
    }

    .user-card {
        grid-template-columns: 1fr;
    }

    .family-index-card {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

    .residence-open-card .record-card-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .residence-media-grid {
        grid-template-columns: 1fr;
    }

    .records-summary-card {
        padding: 13px;
    }

    .records-summary-card strong {
        font-size: 21px;
    }

    .record-card-side {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        padding-top: 14px;
        padding-left: 0;
    }

    .action-form-card,
    .aid-type-form-card,
    .user-form-card,
    .account-password-card,
    .form-block,
    .aid-type-form-block,
    .user-form-block,
    .account-password-block,
    .family-form-block {
        padding: 14px;
    }

    .panel-form {
        padding: 14px;
    }

    .residence-form-block {
        padding: 12px;
    }

    .family-form-block .form-block-heading,
    .representative-toggle,
    .family-benefit-toggle,
    .military-toggle {
        align-items: flex-start;
        flex-direction: column;
    }

    .vulnerability-picker {
        grid-template-columns: 1fr;
    }

    .switch-control {
        width: 66px;
    }

    .family-existing-docs-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .family-doc-list > div {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .family-doc-preview {
        width: 82px;
        height: 64px;
    }

    .family-existing-doc-actions {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
    }

    .family-doc-list > div > button,
    .family-doc-view-link {
        grid-column: 1 / -1;
        width: 100%;
    }

    .family-doc-remove-action {
        width: 100%;
    }

    .family-birth-grid {
        width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr;
    }

    .date-field,
    .date-field input[type="date"] {
        width: 100%;
        max-width: 100%;
    }

    .action-form-actions {
        position: static;
        margin: 0 -14px -14px;
        padding: 14px;
    }

    .action-card,
    .action-card-meta,
    .qr-modal-actions,
    .registration-app-summary {
        grid-template-columns: 1fr;
    }

    .actions-page .action-card-actions,
    .action-record-card .action-card-actions {
        border-top: 1px solid #eef3f7;
        border-left: 0;
        grid-template-columns: minmax(0, 1fr);
        padding-top: 14px;
        padding-left: 0;
    }

    .residence-summary-grid,
    .residence-meta-list {
        grid-template-columns: 1fr;
    }

    .residence-summary-grid,
    .residence-hero-panel,
    .residence-photo-panel,
    .residence-detail-grid,
    .detail-panel,
    .residence-record-panel,
    .residence-record-table,
    .residence-meta-list,
    .residence-meta-list div {
        min-width: 0;
    }

    .residence-hero-panel,
    .residence-photo-panel {
        padding: 14px;
    }

    .residence-action-button {
        width: 100%;
        min-width: 0;
        justify-content: center;
        text-align: center;
    }

    .family-row-actions {
        grid-template-columns: 1fr;
    }

    .residence-record-panel {
        overflow-x: visible;
        padding: 14px;
    }

    .residence-record-table {
        width: 100%;
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .residence-record-table thead {
        display: none;
    }

    .residence-record-table,
    .residence-record-table tbody,
    .residence-record-table tr,
    .residence-record-table td {
        display: block;
    }

    .residence-record-table tr {
        border: 1px solid rgba(216, 224, 232, 0.9);
        border-radius: 8px;
        padding: 10px;
        background: #ffffff;
        box-shadow: 0 8px 18px rgba(28, 39, 51, 0.06);
    }

    .residence-record-table td {
        min-width: 0;
        border-bottom: 0;
        padding: 8px 0;
        overflow-wrap: anywhere;
    }

    .residence-record-table td + td {
        border-top: 1px solid #eef3f7;
    }

    .residence-record-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 3px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .residence-record-table td.actions-column {
        width: auto;
        white-space: normal;
    }

    .residence-record-table td.actions-column::before {
        margin-bottom: 8px;
    }

    .residence-record-table .empty-state {
        text-align: center;
    }

    .residence-record-table .empty-state::before {
        content: "";
        display: none;
    }

    .residence-image-modal {
        width: min(100% - 20px, 1120px);
        max-height: calc(100vh - 20px);
    }

    .residence-image-modal-content {
        padding: 12px;
    }

    .residence-image-modal-content h2 {
        padding-right: 96px;
        font-size: 16px;
    }

    .residence-image-modal-content img {
        max-height: calc(100vh - 132px);
    }

    .residence-image-modal-close-form {
        top: 10px;
        right: 10px;
    }

    .residence-image-modal-close {
        min-height: 36px;
        padding: 7px 11px;
    }

    .family-doc-modal {
        width: min(100% - 20px, 1120px);
        max-height: calc(100vh - 20px);
    }

    .family-doc-modal-content {
        padding: 12px;
    }

    .family-doc-modal-content h2 {
        padding-right: 96px;
        font-size: 16px;
    }

    .family-doc-modal-content img,
    .family-doc-modal-content iframe {
        max-height: calc(100vh - 132px);
    }

    .family-doc-modal-content iframe {
        min-height: calc(100vh - 148px);
    }

    .family-doc-modal-close-form {
        top: 10px;
        right: 10px;
    }

    .family-doc-modal-close {
        min-height: 36px;
        padding: 7px 11px;
    }

    .indicator-grid {
        grid-template-columns: 1fr;
    }

    .action-summary {
        grid-template-columns: 1fr;
    }

    .two-columns,
    .action-location-grid,
    .detail-grid,
    .location-fields-grid,
    .report-filter-grid,
    .signature-grid {
        grid-template-columns: 1fr;
    }

    .choice-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .choice-option {
        justify-content: center;
        min-height: 48px;
        gap: 0;
        padding: 9px 4px;
        font-size: 13px;
    }

    .choice-option::before {
        display: none;
    }

    .choice-option span {
        font-size: clamp(10px, 3vw, 13px);
    }

    .table-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .delivery-qr-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .institution-title {
        display: none;
    }

    .user-area {
        grid-column: 2 / 4;
        max-width: none;
        width: 100%;
    }

    .user-summary {
        max-width: calc(100vw - 132px);
    }

    .accountability-filter-panel {
        padding: 14px;
    }

    .accountability-filter-side {
        padding: 10px;
    }

    .accountability-date-range {
        grid-template-columns: 1fr;
    }

    .signature-request-panel,
    .signature-document-panel {
        padding: 12px;
    }

    .signature-document-stage {
        padding: 8px;
        width: 100%;
    }

    .signature-document-stage iframe {
        width: 100%;
        min-height: 780px;
    }

    .signature-notice-alert {
        align-items: stretch;
        flex-direction: column;
    }

    .signature-alert-action {
        width: 100%;
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .residence-family-meta {
        grid-template-columns: 1fr;
    }

    .residence-family-meta span:nth-child(3) {
        grid-column: auto;
    }

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

    .delivery-record-meta span:nth-child(3) {
        grid-column: auto;
    }

    .delivery-family-history-meta {
        grid-template-columns: 1fr;
    }

    .delivery-data-table {
        min-width: 0;
    }

    .delivery-data-table thead {
        display: none;
    }

    .delivery-data-table,
    .delivery-data-table tbody,
    .delivery-data-table tr,
    .delivery-data-table td {
        display: block;
        width: 100%;
    }

    .delivery-data-table tr {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 10px;
        background: #ffffff;
    }

    .delivery-data-table td {
        border-bottom: 0;
        padding: 6px 0;
    }

    .delivery-data-table td::before {
        content: attr(data-label);
        display: block;
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .delivery-data-table .actions-column {
        width: auto;
        white-space: normal;
    }

    .records-header h1 {
        font-size: 26px;
        line-height: 1.16;
    }

    .records-summary-grid,
    .record-card-meta,
    .action-card-meta,
    .aid-type-meta,
    .user-card-meta,
    .family-index-meta,
    .residence-open-card .record-card-meta,
    .records-filter-form,
    .action-filter-form,
    .action-filter-actions,
    .aid-type-filter-form,
    .aid-type-filter-actions,
    .users-filter-form,
    .users-filter-actions,
    .family-filter-form,
    .family-filter-actions,
    .records-filter-actions,
    .delivery-qr-manual-form,
    .delivery-filter-form,
    .delivery-batch-filter,
    .delivery-batch-filter-grid,
    .delivery-type-grid,
    .delivery-batch-inputs,
    .records-pagination {
        grid-template-columns: 1fr;
    }

    .action-filter-field,
    .action-filter-field-wide,
    .action-filter-field-medium,
    .action-filter-field-compact,
    .action-filter-field-date,
    .action-filter-modern-form .action-filter-actions {
        grid-column: 1 / -1;
    }

    .action-filter-modern-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .action-filter-field-date,
    .action-filter-field-date input[type="date"],
    .action-form-card input[type="date"] {
        max-width: 100%;
        min-width: 0;
    }

    .cadastro-filter-field,
    .cadastro-filter-field-wide,
    .cadastro-filter-field-compact,
    .cadastro-filter-field-date,
    .cadastro-filter-modern-form .records-search-field,
    .cadastro-filter-modern-form .cadastro-filter-actions {
        grid-column: 1 / -1;
    }

    .family-filter-field,
    .family-filter-field-wide,
    .family-filter-field-compact,
    .family-filter-field-date,
    .family-filter-modern-form .family-search-field,
    .family-filter-modern-form .family-filter-actions {
        grid-column: 1 / -1;
    }

    .signatures-filter-field,
    .signatures-filter-field-wide,
    .signatures-filter-field-medium,
    .signatures-filter-field-compact,
    .signatures-filter-field-date,
    .signatures-filter-modern-form .records-search-field,
    .signatures-filter-modern-form .signatures-filter-actions {
        grid-column: 1 / -1;
    }

    .report-filter-field,
    .report-filter-field-wide,
    .report-filter-field-medium,
    .report-filter-field-compact,
    .report-filter-field-date,
    .report-filter-modern-form .report-filter-actions {
        grid-column: 1 / -1;
    }

    .report-kpi-grid,
    .report-insight-grid,
    .report-panel-grid,
    .report-card-grid {
        grid-template-columns: 1fr;
    }

    .records-list-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-pages {
        justify-content: flex-start;
    }

    .residence-open-page,
    .residence-open-page .record-card,
    .residence-open-page .records-summary-card,
    .residence-open-page .residence-photo-panel,
    .residence-open-page .table-panel,
    .residence-family-card,
    .residence-family-meta,
    .residence-family-actions {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .residence-family-card,
    .residence-family-meta,
    .residence-family-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .residence-open-page .records-summary-card strong,
    .residence-family-main strong,
    .residence-family-meta strong,
    .family-pending-fields strong {
        word-break: break-word;
    }

    .residence-record-table .empty-state {
        white-space: normal;
    }

    .existing-extra-photo-list .photo-preview-actions,
    .photo-preview-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .photo-preview-button {
        width: 100%;
    }
}

@media print {
    .print-only {
        display: block !important;
    }

    .is-print-blocked .dti-document {
        display: none !important;
    }

    .print-blocked-message {
        border: 2px solid #7f1d1d;
        padding: 18mm 12mm;
        color: #7f1d1d;
        font-size: 14pt;
        font-weight: 900;
        text-align: center;
    }

    @page {
        size: A4;
        margin: 12mm;
    }

    @page receipt {
        size: 80mm auto;
        margin: 3mm;
    }

    @page dti {
        size: A4;
        margin: 12mm;
    }

    @page recomecar {
        size: A4 landscape;
        margin: 12mm;
    }

    @page report {
        size: A4;
        margin: 12mm;
    }

    :root {
        --bg: #ffffff;
        --surface: #ffffff;
        --line: #c8c8c8;
        --text: #111111;
        --muted: #444444;
    }

    body {
        background: #ffffff;
        font-size: 12px;
    }

    .no-print,
    .sidebar,
    .topbar,
    .app-footer {
        display: none !important;
    }

    .app-shell,
    .app-content {
        display: block;
        min-height: 0;
    }

    .main {
        width: 100%;
        margin: 0;
    }

    .receipt-page {
        page: receipt;
    }

    body.receipt-page {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
    }

    body.receipt-page * {
        visibility: hidden !important;
    }

    body.receipt-page .receipt-main,
    body.receipt-page .receipt-preview-shell,
    body.receipt-page .receipt-ticket,
    body.receipt-page .receipt-ticket * {
        visibility: visible !important;
    }

    .dti-preview-page {
        display: block;
        width: auto;
        margin: 0;
        padding: 0;
        background: #ffffff;
        page-break-before: auto;
        break-before: auto;
    }

    .dti-document {
        display: block;
        width: auto;
        margin: 0;
        padding: 0;
        page-break-before: auto;
        break-before: auto;
    }

    .document-embed-body {
        display: block !important;
        min-height: 0 !important;
        overflow: visible !important;
        background: #ffffff !important;
    }

    .document-embed-body .records-page {
        display: block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .document-embed-body .dti-document {
        display: block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        transform: none !important;
        transform-origin: initial !important;
    }

    .document-embed-body .dti-page,
    .document-embed-body .accountability-page-sheet {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .recomecar-document .accountability-page-sheet,
    .document-embed-body .recomecar-document .accountability-page-sheet {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
    }

    .recomecar-document-viewport {
        display: block !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .recomecar-document {
        width: auto !important;
        transform: none !important;
        transform-origin: initial !important;
    }

    body.is-printing-signature-document .app-shell,
    body.is-printing-signature-document .app-main,
    body.is-printing-signature-document .content-shell,
    body.is-printing-signature-document .signature-detail-page,
    body.is-printing-signature-document .signature-document-panel,
    body.is-printing-signature-document .signature-document-stage {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.is-printing-signature-document .signature-detail-page > :not(.signature-document-panel),
    body.is-printing-signature-document .signature-document-panel > .signature-panel-heading {
        display: none !important;
    }

    body.is-printing-signature-document .signature-document-stage.is-inline-document .records-page {
        display: block !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.is-printing-report-document {
        background: #ffffff !important;
        overflow: visible !important;
    }

    body.is-printing-report-document .app-shell,
    body.is-printing-report-document .app-content,
    body.is-printing-report-document .main,
    body.is-printing-report-document .report-page,
    body.is-printing-report-document .report-document {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.is-printing-report-document .main > .alert,
    body.is-printing-report-document .report-page > :not(.report-document) {
        display: none !important;
    }

    .dti-page {
        width: auto;
        min-height: 0;
        margin: 0;
        border: 0;
        padding: 0;
        box-shadow: none;
        overflow: visible;
        page-break-after: always;
        break-after: page;
        page-break-inside: auto;
        break-inside: auto;
    }

    .dti-page:first-of-type {
        page-break-before: auto;
        break-before: auto;
    }

    .dti-page:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .dti-institutional-header {
        margin-top: 0;
    }

    .dti-page-footer {
        position: static;
        margin-top: 10mm;
    }

    .dti-table {
        display: table;
        table-layout: fixed;
    }

    .dti-table caption {
        display: table-caption;
    }

    .dti-table tbody {
        display: table-row-group;
    }

    .dti-table tr {
        display: table-row;
        border: 0;
    }

    .dti-table th,
    .dti-table td {
        display: table-cell;
        width: auto;
        border: 1px solid #b9c6d2;
    }

    .dti-table th {
        width: 22%;
    }

    .accountability-page {
        display: block;
    }

    .accountability-document {
        margin: 0;
        overflow: visible;
        padding: 0;
    }

    .accountability-page-sheet {
        padding-bottom: 0;
        max-width: none;
        min-width: 0;
    }

    .accountability-table-wrap {
        overflow: visible;
    }

    .accountability-info-table {
        font-size: 9.5pt;
    }

    .accountability-info-table th {
        width: 18%;
    }

    .accountability-info-table td {
        width: 32%;
    }

    .accountability-email-value,
    .accountability-code-value {
        font-size: 8.5pt;
        line-height: 1.25;
    }

    .accountability-list-table {
        min-width: 0;
        font-size: 9pt;
        table-layout: fixed;
    }

    .accountability-list-table th,
    .accountability-list-table td {
        padding: 4px 5px;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .accountability-list-table th:nth-child(1),
    .accountability-list-table td:nth-child(1) {
        width: 8%;
    }

    .accountability-list-table th:nth-child(2),
    .accountability-list-table td:nth-child(2) {
        width: 32%;
    }

    .accountability-list-table th:nth-child(3),
    .accountability-list-table td:nth-child(3) {
        width: 17%;
        white-space: nowrap;
    }

    .accountability-list-table th:nth-child(4),
    .accountability-list-table td:nth-child(4) {
        width: 18%;
        white-space: nowrap;
    }

    .accountability-list-table th:nth-child(5),
    .accountability-list-table td:nth-child(5) {
        width: 25%;
    }

    body.is-printing-recomecar-document {
        background: #ffffff !important;
        overflow: visible !important;
    }

    body.is-printing-recomecar-document .app-shell,
    body.is-printing-recomecar-document .app-content,
    body.is-printing-recomecar-document .main {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.is-printing-recomecar-document .main > .alert,
    body.is-printing-recomecar-document .recomecar-page > :not(.recomecar-document-viewport) {
        display: none !important;
    }

    body.is-printing-recomecar-document .recomecar-page,
    body.is-printing-recomecar-document .recomecar-document-viewport {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        overflow: visible !important;
    }

    body.is-printing-recomecar-document .recomecar-document {
        page: recomecar;
        display: block !important;
        width: 273mm !important;
        min-width: 273mm !important;
        max-width: 273mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        gap: 0 !important;
        background: #ffffff !important;
        transform: none !important;
        transform-origin: initial !important;
        zoom: 1 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.is-printing-recomecar-document .recomecar-document .accountability-page-sheet {
        display: block !important;
        width: 273mm !important;
        min-width: 273mm !important;
        max-width: 273mm !important;
        min-height: 186mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        page-break-after: always;
        break-after: page;
        overflow: visible !important;
    }

    body.is-printing-recomecar-document .recomecar-document .accountability-page-sheet:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 8.2pt;
        table-layout: fixed;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th,
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td {
        padding: 3px 4px;
        line-height: 1.15;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(1),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(1) {
        width: 4%;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(2),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(2) {
        width: 13%;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(3),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(3) {
        width: 25%;
        white-space: normal;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(4),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(4) {
        width: 7%;
        white-space: normal;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(5),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(5) {
        width: 10%;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(6),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(6) {
        width: 12%;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(7),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(7) {
        width: 8%;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(8),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(8) {
        width: 10%;
    }

    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table th:nth-child(9),
    body.is-printing-recomecar-document .accountability-list-table.recomecar-list-table td:nth-child(9) {
        width: 11%;
    }

    .document-embed-body .recomecar-document {
        page: recomecar;
        display: block !important;
        width: 273mm !important;
        min-width: 273mm !important;
        max-width: 273mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        gap: 0 !important;
        background: #ffffff !important;
        transform: none !important;
        transform-origin: initial !important;
        zoom: 1 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .document-embed-body .recomecar-document .accountability-page-sheet {
        display: block !important;
        width: 273mm !important;
        min-width: 273mm !important;
        max-width: 273mm !important;
        min-height: 186mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        page-break-after: always;
        break-after: page;
        overflow: visible !important;
    }

    .document-embed-body .recomecar-document .accountability-page-sheet:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(1),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(1) {
        width: 4%;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(2),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(2) {
        width: 13%;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(3),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(3) {
        width: 25%;
        white-space: normal;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(4),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(4) {
        width: 7%;
        white-space: normal;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(5),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(5) {
        width: 10%;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(6),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(6) {
        width: 12%;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(7),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(7) {
        width: 8%;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(8),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(8) {
        width: 10%;
    }

    .document-embed-body .accountability-list-table.recomecar-list-table th:nth-child(9),
    .document-embed-body .accountability-list-table.recomecar-list-table td:nth-child(9) {
        width: 11%;
    }

    .manual-signature-cell {
        height: 12mm;
    }

    .accountability-signature-sheet {
        display: block;
        width: 100% !important;
        text-align: center;
    }

    .accountability-signature-sheet .accountability-signature-section {
        display: block;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
        margin-right: auto !important;
        margin-left: auto !important;
        text-align: center;
    }

    .accountability-signature-sheet .dti-signature-card {
        position: static;
        left: auto;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
        margin-right: auto !important;
        margin-bottom: 7mm;
        margin-left: auto !important;
        transform: none;
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .accountability-signature-sheet .dti-signature-card > div,
    .accountability-signature-sheet .dti-signature-logo,
    .accountability-signature-sheet .dti-cosigner-list > span,
    .accountability-signature-sheet .dti-cosigner-list > div {
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .accountability-signature-sheet .dti-signature-logo {
        justify-self: center;
    }

    .accountability-signature-section {
        justify-items: center;
        text-align: center;
    }

    .accountability-signature-section > h3,
    .accountability-signature-section .dti-signature-pending,
    .accountability-signature-sheet .dti-cosigner-list {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
        margin-right: auto !important;
        margin-left: auto !important;
        text-align: center;
    }

    .accountability-signature-sheet .dti-cosigner-list {
        display: grid;
        justify-items: center;
        margin-top: 0;
    }

    .accountability-signature-sheet .dti-cosigner-list > div {
        width: 100%;
    }

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

    .dti-photo-frame {
        overflow: hidden;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .indicator,
    .table-panel,
    .detail-panel,
    .report-document {
        box-shadow: none;
        break-inside: avoid;
    }

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

    .indicator {
        min-height: auto;
        padding: 10px;
    }

    .indicator strong {
        font-size: 22px;
    }

    .table-panel {
        overflow: visible;
    }

    .data-table {
        min-width: 0;
        font-size: 11px;
    }

    .data-table th,
    .data-table td {
        padding: 6px;
    }

    .report-page,
    .report-document {
        display: block;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 0;
        padding: 0;
        background: #ffffff;
        color: #111111;
        overflow: visible;
    }

    .report-page {
        page: report;
    }

    .report-document {
        box-sizing: border-box;
        font-size: 8.6pt;
        line-height: 1.2;
    }

    .report-document * {
        box-sizing: border-box;
    }

    .print-heading {
        border-bottom: 2px solid #155e75;
        margin: 0 0 5mm;
        padding: 0 0 3mm;
    }

    .print-heading .eyebrow {
        color: #155e75;
        font-size: 7.2pt;
        letter-spacing: 0;
    }

    .print-heading h1 {
        margin: 1.5mm 0 1mm;
        color: #111111;
        font-size: 15pt;
        line-height: 1.08;
    }

    .print-heading p {
        margin: 0;
        color: #333333;
        font-size: 8pt;
    }

    .report-kpi-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3mm;
        margin: 0 0 5mm;
    }

    .report-panel-grid,
    .report-card-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 5mm;
        margin: 0 0 6mm;
    }

    .report-mini-tables {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4mm;
    }

    .report-insight-grid {
        display: none;
    }

    .report-kpi-card,
    .report-metric-panel,
    .report-section {
        min-width: 0;
        border: 1px solid #b5c1cc;
        border-radius: 0;
        background: #ffffff !important;
        box-shadow: none !important;
        overflow: visible;
    }

    .report-kpi-card,
    .report-metric-panel {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .report-section {
        break-inside: auto;
        page-break-inside: auto;
    }

    .report-kpi-card {
        gap: 0.8mm;
        padding: 2.4mm;
    }

    .report-kpi-card span {
        color: #333333;
        font-size: 7pt;
    }

    .report-kpi-card strong {
        color: #111111;
        font-size: 13.2pt;
        line-height: 1.05;
    }

    .report-kpi-card small {
        color: #333333;
        font-size: 7.2pt;
        line-height: 1.18;
    }

    .report-section,
    .report-metric-panel {
        margin: 0;
        padding: 0;
    }

    .report-document > .report-section {
        margin: 0 0 6mm;
    }

    .report-document > .report-section:last-child,
    .report-document > .report-panel-grid:last-child,
    .report-document > .report-card-grid:last-child {
        margin-bottom: 0;
    }

    .report-panel-grid .report-section,
    .report-card-grid .report-metric-panel {
        margin: 0;
    }

    .report-section .table-heading,
    .report-metric-panel h2 {
        border-bottom: 1px solid #b5c1cc;
        padding: 2mm 2.4mm;
        margin: 0;
        background: #eef4f7 !important;
    }

    .report-section .table-heading h2,
    .report-metric-panel h2 {
        color: #111111;
        font-size: 9pt;
        line-height: 1.15;
    }

    .report-section .table-heading span {
        color: #333333;
        font-size: 7.2pt;
    }

    .report-data-table {
        display: table;
        width: 100%;
        min-width: 0;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 7.2pt;
    }

    .report-data-table thead {
        display: table-header-group;
    }

    .report-data-table tbody {
        display: table-row-group;
    }

    .report-data-table tr {
        display: table-row;
    }

    .report-data-table th,
    .report-data-table td {
        display: table-cell;
        border: 1px solid #b5c1cc;
        padding: 1.4mm;
        color: #111111;
        overflow-wrap: break-word;
        word-break: normal;
        vertical-align: top;
        white-space: normal;
    }

    .report-data-table th {
        background: #f2f5f7 !important;
        font-size: 6.8pt;
        font-weight: 800;
    }

    .report-data-table small,
    .report-data-table a,
    .report-meter-row span,
    .report-meter-row strong,
    .report-meter-row small,
    .report-kpi-card small {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .report-meter-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(14mm, 26mm);
        align-items: start;
        gap: 1.6mm;
        width: 100%;
        min-width: 0;
        border: 0;
        border-bottom: 1px solid #d4dce4;
        border-radius: 0;
        padding: 1.8mm 2.4mm;
        background: #ffffff !important;
    }

    .report-meter-row:last-child {
        border-bottom: 0;
    }

    .report-meter-row span,
    .report-meter-row strong,
    .report-meter-row small {
        min-width: 0;
        color: #111111;
        font-size: 7.4pt;
        line-height: 1.18;
        white-space: normal;
    }

    .report-meter-row span {
        font-weight: 700;
    }

    .report-meter-row strong {
        justify-self: end;
        width: 100%;
        text-align: right;
    }

    .report-meter-row small {
        display: block;
        color: #333333;
        font-size: 6.6pt;
        text-align: inherit;
    }

    .report-metric-panel .empty-state {
        margin: 0;
        border: 0;
        padding: 3mm;
        color: #333333;
        background: #ffffff !important;
        font-size: 7.4pt;
    }

    .status {
        border-color: #9aa9b7 !important;
        color: #111111 !important;
        background: #ffffff !important;
    }

    .receipt-page,
    .receipt-main {
        width: 100%;
        margin: 0;
        padding: 0;
        background: #ffffff;
    }

    .receipt-preview-shell {
        display: block;
        width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    .receipt-ticket {
        width: 72mm;
        max-width: 72mm;
        margin: 0 auto;
        border: 0;
        border-radius: 0;
        padding: 0;
        font-size: 9pt;
        line-height: 1.22;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
    }

    .receipt-paper-edge {
        display: none;
    }

    .receipt-separator {
        margin: 7px 0;
    }

    .receipt-lines {
        gap: 4px;
    }

    .receipt-lines div {
        grid-template-columns: 23mm minmax(0, 1fr);
        gap: 2mm;
    }

    .receipt-header strong {
        font-size: 11pt;
    }

    .receipt-qr {
        gap: 4px;
    }

    .receipt-qr canvas {
        width: 31mm;
        height: 31mm;
    }

    .receipt-footer {
        margin-top: 8px;
        font-size: 8pt;
    }

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