:root {
    --bg: #f6f8fb;
    --surface: #fff;
    --line: #edf1f6;
    --text: #0f172a;
    --muted: #66758a;
    --green: #f5b301;
    --green-dark: #ffffff;
    --green-soft: #0B1F3A;
    --blue: #1463ff;
    --purple: #a426ed;
    --amber: #f5b301;
    --red: #ef4444;
    --orange: #f97316;
    --shadow: 0 10px 28px rgba(15, 23, 42, .06);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, .09);
    --radius: 18px;
    --sidebar: 288px
}

* {
    box-sizing: border-box
}

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

body {
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    -webkit-font-smoothing: antialiased
}

a {
    text-decoration: none;
    color: var(--green);
    font-weight: 800
}

a:hover {
    color: var(--green-dark)
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr)
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 30px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 26px
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 8px 16px
}

.brand-symbol,
.status-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(from 10deg, #0B1F3A, #0B1F3A, #0B1F3A, #0B1F3A);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(22, 163, 74, .18);
}

.brand-symbol span {
    font-size: 24px
}

.brand-copy strong {
    display: block;
    font-size: 25px;
    line-height: .95;
    font-weight: 900;
    letter-spacing: -.05em
}

.brand-copy em {
    display: block;
    color: var(--green);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    font-style: italic
}

.nav-menu {
    display: grid;
    gap: 9px
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #111827;
    border-radius: 13px;
    padding: 14px 14px;
    font-weight: 800;
    transition: .18s ease
}

.nav-menu a span {
    width: 22px;
    text-align: center;
    font-size: 20px;
    color: #334155
}

.nav-menu a.active,
.nav-menu a:hover {
    background: var(--green-soft);
    color: var(--green-dark)
}

.nav-menu a.active span,
.nav-menu a:hover span {
    color: var(--green)
}

.sidebar-status {
    margin-top: auto;
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 6px
}

.sidebar-status strong,
.sidebar-status small,
.sidebar-user strong,
.sidebar-user small {
    display: block
}

.sidebar-status small,
.sidebar-user small {
    color: var(--muted);
    font-weight: 500
}

.status-pill {
    background: #D4AF37;
    color: #0B1F3A;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900
}

.sidebar-user {
    border-top: 1px solid var(--line);
    padding: 22px 6px 0;
    display: grid;
    grid-template-columns: 42px 1fr 20px;
    gap: 10px;
    align-items: center
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--#D4AF37);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900
}

.main-area {
    padding: 38px 34px 44px;
    min-width: 0
}

.content-frame {
    max-width: 1520px;
    margin: 0 auto
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px
}

.page-hero h1,
.page-hero h2 {
    font-size: 26px;
    line-height: 1.15;
    margin: 0 0 7px;
    font-weight: 900;
    letter-spacing: -.04em
}

.page-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 17px
}

.hero-actions,
.top-actions,
.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center
}

.filter-pill,
.date-pill {
    border: 1px solid #dbe3ee;
    border-radius: 13px;
    background: #fff;
    padding: 12px 15px;
    box-shadow: var(--shadow);
    font-weight: 800;
    color: #111827
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px
}

.card.clean {
    box-shadow: none
}

.stat-card h3 {
    font-size: 28px;
    color: var(--green);
    margin: 4px 0
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px
}

.section-head h2,
.section-head h3,
.card h3 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -.03em
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted)
}

.eyebrow {
    display: block;
    margin: 0 0 9px;
    color: var(--green);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: 12px
}

.muted,
small {
    color: var(--muted)
}

button,
.button {
    border: 1px solid transparent;
    background: var(--green);
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(22, 163, 74, .18);
    white-space: nowrap
}

.button:hover,
button:hover {
    background: var(--green-dark);
    color: #fff
}

.button-secondary {
    background: #fff;
    color: var(--green);
    border-color: #D4AF37;
    box-shadow: none
}

.button-secondary:hover {
    background: var(--green-soft);
    color: var(--green-dark)
}

.button-sm {
    font-size: 13px;
    padding: 8px 11px;
    border-radius: 10px
}

.actions {
    justify-content: flex-end;
    margin-bottom: 16px
}

.grid {
    display: grid;
    gap: 20px
}

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

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

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

.full {
    grid-column: 1/-1
}

label {
    font-size: 14px;
    font-weight: 800;
    color: #344054;
    display: flex;
    flex-direction: column;
    gap: 8px
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8e1ec;
    border-radius: 13px;
    background: #fff;
    padding: 13px 14px;
    font: inherit;
    color: var(--text);
    outline: 0
}

input:focus,
select:focus,
textarea:focus {
    border-color: #0B1F3A;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .12)
}

textarea {
    min-height: 112px;
    resize: vertical
}

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

.section-divider {
    height: 1px;
    background: var(--line);
    margin: 10px 0
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff
}

.table-wrap table,
table.data-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    background: #fff
}

th,
td {
    padding: 15px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle
}

tr:last-child td {
    border-bottom: 0
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #64748b;
    background: #fbfcfe;
    font-weight: 900
}

.table-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid transparent
}

.badge.success {
    background: #D4AF37;
    color: #0B1F3A;
    border-color: #D4AF37
}

.badge.warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a
}

.badge.danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca
}

.badge.neutral {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0
}

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

.kpi {
    min-height: 174px;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    align-items: start
}

.kpi-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 25px;
    background: var(--green-soft);
    color: var(--green)
}

.kpi.blue .kpi-icon {
    background: #eaf1ff;
    color: var(--blue)
}

.kpi.purple .kpi-icon {
    background: #f5e8ff;
    color: var(--purple)
}

.kpi.amber .kpi-icon {
    background: #fff6df;
    color: var(--amber)
}

.kpi-title {
    margin: 3px 0 15px;
    font-weight: 900
}

.kpi-value {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.04em;
    color: var(--green)
}

.kpi.blue .kpi-value {
    color: var(--blue)
}

.kpi.purple .kpi-value {
    color: var(--purple)
}

.kpi.amber .kpi-value {
    color: var(--amber)
}

.kpi-footer {
    grid-column: 1/-1;
    border-top: 1px solid var(--line);
    padding-top: 13px;
    color: var(--muted);
    font-weight: 700
}

.dashboard-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .85fr)
}

.chart-card,
.agenda-card {
    min-height: 450px
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 13px;
    font-weight: 700;
    color: #334155
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: 7px
}

.legend-dot.paid {
    background: var(--green)
}

.legend-dot.open {
    background: #d7dce3
}

.bar-chart {
    height: 275px;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding: 24px 14px 12px;
    margin-top: 14px;
    border-radius: 18px;
    background: repeating-linear-gradient(to top, #fff 0, #fff 34px, #edf1f6 35px)
}

.bar-month {
    flex: 1;
    min-width: 54px;
    display: grid;
    gap: 8px;
    text-align: center;
    color: #475569
}

.bars {
    height: 205px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 7px
}

.bar {
    width: 18px;
    min-height: 6px;
    border-radius: 12px 12px 4px 4px
}

.bar.paid {
    background: linear-gradient(180deg, #0B1F3A, #0B1F3A)
}

.bar.open {
    background: linear-gradient(180deg, #d7dce3, #94a3b8)
}

.chart-empty,
.empty-state {
    border-radius: 16px;
    background: #fbfdfc;
    text-align: center;
    padding: 26px;
    color: var(--muted)
}

.chart-empty {
    margin-top: 18px
}

.chart-empty-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    background: var(--green-soft);
    color: var(--green);
    font-size: 30px
}

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

.agenda-row {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 12px 0
}

.agenda-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #D4AF37;
    color: var(--green);
    font-size: 21px
}

.agenda-icon.warn {
    background: #fff7ed;
    color: #f97316
}

.agenda-icon.danger {
    background: #fff1f2;
    color: #e11d48
}

.agenda-row strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
    margin-bottom: 4px
}

.agenda-row small {
    display: block;
    font-size: 13px;
    line-height: 1.25;
    color: var(--muted)
}

.agenda-amount {
    font-weight: 900;
    color: var(--green);
    white-space: nowrap
}

.integration-strip {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 18px;
    align-items: center;
    background: #fff;
    margin-top: 18px
}

.strip-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border-right: 1px solid var(--line);
    padding-right: 18px
}

.strip-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--green-soft);
    color: var(--green);
    font-size: 23px;
}

.summary-row,
.method-summary>div,
.timeline-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line)
}

.summary-row:last-child,
.method-summary>div:last-child {
    border-bottom: 0
}

.timeline {
    display: grid;
    gap: 12px
}

.timeline-item {
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 14px;
    background: #fbfcfe
}

.info-inline {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    background: #fbfcfe;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 14px
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px
}

.check-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fbfcfe;
    padding: 14px
}

.check-card input {
    width: auto
}

.check-card strong,
.check-card small {
    display: block
}

.form-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #fbfcfe;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 14px
}

.form-switch input {
    width: auto
}

.compact-head {
    padding: 0;
    margin: 0
}

.info-card ol {
    margin: 14px 0 0;
    padding-left: 20px;
    color: #475569
}

.info-card li {
    margin: 8px 0
}

.method-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background: radial-gradient(circle at top left, rgba(22, 55, 163, 0.18), transparent 55%), var(--bg)
}

.login-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg)
}

.login-panel {
    padding: 42px
}

.login-panel-brand {
    background: linear-gradient(135deg, #0B1F3A, #0B1F3A);
    color: #fff
}

.login-panel-brand .muted,
.login-panel-brand p,
.login-panel-brand .eyebrow {
    color: #effff3
}

.login-panel h2 {
    font-size: 44px;
    margin: 8px 0 12px;
    letter-spacing: -.07em
}

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

.auth-form h3 {
    font-size: 28px;
    margin: 0
}

.feature-list {
    display: grid;
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none
}

.feature-list li {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    padding: 12px 14px;
    border-radius: 13px
}

.feature-list li:before {
    content: '✓ ';
    font-weight: 900
}

.pay-modal {
    text-align: left
}

.modal-textarea {
    min-height: 120px
}

.pix-qrcode {
    display: grid;
    place-items: center;
    margin: 16px 0
}

.pay-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px
}

@media(max-width:1180px) {
    .app-shell {
        grid-template-columns: 98px 1fr
    }

    .sidebar {
        padding: 22px 14px
    }

    .brand-copy,
    .nav-menu a b,
    .sidebar-status div,
    .sidebar-status .status-pill,
    .sidebar-user div,
    .sidebar-user a {
        display: none
    }

    .brand-block,
    .nav-menu a {
        justify-content: center
    }

    .sidebar-status,
    .sidebar-user {
        grid-template-columns: 1fr;
        justify-items: center
    }

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

    .dashboard-layout,
    .page-grid-2 {
        grid-template-columns: 1fr
    }

    .integration-strip {
        grid-template-columns: 1fr 1fr
    }

    .strip-item {
        border-right: 0
    }
}

@media(max-width:760px) {
    .app-shell {
        display: block
    }

    .sidebar {
        position: relative;
        height: auto;
        padding: 14px
    }

    .brand-copy,
    .nav-menu a b {
        display: block
    }

    .brand-block {
        justify-content: flex-start
    }

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

    .nav-menu a {
        justify-content: flex-start
    }

    .sidebar-status,
    .sidebar-user {
        display: none
    }

    .main-area {
        padding: 20px
    }

    .page-hero {
        flex-direction: column
    }

    .hero-actions,
    .button,
    .actions {
        width: 100%
    }

    .kpi-grid,
    .cols-2,
    .cards-3,
    .form-grid,
    .login-shell,
    .integration-strip,
    .checkbox-grid {
        grid-template-columns: 1fr
    }

    .card {
        padding: 18px
    }

    .login-panel {
        padding: 28px
    }

    .agenda-row {
        grid-template-columns: 46px 1fr
    }

    .agenda-amount {
        grid-column: 2
    }

    .chart-card,
    .agenda-card {
        min-height: auto
    }

    .table-wrap table,
    table.data-table {
        min-width: 720px
    }
}

/* ===== Fortis layout v3 - aplicado globalmente ===== */
body.fortis-layout-v3 {
    background: #f8fafc
}

body.fortis-layout-v3 .app-shell {
    background: #f8fafc
}

body.fortis-layout-v3 .sidebar {
    box-shadow: 8px 0 30px rgba(15, 23, 42, .03)
}

body.fortis-layout-v3 .main-area {
    padding: 40px 38px 52px
}

body.fortis-layout-v3 .content-frame {
    width: 100%;
    max-width: 1540px
}

body.fortis-layout-v3 .page-hero {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0 0 28px;
    min-height: 58px
}

body.fortis-layout-v3 .page-hero h1,
body.fortis-layout-v3 .page-hero h2 {
    font-size: 26px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -.055em
}

body.fortis-layout-v3 .page-hero p {
    font-size: 16px;
    color: #475569;
    line-height: 1.45
}

body.fortis-layout-v3 .card {
    border-color: #eef2f7;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .055);
    background: #fff
}

body.fortis-layout-v3 .section-head {
    padding-bottom: 8px
}

body.fortis-layout-v3 .eyebrow {
    color: #D4AF37;
    letter-spacing: .16em;
    font-size: 12px;
    font-weight: 900
}

body.fortis-layout-v3 .button,
body.fortis-layout-v3 button {
    border-radius: 13px;
    font-weight: 900;
    min-height: 44px
}

body.fortis-layout-v3 .button-secondary {
    background: #fff;
    color: #D4AF37;
    border-color: #D4AF37;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04)
}

body.fortis-layout-v3 .table-wrap {
    border-radius: 18px;
    border-color: #eef2f7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8)
}

body.fortis-layout-v3 th {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    letter-spacing: .11em
}

body.fortis-layout-v3 td {
    color: #1e293b
}

body.fortis-layout-v3 tr:hover td {
    background: #fbfefc
}

body.fortis-layout-v3 input,
body.fortis-layout-v3 select,
body.fortis-layout-v3 textarea {
    border-radius: 13px;
    background: #fff;
    border-color: #dbe3ee;
    min-height: 46px
}

body.fortis-layout-v3 .form-grid {
    gap: 18px
}

body.fortis-layout-v3 label {
    font-weight: 800;
    color: #334155
}

body.fortis-layout-v3 .badge {
    border-radius: 999px;
    font-weight: 900
}

body.fortis-layout-v3 .brand-copy strong {
    font-size: 15px
}

body.fortis-layout-v3 .brand-copy em {
    font-size: 15px
}

body.fortis-layout-v3 .nav-menu a {
    min-height: 50px
}

body.fortis-layout-v3 .nav-menu a.active {
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .04)
}

body.fortis-layout-v3 .grid.cols-2,
body.fortis-layout-v3 .page-grid-2 {
    align-items: start
}

body.fortis-layout-v3 .stack {
    display: grid;
    gap: 20px
}

body.fortis-layout-v3 .table-actions a {
    font-weight: 900;
    color: #D4AF37
}

body.fortis-layout-v3 .table-actions a[data-confirm] {
    color: #ef4444
}

body.fortis-layout-v3 .date-pill,
body.fortis-layout-v3 .filter-pill {
    border-radius: 13px;
    background: #fff;
    border-color: #dbe3ee;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .035)
}

@media(max-width:760px) {
    body.fortis-layout-v3 .main-area {
        padding: 20px 14px 34px
    }

    body.fortis-layout-v3 .page-hero {
        gap: 14px
    }

    body.fortis-layout-v3 .hero-actions a,
    body.fortis-layout-v3 .hero-actions span {
        width: 100%;
        justify-content: center
    }

    body.fortis-layout-v3 .nav-menu {
        grid-template-columns: 1fr 1fr
    }

    body.fortis-layout-v3 .nav-menu a {
        padding: 12px 10px;
        font-size: 14px
    }

    body.fortis-layout-v3 .card {
        padding: 18px
    }
}

/* Fortis ajuste: textos secundarios sempre abaixo dos valores/titulos */
.kpi .kpi-value {
    display: block;
    line-height: 1.05;
    margin-bottom: 7px
}

.kpi small {
    display: block;
    line-height: 1.35;
    margin-top: 2px
}

.kpi-title {
    line-height: 1.25
}

.agenda-row strong {
    display: block
}

.agenda-row small {
    display: block;
    margin-top: 4px
}

/* Fortis paginacao global das listas */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700
}

.table-pagination .page-info {
    color: var(--muted)
}

.table-pagination .page-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.page-btn {
    border: 1px solid #d8e1ec;
    background: #fff;
    color: var(--text);
    border-radius: 10px;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: none;
    cursor: pointer
}

.page-btn:hover {
    border-color: #D4AF37;
    background: var(--green-soft);
    color: var(--green-dark)
}

.page-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff
}

.page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8
}

@media(max-width:760px) {
    .table-pagination {
        justify-content: center;
        text-align: center
    }

    .table-pagination .page-info {
        width: 100%
    }
}

/* Fortis logo oficial */
.brand-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
    background: #fff;
}

.brand-copy em {
    font-size: 13px;
    font-style: normal;
    letter-spacing: .01em;
    color: #5b6b80;
    margin-top: 3px
}

.status-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .10);
}

.login-logo-wrap {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, .22)
}

.login-logo-wrap img {
    max-width: 86px;
    max-height: 86px;
    border-radius: 14px;
    object-fit: contain
}

@media(max-width:1180px) {
    .brand-logo {
        width: 52px;
        height: 52px
    }

    .brand-copy {
        display: none
    }
}

@media(max-width:760px) {
    .brand-logo {
        width: 48px;
        height: 48px
    }

    .brand-copy {
        display: block
    }
}
/* Fortis menu recolhivel + logout no topo */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -14px 0 26px;
    padding: 14px 16px;
    background: rgba(246, 248, 251, .88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(237, 241, 246, .9);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06)
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.topbar-title strong,
.topbar-title small {
    display: block
}

.topbar-title strong {
    font-size: 15px;
    letter-spacing: -.02em
}

.topbar-title small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px
}

.mobile-menu-btn,
.desktop-menu-btn,
.sidebar-collapse-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    border: 1px solid #dbe3ee;
    box-shadow: none;
    font-size: 20px
}

.mobile-menu-btn:hover,
.desktop-menu-btn:hover,
.sidebar-collapse-btn:hover {
    background: var(--green-soft);
    color: var(--green-dark)
}

.mobile-menu-btn {
    display: none
}

.sidebar-collapse-btn {
    margin-left: auto;
    flex: 0 0 42px
}

.button-danger {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 10px 20px rgba(239, 68, 68, .16)
}

.button-danger:hover {
    background: #dc2626;
    color: #fff
}

body.sidebar-collapsed {
    --sidebar: 92px
}

body.sidebar-collapsed .sidebar {
    padding-left: 14px;
    padding-right: 14px;
    align-items: center
}

body.sidebar-collapsed .brand-block {
    width: 100%;
    justify-content: center;
    padding-left: 0;
    padding-right: 0
}

body.sidebar-collapsed .brand-logo {
    margin: 0 auto
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-menu a b,
body.sidebar-collapsed .sidebar-status div,
body.sidebar-collapsed .sidebar-status .status-pill,
body.sidebar-collapsed .sidebar-user div,
body.sidebar-collapsed .sidebar-user a {
    display: none !important
}

body.sidebar-collapsed .nav-menu,
body.sidebar-collapsed .nav-menu a {
    width: 100%
}

body.sidebar-collapsed .nav-menu a {
    justify-content: center;
    padding: 14px 0;
    gap: 0
}

body.sidebar-collapsed .nav-menu a span {
    width: auto;
    font-size: 22px
}

body.sidebar-collapsed .sidebar-status {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    width: 100%
}

body.sidebar-collapsed .sidebar-user {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-left: 0;
    padding-right: 0
}

.mobile-overlay {
    display: none
}

@media (max-width: 980px) {
    :root {
        --sidebar: 280px
    }

    .app-shell {
        display: block
    }

    .sidebar {
        position: fixed;
        z-index: 60;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-105%);
        transition: transform .24s ease;
        box-shadow: 24px 0 48px rgba(15, 23, 42, .18)
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0)
    }

    .mobile-overlay {
        position: fixed;
        z-index: 50;
        inset: 0;
        background: rgba(15, 23, 42, .42);
        backdrop-filter: blur(2px)
    }

    body.sidebar-mobile-open .mobile-overlay {
        display: block
    }

    .main-area {
        padding: 20px 14px 34px
    }

    .app-topbar {
        margin: 0 0 18px;
        border-radius: 16px
    }

    .mobile-menu-btn {
        display: inline-flex
    }

    .desktop-menu-btn,
    .sidebar-collapse-btn {
        display: none
    }

    body.sidebar-collapsed {
        --sidebar: 280px
    }

    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .nav-menu a b,
    body.sidebar-collapsed .sidebar-status div,
    body.sidebar-collapsed .sidebar-status .status-pill,
    body.sidebar-collapsed .sidebar-user div,
    body.sidebar-collapsed .sidebar-user a {
        display: block !important
    }

    body.sidebar-collapsed .sidebar {
        align-items: stretch;
        padding: 30px 18px 24px
    }

    body.sidebar-collapsed .nav-menu a {
        justify-content: flex-start;
        padding: 14px 14px;
        gap: 14px
    }
}

@media (max-width: 560px) {
    .app-topbar {
        align-items: stretch;
        flex-direction: column
    }

    .topbar-left,
    .topbar-actions {
        width: 100%;
        justify-content: space-between
    }

    .topbar-actions .button,
    .topbar-actions button {
        flex: 1
    }
}

/* Fortis correção final: sem topo duplicado, um botão de menu e menu mobile em uma coluna */
.app-topbar,
.desktop-menu-btn {
    display: none !important;
}

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

.mobile-menu-btn {
    display: none;
}

.js-logout-btn,
.button-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 10px 20px rgba(239, 68, 68, .18);
}

.js-logout-btn:hover,
.button-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

@media (max-width: 980px) {
    .mobile-menu-btn {
        display: inline-flex !important;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 45;
        width: 46px;
        height: 46px;
        border-radius: 14px;
        background: #fff;
        color: #0f172a;
        border: 1px solid #dbe3ee;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
        font-size: 22px;
        padding: 0;
    }

    body.sidebar-mobile-open .mobile-menu-btn {
        display: none !important;
    }

    .sidebar-collapse-btn {
        display: none !important;
    }

    .main-area {
        padding-top: 78px !important;
    }

    .sidebar .brand-copy,
    .sidebar .nav-menu a b {
        display: block !important;
    }

    .sidebar .brand-block,
    .sidebar .nav-menu a {
        justify-content: flex-start !important;
    }

    .sidebar .nav-menu,
    body.fortis-layout-v3 .nav-menu,
    body.fortis-layout-v3 .sidebar .nav-menu {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 9px !important;
        width: 100% !important;
    }

    .sidebar .nav-menu a,
    body.fortis-layout-v3 .nav-menu a,
    body.sidebar-collapsed .nav-menu a {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 14px 14px !important;
        gap: 14px !important;
    }

    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .nav-menu a b {
        display: block !important;
    }
}

@media (max-width: 560px) {
    .top-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .top-actions .filter-pill {
        grid-column: 1 / -1;
        text-align: center;
    }

    .top-actions .button,
    .top-actions button {
        width: 100%;
    }
}

/* Fortis ajuste definitivo: subtítulos/valores sempre em coluna */
.strip-copy,
.info-text,
.card-info-text,
.kpi > div:nth-child(2),
.agenda-row > div:nth-child(2) {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    min-width: 0;
}

.strip-copy small,
.info-text .label,
.card-info-text .label {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    color: var(--muted) !important;
    font-weight: 800 !important;
}

.strip-copy strong,
.info-text .value,
.card-info-text .value {
    display: block !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
    color: var(--text) !important;
    font-weight: 900 !important;
}

.strip-copy .badge,
.strip-copy .muted,
.strip-copy .mini-config-link {
    display: inline-flex !important;
    margin-top: 2px !important;
}

.mini-config-link {
    font-size: 12px;
    font-weight: 900;
    color: var(--green);
}

.status-pill.warning {
    background: #fff7ed;
    color: #c2410c;
}

.status-pill.success {
    background: #dcfce7;
    color: #15803d;
}

/* Fortis ajuste definitivo mobile: menu em uma única coluna */
@media (max-width: 980px) {
    .sidebar .nav-menu,
    body.fortis-layout-v3 .nav-menu,
    body.fortis-layout-v3 .sidebar .nav-menu,
    body.sidebar-collapsed .nav-menu {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 9px !important;
        width: 100% !important;
    }

    .sidebar .nav-menu a,
    body.fortis-layout-v3 .nav-menu a,
    body.sidebar-collapsed .nav-menu a {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 14px 14px !important;
        gap: 14px !important;
    }
}

/* Fortis ajuste menu: o botao hamburguer sempre fica disponivel para expandir/recolher */
body.sidebar-collapsed .sidebar-collapse-btn {
    display: inline-flex !important;
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 80;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #0f172a;
    border: 1px solid #dbe3ee;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

body.sidebar-collapsed .brand-block {
    padding-top: 58px;
}

@media (max-width: 980px) {
    .mobile-menu-btn,
    body.sidebar-mobile-open .mobile-menu-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        z-index: 90;
    }

    body.sidebar-mobile-open .mobile-menu-btn {
        left: 246px;
        box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
    }

    body.sidebar-collapsed .sidebar-collapse-btn,
    .sidebar-collapse-btn {
        display: none !important;
    }
}

@media (max-width: 320px) {
    body.sidebar-mobile-open .mobile-menu-btn {
        left: auto;
        right: 12px;
    }
}


/* Correção: cards de agrupamento não somem no hover */
.group-card,
.group-card:hover,
.group-card:focus,
.group-card:visited {
    background: #fff !important;
    color: #0f172a !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none !important;
}
.group-card *,
.group-card:hover *,
.group-card:focus *,
.group-card:visited * {
    color: #0f172a !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.group-card small,
.group-card:hover small {
    color: #64748b !important;
}
.group-card:hover {
    border-color: #2563eb !important;
    box-shadow: 0 14px 34px rgba(37,99,235,.12) !important;
}

/* Correção definitiva: botões dourados não somem no hover
   Abrange tanto class="button button-secondary" quanto class="button secondary". */
a.button.button-secondary,
button.button-secondary,
body.fortis-layout-v3 a.button.button-secondary,
body.fortis-layout-v3 button.button-secondary,
a.button.secondary,
button.secondary,
body.fortis-layout-v3 a.button.secondary,
body.fortis-layout-v3 button.secondary {
    background: #D4AF37 !important;
    background-color: #D4AF37 !important;
    color: #0B1F3A !important;
    border: 1px solid #D4AF37 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

a.button.button-secondary:hover,
a.button.button-secondary:focus,
a.button.button-secondary:active,
button.button-secondary:hover,
button.button-secondary:focus,
button.button-secondary:active,
body.fortis-layout-v3 a.button.button-secondary:hover,
body.fortis-layout-v3 a.button.button-secondary:focus,
body.fortis-layout-v3 a.button.button-secondary:active,
body.fortis-layout-v3 button.button-secondary:hover,
body.fortis-layout-v3 button.button-secondary:focus,
body.fortis-layout-v3 button.button-secondary:active,
a.button.secondary:hover,
a.button.secondary:focus,
a.button.secondary:active,
button.secondary:hover,
button.secondary:focus,
button.secondary:active,
body.fortis-layout-v3 a.button.secondary:hover,
body.fortis-layout-v3 a.button.secondary:focus,
body.fortis-layout-v3 a.button.secondary:active,
body.fortis-layout-v3 button.secondary:hover,
body.fortis-layout-v3 button.secondary:focus,
body.fortis-layout-v3 button.secondary:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #D4AF37 !important;
    border-color: #D4AF37 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

a.button.button-secondary:hover *,
a.button.button-secondary:focus *,
a.button.button-secondary:active *,
button.button-secondary:hover *,
button.button-secondary:focus *,
button.button-secondary:active *,
a.button.secondary:hover *,
a.button.secondary:focus *,
a.button.secondary:active *,
button.secondary:hover *,
button.secondary:focus *,
button.secondary:active * {
    color: #D4AF37 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Compatibilidade: páginas antigas que ainda usam page-header aparecem como page-hero */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 28px;
}
.page-header h1,
.page-header h2 {
    font-size: 26px;
    line-height: 1.15;
    margin: 0 0 7px;
    font-weight: 900;
    letter-spacing: -.04em;
    color: #0f172a;
}
.page-header p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
}
@media (max-width: 760px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Fortis 2026-07: hover visivel e layout adaptavel em qualquer viewport */
.sidebar {
    min-height: 0;
    overflow: hidden;
}

.sidebar .brand-block,
.sidebar .sidebar-status,
.sidebar .sidebar-user {
    flex-shrink: 0;
}

.sidebar .nav-menu {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sidebar .nav-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar .nav-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

/* Os botoes dourados mantem fundo e texto contrastantes no hover/foco. */
body.fortis-layout-v3 a.button:not(.button-danger):not(.button-secondary):not(.secondary):hover,
body.fortis-layout-v3 a.button:not(.button-danger):not(.button-secondary):not(.secondary):focus-visible,
body.fortis-layout-v3 button:not(.button-danger):not(.js-logout-btn):not(.button-secondary):not(.secondary):not(.mobile-menu-btn):not(.sidebar-collapse-btn):hover,
body.fortis-layout-v3 button:not(.button-danger):not(.js-logout-btn):not(.button-secondary):not(.secondary):not(.mobile-menu-btn):not(.sidebar-collapse-btn):focus-visible {
    background: #d69e00;
    border-color: #d69e00;
    color: #0b1f3a;
    opacity: 1;
    visibility: visible;
}

body.fortis-layout-v3 a.button.button-secondary:hover,
body.fortis-layout-v3 a.button.button-secondary:focus-visible,
body.fortis-layout-v3 button.button-secondary:hover,
body.fortis-layout-v3 button.button-secondary:focus-visible,
body.fortis-layout-v3 a.button.secondary:hover,
body.fortis-layout-v3 a.button.secondary:focus-visible,
body.fortis-layout-v3 button.secondary:hover,
body.fortis-layout-v3 button.secondary:focus-visible {
    background: #b88916 !important;
    background-color: #b88916 !important;
    border-color: #b88916 !important;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.fortis-layout-v3 a.button.button-secondary:hover *,
body.fortis-layout-v3 a.button.button-secondary:focus-visible *,
body.fortis-layout-v3 button.button-secondary:hover *,
body.fortis-layout-v3 button.button-secondary:focus-visible *,
body.fortis-layout-v3 a.button.secondary:hover *,
body.fortis-layout-v3 a.button.secondary:focus-visible *,
body.fortis-layout-v3 button.secondary:hover *,
body.fortis-layout-v3 button.secondary:focus-visible * {
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.main-area,
.content-frame,
.card,
.page-hero,
.page-header {
    min-width: 0;
}

.page-hero,
.page-header,
.hero-actions,
.top-actions,
.actions {
    flex-wrap: wrap;
}

@media (max-height: 820px) and (min-width: 981px) {
    .sidebar {
        gap: 12px;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .brand-block {
        padding-bottom: 6px;
    }

    body.fortis-layout-v3 .nav-menu a {
        min-height: 42px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .sidebar-user {
        padding-top: 12px;
    }
}

@media (max-width: 980px) {
    .sidebar {
        height: 100vh;
        height: 100dvh;
        max-width: calc(100vw - 44px);
        gap: 14px;
        padding: 18px 14px 16px !important;
    }

    .sidebar .nav-menu {
        display: block !important;
        padding-right: 4px;
    }

    .sidebar .nav-menu a + a {
        margin-top: 7px;
    }

    .main-area,
    body.fortis-layout-v3 .main-area {
        width: 100%;
        padding-left: clamp(12px, 3vw, 24px) !important;
        padding-right: clamp(12px, 3vw, 24px) !important;
    }
}

@media (max-width: 560px) {
    .page-hero,
    .page-header,
    .hero-actions,
    .top-actions,
    .actions {
        width: 100%;
    }

    .hero-actions > *,
    .top-actions > *,
    .actions > * {
        max-width: 100%;
    }

    input,
    select,
    textarea,
    button,
    .button {
        max-width: 100%;
    }
}

/* Central de conta, usuarios e importador */
.sidebar-account {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    padding-top: 14px;
}

.sidebar-account-copy { min-width: 0; }
.sidebar-account-copy strong,
.sidebar-account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-account-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.account-link,
button.account-link {
    min-height: 34px !important;
    padding: 7px 9px !important;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    box-shadow: none;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.account-link:hover,
button.account-link:hover { background: #0b1f3a !important; border-color: #0b1f3a !important; color: #fff !important; }
button.account-logout { color: #dc2626; }

.profile-layout {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.profile-summary { text-align: center; position: sticky; top: 20px; }
.profile-avatar,
.mini-avatar { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #0b1f3a, #244668); color: #f5b301; font-weight: 900; }
.profile-avatar { width: 82px; height: 82px; margin: 0 auto 16px; font-size: 26px; box-shadow: 0 14px 30px rgba(11, 31, 58, .2); }
.profile-summary h2 { margin: 0 0 6px; }
.profile-summary > p { margin: 0 0 14px; color: var(--muted); overflow-wrap: anywhere; }
.profile-meta { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-meta span { color: var(--muted); }
.security-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.security-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #fff7ed; font-size: 22px; }
.security-card h3 { margin: 2px 0 6px; }
.security-card p { margin: 0; }
.form-card-narrow { max-width: 900px; }
.user-cell { display: flex; align-items: center; gap: 11px; min-width: 220px; }
.user-cell div { min-width: 0; }
.user-cell strong, .user-cell small { display: block; }
.user-cell small { margin-top: 3px; }
.mini-avatar { width: 38px; height: 38px; flex: 0 0 38px; font-size: 12px; }
.badge-muted { background: #f1f5f9; color: #64748b; }

.import-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 22px; align-items: start; }
.pdf-dropzone { position: relative; border: 2px dashed #cbd5e1; border-radius: 18px; background: #f8fafc; transition: .2s ease; }
.pdf-dropzone:hover, .pdf-dropzone.is-dragging { border-color: #d4af37; background: #fffbeb; }
.pdf-dropzone.has-file { border-color: #16a34a; background: #f0fdf4; }
.pdf-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pdf-dropzone-label { min-height: 250px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; cursor: pointer; }
.pdf-icon { width: 62px; height: 72px; display: grid; place-items: center; border-radius: 10px 10px 16px 10px; background: #dc2626; color: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 12px 24px rgba(220, 38, 38, .2); }
.pdf-file-name { margin-top: 8px; padding: 8px 12px; max-width: 100%; border-radius: 999px; background: #fff; color: #334155; font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-steps { display: grid; gap: 18px; }
.import-steps > div { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; }
.import-steps > div > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #0b1f3a; color: #f5b301; font-weight: 900; }
.import-steps p, .import-steps strong, .import-steps small { margin: 0; display: block; }
.import-steps small { margin-top: 3px; }

@media (max-width: 980px) {
    .sidebar-account { display: grid !important; }
    .sidebar-account-copy, .sidebar-account-actions { display: grid !important; }
    .import-layout, .profile-layout { grid-template-columns: 1fr; }
    .profile-summary { position: static; }
}

@media (max-width: 620px) {
    .security-card { grid-template-columns: auto minmax(0, 1fr); }
    .security-card .button { grid-column: 1 / -1; width: 100%; }
    .pdf-dropzone-label { min-height: 210px; padding: 22px 14px; }
}

/* Fortis Design System - escala compacta e paleta padronizada */
:root {
    --fortis-navy: #102a43;
    --fortis-navy-hover: #183f63;
    --fortis-gold: #d4af37;
    --fortis-gold-hover: #b89224;
    --fortis-danger: #dc2626;
    --fortis-danger-hover: #b91c1c;
    --fortis-focus: rgba(37, 99, 235, .16);
    --fortis-border: #e2e8f0;
    --fortis-radius: 12px;
    --fortis-shadow: 0 6px 20px rgba(15, 23, 42, .055);
    --sidebar: 260px;
}

html { font-size: 14px; }

body,
body.fortis-layout-v3 {
    color: #172033;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    background: #f6f8fb;
}

body.fortis-layout-v3 .main-area {
    padding: 26px 28px 36px;
}

body.fortis-layout-v3 .content-frame { max-width: 1480px; }

.sidebar {
    gap: 12px;
    padding: 18px 14px 16px;
}

.brand-block { gap: 9px; padding: 0 4px 8px; }
.brand-logo { width: 54px; height: 54px; border-radius: 10px; box-shadow: 0 5px 14px rgba(15, 23, 42, .09); }
body.fortis-layout-v3 .brand-copy strong,
body.fortis-layout-v3 .brand-copy em { font-size: 14px; line-height: 1.1; letter-spacing: -.02em; }

body.fortis-layout-v3 .nav-menu { gap: 5px; }
body.fortis-layout-v3 .nav-menu a {
    min-height: 40px;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}
body.fortis-layout-v3 .nav-menu a span { width: 20px; font-size: 17px; }
.sidebar-status { padding: 6px 3px; gap: 8px; }
.status-logo-img { width: 36px; height: 36px; }
.status-pill { padding: 4px 7px; font-size: 10px; }
.sidebar-account { padding-top: 10px; grid-template-columns: 36px minmax(0, 1fr) !important; }
.sidebar-account .avatar { width: 36px; height: 36px; font-size: 11px; }
.sidebar-account-copy strong { font-size: 12px; }
.sidebar-account-copy small { font-size: 10px; }

body.sidebar-collapsed { --sidebar: 78px; }
body.sidebar-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
body.sidebar-collapsed .brand-block { padding-top: 50px; }
body.sidebar-collapsed .brand-logo { width: 46px; height: 46px; }

.page-hero,
body.fortis-layout-v3 .page-hero,
.page-header {
    gap: 14px;
    min-height: 0;
    margin-bottom: 18px;
}

.page-hero h1,
.page-hero h2,
.page-header h1,
.page-header h2,
body.fortis-layout-v3 .page-hero h1,
body.fortis-layout-v3 .page-hero h2 {
    margin-bottom: 5px;
    color: #111827;
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 800;
    letter-spacing: -.035em;
}

.page-hero p,
.page-header p,
body.fortis-layout-v3 .page-hero p,
body.fortis-layout-v3 .page-header p {
    max-width: 760px;
    font-size: 14px;
    line-height: 1.45;
}

.eyebrow,
body.fortis-layout-v3 .eyebrow {
    margin-bottom: 6px;
    color: #a77d0a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.card,
body.fortis-layout-v3 .card {
    padding: 18px;
    margin-bottom: 14px;
    border-color: var(--fortis-border);
    border-radius: 14px;
    box-shadow: var(--fortis-shadow);
}

.section-head { gap: 12px; margin-bottom: 14px; padding-bottom: 0 !important; }
.section-head h2,
.section-head h3,
.card h3,
body.fortis-layout-v3 .section-head h2,
body.fortis-layout-v3 .section-head h3,
body.fortis-layout-v3 .card h3 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.section-head p { margin-top: 5px; font-size: 13px; }

.grid,
body.fortis-layout-v3 .stack { gap: 14px; }
.form-grid,
body.fortis-layout-v3 .form-grid { gap: 13px 14px; }

label,
body.fortis-layout-v3 label {
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

input,
select,
textarea,
body.fortis-layout-v3 input,
body.fortis-layout-v3 select,
body.fortis-layout-v3 textarea {
    min-height: 40px;
    padding: 9px 11px;
    border-color: #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
}

textarea,
body.fortis-layout-v3 textarea { min-height: 88px; }
input:focus,
select:focus,
textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px var(--fortis-focus); }

.button,
button:not(.page-btn):not(.mobile-menu-btn):not(.desktop-menu-btn):not(.sidebar-collapse-btn):not(.account-link):not(.swal2-styled),
body.fortis-layout-v3 .button,
body.fortis-layout-v3 button:not(.page-btn):not(.mobile-menu-btn):not(.desktop-menu-btn):not(.sidebar-collapse-btn):not(.account-link):not(.swal2-styled) {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--fortis-navy);
    border-radius: 10px;
    background: var(--fortis-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(16, 42, 67, .14);
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.button:hover,
.button:focus-visible,
button:not(.page-btn):not(.mobile-menu-btn):not(.desktop-menu-btn):not(.sidebar-collapse-btn):not(.account-link):not(.swal2-styled):hover,
button:not(.page-btn):not(.mobile-menu-btn):not(.desktop-menu-btn):not(.sidebar-collapse-btn):not(.account-link):not(.swal2-styled):focus-visible,
body.fortis-layout-v3 .button:hover,
body.fortis-layout-v3 .button:focus-visible {
    border-color: var(--fortis-navy-hover);
    background: var(--fortis-navy-hover);
    color: #fff;
    box-shadow: 0 5px 14px rgba(16, 42, 67, .18);
}

.button-secondary,
.button.secondary,
body.fortis-layout-v3 .button-secondary,
body.fortis-layout-v3 .button.secondary,
body.fortis-layout-v3 a.button.button-secondary,
body.fortis-layout-v3 button.button-secondary {
    border-color: var(--fortis-gold) !important;
    background: var(--fortis-gold) !important;
    color: #172033 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, .14) !important;
}

.button-secondary:hover,
.button-secondary:focus-visible,
.button.secondary:hover,
.button.secondary:focus-visible,
body.fortis-layout-v3 .button-secondary:hover,
body.fortis-layout-v3 .button-secondary:focus-visible,
body.fortis-layout-v3 .button.secondary:hover,
body.fortis-layout-v3 .button.secondary:focus-visible {
    border-color: var(--fortis-gold-hover) !important;
    background: var(--fortis-gold-hover) !important;
    color: #fff !important;
}

.button-danger,
.js-logout-btn:not(.account-link),
body.fortis-layout-v3 .button-danger {
    border-color: var(--fortis-danger) !important;
    background: var(--fortis-danger) !important;
    color: #fff !important;
}
.button-danger:hover,
.button-danger:focus-visible,
.js-logout-btn:not(.account-link):hover,
body.fortis-layout-v3 .button-danger:hover {
    border-color: var(--fortis-danger-hover) !important;
    background: var(--fortis-danger-hover) !important;
}

.button-sm { min-height: 32px !important; padding: 6px 9px !important; font-size: 11px !important; }
.hero-actions, .top-actions, .actions, .form-actions { gap: 8px; }
.filter-pill, .date-pill, body.fortis-layout-v3 .filter-pill, body.fortis-layout-v3 .date-pill { padding: 9px 11px; border-radius: 10px; font-size: 12px; }

.table-wrap { border-radius: 12px; }
th, td { padding: 10px 12px; font-size: 12px; }
th, body.fortis-layout-v3 th { font-size: 10px; letter-spacing: .07em; }
.table-actions { gap: 8px; }
.badge { padding: 4px 7px; font-size: 10px; font-weight: 800; }

.kpi-grid { gap: 10px; margin-bottom: 14px; }
.kpi { min-height: 120px; grid-template-columns: 44px 1fr; gap: 11px; }
.kpi-icon { width: 42px; height: 42px; font-size: 18px; }
.kpi-title { margin: 2px 0 8px; font-size: 12px; font-weight: 700; }
.kpi-value, .kpi .kpi-value { font-size: 20px; font-weight: 800; }
.kpi-footer { padding-top: 9px; font-size: 11px; }
.stat-card h3 { font-size: 21px; }
.chart-card, .agenda-card { min-height: 330px; }
.agenda-row { padding: 9px 0; }
.agenda-row strong { font-size: 13px; }
.agenda-row small { font-size: 11px; }
.integration-strip { gap: 12px; margin-top: 12px; }

.profile-avatar { width: 64px; height: 64px; font-size: 20px; }
.security-icon { width: 40px; height: 40px; font-size: 18px; }
.pdf-dropzone-label { min-height: 190px; padding: 20px; }
.pdf-icon { width: 50px; height: 58px; }

.login-shell { width: min(920px, 100%); border-radius: 20px; }
.login-panel { padding: 30px; }
.login-panel h2 { font-size: 32px; }
.auth-form { gap: 14px; }
.auth-form h3 { font-size: 22px; }
.feature-list { gap: 8px; margin-top: 18px; }
.feature-list li { padding: 9px 11px; border-radius: 10px; font-size: 12px; }

@media (min-width: 981px) and (max-width: 1180px) {
    .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
    .sidebar { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 980px) {
    :root { --sidebar: 260px; }
    .sidebar { width: min(260px, calc(100vw - 44px)); }
    body.fortis-layout-v3 .main-area { padding: 68px 18px 28px !important; }
    body.fortis-layout-v3 .nav-menu a { min-height: 39px; padding: 8px 10px !important; }
}

@media (max-width: 760px) {
    body.fortis-layout-v3 .main-area { padding: 66px 12px 24px !important; }
    .card, body.fortis-layout-v3 .card { padding: 14px; border-radius: 12px; }
    .page-hero, body.fortis-layout-v3 .page-hero, .page-header { margin-bottom: 14px; }
    .page-hero h1, .page-header h1, body.fortis-layout-v3 .page-hero h1 { font-size: 20px; }
    .form-grid { gap: 11px; }
    .login-panel { padding: 22px; }
    .login-panel h2 { font-size: 26px; }
    .pdf-dropzone-label { min-height: 160px; }
}

/* Ações compactas e status financeiro clicável */
.table-actions.actions-icons { flex-wrap: nowrap; gap: 7px; align-items: center; }
body.fortis-layout-v3 .action-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 9px;
    text-decoration: none !important;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
body.fortis-layout-v3 .action-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.fortis-layout-v3 .action-icon.edit-icon { color: #9a6505 !important; background: #fff8e8; border-color: #f2d48f; }
body.fortis-layout-v3 .action-icon.resend-icon { color: #1d4ed8 !important; background: #eff6ff; border-color: #bfdbfe; }
body.fortis-layout-v3 .action-icon.delete-icon { color: #dc2626 !important; background: #fff1f2; border-color: #fecdd3; }
body.fortis-layout-v3 .action-icon:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(15, 23, 42, .12); opacity: 1 !important; visibility: visible !important; }
body.fortis-layout-v3 .action-icon.edit-icon:hover { color: #744600 !important; background: #ffefc7; border-color: #d99a1d; }
body.fortis-layout-v3 .action-icon.resend-icon:hover { color: #1e40af !important; background: #dbeafe; border-color: #93c5fd; }
body.fortis-layout-v3 .action-icon.delete-icon:hover { color: #b91c1c !important; background: #ffe4e6; border-color: #fda4af; }
body.fortis-layout-v3 .action-icon:focus-visible { outline: 3px solid rgba(37, 99, 235, .2); outline-offset: 2px; }
.financial-status-action { cursor: pointer; user-select: none; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.financial-status-action:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 23, 42, .13); filter: brightness(.98); }
.financial-status-action:focus-visible { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: 2px; }

/* SweetAlert com acabamento Fortis */
.swal2-container { padding: 16px !important; backdrop-filter: blur(2px); }
body .swal2-popup:not(.swal2-toast) {
    width: min(420px, calc(100vw - 24px)) !important;
    padding: 24px !important;
    border: 1px solid #e5eaf0 !important;
    border-radius: 18px !important;
    background: #fff !important;
    font-family: 'Inter', sans-serif !important;
    box-shadow: 0 24px 70px rgba(15, 31, 51, .22) !important;
}
body .swal2-popup:not(.swal2-toast) .swal2-title { padding: 0 !important; color: #102a43 !important; font-size: 21px !important; font-weight: 800 !important; line-height: 1.25 !important; letter-spacing: -.025em; }
body .swal2-popup:not(.swal2-toast) .swal2-html-container { margin: 8px 0 0 !important; padding: 0 !important; color: #64748b !important; font-size: 13px !important; line-height: 1.55 !important; }
body .swal2-popup:not(.swal2-toast) .swal2-select {
    width: 100% !important;
    height: 44px !important;
    margin: 16px 0 0 !important;
    padding: 0 38px 0 13px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background-color: #fff !important;
    color: #172033 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
body .swal2-popup:not(.swal2-toast) .swal2-select:focus { border-color: #d4af37 !important; outline: 3px solid rgba(212, 175, 55, .16) !important; }
body .swal2-popup:not(.swal2-toast) .swal2-actions { width: 100% !important; margin: 18px 0 0 !important; gap: 8px; }
body .swal2-popup:not(.swal2-toast) .swal2-styled { min-height: 40px; margin: 0 !important; padding: 9px 15px !important; border-radius: 10px !important; font-family: 'Inter', sans-serif !important; font-size: 12px !important; font-weight: 800 !important; box-shadow: none !important; }
body .swal2-popup:not(.swal2-toast) .swal2-styled:focus-visible { outline: 3px solid rgba(37, 99, 235, .2) !important; outline-offset: 2px; }
body .fortis-confirm-primary { background: #102a43 !important; color: #fff !important; }
body .fortis-confirm-primary:hover { background: #183f62 !important; }
body .fortis-confirm-danger { background: #dc2626 !important; color: #fff !important; }
body .fortis-confirm-danger:hover { background: #b91c1c !important; }
body .fortis-cancel { border: 1px solid #cbd5e1 !important; background: #fff !important; color: #475569 !important; }
body .fortis-cancel:hover { border-color: #94a3b8 !important; background: #f8fafc !important; color: #172033 !important; }
body .swal2-popup:not(.swal2-toast) .swal2-validation-message { margin: 12px 0 0 !important; border-radius: 9px !important; font-size: 12px !important; }
@media(max-width:480px) { body .swal2-popup:not(.swal2-toast) { padding: 20px 16px !important; border-radius: 15px !important; } body .swal2-popup:not(.swal2-toast) .swal2-actions { display: grid !important; grid-template-columns: 1fr 1fr; } body .swal2-popup:not(.swal2-toast) .swal2-styled { width: 100%; } }

/* Progresso da importacao de PDF no SweetAlert */
.import-progress { display: grid; gap: 12px; padding: 8px 2px 2px; text-align: center; }
.import-progress-stage { min-height: 21px; color: #334155; font-size: 13px; font-weight: 700; }
.import-progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e2e8f0; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .08); }
.import-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #102a43, #d4af37); transition: width .28s ease; }
.import-progress-value { color: #102a43; font-size: 20px; font-weight: 800; }
.import-progress small { color: #64748b; font-size: 11px; }

/* ===== Fortis layout v4 - identidade profissional global ===== */
body.fortis-layout-v3 {
    --sidebar: 252px;
    background: #f2f5f9;
    color: #172033;
}
body.fortis-layout-v3 .app-shell { background: #f2f5f9; }
body.fortis-layout-v3.sidebar-collapsed { --sidebar: 78px; }
body.fortis-layout-v3 .sidebar {
    z-index: 40;
    gap: 14px;
    padding: 18px 14px 16px;
    border-right: 0;
    background: linear-gradient(180deg, #0b2038 0%, #102a43 58%, #0a1c30 100%);
    box-shadow: 10px 0 35px rgba(8, 28, 48, .13);
}
body.fortis-layout-v3 .brand-block {
    min-height: 62px;
    padding: 0 4px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
body.fortis-layout-v3 .brand-logo {
    width: 48px;
    height: 48px;
    padding: 3px;
    border: 1px solid rgba(212, 175, 55, .35);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}
body.fortis-layout-v3 .brand-copy strong { color: #fff; font-size: 15px; letter-spacing: .01em; }
body.fortis-layout-v3 .brand-copy em { margin-top: 2px; color: #d9b84c; font-size: 12px; font-style: normal; font-weight: 700; }
body.fortis-layout-v3 .sidebar-collapse-btn {
    border: 1px solid rgba(255, 255, 255, .16) !important;
    background: rgba(255, 255, 255, .07) !important;
    color: #f4d46c !important;
    box-shadow: none !important;
}
body.fortis-layout-v3 .sidebar-collapse-btn:hover { border-color: rgba(212, 175, 55, .55) !important; background: rgba(212, 175, 55, .14) !important; color: #fff !important; }
body.fortis-layout-v3 .nav-menu { gap: 4px; }
body.fortis-layout-v3 .nav-menu a {
    position: relative;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(241, 245, 249, .74);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .005em;
}
body.fortis-layout-v3 .nav-menu a span { color: #d5b54b; font-size: 16px; opacity: .9; }
body.fortis-layout-v3 .nav-menu a:hover {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .065);
    color: #fff;
    transform: translateX(2px);
}
body.fortis-layout-v3 .nav-menu a.active {
    border-color: rgba(212, 175, 55, .2);
    background: linear-gradient(90deg, rgba(212, 175, 55, .2), rgba(212, 175, 55, .08));
    color: #fff;
    box-shadow: inset 3px 0 0 #d4af37, 0 7px 18px rgba(0, 0, 0, .1);
}
body.fortis-layout-v3 .nav-menu a.active span,
body.fortis-layout-v3 .nav-menu a:hover span { color: #f2d36b; opacity: 1; }
body.fortis-layout-v3 .sidebar-status,
body.fortis-layout-v3 .sidebar-account {
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
}
body.fortis-layout-v3 .sidebar-status { padding: 9px; }
body.fortis-layout-v3 .sidebar-status strong,
body.fortis-layout-v3 .sidebar-account strong { color: #f8fafc; }
body.fortis-layout-v3 .sidebar-status small,
body.fortis-layout-v3 .sidebar-account small { color: rgba(226, 232, 240, .62); }
body.fortis-layout-v3 .sidebar-account { padding: 10px !important; }
body.fortis-layout-v3 .sidebar-account .avatar { background: linear-gradient(145deg, #d4af37, #ae811c); color: #102a43; box-shadow: 0 5px 14px rgba(0, 0, 0, .2); }
body.fortis-layout-v3 .sidebar-account-actions { gap: 6px; }
body.fortis-layout-v3 .sidebar-account .account-link {
    min-height: 29px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    background: rgba(255, 255, 255, .06);
    color: #e2e8f0 !important;
    font-size: 10px;
}
body.fortis-layout-v3 .sidebar-account .account-link:hover { border-color: rgba(212, 175, 55, .35); background: rgba(212, 175, 55, .12); color: #fff !important; }

body.fortis-layout-v3 .main-area { padding: 24px clamp(18px, 2.5vw, 36px) 40px; }
body.fortis-layout-v3 .content-frame { width: 100%; max-width: 1460px; }
body.fortis-layout-v3 .page-hero,
body.fortis-layout-v3 .page-header {
    position: relative;
    min-height: 82px;
    margin-bottom: 18px;
    padding: 18px 20px 18px 23px;
    overflow: hidden;
    border: 1px solid #e1e7ef;
    border-left: 4px solid #d4af37;
    border-radius: 15px;
    background: linear-gradient(115deg, #fff 0%, #fff 72%, #f8fafc 100%);
    box-shadow: 0 7px 24px rgba(15, 31, 51, .055);
}
body.fortis-layout-v3 .page-hero::after,
body.fortis-layout-v3 .page-header::after {
    content: '';
    position: absolute;
    top: -55px;
    right: -40px;
    width: 170px;
    height: 170px;
    border: 28px solid rgba(212, 175, 55, .055);
    border-radius: 50%;
    pointer-events: none;
}
body.fortis-layout-v3 .page-hero > *,
body.fortis-layout-v3 .page-header > * { position: relative; z-index: 1; }
body.fortis-layout-v3 .page-hero h1,
body.fortis-layout-v3 .page-hero h2,
body.fortis-layout-v3 .page-header h1,
body.fortis-layout-v3 .page-header h2 { color: #102a43; font-size: clamp(20px, 2vw, 25px); letter-spacing: -.035em; }
body.fortis-layout-v3 .page-hero p,
body.fortis-layout-v3 .page-header p { color: #64748b; font-size: 13px; }

body.fortis-layout-v3 .card {
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 31, 51, .055);
}
body.fortis-layout-v3 .card:hover { border-color: #d9e1eb; }
body.fortis-layout-v3 .section-head { padding-bottom: 12px !important; border-bottom: 1px solid #eef2f6; }
body.fortis-layout-v3 .section-head h2,
body.fortis-layout-v3 .section-head h3,
body.fortis-layout-v3 .card h3 { color: #102a43; }
body.fortis-layout-v3 .eyebrow { color: #a8780c; font-size: 9px; letter-spacing: .15em; }
body.fortis-layout-v3 .kpi { position: relative; overflow: hidden; border-top: 3px solid #d4af37; }
body.fortis-layout-v3 .kpi.blue { border-top-color: #2563eb; }
body.fortis-layout-v3 .kpi.purple { border-top-color: #7c3aed; }
body.fortis-layout-v3 .kpi.amber { border-top-color: #d97706; }
body.fortis-layout-v3 .kpi-icon { border-radius: 12px; }
body.fortis-layout-v3 .kpi-value { color: #102a43; letter-spacing: -.025em; }

body.fortis-layout-v3 .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}
body.fortis-layout-v3 table { border-collapse: separate; border-spacing: 0; }
body.fortis-layout-v3 th {
    padding-top: 11px;
    padding-bottom: 11px;
    border-bottom: 1px solid #dfe6ee;
    background: #f3f6f9;
    color: #526276;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
}
body.fortis-layout-v3 td { border-bottom-color: #edf1f5; color: #253247; }
body.fortis-layout-v3 tr:last-child td { border-bottom: 0; }
body.fortis-layout-v3 tr:hover td { background: #f8fafc; }

body.fortis-layout-v3 input,
body.fortis-layout-v3 select,
body.fortis-layout-v3 textarea {
    border-color: #cfd8e3;
    background: #fbfcfe;
    color: #172033;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .025);
}
body.fortis-layout-v3 input:hover,
body.fortis-layout-v3 select:hover,
body.fortis-layout-v3 textarea:hover { border-color: #aebdcd; background: #fff; }
body.fortis-layout-v3 input:focus,
body.fortis-layout-v3 select:focus,
body.fortis-layout-v3 textarea:focus { border-color: #b88b21; background: #fff; box-shadow: 0 0 0 3px rgba(212, 175, 55, .14); }
body.fortis-layout-v3 .filter-pill,
body.fortis-layout-v3 .date-pill { border-color: #dbe2ea; background: #f8fafc; color: #334155; box-shadow: none; }
body.fortis-layout-v3 .badge { border-width: 1px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }

@media(min-width:981px) and (max-width:1180px) {
    body.fortis-layout-v3 { --sidebar: 78px; }
    body.fortis-layout-v3 .sidebar { padding-left: 10px; padding-right: 10px; }
}
@media(max-width:980px) {
    body.fortis-layout-v3 .sidebar {
        z-index: 120 !important;
        opacity: 1 !important;
        filter: none !important;
        backdrop-filter: none !important;
        box-shadow: 14px 0 38px rgba(7, 25, 43, .3);
    }
    body.fortis-layout-v3 .mobile-overlay { z-index: 100 !important; }
    body.fortis-layout-v3 .mobile-menu-btn { z-index: 130 !important; border: 1px solid #244664 !important; background: #102a43 !important; color: #f1d36c !important; box-shadow: 0 6px 18px rgba(16, 42, 67, .22) !important; }
    body.fortis-layout-v3 .sidebar .nav-menu a { color: #e2e8f0 !important; text-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
    body.fortis-layout-v3 .sidebar .nav-menu a.active,
    body.fortis-layout-v3 .sidebar .nav-menu a:hover { color: #fff !important; }
    body.fortis-layout-v3 .sidebar .brand-copy strong { color: #fff !important; }
    body.fortis-layout-v3 .sidebar .brand-copy em { color: #f0cf62 !important; }
    body.fortis-layout-v3 .main-area { padding: 68px 16px 28px !important; }
}
@media(max-width:600px) {
    body.fortis-layout-v3 .page-hero,
    body.fortis-layout-v3 .page-header { min-height: 0; padding: 15px; border-left-width: 3px; border-radius: 12px; }
    body.fortis-layout-v3 .page-hero::after,
    body.fortis-layout-v3 .page-header::after { display: none; }
    body.fortis-layout-v3 .card { padding: 14px; border-radius: 12px; }
}

/* =========================================================
   MENU RESPONSIVO FORTIS — CORREÇÃO FINAL
   Mantém menu completo no desktop e usa gaveta em telas menores.
   ========================================================= */
:root {
    --sidebar: 260px;
}

body.fortis-layout-v3 .app-shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

body.fortis-layout-v3 .sidebar {
    width: var(--sidebar);
    min-width: var(--sidebar);
    padding: 20px 14px 16px;
    gap: 14px;
    overflow: hidden;
}

body.fortis-layout-v3 .brand-block {
    min-height: 64px;
    padding: 4px 6px 12px;
    flex: 0 0 auto;
}

body.fortis-layout-v3 .brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex: 0 0 48px;
}

body.fortis-layout-v3 .brand-copy {
    min-width: 0;
    overflow: hidden;
}

body.fortis-layout-v3 .brand-copy strong,
body.fortis-layout-v3 .brand-copy em {
    white-space: nowrap;
}

body.fortis-layout-v3 .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 3px 8px;
    scrollbar-width: thin;
}

body.fortis-layout-v3 .nav-menu a {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 12px;
    flex: 0 0 auto;
}

body.fortis-layout-v3 .nav-menu a span {
    width: 24px;
    min-width: 24px;
    font-size: 18px;
}

body.fortis-layout-v3 .nav-menu a b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.fortis-layout-v3 .sidebar-status,
body.fortis-layout-v3 .sidebar-user {
    flex: 0 0 auto;
}

body.fortis-layout-v3 .sidebar-user {
    grid-template-columns: 42px minmax(0, 1fr);
}

body.fortis-layout-v3 .sidebar-account-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
}

body.fortis-layout-v3 .sidebar-account-actions .account-link {
    flex: 1;
    min-height: 34px;
}

/* Menu recolhido somente quando o usuário clicar no botão. */
body.fortis-layout-v3.sidebar-collapsed {
    --sidebar: 78px;
}

body.fortis-layout-v3.sidebar-collapsed .sidebar {
    width: 78px;
    min-width: 78px;
    padding-left: 9px;
    padding-right: 9px;
}

body.fortis-layout-v3.sidebar-collapsed .brand-block,
body.fortis-layout-v3.sidebar-collapsed .nav-menu a {
    justify-content: center;
}

/* Monitores médios continuam com menu completo, apenas mais compacto. */
@media (min-width: 981px) and (max-width: 1280px) {
    :root {
        --sidebar: 226px;
    }

    body.fortis-layout-v3 .sidebar {
        width: var(--sidebar);
        min-width: var(--sidebar);
        padding: 16px 11px 14px;
    }

    body.fortis-layout-v3 .brand-copy,
    body.fortis-layout-v3 .nav-menu a b,
    body.fortis-layout-v3 .sidebar-status div,
    body.fortis-layout-v3 .sidebar-status .status-pill,
    body.fortis-layout-v3 .sidebar-user div,
    body.fortis-layout-v3 .sidebar-user a,
    body.fortis-layout-v3 .sidebar-user button {
        display: initial;
    }

    body.fortis-layout-v3 .brand-block,
    body.fortis-layout-v3 .nav-menu a {
        justify-content: flex-start;
    }

    body.fortis-layout-v3 .nav-menu a {
        padding: 10px 10px;
        gap: 10px;
        font-size: 13px;
    }

    body.fortis-layout-v3 .sidebar-status {
        display: none;
    }

    body.fortis-layout-v3 .main-area {
        padding: 28px 22px 40px;
    }
}

/* Tablet e celular: menu em gaveta lateral, sem barra estreita permanente. */
@media (max-width: 980px) {
    body.fortis-layout-v3 .app-shell,
    body.fortis-layout-v3.sidebar-collapsed .app-shell {
        display: block;
    }

    body.fortis-layout-v3 .sidebar,
    body.fortis-layout-v3.sidebar-collapsed .sidebar {
        position: fixed;
        z-index: 140;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(310px, 88vw);
        min-width: min(310px, 88vw);
        height: 100dvh;
        padding: 18px 14px 16px;
        transform: translateX(-105%);
        transition: transform .24s ease;
        box-shadow: 18px 0 50px rgba(15, 23, 42, .24);
        overflow: hidden;
    }

    body.fortis-layout-v3.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    body.fortis-layout-v3 .brand-copy,
    body.fortis-layout-v3 .nav-menu a b,
    body.fortis-layout-v3 .sidebar-user div,
    body.fortis-layout-v3 .sidebar-user a,
    body.fortis-layout-v3 .sidebar-user button,
    body.fortis-layout-v3.sidebar-collapsed .brand-copy,
    body.fortis-layout-v3.sidebar-collapsed .nav-menu a b,
    body.fortis-layout-v3.sidebar-collapsed .sidebar-user div,
    body.fortis-layout-v3.sidebar-collapsed .sidebar-user a,
    body.fortis-layout-v3.sidebar-collapsed .sidebar-user button {
        display: initial;
    }

    body.fortis-layout-v3 .brand-block,
    body.fortis-layout-v3 .nav-menu a,
    body.fortis-layout-v3.sidebar-collapsed .brand-block,
    body.fortis-layout-v3.sidebar-collapsed .nav-menu a {
        justify-content: flex-start;
    }

    body.fortis-layout-v3 .nav-menu {
        display: flex;
        grid-template-columns: none;
    }

    body.fortis-layout-v3 .sidebar-status {
        display: none;
    }

    body.fortis-layout-v3 .sidebar-user,
    body.fortis-layout-v3.sidebar-collapsed .sidebar-user {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        justify-items: stretch;
    }

    body.fortis-layout-v3 .main-area {
        width: 100%;
        min-width: 0;
        padding: 72px 18px 34px;
    }

    body.fortis-layout-v3 .mobile-menu-btn {
        display: inline-flex !important;
        position: fixed;
        z-index: 150 !important;
        top: 14px;
        left: 14px;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0 !important;
        border-radius: 12px !important;
    }

    body.fortis-layout-v3.sidebar-mobile-open .mobile-menu-btn {
        left: min(250px, calc(88vw - 58px));
    }

    body.fortis-layout-v3 .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 130;
        background: rgba(15, 23, 42, .48);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .2s ease, visibility .2s ease;
    }

    body.fortis-layout-v3.sidebar-mobile-open .mobile-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.fortis-layout-v3 .sidebar-collapse-btn {
        display: none !important;
    }
}

@media (max-width: 560px) {
    body.fortis-layout-v3 .main-area {
        padding: 68px 12px 28px;
    }

    body.fortis-layout-v3 .sidebar,
    body.fortis-layout-v3.sidebar-collapsed .sidebar {
        width: min(292px, 91vw);
        min-width: min(292px, 91vw);
    }

    body.fortis-layout-v3.sidebar-mobile-open .mobile-menu-btn {
        left: min(234px, calc(91vw - 58px));
    }
}

/* Menu responsivo automático: aberto em monitores e lateral em telas menores */
@media (min-width: 981px) and (max-width: 1180px) {
    :root { --sidebar: 288px; }

    .app-shell,
    body.fortis-layout-v3 .app-shell {
        grid-template-columns: 288px minmax(0, 1fr) !important;
    }

    .sidebar,
    body.fortis-layout-v3 .sidebar {
        width: auto !important;
        padding: 22px 16px 20px !important;
        align-items: stretch !important;
    }

    .brand-copy,
    .nav-menu a b,
    .sidebar-status div,
    .sidebar-status .status-pill,
    .sidebar-user div,
    .sidebar-user a,
    .sidebar-account-actions {
        display: block !important;
    }

    .brand-block,
    .nav-menu a {
        justify-content: flex-start !important;
    }

    .nav-menu a {
        gap: 12px !important;
        padding: 12px 12px !important;
    }

    .sidebar-status {
        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) !important;
        justify-items: stretch !important;
    }

    .sidebar-status .status-pill {
        grid-column: 1 / -1;
        width: max-content;
        margin-left: 50px;
    }

    .sidebar-user,
    .sidebar-account {
        display: grid !important;
        grid-template-columns: 42px minmax(0, 1fr) !important;
        justify-items: stretch !important;
    }

    .sidebar-account-actions {
        grid-column: 1 / -1;
        margin-top: 8px;
    }
}
