@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/vendor/fonts/inter/inter-400-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../assets/vendor/fonts/inter/inter-500-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../assets/vendor/fonts/inter/inter-600-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../assets/vendor/fonts/inter/inter-700-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../assets/vendor/fonts/inter/inter-800-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../assets/vendor/fonts/inter/inter-900-latin.woff2') format('woff2');
}

:root {
    --bg: #dbe8f4;
    --nav: #0b2a4a;
    --nav2: #123a64;
    --panel: #ffffff;
    --line: #d8e3f0;
    --text: #0f243a;
    --muted: #607083;
    --accent: #1e66c6;
    --shadow: 0 16px 34px rgba(10, 32, 56, 0.12);
    --sidebar-width: 275px;
    --sidebar-peek-width: 18px;
}

.mobile-startup-splash {
    position: fixed;
    inset: 0;
    z-index: 2070;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.26), transparent 52%), linear-gradient(160deg, rgba(9, 30, 56, 0.97), rgba(14, 52, 94, 0.98));
    backdrop-filter: blur(3px);
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
    visibility: hidden;
}

.mobile-startup-splash.is-visible {
    opacity: 1;
    transform: scale(1);
    visibility: visible;
}

.mobile-startup-splash.is-hidden {
    opacity: 0;
    transform: scale(1.02);
    visibility: hidden;
}

.mobile-startup-splash__content {
    min-width: min(90vw, 360px);
    border: 1px solid rgba(166, 200, 255, 0.35);
    border-radius: 20px;
    padding: 24px 22px;
    text-align: center;
    color: #f3f8ff;
    background: linear-gradient(160deg, rgba(9, 32, 60, 0.78), rgba(20, 68, 126, 0.78));
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.mobile-startup-splash__badge {
    width: 58px;
    height: 58px;
    margin: 0 auto 10px;
    border-radius: 16px;
    background: linear-gradient(140deg, #2a84ff, #7dc0ff);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.04em;
    animation: mobileStartupPulse 1.2s ease-in-out infinite;
}

.mobile-startup-splash__title {
    font-size: 1.15rem;
    font-weight: 700;
}

.mobile-startup-splash__subtitle {
    margin-top: 4px;
    color: rgba(224, 238, 255, 0.92);
    font-size: 0.95rem;
}

@keyframes mobileStartupPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(125, 192, 255, 0.35); }
    70% { transform: scale(1.04); box-shadow: 0 0 0 15px rgba(125, 192, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(125, 192, 255, 0); }
}

@media (max-width: 768px) {
    .mobile-startup-splash {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-startup-splash,
    .mobile-startup-splash__badge {
        animation: none !important;
        transition: none !important;
    }
}

.support-bubble-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: #17406b;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    z-index: 1080;
}

.support-bubble-btn i {
    font-size: 1.35rem;
}

.support-bubble-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #fff;
}

.support-bubble-pulse {
    animation: supportBubblePulse 1.2s ease-in-out infinite;
}

@keyframes supportBubblePulse {
    0% { transform: scale(1); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
    50% { transform: scale(1.08); box-shadow: 0 8px 26px rgba(29,108,209,.5); }
    100% { transform: scale(1); box-shadow: 0 8px 22px rgba(0,0,0,.25); }
}

.support-ticket-list {
    max-height: 62vh;
    overflow: auto;
    border-radius: 12px;
}

.support-message-list {
    height: 48vh;
    overflow: auto;
    background: #f2f6fb;
}

.support-message-item {
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #d6e3f0;
    max-width: 78%;
}

.support-message-item.is-other {
    background: #ffffff;
    margin-right: auto;
}

.support-message-item.is-own {
    background: linear-gradient(135deg, #1656a7, #1d6cd1);
    color: #fff;
    margin-left: auto;
    border-color: #1656a7;
}

.support-message-item.is-own .text-muted {
    color: rgba(255, 255, 255, 0.82) !important;
}

.support-message-text {
    word-break: break-word;
}

.support-modal-content {
    border: 0;
    border-radius: 16px;
}

.support-modal-header {
    background: #1656a7;
    color: #fff;
}

.support-modal-header .btn-close {
    filter: invert(1);
}

.support-left-pane {
    background: #f5f8fc;
    border-radius: 14px;
    padding: 0.75rem;
}

.support-chat-pane {
    background: #fff;
    border-radius: 14px;
    padding: 0.75rem;
    border: 1px solid #e4edf6;
}

.support-chat-topbar {
    background: #f5f8fc;
    border: 1px solid #e1ebf5;
    border-radius: 12px;
    padding: 0.65rem;
}

.support-contact-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #fff;
    border: 1px solid #e2ebf5;
    border-radius: 12px;
    padding: 0.65rem 0.7rem;
}

.support-contact-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1656a7, #1d6cd1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.support-input-wrap .form-control {
    border-radius: 0;
}

.support-input-wrap .btn {
    border-radius: 0 12px 12px 0;
}

#btnSupportAttach {
    border-radius: 12px 0 0 12px !important;
}

/* SIGTAP - abas adicionais no modal de detalhe */
.sigtap-abas-nav .nav-link {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    line-height: 1.2;
}

.sigtap-subabas-nav .nav-link {
    padding: 0.18rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.15;
}

.sigtap-abas-table {
    table-layout: fixed;
    width: 100%;
}

.sigtap-abas-table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 0.86rem;
    vertical-align: top;
}

.sigtap-abas-table th {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 0.82rem;
    font-weight: 700;
    background: #f8f9fb;
    vertical-align: top;
}

/* SIGTAP - relatorio de compatibilidade */
.sigtap-compat-report-wrap {
    border: 1px solid #bcc3cd;
    border-radius: 6px;
    background: #fff;
    padding: 10px;
}

.sigtap-compat-report-empty {
    color: #5e6976;
    text-align: center;
    padding: 24px 12px;
}

.sigtap-compat-header {
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 8px;
    padding-bottom: 7px;
}

.sigtap-compat-org {
    font-size: 0.98rem;
    color: #20242a;
    line-height: 1.3;
}

.sigtap-compat-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #101418;
    margin-top: 5px;
    margin-bottom: 1px;
    letter-spacing: -0.01em;
}

.sigtap-compat-meta {
    font-size: 1rem;
    color: #13161a;
    font-weight: 600;
}

.sigtap-compat-consulta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    border: 1px solid #b7bdc6;
    border-radius: 4px;
    background: #ebeff4;
    padding: 6px 9px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.sigtap-compat-section {
    border: 1px solid #b8bec7;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #fff;
}

.sigtap-compat-group {
    border: 1px solid #aeb5bf;
    border-radius: 4px;
    background: #f8f9fb;
    padding: 8px;
    margin-bottom: 10px;
}

.sigtap-compat-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 6px 7px;
    margin-bottom: 6px;
    border-bottom: 1px solid #c6ccd5;
    font-size: 0.95rem;
    font-weight: 700;
    color: #161b22;
}

.sigtap-compat-group-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: #4a5668;
    background: #edf1f7;
    border: 1px solid #c5cfdb;
    border-radius: 12px;
    padding: 2px 8px;
}

.sigtap-compat-section-title {
    background: #d7dbe2;
    color: #1b2026;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid #b8bec7;
    padding: 6px 8px;
}

.sigtap-compat-section-consulta {
    background: #f5f6f8;
    border-bottom: 1px solid #ccd2da;
    padding: 5px 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1c2127;
}

.sigtap-compat-table-official thead th {
    background: #f1f3f6;
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #2b3139;
    border-bottom: 1px solid #cbd2db;
    padding: 5px 8px;
}

.sigtap-compat-table-official td {
    border-bottom: 1px solid #d5dae1;
    padding: 6px 8px;
    vertical-align: top;
}

.sigtap-compat-proc {
    font-weight: 600;
    color: #11161b;
}

.sigtap-compat-row-first .sigtap-compat-proc {
    border-top: 1px solid #b9bfc8;
    padding-top: 7px;
}

.sigtap-compat-qtd,
.sigtap-compat-desde {
    width: 1%;
    white-space: nowrap;
    font-weight: 600;
    color: #2e343c;
}

.sigtap-compat-actions-head,
.sigtap-compat-actions-cell {
    width: 1%;
    white-space: nowrap;
}

.sigtap-compat-actions-head {
    text-align: right;
}

.sigtap-compat-actions-cell {
    text-align: right;
}

.sigtap-procedimento-table th,
.sigtap-procedimento-table td {
    white-space: normal;
    word-break: break-word;
    vertical-align: top;
}

.sigtap-procedimento-table th:nth-child(3),
.sigtap-procedimento-table td:nth-child(3) {
    min-width: 340px;
}

.sigtap-procedimento-table th:nth-child(4),
.sigtap-procedimento-table td:nth-child(4) {
    min-width: 170px;
}

@media (max-width: 768px) {
    .sigtap-compat-title {
        font-size: 1.55rem;
    }

    .sigtap-compat-table-official thead th {
        font-size: 0.73rem;
    }

    .sigtap-compat-table-official td {
        font-size: 0.88rem;
    }
}

/* Modal de pendência do faturamento */
.faturamento-pendencia-section + .faturamento-pendencia-section {
    border-top: 1px solid #e6edf6;
    padding-top: 0.9rem;
}

.faturamento-pendencia-resumo {
    background: #f3f8ff;
    border: 1px solid #d9e7fb !important;
}

.faturamento-pendencia-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #5b6f86;
}

.faturamento-pendencia-value {
    font-size: 0.93rem;
    font-weight: 700;
    color: #0f2f57;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.faturamento-pendencia-table-wrap {
    max-height: 250px;
}

.faturamento-pendencia-table td,
.faturamento-pendencia-table th {
    vertical-align: top;
}

.gp-paginator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #d8e3f0;
    border-radius: 10px;
    background: #f7fbff;
}

.gp-paginator__summary {
    color: #4e6278;
    font-size: 0.88rem;
    font-weight: 600;
}

.gp-paginator__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gp-paginator__per-page-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #334b63;
    font-size: 0.84rem;
    font-weight: 600;
}

.gp-paginator__per-page {
    width: 80px;
}

.gp-paginator__buttons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gp-paginator__pages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 767.98px) {
    .faturamento-pendencia-value {
        white-space: normal;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(30, 102, 198, 0.15), transparent 26%), var(--bg);
}

body.login-theme-enabled {
    position: relative;
    background: var(--bg);
}

body.login-theme-enabled::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: var(--login-theme-image);
    background-repeat: no-repeat;
    background-size: var(--login-theme-fit, cover);
    background-position: var(--login-theme-position, center center);
}

body.login-theme-enabled::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(8, 21, 40, var(--login-theme-overlay, 0.35));
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body.flow-initializing #painel-internacao {
    visibility: hidden;
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    box-shadow: var(--shadow);
    border: 1px solid #f0f5fb;
    backdrop-filter: blur(2px);
}

.login-theme-preview {
    position: relative;
    min-height: 260px;
    border-radius: 14px;
    border: 1px solid #d8e3f0;
    background: radial-gradient(circle at top left, rgba(30, 102, 198, 0.15), transparent 28%), #dbe8f4;
    background-image: var(--preview-login-image, radial-gradient(circle at top left, rgba(30, 102, 198, 0.15), transparent 28%));
    background-size: var(--preview-login-fit, cover);
    background-position: var(--preview-login-position, center center);
    background-repeat: no-repeat;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.login-theme-preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 21, 40, var(--preview-login-overlay, 0.35));
}

.login-theme-preview-card {
    position: relative;
    z-index: 1;
    width: min(88%, 360px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(9, 31, 57, 0.2);
    padding: 18px;
}

.login-theme-preview-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: #0b2a4a;
}

.login-theme-preview-subtitle {
    color: #5e7288;
    margin-top: 6px;
    font-size: 0.95rem;
}

.auth-head {
    padding: 22px 24px 10px;
}

.auth-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nav);
}

.auth-subtitle {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.95rem;
}

.auth-body {
    padding: 0 24px 24px;
}

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

.layout,
.main,
.panel,
#painel-internacao {
    min-width: 0;
}

.sidebar-toggle-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 2050;
    width: 42px;
    height: 42px;
    border: 1px solid #d1e2f5;
    border-radius: 12px;
    background: #ffffff;
    color: #0f3c72;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(10, 32, 56, 0.15);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 18, 35, 0.45);
    z-index: 2030;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.sidebar {
    width: var(--sidebar-width);
    background: #0e2038;
    color: #eef4ff;
    padding: 18px 14px;
    padding-right: 10px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2040;
    overflow-y: auto;
    scrollbar-gutter: stable;
    box-sizing: border-box;
    transition: transform 0.24s ease;
    will-change: transform;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 8px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

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

.brand-badge {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #256fda, #1549a6);
    font-weight: 800;
}

.brand-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.brand-subtitle {
    font-size: 0.74rem;
    opacity: 0.8;
}

.sidebar-pin-btn {
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #eaf2ff;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar-pin-btn:hover {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-pin-btn[aria-pressed="true"] {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.18);
}

.nav-title {
    margin: 14px 10px 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    opacity: 0.66;
    font-weight: 700;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #cfd8e8;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 6px;
}

.nav-link-custom.active,
.nav-link-custom:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-toggle {
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    color: #9fb1cc;
}

.nav-group-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-group-chevron {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-group-toggle[aria-expanded="false"] .nav-group-chevron {
    transform: rotate(-90deg);
}

.nav-group-body {
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 14px;
}

.nav-link-custom.nav-link-sub {
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 10px;
}

.nav-subgroup-toggle {
    justify-content: space-between;
}

.nav-subgroup-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-subgroup-toggle[aria-expanded="false"] .nav-group-chevron {
    transform: rotate(-90deg);
}

.nav-subgroup-body {
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 20px;
}

.nav-link-custom.nav-link-subsub {
    font-size: 0.82rem;
    font-weight: 500;
    padding: 7px 10px;
}

.nav-link-custom.nav-link-subsub.active {
    background: rgba(55, 138, 221, 0.25);
    color: #fff;
}

.nav-link-custom.nav-link-subsub:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    transition: margin-left 0.24s ease;
}

.top-account-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    overflow: visible;
    background: #1a4672;
    border: 1px solid #1a4672;
    border-radius: 18px;
    padding: 12px 18px;
    box-shadow: 0 12px 24px rgba(18, 44, 76, 0.16);
}

.top-account-left {
    display: flex;
    align-items: center;
}

.top-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: #e8f1ff;
    border-radius: 12px;
    padding: 7px 2px 7px 8px;
    box-shadow: none;
}

.top-account-btn .flow-context-chip {
    margin-right: 2px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

.internacao-top-actions {
    flex-wrap: nowrap;
}

.internacao-top-actions #internacaoSearch {
    min-width: 280px;
}

.top-account-btn:hover {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.12);
}

.top-account-btn::after {
    margin-left: 6px;
    color: #d9e8ff;
}

.top-account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #256fda, #1549a6);
    color: #fff;
    font-weight: 800;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-account-meta {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.top-account-meta strong {
    font-size: 0.9rem;
    color: #f0f6ff;
}

.top-account-meta small {
    font-size: 0.75rem;
    color: #b8cdea;
}

.top-account-menu {
    min-width: 290px;
    z-index: 1200;
}

#topUpdatesMenu {
    min-width: 340px;
    max-width: 420px;
    max-height: 420px;
    overflow-y: auto;
}

.top-account-extra-card {
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 0;
    min-width: 270px;
}

.top-weather-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    border-radius: 14px;
    padding: 8px 10px;
    box-shadow: none;
}

.top-weather-icon {
    font-size: 1.9rem;
    line-height: 1;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28));
}

.top-weather-main {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.top-weather-temp {
    color: #ffffff;
    font-weight: 900;
    font-size: 2rem;
    text-shadow: 0 2px 5px rgba(14, 36, 67, 0.28);
}

.top-weather-desc {
    color: #f3f8ff;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(14, 36, 67, 0.28);
}

.top-weather-city {
    color: #e4eefc;
    font-size: 0.76rem;
    margin-top: 3px;
    text-shadow: 0 1px 2px rgba(14, 36, 67, 0.22);
}

.top-weather-time {
    color: #c9ddf8;
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.03em;
}

.top-bell-wrap {
    position: relative;
    width: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dceaff;
}

.top-notify-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    padding: 0 5px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
}

.top-notify-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border-bottom: 1px solid #eef3fa;
    line-height: 1.4;
}

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

.top-notify-item--unread {
    background: #f4f8ff;
}

.top-updates-btn {
    padding: 7px 8px;
}

.top-updates-btn::after {
    display: none;
}

@media (min-width: 1200.02px) {
    .layout.sidebar-collapsed .sidebar {
        transform: translateX(calc(-1 * (var(--sidebar-width) - var(--sidebar-peek-width))));
    }

    .layout.sidebar-collapsed .main {
        margin-left: var(--sidebar-peek-width);
    }

    .layout.sidebar-auto-open .sidebar,
    .layout.sidebar-pinned .sidebar {
        transform: translateX(0);
    }

    .layout.sidebar-auto-open .main,
    .layout.sidebar-pinned .main {
        margin-left: var(--sidebar-width);
    }
}

body.sidebar-lock {
    overflow: hidden;
}

.page-header {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #f2f6fb;
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.page-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 900;
}

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

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

.portal-correio-page {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at 12% -8%, rgba(23, 108, 211, 0.2), transparent 36%),
        radial-gradient(circle at 88% 5%, rgba(16, 59, 110, 0.14), transparent 30%),
        #e9eff7;
}

.portal-correio-page .container {
    max-width: 1100px;
}

.portal-correio-page .panel {
    border-radius: 20px;
    border: 1px solid #dde7f3;
    box-shadow: 0 14px 30px rgba(17, 48, 83, 0.09);
    animation: portalFadeUp 0.4s ease both;
}

.portal-correio-page .panel + .panel {
    animation-delay: 0.06s;
}

.portal-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(130deg, #0f3b72 0%, #1a5eb3 100%);
    color: #fff;
    padding-top: 14px;
    padding-bottom: 14px;
}

.portal-hero::after {
    content: "";
    position: absolute;
    inset: auto -45px -45px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.24), transparent 66%);
    pointer-events: none;
}

.portal-hero-grid {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-hero .h4 {
    color: #fff;
    font-size: clamp(1.32rem, 1.8vw, 1.8rem);
}

.portal-hero .text-muted {
    color: rgba(231, 241, 255, 0.9) !important;
}

.portal-hero .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.portal-hero .btn-outline-secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.portal-hero-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.32rem 0.72rem;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #ebf3ff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.portal-login-panel,
.portal-remessas-panel,
.portal-retorno-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.portal-login-panel {
    border-top: 4px solid rgba(30, 102, 198, 0.36);
}

.portal-correio-page .form-label {
    font-weight: 700;
    color: #1f4575;
}

.portal-correio-page .form-control {
    border-radius: 12px;
    border-color: #cddbeb;
    min-height: 44px;
}

.portal-input-wrap {
    border-radius: 12px;
    border: 1px solid #cddbeb;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.portal-input-wrap:focus-within {
    border-color: #2d75d0;
    box-shadow: 0 0 0 0.22rem rgba(36, 113, 209, 0.18);
}

.portal-input-wrap .form-control {
    border: 0;
    box-shadow: none !important;
    border-radius: 0;
}

.portal-input-icon {
    border: 0;
    background: #eef4fc;
    color: #1e5eb4;
    font-weight: 800;
    min-width: 44px;
    justify-content: center;
}

.portal-correio-page .form-control:focus {
    border-color: #2d75d0;
    box-shadow: 0 0 0 0.22rem rgba(36, 113, 209, 0.18);
}

.portal-btn-primary {
    border: 0;
    border-radius: 12px;
    min-height: 44px;
    font-weight: 700;
    background: linear-gradient(135deg, #1f6fd4 0%, #1a57a2 100%);
    box-shadow: 0 8px 18px rgba(27, 92, 173, 0.24);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.2s ease;
}

.portal-btn-primary:hover {
    background: linear-gradient(135deg, #2067c1 0%, #154987 100%);
    transform: translateY(-1px);
    box-shadow: 0 11px 22px rgba(24, 78, 146, 0.28);
}

.portal-btn-primary:active {
    transform: translateY(0);
    filter: saturate(0.94);
}

.portal-remessas-table thead th {
    border-bottom: 1px solid #d7e4f3;
    color: #1e446f;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portal-remessas-table tbody td {
    border-color: #e5edf7;
    vertical-align: middle;
}

.portal-remessas-table tbody tr:nth-child(odd) {
    background: #fbfdff;
}

.portal-remessas-table tbody tr {
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.portal-remessas-table tbody tr:hover {
    background: #f2f8ff;
}

.portal-remessas-table details summary {
    cursor: pointer;
    color: #1d60b6;
    font-weight: 700;
}

.portal-correio-page .alert {
    border-radius: 12px;
}

.portal-empty-state {
    text-align: center;
    padding: 1.35rem 1rem;
}

.portal-empty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 0.65rem;
    border-radius: 50%;
    background: linear-gradient(140deg, #e9f1fe 0%, #dce9fd 100%);
    border: 1px solid #c7daf9;
    position: relative;
}

.portal-empty-icon::before {
    content: "";
    position: absolute;
    inset: 15px;
    border-radius: 10px;
    border: 2px solid #2b70cb;
}

.portal-empty-state h3 {
    font-size: 1.03rem;
    margin: 0 0 0.3rem;
    color: #153d6c;
    font-weight: 800;
}

.portal-empty-state p {
    margin: 0 0 0.75rem;
    color: #5d7290;
}

.portal-empty-action {
    border-radius: 999px;
    font-weight: 700;
}

@keyframes portalFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .portal-hero-grid {
        align-items: flex-start;
    }

    .portal-hero .h4 {
        font-size: 1.25rem;
    }

    .portal-hero-chip {
        margin-top: 0.1rem;
    }

    .portal-login-panel .btn,
    .portal-remessas-panel .btn {
        width: 100%;
    }
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.module-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.module-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.module-desc {
    margin: 6px 0 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.flow-context-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    padding: 10px 12px;
}

.flow-context-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.flow-context-chip--same {
    background: rgba(30, 102, 198, 0.15);
    color: #1a56a5;
}

.flow-context-chip--andar {
    background: rgba(218, 133, 39, 0.2);
    color: #9a560f;
}

.flow-context-chip--internacao {
    background: rgba(30, 165, 88, 0.15);
    color: #1a7a45;
}

.flow-context-chip--geral {
    background: rgba(102, 117, 137, 0.15);
    color: #3c4d63;
}

.flow-context-chip--siresp {
    background: rgba(17, 92, 179, 0.14);
    color: #0f4f99;
}

.flow-context-text {
    color: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.internacao-context-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.internacao-context-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(30, 102, 198, 0.12);
    color: #1a5cb3;
}

.internacao-context-text {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.section-title {
    color: var(--nav);
    font-weight: 800;
}

.user-table th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5c6f86;
}

.module-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(30, 102, 198, 0.1);
    color: #1e5db3;
    padding: 4px 10px;
    margin-right: 6px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.table-perm thead th {
    font-size: 0.74rem;
    text-transform: uppercase;
    color: #5f728a;
}

.table-perm tbody tr td {
    vertical-align: middle;
}

.permission-row-muted {
    opacity: 0.55;
}

.setor-regras-container {
    max-height: 260px;
    overflow-y: auto;
}

.setor-regra-row {
    background: #fff;
}

.setor-regra-row .form-label {
    font-size: 0.84rem;
}

#internacaoPendenciaBtnGroup .btn {
    height: 42px;
}

@media (min-width: 768px) {
    #internacaoPendenciaSetorGroup {
        order: 1;
    }

    #internacaoPendenciaBtnGroup {
        order: 2;
    }
}

@media (max-width: 1200px) {
    .sidebar-pin-btn {
        display: none;
    }

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

    .sidebar {
        transform: translateX(-105%);
        z-index: 2040;
    }

    .main {
        margin-left: 0;
        padding: 68px 14px 14px;
    }

    .top-account-strip {
        margin-right: 0;
        margin-bottom: 10px;
        padding: 10px 12px;
        gap: 8px;
    }

    .top-account-meta {
        display: none;
    }

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

    .layout.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.mini-stat {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    padding: 12px 14px;
}

.mini-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.mini-stat strong {
    font-size: 1.28rem;
    font-weight: 600;
    color: #163b66;
}

.same-fixed-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.faturamento-fixed-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.same-fixed-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    min-height: 84px;
}

.same-fixed-card--pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.same-fixed-card--pair .same-fixed-card-item:first-child {
    border-right: 1px solid #dbe7f7;
}

.same-fixed-card--triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.same-fixed-card--triple .same-fixed-card-item:not(:last-child) {
    border-right: 1px solid #dbe7f7;
}

.same-fixed-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
    gap: 4px;
}

.same-fixed-card-item span {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.1;
}

.same-fixed-card-item strong {
    color: #163b66;
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.1;
}

.pickup-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    border: 1px solid #cfe0f5;
    background: #eef5ff;
    color: #215fae;
    font-size: 0.78rem;
    font-weight: 700;
}

.internacao-table th,
.setor-table th,
.referencia-table th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5c6f86;
}

.internacao-table td,
.setor-table td,
.referencia-table td {
    vertical-align: middle;
}

.internacao-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.internacao-table {
    min-width: 1080px;
}

.internacao-table td,
.internacao-table th,
.flow-context-text,
.module-desc,
.pickup-chip {
    overflow-wrap: anywhere;
}

.internacao-toolbar {
    align-items: flex-start;
}

.internacao-toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.internacao-toolbar-actions .form-control {
    min-width: 220px;
    flex: 1 1 260px;
}

.internacao-toolbar-actions .btn,
.internacao-toolbar-actions .btn-group {
    flex: 0 0 auto;
}

.internacao-actions-cell .d-flex {
    min-width: 220px;
}

.nav-pills .nav-link {
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background: #1e66c6;
}

#internacaoStatusTabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.4rem;
    margin: 0;
    border: 1px solid #d4e3f4;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4fc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #b7cae4 #edf4fc;
}

#internacaoStatusTabs .nav-item {
    flex: 0 0 auto;
}

#internacaoStatusTabs .nav-link {
    border: 1px solid transparent;
    border-radius: 0.65rem;
    padding: 0.58rem 0.95rem;
    min-height: 40px;
    color: #1f4f88;
    background: transparent;
    white-space: nowrap;
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.05;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#internacaoStatusTabs .nav-link:hover {
    color: #174173;
    background: #e7f0fb;
    border-color: #c7dbf3;
}

#internacaoStatusTabs .nav-link.active {
    color: #fff;
    background: linear-gradient(180deg, #2b78dd 0%, #1d63bf 100%);
    border-color: #1657af;
    box-shadow: 0 3px 10px rgba(24, 92, 182, 0.24);
}

#internacaoStatusTabs .nav-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 118, 221, 0.24);
}

#andarInternacaoSubtabs,
#pendenciaTipoTabs,
#sameInternacaoSubtabs,
#recebimentoModoTabs {
    flex-wrap: wrap;
}

#recebimentoTipoTabs {
    flex-wrap: wrap;
}

#recebimentoTipoTabs .btn,
#andarInternacaoSubtabs .nav-link,
#pendenciaTipoTabs .nav-link,
#sameInternacaoSubtabs .nav-link,
#recebimentoModoTabs .nav-link {
    white-space: nowrap;
}

.ti-admin-tabs .nav-link {
    font-weight: 700;
    color: #46617f;
}

.ti-admin-tabs .nav-link.active {
    color: #11427a;
    border-color: #c7daef #c7daef #fff;
}

.modal-xxl {
    --bs-modal-width: min(1540px, 96vw);
}

.modal-internacao-wide {
    --bs-modal-width: min(1700px, 98vw);
}

.internacao-import-table {
    min-width: 1550px;
}

.internacao-import-table th,
.internacao-import-table td {
    white-space: nowrap;
}

.internacao-import-table th:nth-child(4),
.internacao-import-table td:nth-child(4),
.internacao-import-table th:nth-child(11),
.internacao-import-table td:nth-child(11) {
    min-width: 190px;
}

.internacao-import-table th:nth-child(7),
.internacao-import-table td:nth-child(7),
.internacao-import-table th:nth-child(8),
.internacao-import-table td:nth-child(8),
.internacao-import-table th:nth-child(9),
.internacao-import-table td:nth-child(9) {
    min-width: 180px;
}

.historico-table th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5c6f86;
}

.historico-table td {
    vertical-align: top;
}

.context-pre {
    max-width: 380px;
    max-height: 180px;
    overflow: auto;
    margin: 8px 0 0;
    font-size: 0.74rem;
    line-height: 1.35;
    background: #f6f9fd;
    border: 1px solid #deebfa;
    border-radius: 8px;
    padding: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.andar-subcards {
    display: grid;
    grid-template-columns: repeat(2, minmax(170px, 1fr));
    gap: 10px;
    min-width: 0;
}

.andar-subcard {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    padding: 12px 14px;
    text-align: left;
    color: var(--text);
    min-height: 0;
}

.andar-subcard span {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.andar-subcard strong {
    font-size: 1.28rem;
    font-weight: 900;
    color: #163b66;
}

.andar-subcard.active {
    border-color: #1e66c6;
    box-shadow: inset 0 0 0 1px rgba(30, 102, 198, 0.2);
}

.andar-subtabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.andar-subtabs-row #andarInternacaoCardsWrap {
    margin-left: auto;
}

.stats-grid #andarInternacaoCardsWrap {
    display: contents;
}

.stats-grid #andarInternacaoCardsWrap .andar-subcards {
    display: contents;
}

.modal-dialog {
    width: min(96vw, var(--bs-modal-width, 560px));
    margin: 1rem auto;
    max-width: min(96vw, var(--bs-modal-width, 560px));
}

.modal-content {
    max-height: calc(100vh - 2rem);
    width: 100%;
}

.modal-body {
    overflow: auto;
    max-height: calc(100vh - 190px);
}

.modal.show .modal-dialog {
    transform: none !important;
}

.modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
}

.modal-mobile-full .modal-dialog {
    --bs-modal-width: min(1540px, 96vw);
}

#modalSiresp .modal-dialog {
    --bs-modal-width: min(1700px, 98vw);
}

.modal-correio-wide {
    --bs-modal-width: min(1820px, 98vw);
}

#modalCorreio .modal-content {
    border-radius: 14px;
}

#modalCorreio .modal-header {
    background: linear-gradient(180deg, #f7fbff 0%, #f1f7ff 100%);
    border-bottom: 1px solid #dbe7f5;
}

#modalCorreio .modal-title {
    font-weight: 800;
    color: #143a66;
}

.correio-modal-body {
    padding-top: 12px;
}

.correio-toolbar .form-label {
    font-weight: 700;
    color: #3b5678;
}

.correio-toolbar-actions .btn {
    min-width: 128px;
}

.correio-table-wrap {
    border: 1px solid #dce8f6;
    border-radius: 12px;
    background: #ffffff;
}

.correio-table {
    min-width: 1360px;
}

.correio-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f9ff;
    color: #214569;
    font-weight: 800;
    border-bottom: 1px solid #dce8f6;
}

.correio-table tbody tr:nth-child(odd) {
    background: #fcfeff;
}

.correio-table tbody tr:hover {
    background: #f3f9ff;
}

.correio-code-main {
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #102f53;
}

.correio-code-sub {
    font-size: 0.86rem;
    color: #5a6f85;
}

.correio-status-badge {
    font-size: 0.79rem;
    font-weight: 700;
    padding: 0.35rem 0.62rem;
}

.correio-status--aguardando {
    background: #eef4ff;
    color: #2f5ca1;
    border: 1px solid #cadbf8;
}

.correio-status--transporte {
    background: #fff7e8;
    color: #8a5b00;
    border: 1px solid #f0d59c;
}

.correio-status--entregue {
    background: #e8f8ef;
    color: #1c7145;
    border: 1px solid #b6e2ca;
}

.correio-status--chegada {
    background: #e8f5ff;
    color: #0f5b8f;
    border: 1px solid #b8dbf3;
}

.correio-status--retorno-solicitado {
    background: #efe8ff;
    color: #5e3aa5;
    border: 1px solid #d2c0f7;
}

.correio-status--retorno-transporte {
    background: #fff4e8;
    color: #8d5400;
    border: 1px solid #f2d0a2;
}

.correio-status--retorno-entregue {
    background: #e8f9f2;
    color: #146943;
    border: 1px solid #b7e7cf;
}

.correio-status--cancelada {
    background: #fdecee;
    color: #9a2b37;
    border: 1px solid #f1c1c8;
}

.correio-action-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.correio-action-wrap .btn {
    min-width: 74px;
}

.correio-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    border: 1px solid #dbe7f5;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f7fbff;
}

.correio-pagination-summary {
    font-weight: 600;
    color: #4e6278;
}

.correio-pagination-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.correio-pagination-per-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334b63;
    font-size: 0.84rem;
    font-weight: 600;
}

.correio-pagination-per-page select {
    width: 82px;
}

.correio-pagination-pages {
    color: #3a5573;
    font-size: 0.86rem;
    font-weight: 700;
}

.correio-legenda-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 14px;
}

.correio-legenda-card {
    border: 1px solid #dce8f6;
    border-radius: 12px;
    background: #f9fcff;
    padding: 12px;
}

#correioCameraWrap {
    border-color: #dce8f6 !important;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%) !important;
}

.correio-camera-reader {
    width: min(460px, 100%);
    min-height: 300px;
    margin: 0 auto;
    border: 1px solid #c7dbf3;
    border-radius: 12px;
    overflow: hidden;
    background: #0f1725;
}

.correio-camera-reader video {
    width: 100%;
    height: auto;
}

@media (max-width: 992px) {
    .correio-legenda-grid {
        grid-template-columns: 1fr;
    }
}

.modal-mobile-full .modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
}

.modal-mobile-full .modal-footer {
    border-top: 1px solid #e2eaf4;
}

.modal-mobile-full .modal-body {
    max-height: calc(100vh - 168px);
}

.siresp-print-progress {
    display: block;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #d8e4f5;
    border-radius: 0.5rem;
    background: #f5f9ff;
}

#modalSirespPrint {
    z-index: 1090;
}

.modal-backdrop.estacionamento-backdrop {
    z-index: 2055;
}

#modalEstacionamento {
    z-index: 2060;
}

#modalEstacionamento .modal-content {
    border-radius: 14px;
}

#modalEstacionamento .modal-header {
    background: linear-gradient(125deg, #f7fbff 0%, #edf5ff 100%);
    border-bottom: 1px solid #d9e6fa;
}

#modalEstacionamento .modal-footer {
    background: #fbfdff;
    border-top: 1px solid #d9e6fa;
}

.estacionamento-modal-shell {
    background:
        radial-gradient(circle at 90% -20%, rgba(32, 107, 196, 0.08), transparent 40%),
        radial-gradient(circle at -10% 120%, rgba(22, 163, 74, 0.07), transparent 45%);
}

.estacionamento-modal-hero {
    border: 1px solid #d7e3f7;
    border-radius: 12px;
    padding: 12px 14px;
    background: #f8fbff;
}

.estacionamento-modal-hero-head {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-start;
}

.estacionamento-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 10px;
}

.estacionamento-kpi-card {
    background: #ffffff;
    border: 1px solid #dbe7f8;
    border-radius: 10px;
    padding: 8px 10px;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.estacionamento-kpi-label {
    color: #4f6384;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.estacionamento-kpi-card strong {
    color: #183258;
    font-size: 1.25rem;
    line-height: 1.2;
}

@media (max-width: 992px) {
    .estacionamento-kpi-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .estacionamento-modal-hero-head {
        flex-direction: column;
        align-items: stretch;
    }

    .estacionamento-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.modal-backdrop.siresp-print-backdrop {
    z-index: 1085;
}

#modalSirespAltasLoteProcessando {
    z-index: 1100;
}

.modal-backdrop.siresp-altas-lote-backdrop {
    z-index: 1095;
}

#modalSirespSyncObrigatoria,
#modalSirespSyncPrompt6h {
    z-index: 1110;
}

.modal-backdrop.siresp-sync-obrigatoria-backdrop,
.modal-backdrop.siresp-sync-prompt-backdrop {
    z-index: 1105;
}

#modalSirespEntradaSyncProgress {
    z-index: 1120;
}

.modal-backdrop.siresp-entrada-sync-backdrop {
    z-index: 1115;
}

#modalFaturamentoContas .table,
#modalFaturamentoCritica .table,
#modalFaturamentoProducao .table,
#modalSigtapOnline .table,
#modalSigtapDetalhe .table {
    min-width: 760px;
}

.faturamento-contas-toolbar {
    gap: 0.75rem;
}

.faturamento-contas-actions {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    #painel-internacao > .d-flex.justify-content-between.align-items-center.flex-wrap.gap-2.mb-3 > div:first-child {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .top-account-strip {
        align-items: stretch;
    }

    .top-account-btn {
        width: 100%;
        justify-content: flex-end;
        padding: 7px 4px;
    }

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

    .internacao-toolbar {
        flex-direction: column;
        align-items: stretch !important;
    }

    .internacao-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .internacao-toolbar-actions .form-control,
    .internacao-toolbar-actions .btn,
    .internacao-toolbar-actions .btn-group {
        width: 100%;
        min-width: 0;
    }

    .internacao-toolbar-actions .btn-group .btn {
        width: auto;
        flex: 1 1 0;
    }

    #internacaoStatusTabs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
        gap: 8px;
        overflow: visible;
        width: 100%;
        min-width: 0;
    }

    #internacaoStatusTabs .nav-item {
        width: 100%;
    }

    #internacaoStatusTabs .nav-link {
        width: 100%;
        min-height: 42px;
        padding: 0.6rem 0.75rem;
        font-size: 0.95rem;
        white-space: nowrap;
        text-align: center;
    }

    #andarInternacaoSubtabs,
    #pendenciaTipoTabs,
    #sameInternacaoSubtabs,
    #faturamentoFaturarSubtabs,
    #recebimentoModoTabs,
    #sirespLeitosSubtabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        width: 100%;
        padding-bottom: 2px;
    }

    #andarInternacaoSubtabs .nav-item,
    #pendenciaTipoTabs .nav-item,
    #sameInternacaoSubtabs .nav-item,
    #faturamentoFaturarSubtabs .nav-item,
    #recebimentoModoTabs .nav-item,
    #sirespLeitosSubtabs .nav-item {
        flex: 0 0 auto;
    }

    #andarInternacaoSubtabs .nav-link,
    #pendenciaTipoTabs .nav-link,
    #sameInternacaoSubtabs .nav-link,
    #faturamentoFaturarSubtabs .nav-link,
    #recebimentoModoTabs .nav-link,
    #sirespLeitosSubtabs .nav-link {
        min-height: 40px;
        padding: 0.55rem 0.9rem;
        white-space: nowrap;
    }

    .modal {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .modal-dialog {
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
        margin: 6px auto !important;
    }

    .modal-content {
        max-height: calc(100vh - 12px);
    }

    .modal-mobile-full {
        padding: 0 !important;
    }

    .modal-mobile-full .modal-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        height: 100vh;
    }

    .modal-mobile-full .modal-dialog-scrollable {
        height: 100vh;
    }

    .modal-mobile-full .modal-content {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-mobile-full .modal-body {
        max-height: calc(100vh - 130px);
    }

    .modal-mobile-full .modal-footer {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .modal-mobile-full .modal-footer .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 136px;
    }

    .faturamento-contas-toolbar {
        align-items: stretch !important;
        flex-direction: column;
    }

    .faturamento-contas-actions .btn {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .internacao-table {
        min-width: 0;
    }

    .internacao-table thead {
        display: none;
    }

    .internacao-table tbody {
        display: block;
    }

    .internacao-table tbody tr {
        display: block;
        border: 1px solid #dde8f6;
        border-radius: 12px;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.65rem;
        background: #fff;
    }

    .internacao-table tbody td {
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        align-items: flex-start;
        border: 0;
        padding: 0.35rem 0;
    }

    .internacao-table tbody td::before {
        content: attr(data-label);
        color: #5f728a;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        flex: 0 0 42%;
        max-width: 42%;
    }

    .internacao-table tbody td[data-label="#"] {
        display: none;
    }

    .internacao-table tbody td[data-label="Paciente"] {
        display: block;
    }

    .internacao-table tbody td[data-label="Paciente"]::before {
        display: block;
        margin-bottom: 0.2rem;
        max-width: none;
    }

    .internacao-table tbody .internacao-actions-cell .d-flex {
        min-width: 0;
        width: 100%;
    }

    .internacao-table tbody .internacao-actions-cell .btn {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .internacao-table tbody tr td[colspan] {
        display: table-cell;
        padding: 0.75rem 0.5rem;
    }

    .andar-subtabs-row {
        flex-direction: column;
        align-items: stretch;
    }

    .andar-subtabs-row #andarInternacaoCardsWrap {
        margin-left: 0;
    }

    .andar-subcards {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    #modalChecklist .modal-dialog,
    #modalChecklistBloqueioPendencia .modal-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        margin: 0 !important;
        height: 100vh;
    }

    #modalChecklist.modal,
    #modalChecklistBloqueioPendencia.modal {
        padding: 0 !important;
    }

    #modalChecklist.modal.show .modal-dialog,
    #modalChecklistBloqueioPendencia.modal.show .modal-dialog {
        transform: none !important;
    }

    #modalChecklist .modal-dialog-scrollable,
    #modalChecklistBloqueioPendencia .modal-dialog-scrollable {
        height: 100vh !important;
    }

    #modalChecklist .modal-content,
    #modalChecklistBloqueioPendencia .modal-content {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    #modalChecklist .modal-header,
    #modalChecklistBloqueioPendencia .modal-header {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #fff;
    }

    #modalChecklist .modal-body,
    #modalChecklistBloqueioPendencia .modal-body {
        max-height: calc(100vh - 120px);
        overflow: auto;
    }

    #modalChecklist .modal-footer,
    #modalChecklistBloqueioPendencia .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 3;
        background: #fff;
    }
}

@media (max-width: 576px) {
    .top-account-strip {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
        border-radius: 14px;
    }

    .top-account-left {
        width: 100%;
    }

    .top-weather-card {
        width: 100%;
        padding: 8px 8px;
        border-radius: 10px;
    }

    .top-weather-temp {
        font-size: 1.9rem;
    }

    .top-account-strip > .d-flex {
        width: 100%;
        justify-content: flex-end;
    }

    .top-account-btn {
        width: 100%;
        justify-content: space-between;
        padding: 8px 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }

    .top-account-btn .flow-context-chip {
        max-width: 48vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .internacao-top-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .internacao-top-actions #internacaoSearch {
        grid-column: 1 / -1;
        min-width: 0;
        max-width: none !important;
    }

    .internacao-top-actions #btnBuscarInternacao,
    .internacao-top-actions #btnNovaInternacao {
        width: 100%;
    }

    #internacaoStatusTabs {
        grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
        gap: 6px;
    }

    #internacaoStatusTabs .nav-link {
        min-height: 42px;
        font-size: 0.92rem;
        padding: 0.55rem 0.6rem;
        border-radius: 10px;
    }

    .stats-grid {
        gap: 8px;
    }

    .mini-stat {
        padding: 10px 12px;
    }
}

#painel-internacao,
#modulo-gestor,
#painel-modulo-supervisor,
#painel-modulo-correio,
#painel-modulo-estacionamento,
#painel-ti-navegacao,
.ti-tab-pane {
    animation: gpPanelFadeIn 0.28s ease;
}

@keyframes gpPanelFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    #painel-internacao,
    #modulo-gestor,
    #painel-modulo-supervisor,
    #painel-modulo-correio,
    #painel-modulo-estacionamento,
    #painel-ti-navegacao,
    .ti-tab-pane {
        animation: none;
    }
}
