html {
    scroll-behavior: smooth;
}

:root {
    --app-bg: #f5f8ff;
    --app-bg-strong: #f8fbff;
    --app-surface: rgba(255, 255, 255, .92);
    --app-surface-solid: #ffffff;
    --app-surface-muted: #f3f7ff;
    --app-border: #d8e3f5;
    --app-border-strong: #b8c9e6;
    --app-text: #07122f;
    --app-muted: #667695;
    --app-primary: #075ce8;
    --app-primary-hover: #0348bf;
    --app-accent: #ff7a1a;
    --app-shadow: 0 24px 70px rgba(17, 42, 92, .12);
    --app-shadow-soft: 0 14px 34px rgba(17, 42, 92, .08);
}

[data-theme="dark"] {
    --app-bg: #020817;
    --app-bg-strong: #06142b;
    --app-surface: rgba(8, 20, 42, .86);
    --app-surface-solid: #08142a;
    --app-surface-muted: #0d1d39;
    --app-border: rgba(134, 162, 207, .24);
    --app-border-strong: rgba(134, 162, 207, .38);
    --app-text: #f8fbff;
    --app-muted: #9badca;
    --app-primary: #0b6bff;
    --app-primary-hover: #2684ff;
    --app-accent: #ff7a1a;
    --app-shadow: 0 24px 70px rgba(0, 0, 0, .34);
    --app-shadow-soft: 0 14px 36px rgba(0, 0, 0, .24);
    color-scheme: dark;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
}

.app-body {
    background:
        radial-gradient(circle at 92% 0%, rgba(11, 107, 255, .22), transparent 34rem),
        linear-gradient(145deg, #071a38 0%, #020817 100%) !important;
    color: var(--app-text);
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    padding: .75rem;
}

.app-workspace {
    background:
        radial-gradient(circle at 82% 0%, rgba(11, 107, 255, .10), transparent 28rem),
        linear-gradient(180deg, #fbfdff 0%, #f2f6ff 100%);
    border: 1px solid rgba(134, 162, 207, .18);
    border-radius: 1.4rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .24);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 1.5rem);
    min-width: 0;
    overflow: hidden;
}

.app-main {
    flex: 1;
    padding: 1.75rem;
}

@media (min-width: 1024px) {
    .app-shell {
        padding: .9rem .9rem .9rem 19.75rem;
    }

    .app-workspace {
        min-height: calc(100vh - 1.8rem);
    }
}

@media (max-width: 1023px) {
    .app-main {
        padding: 1rem;
    }
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

textarea {
    resize: vertical;
}

.page {
    display: flex;
    flex-direction: column;
    gap: 1.45rem;
    width: 100%;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: .25rem .15rem .35rem;
}

.page-title {
    color: var(--app-text);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 2.15rem;
}

.page-subtitle {
    color: var(--app-muted);
    font-size: .95rem;
    line-height: 1.35rem;
    margin-top: .25rem;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.app-date-card {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.05rem;
    box-shadow: var(--app-shadow-soft);
    display: flex;
    gap: .85rem;
    padding: .75rem 1rem;
}

.app-date-icon {
    align-items: center;
    background: #eaf1ff;
    border-radius: .9rem;
    color: var(--app-primary);
    display: inline-flex;
    height: 2.6rem;
    justify-content: center;
    width: 2.6rem;
}

.app-date-value {
    color: var(--app-text);
    font-size: .92rem;
    font-weight: 900;
}

.app-date-label {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
}

.stat-grid {
    display: grid;
    gap: 1.05rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.stat-card {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.2rem;
    box-shadow: 0 18px 42px rgba(17, 42, 92, .08);
    display: flex;
    gap: 1rem;
    min-height: 7.65rem;
    padding: 1.45rem;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.stat-card:hover {
    border-color: var(--app-border-strong);
    box-shadow: var(--app-shadow);
    transform: translateY(-2px);
}

.stat-card.stat-compact {
    display: block;
}

.stat-icon {
    align-items: center;
    border-radius: 1.05rem;
    display: inline-flex;
    flex: 0 0 auto;
    height: 3.65rem;
    justify-content: center;
    width: 3.65rem;
}

.stat-label {
    color: #5f7195;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.stat-value {
    color: var(--app-text);
    font-size: 2.05rem;
    font-weight: 950;
    line-height: 2.25rem;
    margin-top: .15rem;
}

.stat-caption {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
    margin-top: .15rem;
}

.stat-blue .stat-icon { background: #dbeafe; color: #1d4ed8; }
.stat-green .stat-icon { background: #dcfce7; color: #15803d; }
.stat-amber .stat-icon { background: #fef3c7; color: #b45309; }
.stat-red .stat-icon { background: #fee2e2; color: #b91c1c; }
.stat-purple .stat-icon { background: #ede9fe; color: #6d28d9; }
.stat-slate .stat-icon { background: #e2e8f0; color: #334155; }

[data-theme="dark"] .stat-blue .stat-icon { background: rgba(37, 99, 235, .18); color: #60a5fa; }
[data-theme="dark"] .stat-green .stat-icon { background: rgba(22, 163, 74, .18); color: #4ade80; }
[data-theme="dark"] .stat-amber .stat-icon { background: rgba(245, 158, 11, .18); color: #fbbf24; }
[data-theme="dark"] .stat-red .stat-icon { background: rgba(220, 38, 38, .18); color: #f87171; }
[data-theme="dark"] .stat-purple .stat-icon { background: rgba(109, 40, 217, .20); color: #c4b5fd; }
[data-theme="dark"] .stat-slate .stat-icon { background: rgba(148, 163, 184, .14); color: #cbd5e1; }

.secondary-stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.secondary-stat {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.15rem;
    box-shadow: var(--app-shadow-soft);
    color: var(--app-text);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    min-height: 5.25rem;
    padding: 1rem 1.2rem;
    text-decoration: none;
}

.secondary-stat-title {
    color: var(--app-text);
    font-size: .92rem;
    font-weight: 850;
}

.secondary-stat-caption {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
    margin-top: .2rem;
}

.secondary-stat > span,
.secondary-stat-number {
    color: var(--app-primary);
    font-size: 1.85rem;
    font-weight: 950;
    line-height: 1;
}

.secondary-stat-red > span {
    color: #dc2626;
}

.secondary-stat-split {
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.secondary-stat-split a {
    color: inherit;
    text-decoration: none;
}

.filter-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.25rem;
    box-shadow: var(--app-shadow-soft);
    padding: 1.15rem;
}

.page-header-clean {
    padding-top: .1rem;
}

.btn-pill {
    border-radius: 1rem;
    min-height: 3.2rem;
    padding-inline: 1.45rem;
}

.filter-panel-inline {
    padding: 1rem;
}

.native-filter-grid {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(18rem, 1.3fr) minmax(12rem, .6fr) auto;
}

.native-filter-actions {
    align-items: end;
    display: flex;
    gap: .65rem;
}

.form-control-icon {
    align-items: center;
    background: rgba(255, 255, 255, .88);
    border: 1px solid #c7d4eb;
    border-radius: .9rem;
    display: flex;
    min-height: 3.25rem;
    padding: 0 .85rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control-icon:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-control-icon i {
    color: #7a8cab;
    margin-right: .65rem;
}

.form-control-icon .form-control {
    background: transparent;
    border: 0;
    border-radius: 0;
    min-height: 3rem;
    padding: 0;
}

.form-control-icon .form-control:focus {
    box-shadow: none;
}

.quick-actions-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.quick-action {
    align-items: center;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.15rem;
    color: var(--app-text);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    justify-content: center;
    min-height: 7rem;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.quick-action:hover {
    border-color: var(--app-border-strong);
    transform: translateY(-2px);
}

.quick-action i {
    font-size: 1.55rem;
}

.card,
.filter-card,
.table-shell {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.25rem;
    box-shadow: var(--app-shadow-soft);
    backdrop-filter: blur(18px);
}

.card,
.filter-card {
    padding: 1.25rem;
}

.table-shell {
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(17, 42, 92, .08);
}

.native-table-toolbar {
    align-items: center;
    border-bottom: 1px solid var(--app-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.native-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.native-table-button {
    align-items: center;
    background: #eef3fb;
    border: 0;
    border-radius: .8rem;
    color: #334155;
    display: inline-flex;
    font-size: .82rem;
    font-weight: 850;
    gap: .4rem;
    min-height: 2.45rem;
    padding: 0 .95rem;
    transition: background-color .15s ease, transform .15s ease;
}

.native-table-button:hover {
    background: #e3ebf8;
    transform: translateY(-1px);
}

.native-page-size {
    align-items: center;
    color: var(--app-muted);
    display: flex;
    font-size: .86rem;
    gap: .65rem;
}

.native-page-size select {
    background: rgba(255, 255, 255, .88);
    border: 1px solid #c7d4eb;
    border-radius: .8rem;
    color: var(--app-text);
    min-height: 2.55rem;
    padding: 0 .8rem;
}

.native-pagination {
    align-items: center;
    background: rgba(248, 251, 255, .72);
    border-top: 1px solid var(--app-border);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.native-pagination-info {
    color: var(--app-muted);
    font-size: .88rem;
}

.native-pagination-controls {
    align-items: center;
    display: flex;
    gap: .4rem;
}

.native-page-link,
.native-page-ellipsis {
    align-items: center;
    border-radius: .8rem;
    color: var(--app-text);
    display: inline-flex;
    font-size: .9rem;
    font-weight: 850;
    height: 2.55rem;
    justify-content: center;
    min-width: 2.55rem;
    padding-inline: .75rem;
    text-decoration: none;
}

.native-page-link {
    background: #eef3fb;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.native-page-link:hover {
    background: #e3ebf8;
    transform: translateY(-1px);
}

.native-page-link.active {
    background: var(--app-primary);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(11, 92, 255, .24);
}

.native-page-link.disabled {
    cursor: not-allowed;
    opacity: .45;
    pointer-events: none;
}

.native-page-ellipsis {
    color: var(--app-muted);
}

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

.kanban-board {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, minmax(18rem, 1fr));
    overflow-x: auto;
    padding-bottom: .5rem;
}

.kanban-column {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    min-height: 32rem;
    padding: .875rem;
}

.kanban-column-header {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .875rem;
}

.kanban-column-header h2 {
    color: #0f172a;
    font-size: .95rem;
    font-weight: 800;
}

.kanban-column-header p {
    color: #64748b;
    font-size: .75rem;
    margin-top: .15rem;
}

.kanban-items {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.kanban-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    padding: .875rem;
}

.kanban-empty {
    border: 1px dashed #cbd5e1;
    border-radius: .75rem;
    color: #94a3b8;
    font-size: .875rem;
    padding: 1rem;
    text-align: center;
}

.agenda-layout {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 24rem;
}

.agenda-month-title {
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-transform: capitalize;
}

.agenda-weekdays,
.agenda-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.agenda-weekdays span {
    color: #64748b;
    font-size: .75rem;
    font-weight: 800;
    padding: .5rem;
    text-align: center;
    text-transform: uppercase;
}

.agenda-grid {
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

.agenda-day {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    min-height: 7.5rem;
    padding: .5rem;
}

.agenda-day.is-muted {
    background: #f8fafc;
    color: #94a3b8;
}

.agenda-day.is-today {
    box-shadow: inset 0 0 0 2px #2563eb;
}

.agenda-day-number {
    color: #0f172a;
    font-size: .8rem;
    font-weight: 900;
    margin-bottom: .35rem;
}

.agenda-day-events {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.agenda-event {
    border-radius: .45rem;
    display: block;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1rem;
    overflow: hidden;
    padding: .18rem .4rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-event-blue,
.agenda-dot-blue { background: #dbeafe; color: #1d4ed8; }
.agenda-event-purple,
.agenda-dot-purple { background: #ede9fe; color: #6d28d9; }
.agenda-event-amber,
.agenda-dot-amber { background: #fef3c7; color: #b45309; }
.agenda-event-red,
.agenda-dot-red { background: #fee2e2; color: #b91c1c; }
.agenda-event-green,
.agenda-dot-green { background: #dcfce7; color: #15803d; }

.agenda-more {
    color: #64748b;
    font-size: .7rem;
    font-weight: 700;
}

.agenda-list {
    max-height: calc(100vh - 10rem);
    overflow-y: auto;
}

.agenda-list-item {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    display: flex;
    gap: .75rem;
    padding: .75rem;
}

.agenda-list-item:hover {
    background: #f8fafc;
}

.agenda-dot {
    border-radius: 999px;
    flex: 0 0 auto;
    height: .75rem;
    width: .75rem;
}

.data-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: .875rem;
}

.data-table thead {
    background: rgba(233, 240, 253, .78);
    border-bottom: 1px solid var(--app-border);
}

.data-table th {
    color: #51658d;
    font-size: .75rem;
    font-weight: 800;
    padding: 1.05rem 1.35rem;
    text-align: left;
}

.data-table th:last-child {
    text-align: right;
}

.data-table tbody {
    border-color: var(--app-border);
}

.data-table td {
    color: var(--app-text);
    padding: 1.05rem 1.35rem;
    vertical-align: middle;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--app-border);
    transition: background-color .15s ease;
}

.data-table tbody tr:hover {
    background: rgba(241, 246, 255, .78);
}

.dataTables_wrapper {
    color: #334155;
    font-size: .875rem;
    padding: 1rem;
}

.dataTables_wrapper .data-table {
    border-collapse: collapse !important;
    margin: 0 !important;
}

.datatable-header,
.datatable-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
}

.datatable-header {
    border-bottom: 1px solid var(--app-border);
    margin: -1rem -1rem 0;
    padding: 1rem;
}

.datatable-footer {
    background: rgba(248, 251, 255, .72);
    border-top: 1px solid var(--app-border);
    margin: 0 -1rem -1rem;
    padding: 1rem;
}

.dataTables_wrapper .dt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.dataTables_wrapper .dt-button,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    align-items: center !important;
    background: #eef3fb !important;
    border: 0 !important;
    border-radius: .78rem !important;
    color: #334155 !important;
    display: inline-flex !important;
    font-weight: 800 !important;
    gap: .4rem;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0 .9rem !important;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.dataTables_wrapper .dt-button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e2e8f0 !important;
    border: 0 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #1d4ed8 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #cbd5e1;
    background: rgba(255, 255, 255, .82);
    border-radius: .8rem;
    color: #0f172a;
    min-height: 2.55rem;
    outline: none;
    padding: .4rem .7rem;
}

.empty-row {
    color: #64748b;
    padding: 2.5rem 1.25rem;
    text-align: center;
}

.form-label {
    color: #334155;
    display: block;
    font-size: .875rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.form-control {
    width: 100%;
    min-height: 3.25rem;
    border: 1px solid #c7d4eb;
    border-radius: .9rem;
    background: rgba(255, 255, 255, .88);
    color: #0f172a;
    padding: .75rem 1rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-help {
    color: #64748b;
    font-size: .75rem;
    line-height: 1rem;
    margin-top: .5rem;
}

.btn {
    align-items: center;
    border: 0;
    border-radius: .85rem;
    cursor: pointer;
    display: inline-flex;
    font-size: .875rem;
    font-weight: 800;
    gap: .5rem;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.3rem;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:focus-visible,
.btn-icon:focus-visible {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .16);
    outline: none;
}

.btn:disabled,
.btn[aria-disabled="true"],
.btn-icon:disabled,
.btn-icon[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .6;
    transform: none;
}

.btn-primary {
    background: #164dff;
    box-shadow: 0 18px 34px rgba(22, 77, 255, .24);
    color: #fff;
}

.btn-primary:hover {
    background: #0c43e8;
}

.btn-secondary {
    background: #eef3fb;
    color: #334155;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-outline {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.btn-outline:hover {
    background: #f8fafc;
}

.btn-sm {
    border-radius: .625rem;
    font-size: .75rem;
    min-height: 2.25rem;
    padding: 0 .875rem;
}

.btn-dark {
    background: #07122f;
    color: #fff;
}

.btn-dark:hover {
    background: #1e293b;
}

.btn-success {
    background: #16a34a;
    color: #fff;
}

.btn-success:hover {
    background: #15803d;
}

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

.btn-danger:hover {
    background: #b91c1c;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-soft-blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.btn-soft-blue:hover {
    background: #dbeafe;
}

.btn-soft-green {
    background: #f0fdf4;
    color: #15803d;
}

.btn-soft-green:hover {
    background: #dcfce7;
}

.btn-soft-red {
    background: #fef2f2;
    color: #b91c1c;
}

.btn-soft-red:hover {
    background: #fee2e2;
}

.btn-soft-amber {
    background: #fffbeb;
    color: #b45309;
}

.btn-soft-amber:hover {
    background: #fef3c7;
}

.btn-soft-purple {
    background: #faf5ff;
    color: #7e22ce;
}

.btn-soft-purple:hover {
    background: #f3e8ff;
}

.btn-icon {
    align-items: center;
    border: 0;
    border-radius: .85rem;
    cursor: pointer;
    display: inline-flex;
    height: 2.55rem;
    justify-content: center;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
    width: 2.55rem;
}

.btn-icon:hover {
    transform: translateY(-1px);
}

.btn-icon-neutral {
    background: #f1f5fb;
    color: #435371;
}

.btn-icon-neutral:hover {
    background: #e2e8f0;
}

.btn-icon-blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.btn-icon-blue:hover {
    background: #dbeafe;
}

.btn-icon-green {
    background: #f0fdf4;
    color: #15803d;
}

.btn-icon-green:hover {
    background: #dcfce7;
}

.btn-icon-red {
    background: #fef2f2;
    color: #b91c1c;
}

.btn-icon-red:hover {
    background: #fee2e2;
}

.btn-icon-amber {
    background: #fffbeb;
    color: #b45309;
}

.btn-icon-amber:hover {
    background: #fef3c7;
}

.btn-icon-purple {
    background: #faf5ff;
    color: #7e22ce;
}

.btn-icon-purple:hover {
    background: #f3e8ff;
}

.badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: .75rem;
    font-weight: 800;
    gap: .25rem;
    padding: .25rem .625rem;
    white-space: nowrap;
}

.badge-success {
    background: #f0fdf4;
    color: #15803d;
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
}

.badge-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.theme-toggle-btn {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--app-border);
    border-radius: .95rem;
    color: var(--app-text);
    display: inline-flex;
    height: 2.65rem;
    justify-content: center;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
    width: 2.65rem;
}

.theme-toggle-btn:hover {
    background: var(--app-surface-solid);
    border-color: var(--app-border-strong);
    transform: translateY(-1px);
}

.sidebar-shell {
    border: 1px solid rgba(134, 162, 207, .2);
    border-radius: 1.2rem;
    bottom: .9rem !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .06);
    left: .9rem !important;
    overflow: hidden;
    top: .9rem !important;
}

.sidebar-shell nav::-webkit-scrollbar {
    width: .42rem;
}

.sidebar-shell nav::-webkit-scrollbar-thumb {
    background: rgba(167, 190, 232, .32);
    border-radius: 999px;
}

.sidebar-shell nav a,
.sidebar-shell nav button {
    border-radius: .85rem;
}

.sidebar-shell nav a:hover,
.sidebar-shell nav button:hover {
    background: rgba(255, 255, 255, .1);
}

.app-topbar {
    background: rgba(248, 251, 255, .92) !important;
    border-color: var(--app-border) !important;
    box-shadow: 0 1px 0 rgba(12, 32, 73, .04), 0 14px 32px rgba(12, 32, 73, .06);
    margin: 0;
}

[data-theme="dark"] .app-topbar {
    background: rgba(8, 20, 42, .82) !important;
    border-color: var(--app-border) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 16px 40px rgba(0, 0, 0, .22);
}

.app-topbar input::placeholder {
    color: #8da0bd;
}

[data-theme="dark"] .page-header,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .secondary-stat,
[data-theme="dark"] .app-date-card,
[data-theme="dark"] .filter-panel,
[data-theme="dark"] .card,
[data-theme="dark"] .filter-card,
[data-theme="dark"] .table-shell {
    background: rgba(8, 20, 42, .86);
    border-color: rgba(134, 162, 207, .24);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

[data-theme="dark"] .page-header {
    background: transparent;
    border: 0;
    box-shadow: none;
}

[data-theme="light"] .app-workspace {
    background:
        radial-gradient(circle at 82% 0%, rgba(11, 107, 255, .10), transparent 28rem),
        linear-gradient(180deg, #fbfdff 0%, #f2f6ff 100%);
}

[data-theme="dark"] .app-workspace {
    background:
        radial-gradient(circle at 80% 0%, rgba(11, 107, 255, .16), transparent 28rem),
        #071020;
}

[data-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: var(--app-muted) !important;
}

[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: rgba(255, 255, 255, .06) !important;
    border: 0 !important;
    border-radius: .75rem !important;
    color: var(--app-text) !important;
    margin: 0 .15rem;
}

[data-theme="dark"] .dataTables_wrapper .dt-buttons .dt-button {
    background: rgba(255, 255, 255, .06) !important;
    border: 0 !important;
    border-radius: .75rem !important;
    color: var(--app-text) !important;
    font-weight: 800;
    padding: .65rem .9rem;
}

[data-theme="dark"] .data-table thead {
    background: rgba(255, 255, 255, .055);
}

[data-theme="dark"] .datatable-header,
[data-theme="dark"] .datatable-footer {
    border-color: rgba(134, 162, 207, .2);
}

[data-theme="dark"] .datatable-footer {
    background: rgba(255, 255, 255, .025);
}

[data-theme="dark"] .form-control-icon,
[data-theme="dark"] .native-page-size select {
    background: rgba(255, 255, 255, .045);
    border-color: var(--app-border);
}

[data-theme="dark"] .native-table-toolbar,
[data-theme="dark"] .native-pagination {
    border-color: rgba(134, 162, 207, .2);
}

[data-theme="dark"] .native-pagination {
    background: rgba(255, 255, 255, .025);
}

[data-theme="dark"] .native-table-button,
[data-theme="dark"] .native-page-link {
    background: rgba(255, 255, 255, .06);
    color: var(--app-text);
}

[data-theme="dark"] .native-table-button:hover,
[data-theme="dark"] .native-page-link:hover {
    background: rgba(255, 255, 255, .11);
}

@media (max-width: 900px) {
    .native-filter-grid,
    .native-pagination,
    .native-table-toolbar {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .native-filter-actions,
    .native-table-actions,
    .native-pagination-controls {
        flex-wrap: wrap;
    }
}

@media (max-width: 1023px) {
    .sidebar-shell {
        border-radius: 0;
        bottom: 0 !important;
        left: 0 !important;
        top: 0 !important;
    }
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at top right, rgba(11, 107, 255, .18), transparent 34rem),
        linear-gradient(180deg, #020817 0%, #06142b 100%);
}

html:has(body.login-page) {
    background: #07101f;
    height: 100%;
    overflow: hidden;
}

.login-page {
    background:
        radial-gradient(circle at 78% 20%, rgba(22, 93, 255, .24), transparent 26rem),
        radial-gradient(circle at 20% 86%, rgba(255, 122, 0, .16), transparent 22rem),
        linear-gradient(145deg, #07101f 0%, #081a34 48%, #06101f 100%);
    color: #f8fbff;
    bottom: 0;
    height: 100dvh;
    inset: 0;
    left: 0;
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
}

[data-theme="dark"] body.login-page,
[data-theme="light"] body.login-page {
    background:
        radial-gradient(circle at 78% 20%, rgba(22, 93, 255, .24), transparent 26rem),
        radial-gradient(circle at 20% 86%, rgba(255, 122, 0, .16), transparent 22rem),
        linear-gradient(145deg, #07101f 0%, #081a34 48%, #06101f 100%) !important;
}

.siga-login-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    height: 100dvh;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(.75rem, 2.15vw, 2.4rem);
}

.siga-login-panel {
    background:
        linear-gradient(98deg, rgba(2, 10, 25, .96) 0%, rgba(4, 16, 36, .96) 52%, rgba(11, 26, 48, .96) 100%);
    border: 1px solid rgba(167, 190, 232, .28);
    border-radius: 1.5rem;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(25rem, .95fr);
    height: min(100%, 53rem);
    max-height: calc(100dvh - clamp(1.5rem, 4.3vw, 4.8rem));
    min-height: 0;
    overflow: hidden;
    position: relative;
    width: min(100%, 108rem);
}

.siga-login-panel::before {
    background: linear-gradient(105deg, transparent 0%, transparent 49%, rgba(255, 255, 255, .055) 49.2%, rgba(255, 255, 255, .03) 61%, transparent 61.2%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.siga-login-left,
.siga-login-right {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.siga-login-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4.5rem);
}

.siga-login-brand {
    max-width: 37rem;
    position: relative;
    z-index: 2;
}

.siga-login-logo {
    display: block;
    margin-bottom: clamp(2rem, 4.5vw, 4rem);
    max-width: min(27rem, 80%);
}

.siga-login-brand h1 {
    color: #ffffff;
    font-size: clamp(2rem, 2.85vw, 3.75rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.siga-login-brand h1 span {
    color: #ff7a00;
}

.siga-login-mark {
    background: #0b6bff;
    height: 1px;
    margin: 1.6rem 0 1.35rem;
    position: relative;
    width: 4.25rem;
}

.siga-login-mark::after {
    background: rgba(255, 122, 0, .9);
    content: "";
    height: 1px;
    left: 3.4rem;
    position: absolute;
    top: 0;
    width: 1.2rem;
}

.siga-login-brand p {
    color: #b7c4d8;
    font-size: clamp(.98rem, 1vw, 1.12rem);
    line-height: 1.65;
    margin: 0;
    max-width: 27rem;
}

.siga-command-visual {
    bottom: 1rem;
    height: 23rem;
    opacity: .86;
    pointer-events: none;
    position: absolute;
    right: 3rem;
    width: 31rem;
}

.siga-radar {
    align-items: center;
    background: radial-gradient(circle, rgba(11, 107, 255, .45) 0, rgba(11, 107, 255, .16) 2.2rem, transparent 2.3rem);
    border: 1px solid rgba(50, 129, 255, .34);
    border-radius: 50%;
    display: flex;
    height: 17rem;
    justify-content: center;
    position: absolute;
    right: 5rem;
    top: 2rem;
    width: 17rem;
}

.siga-radar::before,
.siga-radar::after,
.siga-radar span {
    border: 1px solid rgba(50, 129, 255, .24);
    border-radius: 50%;
    content: "";
    position: absolute;
}

.siga-radar::before {
    inset: 3rem;
}

.siga-radar::after {
    inset: 5.9rem;
}

.siga-radar span:nth-child(1) {
    inset: 1.35rem;
}

.siga-radar span:nth-child(2) {
    background: rgba(50, 129, 255, .4);
    border: 0;
    height: 1px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 100%;
}

.siga-radar span:nth-child(3) {
    background: rgba(50, 129, 255, .4);
    border: 0;
    height: 1px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.radar-node {
    align-items: center;
    background: rgba(8, 41, 91, .86);
    border: 1px solid rgba(30, 126, 255, .45);
    border-radius: .85rem;
    box-shadow: 0 12px 36px rgba(11, 107, 255, .22);
    color: #38a7ff;
    display: flex;
    font-size: 1.25rem;
    height: 3.3rem;
    justify-content: center;
    position: absolute;
    width: 3.3rem;
}

.radar-node-top {
    left: 50%;
    top: -1.8rem;
    transform: translateX(-50%);
}

.radar-node-left {
    left: -2rem;
    top: 9rem;
}

.radar-node-right {
    right: -2rem;
    top: 7.4rem;
}

.radar-node-bottom {
    bottom: -1.9rem;
    right: 2.5rem;
}

.siga-analytics {
    align-items: end;
    background: rgba(7, 22, 48, .72);
    border: 1px solid rgba(104, 144, 202, .16);
    border-radius: .95rem;
    bottom: 0;
    display: flex;
    gap: .55rem;
    height: 6.5rem;
    padding: 1.2rem;
    position: absolute;
    transform: rotate(-8deg);
}

.siga-analytics div {
    background: #0b6bff;
    border-radius: .4rem .4rem 0 0;
    width: 1rem;
}

.siga-analytics div:nth-child(even) {
    background: #ff7a00;
}

.siga-analytics-one {
    left: 1rem;
    width: 11rem;
}

.siga-analytics-two {
    left: 11rem;
    width: 15rem;
}

.siga-analytics-one div:nth-child(1) { height: 38%; }
.siga-analytics-one div:nth-child(2) { height: 64%; }
.siga-analytics-one div:nth-child(3) { height: 48%; }
.siga-analytics-one div:nth-child(4) { height: 78%; }
.siga-analytics-two div:nth-child(1) { height: 42%; }
.siga-analytics-two div:nth-child(2) { height: 58%; }
.siga-analytics-two div:nth-child(3) { height: 34%; }
.siga-analytics-two div:nth-child(4) { height: 72%; }
.siga-analytics-two div:nth-child(5) { height: 52%; }

.siga-login-right {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.75rem, 3.5vw, 4rem);
}

.siga-login-card {
    background: rgba(7, 18, 35, .76);
    border: 1px solid rgba(167, 190, 232, .18);
    border-radius: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 24px 60px rgba(0, 0, 0, .18);
    padding: clamp(1.65rem, 2.35vw, 2.65rem);
    width: min(100%, 35rem);
}

.siga-login-heading {
    margin-bottom: 1.55rem;
}

.siga-login-heading h2 {
    color: #ffffff;
    font-size: clamp(1.45rem, 1.5vw, 1.9rem);
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 .85rem;
}

.siga-login-heading p {
    color: #aebbd0;
    margin: 0;
}

.siga-login-form {
    display: grid;
    gap: 1.15rem;
}

.siga-field label {
    color: #f3f7ff;
    display: block;
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .65rem;
}

.siga-input-wrap {
    align-items: center;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(167, 190, 232, .18);
    border-radius: .7rem;
    display: flex;
    gap: .8rem;
    height: 3.05rem;
    padding: 0 1rem;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.siga-input-wrap:focus-within {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(56, 167, 255, .72);
    box-shadow: 0 0 0 4px rgba(11, 107, 255, .12);
}

.siga-input-wrap > i {
    color: #9cafc9;
    font-size: 1.05rem;
}

.siga-input-wrap input {
    background: transparent;
    border: 0;
    color: #ffffff;
    flex: 1;
    font-size: .95rem;
    height: 100%;
    min-width: 0;
    outline: 0;
}

.siga-input-wrap input::placeholder {
    color: #8999b3;
}

.siga-password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #a8b8d2;
    cursor: pointer;
    display: inline-flex;
    height: 2.2rem;
    justify-content: center;
    width: 2.2rem;
}

.siga-password-toggle:hover {
    color: #38a7ff;
}

.siga-login-options {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.siga-login-options label {
    align-items: center;
    color: #e5edf9;
    cursor: pointer;
    display: inline-flex;
    font-size: .95rem;
    gap: .55rem;
}

.siga-login-options input {
    accent-color: #0b6bff;
    height: 1rem;
    width: 1rem;
}

.siga-login-options a {
    color: #38a7ff;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}

.siga-login-options a:hover {
    color: #77c3ff;
}

.siga-login-submit,
.siga-sso-button {
    align-items: center;
    border-radius: .72rem;
    display: inline-flex;
    font-weight: 700;
    gap: .65rem;
    height: 3.25rem;
    justify-content: center;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
    width: 100%;
}

.siga-login-submit {
    background: #0b6bff;
    border: 1px solid #0b6bff;
    box-shadow: 0 16px 30px rgba(11, 107, 255, .24);
    color: #ffffff;
}

.siga-login-submit:hover {
    background: #095fe0;
    border-color: #095fe0;
    transform: translateY(-1px);
}

.siga-login-divider {
    align-items: center;
    color: #8fa1bd;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr auto 1fr;
    margin-top: .35rem;
}

.siga-login-divider span {
    background: rgba(167, 190, 232, .14);
    height: 1px;
}

.siga-login-divider em {
    font-size: .84rem;
    font-style: normal;
}

.siga-sso-button {
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(167, 190, 232, .22);
    color: #f7fbff;
}

.siga-sso-button:disabled {
    cursor: not-allowed;
    opacity: .8;
}

.siga-login-copy {
    color: #97a7bf;
    font-size: .84rem;
    margin: 1.15rem 0 0;
    text-align: center;
}

.siga-auth-panel .siga-command-visual {
    display: none;
}

.siga-auth-panel .siga-login-brand {
    max-width: 34rem;
}

.siga-auth-alert {
    border-radius: .8rem;
    font-size: .92rem;
    line-height: 1.45;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
}

.siga-auth-alert-error {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(248, 113, 113, .28);
    color: #fecaca;
}

.siga-auth-alert-success {
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(74, 222, 128, .28);
    color: #bbf7d0;
}

.siga-auth-secondary {
    align-items: center;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(167, 190, 232, .18);
    border-radius: .72rem;
    color: #dbe8fb;
    display: inline-flex;
    font-weight: 700;
    gap: .55rem;
    height: 3rem;
    justify-content: center;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
    width: 100%;
}

.siga-auth-secondary:hover {
    background: rgba(255, 255, 255, .075);
    border-color: rgba(167, 190, 232, .34);
    color: #ffffff;
    transform: translateY(-1px);
}

@media (max-width: 860px) {
    .login-page {
        height: auto;
        inset: auto;
        overflow: auto;
        position: static;
    }

    .siga-login-shell {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .siga-login-panel {
        height: auto;
        max-height: none;
        grid-template-columns: 1fr;
    }

    .siga-login-left {
        min-height: 24rem;
        padding-bottom: 2rem;
    }

    .siga-login-logo {
        margin-bottom: 2.2rem;
        max-width: 16rem;
    }

    .siga-command-visual {
        opacity: .42;
        right: -6rem;
        top: 4rem;
    }

    .siga-login-right {
        padding-top: 0;
    }
}

@media (max-height: 760px) and (min-width: 861px) {
    .siga-login-logo {
        margin-bottom: 1.65rem;
        max-width: min(22rem, 72%);
    }

    .siga-login-brand h1 {
        font-size: clamp(2rem, 2.35vw, 3.15rem);
    }

    .siga-login-brand p {
        font-size: .95rem;
        line-height: 1.5;
    }

    .siga-login-mark {
        margin: 1rem 0 .9rem;
    }

    .siga-command-visual {
        opacity: .54;
        transform: scale(.82);
        transform-origin: right bottom;
    }

    .siga-login-heading {
        margin-bottom: 1.1rem;
    }

    .siga-login-form {
        gap: .9rem;
    }

    .siga-login-card {
        padding: 1.65rem 2rem;
    }

    .siga-login-copy {
        margin-top: .75rem;
    }
}

@media (max-width: 640px) {
    .siga-login-shell {
        padding: .75rem;
    }

    .siga-login-panel {
        border-radius: 1rem;
        min-height: calc(100vh - 1.5rem);
    }

    .siga-login-left {
        min-height: auto;
        padding: 2rem 1.35rem 1rem;
    }

    .siga-login-brand p,
    .siga-command-visual {
        display: none;
    }

    .siga-login-right {
        padding: 1rem 1.2rem 1.6rem;
    }

    .siga-login-card {
        border-radius: 1rem;
        padding: 1.35rem;
    }

    .siga-login-options {
        align-items: flex-start;
        flex-direction: column;
    }
}

[data-theme="dark"] :where(.bg-white, .bg-slate-50, .bg-slate-100) {
    background-color: var(--app-surface) !important;
}

[data-theme="dark"] :where(.text-slate-900, .text-slate-800, .text-slate-700, .text-slate-600) {
    color: var(--app-text) !important;
}

[data-theme="dark"] :where(.text-slate-500, .text-slate-400) {
    color: var(--app-muted) !important;
}

[data-theme="dark"] :where(.border-slate-100, .border-slate-200, .border-slate-300) {
    border-color: var(--app-border) !important;
}

[data-theme="dark"] :where(.hover\:bg-slate-50:hover, .hover\:bg-slate-100:hover) {
    background-color: rgba(255, 255, 255, .07) !important;
}

[data-theme="dark"] header {
    background: rgba(8, 20, 42, .82) !important;
    border-color: var(--app-border) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 18px 55px rgba(0, 0, 0, .20);
}

[data-theme="light"] header {
    background: rgba(248, 251, 255, .88) !important;
    box-shadow: 0 1px 0 rgba(12, 32, 73, .04), 0 18px 48px rgba(12, 32, 73, .08);
}

[data-theme="dark"] .form-label,
[data-theme="dark"] .agenda-month-title,
[data-theme="dark"] .agenda-day-number,
[data-theme="dark"] .kanban-column-header h2,
[data-theme="dark"] .processing-title {
    color: var(--app-text);
}

[data-theme="dark"] .page-subtitle,
[data-theme="dark"] .form-help,
[data-theme="dark"] .agenda-weekdays span,
[data-theme="dark"] .kanban-column-header p,
[data-theme="dark"] .processing-message,
[data-theme="dark"] .empty-row {
    color: var(--app-muted);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background: rgba(255, 255, 255, .045);
    border-color: var(--app-border);
    color: var(--app-text);
}

[data-theme="dark"] .form-control::placeholder {
    color: #7d8faf;
}

[data-theme="dark"] .data-table thead {
    background: rgba(255, 255, 255, .045);
}

[data-theme="dark"] .data-table tbody tr {
    border-color: rgba(134, 162, 207, .14);
}

[data-theme="dark"] .data-table tbody tr:hover,
[data-theme="dark"] .agenda-list-item:hover {
    background: rgba(255, 255, 255, .045);
}

[data-theme="dark"] .kanban-column,
[data-theme="dark"] .agenda-day.is-muted {
    background: rgba(255, 255, 255, .035);
    border-color: var(--app-border);
}

[data-theme="dark"] .kanban-card,
[data-theme="dark"] .agenda-day,
[data-theme="dark"] .agenda-list-item,
[data-theme="dark"] .processing-modal,
[data-theme="dark"] #notificationsDropdown,
[data-theme="dark"] #userDropdown,
[data-theme="dark"] #systemFeedbackModal > div,
[data-theme="dark"] #modalAviso > div {
    background: var(--app-surface-solid);
    border-color: var(--app-border);
    color: var(--app-text);
}

[data-theme="dark"] .agenda-grid,
[data-theme="dark"] .agenda-day,
[data-theme="dark"] .datatable-header,
[data-theme="dark"] .datatable-footer {
    border-color: var(--app-border);
}

[data-theme="dark"] .dataTables_wrapper {
    color: var(--app-text);
}

[data-theme="dark"] .dataTables_wrapper .dt-button,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: rgba(255, 255, 255, .07) !important;
    color: var(--app-text) !important;
}

[data-theme="dark"] .dataTables_wrapper .dt-button:hover,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, .12) !important;
    color: #fff !important;
}

.btn-primary,
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--app-primary) !important;
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--app-primary-hover) !important;
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-icon-neutral {
    background: rgba(255, 255, 255, .06);
    border-color: var(--app-border);
    color: var(--app-text);
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .btn-icon-neutral:hover {
    background: rgba(255, 255, 255, .11);
}

.metric-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: .875rem;
    box-shadow: var(--app-shadow-soft);
    padding: 1.25rem;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: .75rem;
    color: #b91c1c;
    font-size: .875rem;
    padding: .75rem 1rem;
}

.ai-assistant-fab {
    align-items: center;
    background: #1d4ed8;
    border: 0;
    border-radius: 999px;
    bottom: 1.25rem;
    box-shadow: 0 18px 40px rgba(29, 78, 216, .28);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 1.35rem;
    height: 3.25rem;
    justify-content: center;
    position: fixed;
    right: 1.25rem;
    transition: transform .15s ease, background-color .15s ease;
    width: 3.25rem;
    z-index: 60;
}

.ai-assistant-fab:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.ai-assistant-panel {
    background: #fff;
    border-left: 1px solid #e2e8f0;
    bottom: 0;
    box-shadow: -18px 0 45px rgba(15, 23, 42, .16);
    display: flex;
    flex-direction: column;
    max-width: 100%;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(105%);
    transition: transform .2s ease;
    width: 430px;
    z-index: 70;
}

.ai-assistant-panel.is-open {
    transform: translateX(0);
}

.ai-assistant-header {
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.ai-assistant-kicker {
    color: #1d4ed8;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ai-assistant-header h2 {
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
    margin: .15rem 0 0;
}

.ai-assistant-actions {
    display: flex;
    gap: .4rem;
}

.ai-assistant-messages {
    background: #f8fafc;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .75rem;
    overflow-y: auto;
    padding: 1rem;
}

.ai-message {
    display: flex;
}

.ai-message-user {
    justify-content: flex-end;
}

.ai-message-body {
    border: 1px solid #e2e8f0;
    border-radius: .85rem;
    color: #334155;
    font-size: .9rem;
    line-height: 1.45;
    max-width: 88%;
    padding: .75rem .9rem;
    white-space: pre-wrap;
}

.ai-message-assistant .ai-message-body {
    white-space: normal;
}

.ai-message-body p {
    margin: 0 0 .7rem;
}

.ai-message-body p:last-child,
.ai-message-body ul:last-child,
.ai-message-body ol:last-child {
    margin-bottom: 0;
}

.ai-message-body ul,
.ai-message-body ol {
    margin: .5rem 0 .75rem 1.2rem;
}

.ai-message-body ul {
    list-style: disc;
}

.ai-message-body ol {
    list-style: decimal;
}

.ai-message-body a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: underline;
}

.ai-message-user .ai-message-body {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.ai-message-assistant .ai-message-body {
    background: #fff;
}

.ai-message-error .ai-message-body {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.ai-assistant-form {
    align-items: flex-end;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: .6rem;
    padding: 1rem;
}

.ai-assistant-shortcuts {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 8.6rem;
    overflow-y: auto;
    padding: .8rem 1rem 0;
}

.ai-assistant-shortcuts button {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 800;
    gap: .45rem;
    justify-content: center;
    min-height: 2.35rem;
    padding: .45rem .6rem;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.ai-assistant-shortcuts button:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.ai-assistant-form textarea {
    border: 1px solid #cbd5e1;
    border-radius: .85rem;
    color: #0f172a;
    flex: 1;
    min-height: 3rem;
    outline: none;
    padding: .75rem .9rem;
    resize: none;
}

.ai-assistant-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

@media (max-width: 640px) {
    .ai-assistant-panel {
        width: 100%;
    }

    .ai-assistant-fab {
        bottom: 1rem;
        right: 1rem;
    }
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: .75rem;
    color: #92400e;
    font-size: .875rem;
    padding: .75rem 1rem;
}

.processing-overlay {
    align-items: center;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(3px);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 1.25rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 9999;
}

.processing-overlay.hidden {
    display: none;
}

.processing-modal {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .875rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
    display: flex;
    gap: 1rem;
    max-width: 28rem;
    padding: 1.25rem;
    width: 100%;
}

.processing-spinner {
    animation: processing-spin .8s linear infinite;
    border: 4px solid #dbeafe;
    border-radius: 999px;
    border-top-color: #1d4ed8;
    flex: 0 0 auto;
    height: 2.75rem;
    width: 2.75rem;
}

.processing-title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.35rem;
}

.processing-message {
    color: #64748b;
    font-size: .875rem;
    line-height: 1.25rem;
    margin-top: .25rem;
}

body.is-processing {
    cursor: wait;
}

body.is-processing a,
body.is-processing button,
body.is-processing input,
body.is-processing select,
body.is-processing textarea {
    pointer-events: none;
}

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

@media (min-width: 1024px) {
    .page-header {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 1100px) {
    .agenda-layout {
        grid-template-columns: 1fr;
    }

    .agenda-list {
        max-height: none;
    }
}

@media (max-width: 760px) {
    .agenda-calendar {
        overflow-x: auto;
    }

    .agenda-weekdays,
    .agenda-grid {
        min-width: 48rem;
    }
}

@media print {
    aside,
    header,
    footer,
    .no-print {
        display: none !important;
    }

    main {
        padding: 0 !important;
    }
}

/* =========================================================
   Hotfix Dashboard - Ações rápidas e cards responsivos
   Referência visual SIGA / Avança
   ========================================================= */

.dashboard-actions-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 1.25rem;
    box-shadow: var(--app-shadow-soft);
    padding: 1.25rem;
}

.dashboard-actions-panel .dashboard-actions-header {
    margin-bottom: 1rem;
}

.dashboard-actions-panel .dashboard-actions-title {
    color: var(--app-text);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25rem;
}

.dashboard-actions-panel .dashboard-actions-subtitle {
    color: var(--app-muted);
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.25rem;
    margin-top: .25rem;
}

.dashboard-actions-grid,
.filter-panel.filter-panel-inline .quick-actions-grid {
    display: grid !important;
    gap: .8rem !important;
    grid-template-columns: repeat(auto-fit, minmax(7.75rem, 1fr)) !important;
    width: 100% !important;
}

.dashboard-actions-grid .quick-action,
.filter-panel.filter-panel-inline .quick-action {
    min-height: 5.85rem !important;
    padding: .9rem .75rem !important;
}

.dashboard-actions-grid .quick-action i,
.filter-panel.filter-panel-inline .quick-action i {
    font-size: 1.35rem !important;
}

/* Corrige o layout quebrado gerado por quick-actions-grid dentro de flex-row */
.filter-panel.filter-panel-inline > .flex {
    align-items: stretch !important;
    display: flex !important;
    flex-direction: column !important;
}

.filter-panel.filter-panel-inline > .flex > .quick-actions-grid,
.filter-panel.filter-panel-inline > .flex > .flex-1 {
    flex: initial !important;
    width: 100% !important;
}

@media (min-width: 1280px) {
    .dashboard-actions-grid,
    .filter-panel.filter-panel-inline .quick-actions-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .dashboard-actions-grid,
    .filter-panel.filter-panel-inline .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .native-table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .native-table-toolbar .btn,
    .native-table-toolbar .btn-sm {
        width: 100%;
    }
}


/* =========================================================
   Agenda operacional - Layout SIGA / Avança
   ========================================================= */

.agenda-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.agenda-layout-modern {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) 25rem;
}

.agenda-calendar {
    overflow: hidden;
}

.agenda-calendar-toolbar {
    align-items: flex-start;
}

.agenda-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem .85rem;
    justify-content: flex-end;
    max-width: 34rem;
}

.agenda-legend span {
    align-items: center;
    color: var(--app-muted);
    display: inline-flex;
    font-size: .75rem;
    font-weight: 800;
    gap: .35rem;
    white-space: nowrap;
}

.agenda-weekdays {
    background: rgba(248, 251, 255, .78);
    border-bottom: 1px solid var(--app-border);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.agenda-weekdays span {
    color: #51658d;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    padding: .85rem .5rem;
    text-align: center;
    text-transform: uppercase;
}

.agenda-grid {
    background: rgba(216, 227, 245, .58);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.agenda-day {
    background: rgba(255, 255, 255, .92);
    min-height: 8.65rem;
    padding: .75rem;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.agenda-day:hover {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(7, 92, 232, .18);
}

.agenda-day.is-muted {
    background: rgba(248, 251, 255, .62);
}

.agenda-day.is-muted .agenda-day-number {
    color: #9badca;
}

.agenda-day.is-today {
    background: #f7fbff;
    box-shadow: inset 0 0 0 2px var(--app-primary);
}

.agenda-day-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: .55rem;
}

.agenda-day-number {
    align-items: center;
    color: var(--app-text);
    display: inline-flex;
    font-size: .85rem;
    font-weight: 950;
    height: 1.75rem;
    justify-content: center;
    min-width: 1.75rem;
}

.agenda-day.is-today .agenda-day-number {
    background: var(--app-primary);
    border-radius: .65rem;
    color: #ffffff;
}

.agenda-day-count {
    align-items: center;
    background: #eef4ff;
    border-radius: 999px;
    color: var(--app-primary);
    display: inline-flex;
    font-size: .68rem;
    font-weight: 950;
    height: 1.35rem;
    justify-content: center;
    min-width: 1.35rem;
    padding: 0 .35rem;
}

.agenda-day-events {
    display: flex;
    flex-direction: column;
    gap: .28rem;
}

.agenda-event {
    border-radius: .55rem;
    display: block;
    font-size: .68rem;
    font-weight: 850;
    line-height: 1rem;
    overflow: hidden;
    padding: .26rem .48rem;
    text-decoration: none;
    text-overflow: ellipsis;
    transition: transform .15s ease, filter .15s ease;
    white-space: nowrap;
}

.agenda-event:hover {
    filter: brightness(.98);
    transform: translateY(-1px);
}

.agenda-event-blue,
.agenda-dot-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.agenda-event-purple,
.agenda-dot-purple {
    background: #ede9fe;
    color: #6d28d9;
}

.agenda-event-amber,
.agenda-dot-amber {
    background: #fef3c7;
    color: #b45309;
}

.agenda-event-red,
.agenda-dot-red {
    background: #fee2e2;
    color: #b91c1c;
}

.agenda-event-green,
.agenda-dot-green {
    background: #dcfce7;
    color: #15803d;
}

.agenda-more {
    color: var(--app-muted);
    font-size: .7rem;
    font-weight: 800;
    padding-left: .2rem;
}

.agenda-list {
    overflow: hidden;
}

.agenda-list-toolbar {
    align-items: flex-start;
}

.agenda-list-content {
    max-height: calc(100vh - 20rem);
    overflow-y: auto;
    padding: 1rem;
}

.agenda-list-content::-webkit-scrollbar {
    width: .42rem;
}

.agenda-list-content::-webkit-scrollbar-thumb {
    background: rgba(102, 118, 149, .24);
    border-radius: 999px;
}

.agenda-list-group + .agenda-list-group {
    margin-top: 1.1rem;
}

.agenda-list-date {
    align-items: center;
    color: var(--app-muted);
    display: flex;
    font-size: .76rem;
    font-weight: 900;
    gap: .4rem;
    letter-spacing: .03em;
    margin-bottom: .55rem;
    text-transform: uppercase;
}

.agenda-list-items {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.agenda-list-item {
    align-items: center;
    background: rgba(248, 251, 255, .82);
    border: 1px solid var(--app-border);
    border-radius: .95rem;
    color: var(--app-text);
    display: flex;
    gap: .7rem;
    padding: .78rem;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.agenda-list-item:hover {
    background: #ffffff;
    border-color: var(--app-border-strong);
    transform: translateY(-1px);
}

.agenda-dot {
    border-radius: 999px;
    flex: 0 0 auto;
    height: .75rem;
    width: .75rem;
}

.agenda-list-item-body {
    display: block;
    min-width: 0;
}

.agenda-list-item-title {
    color: var(--app-text);
    display: block;
    font-size: .86rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-list-item-detail {
    color: var(--app-muted);
    display: block;
    font-size: .74rem;
    font-weight: 700;
    margin-top: .16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-list-item-action {
    align-items: center;
    color: #91a2bf;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .78rem;
    margin-left: auto;
}

[data-theme="dark"] .agenda-weekdays {
    background: rgba(255, 255, 255, .035);
}

[data-theme="dark"] .agenda-grid {
    background: rgba(134, 162, 207, .16);
}

[data-theme="dark"] .agenda-day {
    background: rgba(8, 20, 42, .86);
}

[data-theme="dark"] .agenda-day:hover {
    background: rgba(11, 29, 59, .92);
}

[data-theme="dark"] .agenda-day.is-muted {
    background: rgba(255, 255, 255, .025);
}

[data-theme="dark"] .agenda-day.is-today {
    background: rgba(11, 107, 255, .12);
}

[data-theme="dark"] .agenda-list-item {
    background: rgba(255, 255, 255, .035);
}

[data-theme="dark"] .agenda-list-item:hover {
    background: rgba(255, 255, 255, .06);
}

@media (max-width: 1280px) {
    .agenda-layout-modern {
        grid-template-columns: 1fr;
    }

    .agenda-list-content {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .agenda-calendar-toolbar {
        gap: 1rem;
    }

    .agenda-legend {
        justify-content: flex-start;
    }

    .agenda-grid,
    .agenda-weekdays {
        min-width: 48rem;
    }

    .agenda-calendar {
        overflow-x: auto;
    }

    .agenda-day {
        min-height: 7.5rem;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   Sidebar SIGA / Avança - layout institucional
   ========================================================= */

.sidebar-shell {
    border: 1px solid rgba(134, 162, 207, .22);
    border-radius: 1.25rem;
    bottom: .85rem !important;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .07);
    left: .85rem !important;
    overflow: hidden;
    top: .85rem !important;
}

.sidebar-shell::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 18rem),
        radial-gradient(circle at 50% 0%, rgba(7, 92, 232, .22), transparent 14rem);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.sidebar-shell > div {
    position: relative;
    z-index: 1;
}

.sidebar-shell nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(167, 190, 232, .35) transparent;
}

.sidebar-shell nav::-webkit-scrollbar {
    width: .42rem;
}

.sidebar-shell nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-shell nav::-webkit-scrollbar-thumb {
    background: rgba(167, 190, 232, .34);
    border-radius: 999px;
}

.sidebar-nav-item {
    align-items: center;
    border: 1px solid transparent;
    border-radius: .95rem;
    color: #d7e4fb;
    display: flex;
    gap: .78rem;
    min-height: 3.05rem;
    padding: 0 .9rem;
    text-decoration: none;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
    width: 100%;
}

.sidebar-nav-button {
    background: transparent;
    cursor: pointer;
    justify-content: space-between;
    text-align: left;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, .085);
    border-color: rgba(255, 255, 255, .08);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-nav-item.is-active {
    background: var(--sidebar-active-bg, linear-gradient(135deg, #075ce8 0%, #0348bf 100%));
    border-color: rgba(255, 255, 255, .14);
    box-shadow: var(--sidebar-active-shadow, 0 18px 34px rgba(7, 92, 232, .28));
    color: #ffffff;
}

.sidebar-nav-item.is-open {
    background: rgba(255, 255, 255, .085);
    border-color: rgba(255, 255, 255, .08);
    color: #ffffff;
}

.sidebar-nav-icon {
    align-items: center;
    color: currentColor;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 1.55rem;
    justify-content: center;
    opacity: .95;
    width: 1.55rem;
}

.sidebar-nav-text {
    display: block;
    font-size: .86rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav-chevron {
    color: rgba(215, 228, 251, .75);
    flex: 0 0 auto;
    font-size: .72rem;
    transition: transform .18s ease;
}

.sidebar-submenu {
    border-left: 1px solid rgba(255, 255, 255, .12);
    margin: .35rem 0 .55rem 1.42rem;
    padding-left: .72rem;
    position: relative;
}

.sidebar-subitem {
    align-items: center;
    border-radius: .78rem;
    color: #94a9cc;
    display: flex;
    font-size: .8rem;
    font-weight: 750;
    min-height: 2.42rem;
    padding: 0 .85rem;
    text-decoration: none;
    transition:
        background-color .16s ease,
        color .16s ease,
        transform .16s ease;
}

.sidebar-subitem:hover {
    background: rgba(255, 255, 255, .075);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-subitem.is-active {
    background: var(--sidebar-sub-active-bg, #075ce8);
    box-shadow: 0 10px 22px rgba(7, 92, 232, .24);
    color: #ffffff;
}

.sidebar-brand-card {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 1rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 16px 34px rgba(0, 0, 0, .18);
    padding: 1rem;
}

.sidebar-brand-icon {
    align-items: center;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .85rem;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.sidebar-brand-title {
    color: #ffffff;
    font-size: .9rem;
    font-weight: 900;
    line-height: 1.1rem;
}

.sidebar-brand-text {
    color: #a9bad6;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1rem;
    margin-top: .15rem;
}

.sidebar-brand-footer {
    align-items: center;
    color: #7f91b1;
    display: flex;
    font-size: .68rem;
    font-weight: 700;
    justify-content: space-between;
    margin-top: 1rem;
}

@media (min-width: 1024px) {
    .app-shell {
        padding-left: 18.95rem;
    }
}

@media (max-width: 1023px) {
    .sidebar-shell {
        border-radius: 0 1.25rem 1.25rem 0;
        bottom: 0 !important;
        left: 0 !important;
        top: 0 !important;
    }
}

/* =========================================================
   Topbar SIGA / Avança - layout institucional
   ========================================================= */

.topbar-siga {
    background: rgba(248, 251, 255, .88) !important;
    border-bottom: 1px solid rgba(216, 227, 245, .86);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .76),
        0 18px 42px rgba(17, 42, 92, .06);
    backdrop-filter: blur(18px);
}

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

.topbar-left {
    gap: .9rem;
    min-width: 0;
}

.topbar-actions {
    gap: .55rem;
}

.topbar-icon-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: .95rem;
    color: #07122f;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.05rem;
    height: 2.65rem;
    justify-content: center;
    position: relative;
    text-decoration: none;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        color .16s ease,
        transform .16s ease;
    width: 2.65rem;
}

.topbar-icon-button:hover {
    background: rgba(255, 255, 255, .86);
    border-color: #d8e3f5;
    box-shadow: 0 10px 24px rgba(17, 42, 92, .08);
    color: #075ce8;
    transform: translateY(-1px);
}

.topbar-icon-button:focus-visible,
.topbar-user-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(7, 92, 232, .14);
    outline: none;
}

.topbar-search {
    align-items: center;
    background: rgba(255, 255, 255, .78);
    border: 1px solid #d8e3f5;
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
    display: flex;
    height: 2.75rem;
    max-width: 31rem;
    min-width: 20rem;
    padding: 0 .9rem;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
    width: 31vw;
}

.topbar-search:focus-within {
    background: #ffffff;
    border-color: #b8c9e6;
    box-shadow:
        0 0 0 4px rgba(7, 92, 232, .10),
        0 12px 26px rgba(17, 42, 92, .08);
}

.topbar-search i {
    color: #8091ad;
    flex: 0 0 auto;
    font-size: .95rem;
    margin-right: .7rem;
}

.topbar-search input {
    background: transparent;
    border: 0;
    color: #07122f;
    flex: 1;
    font-size: .86rem;
    font-weight: 600;
    min-width: 0;
    outline: none;
}

.topbar-search input::placeholder {
    color: #8da0bd;
    font-weight: 600;
}

.topbar-search span {
    align-items: center;
    background: #eef3fb;
    border: 1px solid #dbe6f7;
    border-radius: .55rem;
    color: #58709a;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 850;
    height: 1.45rem;
    padding: 0 .45rem;
}

.topbar-notification-badge {
    align-items: center;
    background: #ff6b2c;
    border: 2px solid #ffffff;
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(255, 107, 44, .32);
    color: #ffffff;
    display: inline-flex;
    font-size: .67rem;
    font-weight: 950;
    justify-content: center;
    line-height: 1;
    min-height: 1.15rem;
    min-width: 1.15rem;
    padding: 0 .28rem;
    position: absolute;
    right: -.2rem;
    top: -.2rem;
}

.topbar-divider {
    background: #d8e3f5;
    height: 2rem;
    margin: 0 .3rem;
    width: 1px;
}

.topbar-user-button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 1rem;
    color: #07122f;
    cursor: pointer;
    display: inline-flex;
    gap: .7rem;
    min-height: 2.9rem;
    padding: .28rem .45rem .28rem .35rem;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        transform .16s ease;
}

.topbar-user-button:hover {
    background: rgba(255, 255, 255, .86);
    border-color: #d8e3f5;
    box-shadow: 0 12px 28px rgba(17, 42, 92, .08);
    transform: translateY(-1px);
}

.topbar-user-avatar {
    align-items: center;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid rgba(7, 92, 232, .14);
    border-radius: 999px;
    color: #075ce8;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: .95rem;
    font-weight: 950;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.topbar-user-avatar.is-large {
    font-size: 1rem;
    height: 2.75rem;
    width: 2.75rem;
}

.topbar-user-info {
    display: block;
    min-width: 0;
    text-align: left;
}

.topbar-user-name {
    color: #07122f;
    font-size: .82rem;
    font-weight: 900;
    line-height: 1.05rem;
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-role {
    color: #667695;
    font-size: .72rem;
    font-weight: 700;
    line-height: .95rem;
}

.topbar-user-chevron {
    color: #8091ad;
    font-size: .72rem;
    transition: transform .16s ease;
}

.topbar-dropdown {
    background: rgba(255, 255, 255, .96);
    border: 1px solid #d8e3f5;
    border-radius: 1.15rem;
    box-shadow:
        0 28px 70px rgba(17, 42, 92, .18),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    overflow: hidden;
    position: absolute;
    right: 0;
    top: calc(100% + .75rem);
    z-index: 60;
    backdrop-filter: blur(18px);
}

.topbar-notifications-dropdown {
    max-width: calc(100vw - 2rem);
    width: 24.5rem;
}

.topbar-user-dropdown {
    width: 17rem;
}

.topbar-dropdown-header {
    align-items: center;
    border-bottom: 1px solid #edf2fb;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.topbar-dropdown-title {
    color: #07122f;
    font-size: .92rem;
    font-weight: 950;
    line-height: 1.2rem;
}

.topbar-dropdown-subtitle {
    color: #667695;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1rem;
    margin-top: .1rem;
}

.topbar-dropdown-action {
    align-items: center;
    background: #eff6ff;
    border-radius: .7rem;
    color: #075ce8;
    display: inline-flex;
    font-size: .72rem;
    font-weight: 900;
    min-height: 2rem;
    padding: 0 .65rem;
    text-decoration: none;
    white-space: nowrap;
}

.topbar-dropdown-action:hover {
    background: #dbeafe;
}

.topbar-notifications-list {
    max-height: 24rem;
    overflow-y: auto;
}

.topbar-notifications-list::-webkit-scrollbar {
    width: .42rem;
}

.topbar-notifications-list::-webkit-scrollbar-thumb {
    background: #cbd8ed;
    border-radius: 999px;
}

.topbar-notification-item {
    align-items: flex-start;
    border-bottom: 1px solid #edf2fb;
    color: inherit;
    display: flex;
    gap: .8rem;
    padding: .95rem 1rem;
    position: relative;
    text-decoration: none;
    transition: background-color .16s ease;
}

.topbar-notification-item:hover {
    background: #f8fbff;
}

.topbar-notification-item.is-unread {
    background:
        linear-gradient(90deg, rgba(7, 92, 232, .08), transparent 70%),
        #ffffff;
}

.topbar-notification-icon {
    align-items: center;
    border-radius: .85rem;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.topbar-notification-icon.is-info {
    background: #eff6ff;
    color: #075ce8;
}

.topbar-notification-icon.is-success {
    background: #f0fdf4;
    color: #15803d;
}

.topbar-notification-icon.is-error {
    background: #fef2f2;
    color: #dc2626;
}

.topbar-notification-content {
    min-width: 0;
    padding-right: .5rem;
}

.topbar-notification-title {
    color: #07122f;
    font-size: .84rem;
    font-weight: 900;
    line-height: 1.15rem;
}

.topbar-notification-message {
    color: #667695;
    display: -webkit-box;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.05rem;
    margin-top: .2rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.topbar-notification-date {
    color: #8da0bd;
    font-size: .68rem;
    font-weight: 700;
    margin-top: .45rem;
}

.topbar-unread-dot {
    background: #075ce8;
    border-radius: 999px;
    height: .46rem;
    position: absolute;
    right: .9rem;
    top: 1.15rem;
    width: .46rem;
}

.topbar-empty-state {
    align-items: center;
    color: #667695;
    display: flex;
    flex-direction: column;
    font-size: .84rem;
    font-weight: 700;
    gap: .7rem;
    justify-content: center;
    min-height: 9rem;
    padding: 1.25rem;
    text-align: center;
}

.topbar-empty-icon {
    align-items: center;
    background: #f3f7ff;
    border-radius: 1rem;
    color: #8091ad;
    display: inline-flex;
    height: 2.8rem;
    justify-content: center;
    width: 2.8rem;
}

.topbar-dropdown-footer {
    border-top: 1px solid #edf2fb;
    padding: .55rem;
}

.topbar-dropdown-footer a {
    align-items: center;
    border-radius: .8rem;
    color: #075ce8;
    display: flex;
    font-size: .82rem;
    font-weight: 900;
    gap: .45rem;
    height: 2.45rem;
    justify-content: center;
    text-decoration: none;
    transition: background-color .16s ease;
}

.topbar-dropdown-footer a:hover {
    background: #eff6ff;
}

.topbar-user-dropdown-header {
    align-items: center;
    border-bottom: 1px solid #edf2fb;
    display: flex;
    gap: .8rem;
    padding: 1rem;
}

.topbar-dropdown-menu {
    padding: .55rem;
}

.topbar-dropdown-menu + .topbar-dropdown-menu {
    border-top: 1px solid #edf2fb;
}

.topbar-dropdown-menu a {
    align-items: center;
    border-radius: .85rem;
    color: #334155;
    display: flex;
    font-size: .84rem;
    font-weight: 800;
    gap: .75rem;
    min-height: 2.65rem;
    padding: 0 .8rem;
    text-decoration: none;
    transition:
        background-color .16s ease,
        color .16s ease,
        transform .16s ease;
}

.topbar-dropdown-menu a:hover {
    background: #f3f7ff;
    color: #075ce8;
    transform: translateX(2px);
}

.topbar-dropdown-menu a i {
    color: #075ce8;
    font-size: .95rem;
}

.topbar-dropdown-menu-danger a {
    color: #dc2626;
}

.topbar-dropdown-menu-danger a:hover {
    background: #fef2f2;
    color: #b91c1c;
}

.topbar-dropdown-menu-danger a i {
    color: currentColor;
}

[data-theme="dark"] .topbar-siga {
    background: rgba(8, 20, 42, .86) !important;
    border-bottom-color: rgba(134, 162, 207, .22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .04),
        0 18px 42px rgba(0, 0, 0, .22);
}

[data-theme="dark"] .topbar-icon-button,
[data-theme="dark"] .topbar-user-button,
[data-theme="dark"] .topbar-user-name {
    color: #f8fbff;
}

[data-theme="dark"] .topbar-icon-button:hover,
[data-theme="dark"] .topbar-user-button:hover {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(134, 162, 207, .22);
}

[data-theme="dark"] .topbar-search {
    background: rgba(255, 255, 255, .055);
    border-color: rgba(134, 162, 207, .22);
}

[data-theme="dark"] .topbar-search:focus-within {
    background: rgba(255, 255, 255, .075);
    border-color: rgba(134, 162, 207, .36);
}

[data-theme="dark"] .topbar-search input {
    color: #f8fbff;
}

[data-theme="dark"] .topbar-search span {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(134, 162, 207, .18);
    color: #9badca;
}

[data-theme="dark"] .topbar-divider {
    background: rgba(134, 162, 207, .22);
}

[data-theme="dark"] .topbar-dropdown {
    background: rgba(8, 20, 42, .96);
    border-color: rgba(134, 162, 207, .24);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .35);
}

[data-theme="dark"] .topbar-dropdown-header,
[data-theme="dark"] .topbar-dropdown-footer,
[data-theme="dark"] .topbar-user-dropdown-header,
[data-theme="dark"] .topbar-dropdown-menu + .topbar-dropdown-menu,
[data-theme="dark"] .topbar-notification-item {
    border-color: rgba(134, 162, 207, .18);
}

[data-theme="dark"] .topbar-dropdown-title,
[data-theme="dark"] .topbar-notification-title {
    color: #f8fbff;
}

[data-theme="dark"] .topbar-dropdown-subtitle,
[data-theme="dark"] .topbar-user-role,
[data-theme="dark"] .topbar-notification-message,
[data-theme="dark"] .topbar-empty-state {
    color: #9badca;
}

[data-theme="dark"] .topbar-notification-item:hover,
[data-theme="dark"] .topbar-dropdown-menu a:hover {
    background: rgba(255, 255, 255, .055);
}

[data-theme="dark"] .topbar-notification-item.is-unread {
    background:
        linear-gradient(90deg, rgba(11, 107, 255, .16), transparent 70%),
        rgba(255, 255, 255, .025);
}

[data-theme="dark"] .topbar-dropdown-menu a {
    color: #d7e4fb;
}

@media (max-width: 1023px) {
    .topbar-search {
        display: none;
    }

    .topbar-user-info,
    .topbar-user-chevron {
        display: none;
    }

    .topbar-user-button {
        padding: .25rem;
    }
}

@media (max-width: 640px) {
    .topbar-siga {
        padding-left: .85rem;
        padding-right: .85rem;
    }

    .topbar-actions {
        gap: .35rem;
    }

    .topbar-icon-button {
        height: 2.45rem;
        width: 2.45rem;
    }

    .topbar-divider {
        display: none;
    }

    .topbar-notifications-dropdown {
        right: -5.5rem;
        width: calc(100vw - 1.5rem);
    }

    .topbar-user-dropdown {
        right: 0;
        width: calc(100vw - 1.5rem);
    }
}

.badge-slate {
    background: #f1f5f9;
    color: #334155;
}

[data-theme="dark"] .badge-slate {
    background: rgba(148, 163, 184, .14);
    color: #cbd5e1;
}

/* =========================================================
   Assistente Avança IA - Novo Layout
   ========================================================= */

.ai-assistant-fab {
    align-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .32), transparent 32%),
        linear-gradient(135deg, #075ce8 0%, #164dff 58%, #003ab8 100%);
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    bottom: 1.45rem;
    box-shadow:
        0 18px 42px rgba(7, 92, 232, .38),
        0 0 0 8px rgba(7, 92, 232, .08);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.35rem;
    height: 3.45rem;
    justify-content: center;
    position: fixed;
    right: 1.45rem;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    width: 3.45rem;
    z-index: 80;
}

.ai-assistant-fab:hover {
    box-shadow:
        0 24px 52px rgba(7, 92, 232, .46),
        0 0 0 10px rgba(7, 92, 232, .1);
    transform: translateY(-3px) scale(1.03);
}

.ai-assistant-fab:focus-visible {
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, .95),
        0 0 0 8px rgba(7, 92, 232, .35);
    outline: none;
}

.ai-assistant-panel {
    background:
        radial-gradient(circle at 90% 0%, rgba(7, 92, 232, .12), transparent 18rem),
        linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(247, 250, 255, .98) 100%);
    border: 1px solid rgba(184, 201, 230, .9);
    border-radius: 1.35rem;
    bottom: 5.55rem;
    box-shadow:
        0 28px 80px rgba(17, 42, 92, .22),
        inset 0 1px 0 rgba(255, 255, 255, .8);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 7rem);
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    position: fixed;
    right: 1.45rem;
    transform: translateY(1rem) scale(.98);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    visibility: hidden;
    width: min(27rem, calc(100vw - 2rem));
    z-index: 79;
}

.ai-assistant-panel.is-open,
.ai-assistant-panel[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.ai-assistant-header {
    align-items: center;
    background: rgba(255, 255, 255, .74);
    border-bottom: 1px solid rgba(216, 227, 245, .9);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.ai-assistant-brand {
    align-items: center;
    display: flex;
    gap: .8rem;
    min-width: 0;
}

.ai-assistant-logo {
    align-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .45), transparent 34%),
        linear-gradient(135deg, #075ce8 0%, #164dff 65%, #003ab8 100%);
    border-radius: 1rem;
    box-shadow: 0 14px 28px rgba(7, 92, 232, .24);
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.1rem;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.ai-assistant-kicker {
    color: #5f7195;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1;
    margin-bottom: .22rem;
    text-transform: uppercase;
}

.ai-assistant-header h2 {
    color: var(--app-text);
    font-size: 1.05rem;
    font-weight: 950;
    line-height: 1.2rem;
    margin: 0;
}

.ai-assistant-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: .45rem;
}

.ai-assistant-messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .85rem;
    min-height: 17rem;
    overflow-y: auto;
    padding: 1rem;
    scroll-behavior: smooth;
}

.ai-assistant-messages::-webkit-scrollbar {
    width: .42rem;
}

.ai-assistant-messages::-webkit-scrollbar-thumb {
    background: rgba(122, 140, 171, .34);
    border-radius: 999px;
}

.ai-message {
    display: flex;
    gap: .7rem;
    max-width: 100%;
}

.ai-message-avatar {
    align-items: center;
    background: #eaf1ff;
    border-radius: .85rem;
    color: var(--app-primary);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.ai-message-content {
    max-width: calc(100% - 3rem);
}

.ai-message-name {
    color: #5f7195;
    font-size: .72rem;
    font-weight: 900;
    margin-bottom: .3rem;
}

.ai-message-body {
    background: #ffffff;
    border: 1px solid rgba(216, 227, 245, .95);
    border-radius: 0 1rem 1rem 1rem;
    box-shadow: 0 12px 26px rgba(17, 42, 92, .07);
    color: var(--app-text);
    font-size: .9rem;
    line-height: 1.45rem;
    padding: .85rem .95rem;
}

.ai-message-user {
    justify-content: flex-end;
}

.ai-message-user .ai-message-avatar,
.ai-message-user .ai-message-name {
    display: none;
}

.ai-message-user .ai-message-content {
    max-width: 88%;
}

.ai-message-user .ai-message-body {
    background: linear-gradient(135deg, #075ce8 0%, #164dff 100%);
    border-color: transparent;
    border-radius: 1rem 0 1rem 1rem;
    box-shadow: 0 14px 30px rgba(7, 92, 232, .2);
    color: #ffffff;
}

.ai-assistant-shortcuts {
    border-top: 1px solid rgba(216, 227, 245, .9);
    display: grid;
    gap: .55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: .9rem 1rem;
}

.ai-assistant-shortcuts button {
    align-items: center;
    background: rgba(255, 255, 255, .82);
    border: 1px solid #d8e3f5;
    border-radius: .9rem;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 850;
    gap: .5rem;
    justify-content: flex-start;
    min-height: 2.7rem;
    padding: 0 .75rem;
    text-align: left;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.ai-assistant-shortcuts button:hover {
    background: #eff6ff;
    border-color: #b8c9e6;
    color: var(--app-primary);
    transform: translateY(-1px);
}

.ai-assistant-shortcuts button i {
    color: var(--app-primary);
    flex: 0 0 auto;
    font-size: .95rem;
}

.ai-assistant-form {
    align-items: flex-end;
    background: rgba(255, 255, 255, .86);
    border-top: 1px solid rgba(216, 227, 245, .9);
    display: flex;
    gap: .65rem;
    padding: 1rem;
}

.ai-assistant-form textarea {
    background: rgba(255, 255, 255, .96);
    border: 1px solid #c7d4eb;
    border-radius: 1rem;
    color: var(--app-text);
    flex: 1;
    font-size: .9rem;
    line-height: 1.35rem;
    max-height: 8rem;
    min-height: 3.15rem;
    outline: none;
    padding: .85rem 1rem;
    resize: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ai-assistant-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.ai-assistant-form textarea::placeholder {
    color: #8da0bd;
}

.ai-assistant-send {
    border-radius: 1rem;
    flex: 0 0 auto;
    height: 3.15rem;
    min-height: 3.15rem;
    padding: 0;
    width: 3.15rem;
}

[data-theme="dark"] .ai-assistant-panel {
    background:
        radial-gradient(circle at 90% 0%, rgba(11, 107, 255, .18), transparent 18rem),
        linear-gradient(180deg, rgba(8, 20, 42, .98) 0%, rgba(7, 16, 32, .98) 100%);
    border-color: rgba(134, 162, 207, .24);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

[data-theme="dark"] .ai-assistant-header,
[data-theme="dark"] .ai-assistant-form {
    background: rgba(8, 20, 42, .72);
    border-color: rgba(134, 162, 207, .22);
}

[data-theme="dark"] .ai-assistant-shortcuts {
    border-color: rgba(134, 162, 207, .22);
}

[data-theme="dark"] .ai-message-body,
[data-theme="dark"] .ai-assistant-shortcuts button,
[data-theme="dark"] .ai-assistant-form textarea {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(134, 162, 207, .22);
    color: var(--app-text);
}

[data-theme="dark"] .ai-message-name,
[data-theme="dark"] .ai-assistant-kicker {
    color: var(--app-muted);
}

[data-theme="dark"] .ai-message-avatar {
    background: rgba(11, 107, 255, .18);
    color: #60a5fa;
}

@media (max-width: 640px) {
    .ai-assistant-fab {
        bottom: 1rem;
        height: 3.25rem;
        right: 1rem;
        width: 3.25rem;
    }

    .ai-assistant-panel {
        border-radius: 1.15rem;
        bottom: 4.85rem;
        max-height: calc(100vh - 5.75rem);
        right: 1rem;
        width: calc(100vw - 2rem);
    }

    .ai-assistant-shortcuts {
        grid-template-columns: 1fr;
    }

    .ai-assistant-header,
    .ai-assistant-form,
    .ai-assistant-messages,
    .ai-assistant-shortcuts {
        padding-left: .85rem;
        padding-right: .85rem;
    }
}

/* =========================================================
   Layout unificado - remove efeito de dois cards
   Menu + conteúdo integrados
   ========================================================= */

.app-body {
    background: #f3f7ff !important;
}

.app-shell {
    padding: 0 !important;
    background: #f3f7ff;
}

.app-workspace {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 100vh !important;
    background:
        radial-gradient(circle at 82% 0%, rgba(11, 107, 255, .10), transparent 30rem),
        linear-gradient(180deg, #fbfdff 0%, #eef4ff 100%) !important;
}

.sidebar-shell {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-bottom: 0 !important;
    box-shadow: 10px 0 35px rgba(4, 18, 44, .12) !important;
}

.app-topbar {
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 0 rgba(12, 32, 73, .08) !important;
}

@media (min-width: 1024px) {
    .app-shell {
        padding-left: 18rem !important;
    }

    .app-workspace {
        min-height: 100vh !important;
    }
}

@media (max-width: 1023px) {
    .app-shell {
        padding: 0 !important;
    }

    .app-workspace {
        border-radius: 0 !important;
    }

    .sidebar-shell {
        border-radius: 0 1.25rem 1.25rem 0 !important;
    }
}

[data-theme="dark"] .app-body {
    background: #020817 !important;
}

[data-theme="dark"] .app-shell {
    background: #020817 !important;
}

[data-theme="dark"] .app-workspace {
    background:
        radial-gradient(circle at 80% 0%, rgba(11, 107, 255, .16), transparent 28rem),
        #071020 !important;
}

/* =========================================================
   Kanban moderno - Suporte
   ========================================================= */

.kanban-toolbar-panel {
    padding: 1.15rem 1.25rem;
}

.kanban-board-modern {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(5, minmax(17.5rem, 1fr));
    overflow-x: auto;
    padding: .15rem .1rem .75rem;
    scroll-snap-type: x proximity;
}

.kanban-board-modern::-webkit-scrollbar {
    height: .55rem;
}

.kanban-board-modern::-webkit-scrollbar-thumb {
    background: rgba(134, 162, 207, .45);
    border-radius: 999px;
}

.kanban-column-modern {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 251, 255, .86));
    border: 1px solid var(--app-border);
    border-radius: 1.25rem;
    box-shadow: var(--app-shadow-soft);
    min-height: 34rem;
    padding: 1rem;
    scroll-snap-align: start;
}

.kanban-column-header-modern {
    align-items: center;
    border-bottom: 1px solid rgba(216, 227, 245, .78);
    display: flex;
    gap: .9rem;
    justify-content: space-between;
    margin: -.15rem -.15rem .9rem;
    padding: .15rem .15rem .9rem;
}

.kanban-column-header-modern h2 {
    color: var(--app-text);
    font-size: .95rem;
    font-weight: 900;
    line-height: 1.2rem;
}

.kanban-column-header-modern p {
    color: var(--app-muted);
    font-size: .78rem;
    font-weight: 700;
    margin-top: .12rem;
}

.kanban-column-icon .stat-icon {
    border-radius: .95rem;
    height: 2.8rem;
    width: 2.8rem;
}

.kanban-items {
    gap: .85rem;
}

.kanban-card-modern {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(199, 212, 235, .86);
    border-radius: 1.05rem;
    box-shadow: 0 12px 28px rgba(17, 42, 92, .07);
    padding: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.kanban-card-modern:hover {
    border-color: var(--app-border-strong);
    box-shadow: 0 18px 42px rgba(17, 42, 92, .12);
    transform: translateY(-2px);
}

.kanban-card-top {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.kanban-card-code {
    color: var(--app-muted);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .02em;
    margin-bottom: .22rem;
    text-transform: uppercase;
}

.kanban-card-title {
    color: var(--app-text);
    display: block;
    font-size: .96rem;
    font-weight: 900;
    line-height: 1.25rem;
    text-decoration: none;
}

.kanban-card-title:hover {
    color: var(--app-primary);
}

.kanban-card-orgao,
.kanban-card-product,
.kanban-card-last {
    align-items: flex-start;
    color: var(--app-muted);
    display: flex;
    font-size: .8rem;
    font-weight: 650;
    gap: .45rem;
    line-height: 1.15rem;
    margin-top: .7rem;
}

.kanban-card-orgao i,
.kanban-card-product i,
.kanban-card-last i {
    color: #7a8cab;
    flex: 0 0 auto;
    margin-top: .05rem;
}

.kanban-card-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .85rem;
}

.kanban-card-meta span {
    align-items: center;
    background: #f3f7ff;
    border-radius: 999px;
    color: #51658d;
    display: inline-flex;
    font-size: .74rem;
    font-weight: 800;
    gap: .35rem;
    min-height: 1.75rem;
    padding: 0 .65rem;
}

.kanban-card-footer {
    align-items: center;
    border-top: 1px solid rgba(216, 227, 245, .78);
    display: flex;
    gap: .8rem;
    justify-content: space-between;
    margin-top: .95rem;
    padding-top: .85rem;
}

.kanban-card-footer strong {
    color: var(--app-text);
    display: block;
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.1rem;
}

.kanban-card-date-label {
    color: var(--app-muted);
    display: block;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1rem;
}

.kanban-card-last {
    background: rgba(241, 246, 255, .78);
    border-radius: .8rem;
    font-size: .72rem;
    font-weight: 750;
    margin-top: .85rem;
    padding: .55rem .65rem;
}

.kanban-empty-modern {
    align-items: center;
    background: rgba(248, 251, 255, .82);
    border: 1px dashed var(--app-border-strong);
    border-radius: 1rem;
    color: var(--app-muted);
    display: flex;
    flex-direction: column;
    font-size: .82rem;
    font-weight: 750;
    gap: .45rem;
    justify-content: center;
    min-height: 8rem;
    padding: 1rem;
    text-align: center;
}

.kanban-empty-modern i {
    color: #8da0bd;
    font-size: 1.35rem;
}

[data-theme="dark"] .kanban-column-modern {
    background: rgba(8, 20, 42, .86);
    border-color: rgba(134, 162, 207, .24);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

[data-theme="dark"] .kanban-column-header-modern {
    border-color: rgba(134, 162, 207, .2);
}

[data-theme="dark"] .kanban-card-modern {
    background: rgba(13, 29, 57, .92);
    border-color: rgba(134, 162, 207, .24);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

[data-theme="dark"] .kanban-card-meta span,
[data-theme="dark"] .kanban-card-last,
[data-theme="dark"] .kanban-empty-modern {
    background: rgba(255, 255, 255, .045);
    border-color: rgba(134, 162, 207, .24);
}

[data-theme="dark"] .kanban-card-footer {
    border-color: rgba(134, 162, 207, .2);
}

@media (max-width: 1280px) {
    .kanban-board-modern {
        grid-template-columns: repeat(5, minmax(17rem, 1fr));
    }
}

@media (max-width: 768px) {
    .kanban-toolbar-panel .native-table-actions {
        width: 100%;
    }

    .kanban-toolbar-panel .btn {
        width: 100%;
    }

    .kanban-board-modern {
        grid-template-columns: repeat(5, minmax(16.5rem, 1fr));
        margin-left: -.25rem;
        margin-right: -.25rem;
        padding-left: .25rem;
        padding-right: .25rem;
    }

    .kanban-column-modern {
        min-height: 28rem;
    }
}
/* =========================================================
   Tabela integrada / nativa
   Não depende de DataTables
   ========================================================= */

.integrated-table-shell {
    overflow: hidden;
}

.integrated-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: .875rem;
    width: 100%;
}

.integrated-table thead {
    background: rgba(233, 240, 253, .78);
    border-bottom: 1px solid var(--app-border);
}

.integrated-table th {
    color: #51658d;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .015em;
    padding: 1.05rem 1.35rem;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.integrated-table th:last-child {
    text-align: right;
}

.integrated-table td {
    border-bottom: 1px solid var(--app-border);
    color: var(--app-text);
    padding: 1.05rem 1.35rem;
    vertical-align: middle;
}

.integrated-table tbody tr {
    transition: background-color .15s ease;
}

.integrated-table tbody tr:hover {
    background: rgba(241, 246, 255, .78);
}

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

.integrated-entity {
    align-items: center;
    display: flex;
    gap: .85rem;
    min-width: 18rem;
}

.integrated-avatar {
    align-items: center;
    border-radius: 1rem;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.15rem;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.integrated-avatar-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.integrated-title {
    color: var(--app-text);
    font-size: .92rem;
    font-weight: 900;
    line-height: 1.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integrated-subtitle {
    color: var(--app-muted);
    font-size: .76rem;
    font-weight: 700;
    line-height: 1rem;
    margin-top: .18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integrated-actions {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    white-space: nowrap;
}

[data-theme="dark"] .integrated-table thead {
    background: rgba(255, 255, 255, .045);
}

[data-theme="dark"] .integrated-table td {
    border-color: rgba(134, 162, 207, .14);
}

[data-theme="dark"] .integrated-table tbody tr:hover {
    background: rgba(255, 255, 255, .045);
}

[data-theme="dark"] .integrated-avatar-blue {
    background: rgba(37, 99, 235, .18);
    color: #60a5fa;
}

@media (max-width: 900px) {
    .integrated-table th,
    .integrated-table td {
        padding: .95rem 1rem;
    }

    .integrated-actions {
        justify-content: flex-start;
    }
}

/* =========================================================
   Header actions compactas
   ========================================================= */

.page-header .page-actions {
    align-items: center;
    gap: .6rem;
}

.page-header .page-actions .btn {
    border-radius: .9rem;
    min-height: 2.65rem;
    padding-inline: 1rem;
    font-size: .82rem;
}

.page-header .page-actions .btn i {
    font-size: .95rem;
}

.page-header .page-actions .btn-primary {
    box-shadow: 0 12px 24px rgba(22, 77, 255, .22);
}

@media (max-width: 768px) {
    .page-header .page-actions {
        width: 100%;
    }

    .page-header .page-actions .btn {
        flex: 1 1 calc(50% - .4rem);
    }
}/* =========================================================
   Switch Cards - Preferências
   ========================================================= */

.switch-card {
    align-items: center;
    background: rgba(248, 251, 255, .78);
    border: 1px solid var(--app-border);
    border-radius: 1rem;
    cursor: pointer;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.switch-card:hover {
    background: var(--app-surface-solid);
    border-color: var(--app-border-strong);
    box-shadow: var(--app-shadow-soft);
    transform: translateY(-1px);
}

.switch-card-content {
    align-items: center;
    display: flex;
    gap: .85rem;
    min-width: 0;
}

.switch-card-icon {
    align-items: center;
    border-radius: .9rem;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

.switch-card-icon-blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.switch-card-icon-green {
    background: #f0fdf4;
    color: #15803d;
}

.switch-card-icon-purple {
    background: #faf5ff;
    color: #7e22ce;
}

.switch-card-title {
    color: var(--app-text);
    font-size: .9rem;
    font-weight: 900;
    line-height: 1.15rem;
}

.switch-card-description {
    color: var(--app-muted);
    font-size: .76rem;
    font-weight: 650;
    line-height: 1rem;
    margin-top: .15rem;
}

.switch-input {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.switch-toggle {
    background: #dbe5f3;
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .12);
    flex: 0 0 auto;
    height: 1.6rem;
    position: relative;
    transition: background-color .15s ease, box-shadow .15s ease;
    width: 2.85rem;
}

.switch-toggle::after {
    background: #ffffff;
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
    content: "";
    height: 1.22rem;
    left: .19rem;
    position: absolute;
    top: .19rem;
    transition: transform .15s ease;
    width: 1.22rem;
}

.switch-input:checked + .switch-toggle {
    background: var(--app-primary);
    box-shadow: 0 10px 22px rgba(7, 92, 232, .22);
}

.switch-input:checked + .switch-toggle::after {
    transform: translateX(1.25rem);
}

[data-theme="dark"] .switch-card {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(134, 162, 207, .22);
}

[data-theme="dark"] .switch-card:hover {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(134, 162, 207, .36);
}

[data-theme="dark"] .switch-toggle {
    background: rgba(148, 163, 184, .28);
}

.native-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: .875rem;
}

.native-table thead {
    background: rgba(233, 240, 253, .78);
    border-bottom: 1px solid var(--app-border);
}

.native-table th {
    color: #51658d;
    font-size: .75rem;
    font-weight: 800;
    padding: 1.05rem 1.35rem;
    text-align: left;
    white-space: nowrap;
}

.native-table th:last-child {
    text-align: right;
}

.native-table td {
    color: var(--app-text);
    padding: 1.05rem 1.35rem;
    vertical-align: middle;
}

.native-table tbody tr {
    border-bottom: 1px solid var(--app-border);
    transition: background-color .15s ease;
}

.native-table tbody tr:hover {
    background: rgba(241, 246, 255, .78);
}

.native-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--app-border);
}

[data-theme="dark"] .native-table thead {
    background: rgba(255, 255, 255, .055);
}

[data-theme="dark"] .native-table tbody tr:hover {
    background: rgba(255, 255, 255, .035);
}