:root {
    --cv-bg-top: #dae4f0;
    --cv-bg: #ced9e8;
    --cv-surface: #e2eaf4;
    --cv-surface-soft: #eaf0f8;
    --cv-panel: #ffffff;
    --cv-border: #b6c6da;
    --cv-border-soft: #c8d6e6;
    --cv-text: #1f2937;
    --cv-muted: #556578;
    --cv-primary: #1658b0;
    --cv-primary-dark: #0f3f82;
    --cv-primary-soft: #d2e2f4;
    --cv-nav-active-bg: #c2d8f0;
    --cv-nav-active-text: #0b4cb0;
    --cv-nav-icon: #7b8fa6;
    --cv-shadow: 0 10px 24px rgba(22, 52, 96, 0.1);
    --cv-touch-size: 44px;
}

html {
    min-height: 100%;
}

.gestor-site-footer {
    max-width: 1200px;
    margin: 0.75rem auto 0;
    padding: 0.65rem 1rem 0.25rem;
    text-align: center;
}

.gestor-site-footer__text {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--cv-muted);
    letter-spacing: 0.01em;
}

body.gestor-page {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: linear-gradient(165deg, var(--cv-bg-top) 0%, var(--cv-bg) 55%, #c6d4e4 100%);
    background-attachment: fixed;
    color: var(--cv-text);
}

@media (display-mode: standalone) {
    body.gestor-page {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

.gestor-shell,
.shell {
    max-width: 1200px;
    margin: 0 auto;
}

.gestor-page .btn,
.gestor-page button,
.gestor-page input,
.gestor-page select,
.gestor-page textarea,
.gestor-menu-link,
.module-card {
    touch-action: manipulation;
}

.gestor-page .btn,
.gestor-page button,
.gestor-menu-link {
    min-height: var(--cv-touch-size);
}

.gestor-page .form-control,
.gestor-page .form-select {
    min-height: var(--cv-touch-size);
    border-radius: 11px;
}

.gestor-topbar,
.gestor-panel,
.topbar,
.panel {
    background: var(--cv-panel);
    border: 1px solid var(--cv-border);
    border-radius: 14px;
    box-shadow: var(--cv-shadow);
}

.gestor-topbar {
    background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
}

.gestor-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.gestor-brand img {
    width: auto;
    height: 38px;
    display: block;
    flex-shrink: 0;
}

.gestor-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gestor-subtitle {
    margin: 0;
    color: var(--cv-muted);
    font-size: 0.79rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.08rem 0.45rem;
    line-height: 1.2;
}

.gestor-subtitle-sep {
    color: #b8c4d4;
    font-size: 0.55rem;
    line-height: 1;
}

.gestor-nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    align-items: center;
    justify-content: flex-end;
}

.gestor-topbar-btn {
    min-width: 0;
    min-height: 32px;
    padding: 0.34rem 0.78rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    text-decoration: none;
    font-size: 0.79rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
    box-shadow: none;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.gestor-topbar-btn span {
    white-space: nowrap;
}

.gestor-topbar-btn i {
    font-size: 0.76rem;
    line-height: 1;
}

.gestor-topbar-btn:hover,
.gestor-topbar-btn:focus-visible {
    outline: none;
}

.gestor-topbar-btn--home {
    color: #ffffff;
    background: #1351b4;
    border-color: #1351b4;
}

.gestor-topbar-btn--home:hover,
.gestor-topbar-btn--home:focus-visible {
    color: #ffffff;
    background: #0f47a1;
    border-color: #0f47a1;
}

.gestor-topbar-btn--exit {
    color: #114989;
    background: #ffffff;
    border-color: #1351b4;
}

.gestor-topbar-btn--exit:hover,
.gestor-topbar-btn--exit:focus-visible {
    color: #0f47a1;
    background: #f5f9ff;
    border-color: #0f47a1;
}

.gestor-topbar-btn--back {
    color: #35629a;
    background: #eef5ff;
    border-color: #d7e5f7;
    padding-left: 0.52rem;
    padding-right: 0.58rem;
}

.gestor-topbar-btn--back:hover,
.gestor-topbar-btn--back:focus-visible {
    color: #114989;
    background: #e4effd;
    border-color: #c3d9f3;
}

.gestor-topbar-btn.is-current {
    opacity: 0.92;
}

.gestor-menu-line {
    background: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: 12px;
    padding: 0.35rem;
    margin-bottom: 1rem;
}

.gestor-menu-line > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gestor-menu-line > div::-webkit-scrollbar {
    display: none;
}

.gestor-menu-link {
    color: #244466;
    text-decoration: none;
    padding: 0.42rem 0.72rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.gestor-menu-link i {
    font-size: 0.92rem;
    color: var(--cv-nav-icon);
}

.gestor-menu-link:hover,
.gestor-menu-link:focus {
    background: var(--cv-primary-soft);
    color: var(--cv-nav-active-text);
}

.gestor-menu-link:hover i,
.gestor-menu-link:focus i {
    color: var(--cv-nav-active-text);
}

.gestor-menu-link.is-active {
    background: var(--cv-nav-active-bg);
    color: var(--cv-nav-active-text);
    font-weight: 600;
}

.gestor-menu-link.is-active i {
    color: var(--cv-nav-active-text);
}

.gestor-section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gestor-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #163e68;
}

.gestor-section-desc {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    color: var(--cv-muted);
}

.gestor-pill-total {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    font-size: 0.78rem;
    color: #1e3a5f;
    background: var(--cv-primary-soft);
    font-weight: 600;
}

.gestor-table-wrap {
    border: 1px solid var(--cv-border);
    border-radius: 12px;
    overflow: auto;
    background: #fff;
}

.gestor-cv-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
}

.gestor-cv-modal.is-open {
    display: block;
}

.gestor-cv-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.gestor-cv-modal-dialog {
    position: relative;
    width: min(760px, calc(100% - 24px));
    margin: 4vh auto;
    background: #fff;
    border: 1px solid var(--cv-border);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.gestor-cv-modal-head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--cv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.gestor-cv-modal-title {
    margin: 0;
    font-size: 1rem;
    color: #12365f;
    font-weight: 700;
}

.gestor-cv-modal-body {
    padding: 1rem;
    overflow: auto;
}

.gestor-cv-modal-foot {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--cv-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.gestor-section-title,
.section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #163e68;
}

.gestor-pill-total,
.pill-total {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    color: #1e3a5f;
    background: var(--cv-primary-soft);
    font-weight: 600;
}

.gestor-live-search {
    position: relative;
    flex: 1 1 220px;
    max-width: 420px;
}

.gestor-live-search .form-control {
    padding-left: 2.5rem;
    padding-right: 2.25rem;
    border-radius: 12px;
    border: 1px solid var(--cv-border);
    background: var(--cv-surface);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.gestor-live-search .form-control:focus {
    background: #fff;
    border-color: #8eb2e2;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.gestor-live-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.gestor-live-search-clear {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #64748b;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gestor-live-search-clear:hover {
    background: var(--cv-surface);
    color: #334155;
}

.gestor-table-wrap,
.table-wrap {
    border: 1px solid var(--cv-border);
    border-radius: 12px;
    overflow: auto;
    background: #fff;
}

.table thead th {
    background: var(--cv-surface);
    color: #27466d;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.action-group {
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #cddcf0;
    background: linear-gradient(180deg, #fff 0%, #f6f9ff 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #164782;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    text-decoration: none;
}

.icon-btn:hover {
    border-color: #8eb2e2;
    color: #0f3f78;
}

.icon-btn.danger {
    color: #9f1239;
    background: linear-gradient(180deg, #fff3f4 0%, #ffe4e8 100%);
    border-color: #f7b8c3;
}

.badge-flag {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
}

.badge-on { background: #dcfce7; color: #166534; }
.badge-off { background: #fef3c7; color: #92400e; }
.badge-pending { background: #fff7d6; color: #9a6700; }
.badge-progress { background: #dbeafe; color: #1d4ed8; }
.badge-done { background: #dcfce7; color: #166534; }
.badge-cancel { background: #fee2e2; color: #b91c1c; }

.cv-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
}

.cv-modal.is-open { display: block; }

.cv-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.cv-modal-dialog {
    position: relative;
    width: min(820px, calc(100% - 24px));
    margin: 4vh auto;
    background: #fff;
    border: 1px solid var(--cv-border);
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cv-modal-head {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--cv-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cv-modal-title {
    margin: 0;
    font-size: 1rem;
    color: #12365f;
    font-weight: 700;
}

.cv-modal-body { padding: 1rem; overflow: auto; }

.cv-modal-foot {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--cv-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.flash-center {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    min-width: 260px;
    max-width: min(92vw, 520px);
    padding: 14px 18px;
    border-radius: 12px;
    background: #198754;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
    text-align: center;
}

.gestor-flash-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.gestor-flash-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gestor-flash-card {
    width: min(100%, 360px);
    padding: 1.75rem 1.5rem 1.35rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    text-align: center;
    transform: scale(0.88);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.gestor-flash-backdrop.is-visible .gestor-flash-card {
    transform: scale(1);
    opacity: 1;
}

.gestor-flash-icon-ring {
    width: 76px;
    height: 76px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    border: 4px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.15rem;
    line-height: 1;
}

.gestor-flash-card--success .gestor-flash-icon-ring {
    border-color: #b8e6ca;
    color: #22a05d;
}

.gestor-flash-card--danger .gestor-flash-icon-ring {
    border-color: #f5c2c7;
    color: #dc3545;
}

.gestor-flash-card--warning .gestor-flash-icon-ring {
    border-color: #fde68a;
    color: #d97706;
}

.gestor-flash-card--info .gestor-flash-icon-ring {
    border-color: #b6d4fe;
    color: #0d6efd;
}

.gestor-flash-title {
    margin: 0 0 0.45rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #4b5563;
    line-height: 1.25;
}

.gestor-flash-desc {
    margin: 0 0 1.35rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.5;
}

.gestor-flash-btn {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.gestor-flash-btn:hover {
    filter: brightness(1.05);
}

.gestor-flash-btn:active {
    transform: scale(0.99);
}

.gestor-flash-card--success .gestor-flash-btn { background: #22a05d; }
.gestor-flash-card--danger .gestor-flash-btn { background: #dc3545; }
.gestor-flash-card--warning .gestor-flash-btn { background: #d97706; }
.gestor-flash-card--info .gestor-flash-btn { background: #0d6efd; }

.summary-card {
    border: 1px solid var(--cv-border);
    border-radius: 12px;
    padding: 0.9rem;
    background: var(--cv-surface-soft);
}

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

.summary-item {
    border: 1px solid var(--cv-border-soft);
    border-radius: 10px;
    background: #fff;
    padding: 0.65rem 0.7rem;
}

.summary-label {
    margin: 0;
    color: var(--cv-muted);
    font-size: 0.8rem;
}

.summary-value {
    margin: 0.2rem 0 0;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 700;
    color: #103b6d;
}

.gestor-resumo-operacional {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
}

.gestor-resumo-operacional__lista {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.45rem;
}

a.gestor-resumo-chip {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

a.gestor-resumo-chip:hover,
a.gestor-resumo-chip:focus-visible {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
    outline: none;
}

.gestor-resumo-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 4.6rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--cv-border-soft);
    border-radius: 10px;
    background: #fff;
    flex: 1 1 0;
    max-width: none;
}

.gestor-page-home .gestor-resumo-chip {
    min-height: 76px;
}

.gestor-resumo-chip__icon {
    font-size: 0.9rem;
    line-height: 1;
}

.gestor-resumo-chip__value {
    margin-top: 0.18rem;
    font-size: 1rem;
    line-height: 1.1;
    font-weight: 700;
    color: #103b6d;
}

.gestor-resumo-chip__label {
    margin-top: 0.12rem;
    font-size: 0.58rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--cv-muted);
    text-align: center;
}

.gestor-resumo-operacional__avisos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--cv-border-soft);
}

.gestor-resumo-aviso {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #92400e;
    background: #fff7d6;
    border: 1px solid #fde68a;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
}

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

.gestor-page-home .gestor-home-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 100%);
}

.gestor-home-kpis {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.gestor-home-kpi {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 4.1rem;
    padding: 0.28rem 0.5rem;
    border: 1px solid var(--cv-border-soft);
    border-radius: 8px;
    background: var(--cv-surface-soft);
    cursor: default;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.gestor-home-kpi:hover {
    border-color: #9ec0ea;
    box-shadow: 0 4px 12px rgba(22, 88, 176, 0.1);
    transform: translateY(-1px);
}

.gestor-home-kpi__value {
    font-size: 0.92rem;
    line-height: 1.1;
    font-weight: 700;
    color: #103b6d;
}

.gestor-home-kpi__label {
    margin-top: 0.1rem;
    font-size: 0.58rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--cv-muted);
    text-align: center;
}

.gestor-home-panel .gestor-section-toolbar {
    margin-bottom: 0.85rem;
}

.gestor-home-panel .module-grid-home {
    margin-top: 0;
}

.module-card.is-disabled {
    opacity: 0.75;
    pointer-events: none;
}

.module-card {
    text-decoration: none;
    color: inherit;
    border: 1px solid #cfe0f4;
    border-radius: 12px;
    padding: 0.78rem 0.8rem;
    background: #fff;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.module-card:focus-visible {
    outline: 3px solid rgba(22, 88, 176, 0.24);
    outline-offset: 2px;
}

.gestor-page-home .module-card {
    align-items: center;
    justify-content: space-between;
    text-align: center;
    min-height: 164px;
    padding: 1rem 0.8rem;
}

.module-card:hover,
.module-card:focus {
    transform: translateY(-2px);
    border-color: #9ec0ea;
    box-shadow: 0 10px 20px rgba(22, 88, 176, 0.14);
    color: inherit;
}

.module-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.gestor-page-home .module-head {
    flex-direction: column;
    gap: 0.62rem;
}

.module-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--cv-primary-soft);
    color: var(--cv-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex: 0 0 38px;
}

.gestor-page-home .module-icon {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 16px;
    font-size: 1.7rem;
    background: linear-gradient(180deg, #eaf3ff 0%, #d2e2f4 100%);
    box-shadow: inset 0 0 0 1px rgba(22, 88, 176, 0.08);
}

.module-title {
    margin: 0;
    font-size: 0.94rem;
    color: #12365f;
    font-weight: 700;
    line-height: 1.2;
}

.gestor-page-home .module-title {
    font-size: 1rem;
}

.module-desc {
    margin: 0;
    color: #5f7288;
    font-size: 0.82rem;
    line-height: 1.32;
    flex-grow: 1;
}

.gestor-page-home .module-desc {
    font-size: 0.78rem;
    line-height: 1.25;
}

.module-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border-radius: 999px;
    padding: 0.25rem 0.74rem;
    background: var(--cv-primary-soft);
    color: var(--cv-primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
}

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

.quick-btn {
    width: 100%;
    border-radius: 10px;
    min-height: 40px;
    font-size: 0.84rem;
    font-weight: 700;
}

.config-tree {
    border: 1px solid var(--cv-border);
    border-radius: 12px;
    background: #fff;
    padding: 0.9rem;
}

.tree-item {
    border: 1px solid var(--cv-border-soft);
    border-radius: 10px;
    padding: 0.72rem 0.8rem;
    background: var(--cv-surface-soft);
}

.tree-item + .tree-item { margin-top: 0.6rem; }

.tree-title {
    margin: 0;
    font-size: 0.96rem;
    color: #12365f;
    font-weight: 700;
}

.tree-meta {
    margin: 0.22rem 0 0;
    color: #5f7288;
    font-size: 0.82rem;
}

.kv {
    margin: 0;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 0.45rem 0.85rem;
}

.kv dt {
    color: #345073;
    font-weight: 700;
    font-size: 0.84rem;
}

.kv dd {
    margin: 0;
    color: #1f2937;
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-grid,
    .module-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    body.gestor-page {
        background-attachment: scroll;
    }

    .gestor-shell,
    .shell {
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }

    .gestor-topbar,
    .panel,
    .gestor-panel {
        border-radius: 13px;
    }

    .gestor-topbar {
        padding: 0.72rem !important;
    }

    .gestor-topbar > .d-flex {
        gap: 0.6rem !important;
    }

    .gestor-brand {
        gap: 0.6rem;
    }

    .gestor-brand img {
        height: 34px;
        max-width: 148px;
        object-fit: contain;
    }

    .gestor-nav-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.38rem;
        width: auto;
    }

    .gestor-topbar-btn {
        min-width: 0;
        min-height: 31px;
        padding: 0.32rem 0.66rem;
        border-radius: 999px;
        font-size: 0.76rem;
        font-weight: 600;
    }

    .gestor-menu-line {
        position: sticky;
        top: 0.35rem;
        z-index: 20;
        margin-right: -0.2rem;
        margin-left: -0.2rem;
        background: rgba(226, 234, 244, 0.94);
        backdrop-filter: blur(8px);
    }

    .gestor-menu-line > div {
        flex-wrap: nowrap;
    }

    .gestor-menu-link {
        flex: 0 0 auto;
        min-width: max-content;
        border-radius: 999px;
        font-weight: 700;
    }

    .gestor-section-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .gestor-section-toolbar > .d-flex {
        justify-content: flex-start;
    }

    .gestor-home-kpis {
        justify-content: flex-start;
        width: 100%;
    }

    .gestor-brand-name {
        font-size: 1.02rem;
    }

    .gestor-table-wrap,
    .table-wrap {
        -webkit-overflow-scrolling: touch;
        margin-right: -0.25rem;
        margin-left: -0.25rem;
    }

    .gestor-table-wrap table,
    .table-wrap table,
    .table-responsive table {
        min-width: 720px;
    }

    .gestor-cv-modal-dialog,
    .cv-modal-dialog {
        width: calc(100% - 16px);
        margin: 2vh auto;
        max-height: 96vh;
        border-radius: 16px;
    }

    .gestor-cv-modal-body,
    .cv-modal-body {
        padding: 0.85rem;
    }

    .gestor-cv-modal-foot,
    .cv-modal-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .gestor-cv-modal-foot .btn,
    .cv-modal-foot .btn {
        width: 100%;
    }

    .row.g-2 > [class*="col-"],
    .row.g-3 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .cv-modal-dialog {
        width: calc(100% - 16px);
        margin: 2vh auto;
        max-height: 96vh;
    }
}

@media (max-width: 640px) {
    .gestor-resumo-operacional__lista {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.1rem;
    }

    .gestor-resumo-operacional__lista::-webkit-scrollbar {
        display: none;
    }

    .gestor-resumo-chip {
        flex: 0 0 auto;
        min-width: 4.1rem;
        max-width: none;
    }

    .summary-list,
    .module-grid,
    .quick-grid { grid-template-columns: 1fr; }

    .module-grid-home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.62rem;
    }

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

    .gestor-home-kpi {
        min-width: 3.5rem;
        padding: 0.22rem 0.38rem;
    }

    .gestor-home-kpi__value {
        font-size: 0.84rem;
    }

    .module-card {
        min-height: 104px;
    }

    .gestor-page-home .module-card {
        min-height: 154px;
        padding: 0.9rem 0.55rem;
    }

    .gestor-page-home .module-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        font-size: 1.52rem;
    }

    .gestor-page-home .module-desc {
        display: none;
    }

    .gestor-menu-link {
        padding: 0.45rem 0.65rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 380px) {
    .gestor-shell,
    .shell {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .module-grid-home {
        gap: 0.5rem;
    }

    .gestor-page-home .module-card {
        min-height: 142px;
    }

    .gestor-page-home .module-title {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .gestor-topbar {
        padding: 0.68rem !important;
    }

    .gestor-topbar > .d-flex {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: center !important;
        justify-content: stretch !important;
        gap: 0.55rem !important;
    }

    .gestor-brand {
        width: 100%;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 0.52rem;
    }

    .gestor-brand img {
        width: auto;
        height: 32px;
        max-width: none;
    }

    .gestor-brand-copy {
        align-items: flex-start;
        width: 100%;
    }

    .gestor-subtitle {
        font-size: 0.72rem;
        line-height: 1.15;
        gap: 0.06rem 0.35rem;
    }

    .gestor-subtitle-sep {
        font-size: 0.48rem;
    }

    .gestor-nav-actions {
        margin-top: 0;
        width: 100%;
        justify-content: flex-end;
        align-self: stretch;
        flex-wrap: wrap;
        gap: 0.36rem;
    }

    .gestor-page-home .gestor-nav-actions {
        justify-content: flex-end;
    }

    .gestor-topbar-btn {
        min-height: 31px;
        padding: 0.3rem 0.62rem;
        font-size: 0.74rem;
        gap: 0.28rem;
    }

    .gestor-topbar-btn i {
        font-size: 0.74rem;
    }
}

/* Loading global em ações CRUD */
.cv-crud-loading {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(243, 247, 253, 0.78);
    backdrop-filter: blur(2px);
}

.cv-crud-loading.is-active {
    display: flex;
}

.cv-crud-loading__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #dbe7f5;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.14);
}

.cv-crud-loading__text {
    font: 700 0.88rem/1.2 Inter, "Segoe UI", Roboto, Arial, sans-serif;
    color: #1877F2;
}

.cv-crud-loading__gif,
.cv-crud-loading__spinner {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.cv-crud-loading__spinner {
    border: 4px solid #dbe7f5;
    border-top-color: #1877F2;
    border-radius: 50%;
    animation: cv-crud-spin 0.75s linear infinite;
}

.cv-loading-spinner,
.cv-crud-loading__spinner {
    animation-duration: 0.75s !important;
    animation-iteration-count: infinite !important;
}

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

body.cv-crud-loading-open {
    overflow: hidden;
}

.gestor-flash-backdrop {
    z-index: 100001;
}

/* Thumbs de anexos / fotos */
.cv-thumb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.cv-thumb-item {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    border: 1px solid var(--cv-border, #dbe7f5);
    overflow: hidden;
    background: #f8fbff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-thumb-item i {
    font-size: 1.35rem;
    color: #5f6c7b;
}
