/* ==========================================================
   LUSIAGRO ADMIN ECOSYSTEM - CORE STYLESHEET (UTF-8)
   ========================================================== */

/* ----------------------------------------------------------
   1. DESIGN SYSTEM & VARIÁVEIS GLOBAIS (Enterprise Dark Mode)
   ---------------------------------------------------------- */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #10b981;
    --success-bg: #dcfce7;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;

    --bg: #f8fafc;
    --card: #ffffff;
    --border: #b8c4d4;
    --border-subtle: #7d8ea3;

    --text: #0f172a;
    --muted: #3d4b5f;
    --title: #2563eb;
    
    --radius: 12px;
    --radius-sm: 6px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --card-shadow:
        0 1px 0 rgba(255, 255, 255, .95) inset,
        0 2px 4px rgba(15, 23, 42, .06),
        0 12px 28px rgba(15, 23, 42, .10),
        0 32px 64px rgba(15, 23, 42, .10);
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --border: #334155;
    --border-subtle: #475569;
    --text: #d6dee8;
    --muted: #8b9aaf;
    --title: #8bb4ff;
    --card-shadow:
        0 1px 0 rgba(255, 255, 255, .06) inset,
        0 1px 2px rgba(0, 0, 0, .28),
        0 10px 24px rgba(0, 0, 0, .28),
        0 24px 44px rgba(0, 0, 0, .22);
}

/* Paleta Sala — creme / carvão do eventos_v2. Combina com claro e escuro. */
[data-theme="light"][data-palette="sala"] {
    --primary: #8d6b3a;
    --primary-hover: #6f532c;
    --success: #0f766e;
    --success-bg: #ccfbf1;
    --warning: #b45309;
    --warning-bg: #ffedd5;
    --danger: #be123c;
    --danger-bg: #ffe4e6;
    --bg: #f3efe6;
    --card: #fffdf8;
    --border: rgba(26, 24, 20, .14);
    --border-subtle: rgba(26, 24, 20, .22);
    --text: #1a1814;
    --muted: #6f6a62;
    --title: #8d6b3a;
    --card-shadow:
        0 1px 0 rgba(255, 255, 255, .92) inset,
        0 2px 4px rgba(40, 32, 18, .05),
        0 12px 28px rgba(40, 32, 18, .08),
        0 32px 64px rgba(40, 32, 18, .06);
}

[data-theme="dark"][data-palette="sala"] {
    --primary: #c4a574;
    --primary-hover: #d4b896;
    --success: #5eead4;
    --success-bg: rgba(94, 234, 212, .12);
    --warning: #f5c16c;
    --warning-bg: rgba(245, 193, 108, .14);
    --danger: #fb7185;
    --danger-bg: rgba(251, 113, 133, .14);
    --bg: #07080b;
    --card: #111214;
    --border: rgba(232, 228, 219, .12);
    --border-subtle: rgba(232, 228, 219, .20);
    --text: #e8e4db;
    --muted: #8b8680;
    --title: #c4a574;
    --card-shadow:
        0 1px 0 rgba(255, 253, 248, .04) inset,
        0 1px 2px rgba(0, 0, 0, .35),
        0 10px 24px rgba(0, 0, 0, .32),
        0 24px 44px rgba(0, 0, 0, .26);
}

/* ----------------------------------------------------------
   2. RESET E ESTILOS BASE
   ---------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
}

html { background-color: var(--bg); font-size: 15px; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"][data-palette="sala"] { color-scheme: dark; }
html[data-theme="light"][data-palette="sala"] { color-scheme: light; }

/* Navegação: o menu fica quieto, só o conteúdo se cruza. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}
.sidebar { view-transition-name: admin-sidebar; }
.main-content { view-transition-name: admin-main; }
::view-transition-old(admin-sidebar),
::view-transition-new(admin-sidebar) {
    animation: none;
    mix-blend-mode: normal;
}
::view-transition-group(admin-sidebar) { animation: none; }
::view-transition-group(admin-main) {
    animation-duration: 180ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-old(admin-main) {
    animation: vt-main-out 110ms cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(admin-main) {
    animation: vt-main-in 190ms cubic-bezier(0, 0, 0.2, 1) 40ms both;
}
@keyframes vt-main-out {
    to { opacity: 0; }
}
@keyframes vt-main-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

img {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font-family: inherit;
}

input, select, textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 15px;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-header h1 {
    margin: 0;
    color: var(--title);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1;
    letter-spacing: -.04em;
}
.page-header p:not(.eyebrow) {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.btn-primary-action,
.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.btn-primary-action { background: var(--primary); color: #fff; }
.btn-primary-action:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary-action { background: var(--card); border-color: var(--border); color: var(--text); }
.content-card,
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--card-shadow);
}
.content-card { padding: 18px; }
.content-card h2 { margin: 0 0 8px; font-size: 18px; color: var(--text); }
.muted { color: var(--muted); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 118px;
    padding: 18px;
    color: inherit;
    text-decoration: none;
}
.stat-card:hover {
    border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
    transform: translateY(-1px);
}
.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.stat-card strong {
    color: var(--text);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -.05em;
    font-variant-numeric: tabular-nums;
}
.stat-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

/* ----------------------------------------------------------
   3. ESTRUTURA E LAYOUT (SIDEBAR & MAIN CONTENT)
   ---------------------------------------------------------- */



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

.sidebar {
    width: 260px;
    background:
        radial-gradient(900px 280px at 0% -8%, rgba(37, 99, 235, 0.16), transparent 52%),
        linear-gradient(180deg, #121a2c 0%, #0c1322 48%, #0a101c 100%);
    color: #9aa8bc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 12px 14px;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 12px 0 40px rgba(2, 6, 23, 0.28);
    z-index: 100;
    overflow: hidden;
}

.sidebar-top { min-height: 0; display: flex; flex-direction: column; flex: 1; }
.sidebar-navigation { overflow-y: auto; }
.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 16px 6px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
}
.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.sidebar-brand-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.sidebar-brand-sub {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c4a574;
}
.sidebar-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    padding: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-collapse-btn,
.sidebar-tab,
.sidebar-hotzone,
.sidebar-backdrop {
    display: none;
}
.sidebar-collapse-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar-collapse-btn.is-pinned { color: #e2e8f0; }
.sidebar-collapse-btn.is-pinned:hover { color: #fff; }
html.sidebar-closed.sidebar-peek .sidebar-collapse-btn {
    color: #fff;
    background: #1e293b;
}

.sidebar-tab {
    position: fixed;
    left: 0;
    top: 88px;
    z-index: 130;
    width: 28px;
    height: 52px;
    border: 0;
    border-radius: 0 10px 10px 0;
    background: #0f172a;
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
}
.sidebar-tab:hover { background: #1e293b; }

.sidebar-hotzone {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    z-index: 125;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 115;
    background: rgba(15, 23, 42, 0.28);
}

.sidebar-navigation {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
    padding-right: 2px;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}
.sidebar-navigation::-webkit-scrollbar { width: 6px; }
.sidebar-navigation::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 99px;
}
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.sidebar-group__label {
    margin: 0 10px 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5d6d84;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 24px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 100vh;
}

/* ----------------------------------------------------------
   4. MENU E NAVEGAÇÃO
   ---------------------------------------------------------- */
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    color: #b4c0d1;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border-radius: 10px;
    position: relative;
    transition: background 0.16s ease, color 0.16s ease;
}

.menu-item__ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    color: #8b9bb3;
    font-size: 13px;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.menu-item__txt { min-width: 0; }

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}
.menu-item:hover .menu-item__ico {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.menu-item.active {
    background: rgba(37, 99, 235, 0.16);
    color: #ffffff;
    box-shadow: none;
}
.menu-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 2px;
    background: #7dd3fc;
}
.menu-item.active .menu-item__ico {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.32);
}

.sidebar-footer {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.menu-item.logout {
    margin-top: 8px;
    color: #94a3b8;
}
.menu-item.logout i { font-size: 15px; }
.menu-item.logout:hover {
    background: rgba(220, 38, 38, 0.14);
    color: #fecaca;
}
.menu-item.logout:hover .menu-item__ico {
    background: rgba(220, 38, 38, 0.22);
    color: #fecaca;
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-btn.active {
    background: var(--primary);
    color: #fff;
}

/* ----------------------------------------------------------
   5. COMPONENTES DE CABEÇALHO & DASHBOARD
   ---------------------------------------------------------- */
.top-bar-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-circle {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.user-role {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-role::before {
    content: "●";
    font-size: 10px;
}

.live-clock-widget {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.live-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.live-time {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}

.welcome-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.15);
}

.welcome-banner h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
}

.welcome-banner p {
    margin: 8px 0 0 0;
    opacity: 0.8;
    font-size: 15px;
}

/* ----------------------------------------------------------
   6. CARDS, KPI GRIDS & ALERTAS INTELIGENTES
   ---------------------------------------------------------- */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
}

.card h2 {
    margin-top: 0;
    font-size: 22px;
    color: var(--title);
    font-weight: 500;
    margin-bottom: 12px;
}

.card h3 {
    margin-top: 0;
    font-size: 16px;
    color: var(--title);
    font-weight: 500;
    margin-bottom: 16px;
}

.card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.card hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 94px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--card-shadow);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.kpi-label {
    font-size: 10px;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 4px;
}

.kpi-trend {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

.kpi-total .kpi-icon { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.kpi-success { border-left: 4px solid var(--success); }
.kpi-success .kpi-icon { background: var(--success-bg); color: #16a34a; }
.kpi-success .kpi-label { color: #16a34a; }

.kpi-neutral { border-left: 4px solid #3d4b5f; }
.kpi-neutral .kpi-icon { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.kpi-neutral .kpi-label { color: var(--muted); }

.kpi-warning { border-left: 4px solid var(--warning); }
.kpi-warning .kpi-icon { background: var(--warning-bg); color: #d97706; }
.kpi-warning .kpi-label { color: #d97706; }

.kpi-danger { border-left: 4px solid var(--danger); }
.kpi-danger .kpi-icon { background: var(--danger-bg); color: #dc2626; }
.kpi-danger .kpi-label { color: #dc2626; }

.kpi-primary { border-left: 4px solid var(--primary); }
.kpi-primary .kpi-icon { background: #dbeafe; color: var(--primary); }
.kpi-primary .kpi-label { color: var(--primary); }

.kpi-card .kpi-tooltip {
    visibility: hidden;
    width: 220px;
    background-color: #0f172a;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 10px 12px;
    position: absolute;
    z-index: 100;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
}

.kpi-card:hover .kpi-tooltip {
    visibility: visible;
    opacity: 1;
}

.alert-widget {
    background: var(--card);
    border: 1px solid #fef3c7;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--card-shadow);
    flex-wrap: wrap;
}

.alert-widget-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.alert-widget-icon {
    font-size: 22px;
    color: #d97706;
}

.alert-widget-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.alert-widget-content p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.btn-pendencias {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-pendencias:hover {
    background: #fde68a;
    color: #78350f;
}

[data-theme="dark"] .alert-widget {
    background: var(--card);
    border-color: var(--border);
    border-left-color: var(--warning);
}

[data-theme="dark"] .btn-pendencias {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* ----------------------------------------------------------
   7. FORMULÁRIOS, FILTROS E PESQUISA
   ---------------------------------------------------------- */
.filter-container, .filtro-container, .import-card {
    background: var(--card);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.status-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.status-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
}

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

.status-tab.active {
    background: var(--text);
    color: var(--card);
    border-color: var(--text);
}

.search-box {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 10px;
    align-items: center;
}

.search-input {
    height: 40px;
    width: 100%;
    padding: 0 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--card);
    color: var(--text);
}

.search-btn, .btn-pesquisar, .btn {
    height: 40px;
    padding: 0 18px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    background: var(--primary);
    color: #ffffff;
    transition: var(--transition);
}

.search-btn:hover, .btn-pesquisar:hover, .btn:hover {
    background: var(--primary-hover);
}

.grid-filtros, .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.campo-full {
    grid-column: span 2;
}

.campo-premium, .campo-moderno, .campo-luxe {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-bottom: 12px;
}

.campo-premium .label, .campo-moderno .label, .campo-luxe .label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.campo-premium input, .campo-premium select,
.campo-moderno input, .campo-moderno select,
.campo-luxe input {
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background-color: var(--bg);
    transition: var(--transition);
    width: 100%;
}

.campo-premium input:focus, .campo-premium select:focus,
.campo-moderno input:focus, .campo-moderno select:focus,
.campo-luxe input:focus {
    border-color: var(--primary);
    background-color: var(--card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.btn-submit-luxe {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    height: 48px;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit-luxe:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: var(--card);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ----------------------------------------------------------
   8. TABELAS DE DADOS & ORDENAÇÃO STICKY
   ---------------------------------------------------------- */
.table-responsive, .table-container {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: auto;
    margin-top: 20px;
    max-height: 70vh;
    box-shadow: var(--card-shadow);
}
.table-responsive.is-filtering,
.pagination-wrapper.is-filtering {
    pointer-events: none;
}

.table-responsive table, .table-premium, .table-modern, .table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-responsive thead th, .table-premium th, .table-modern th, .table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.5px;
    padding: 14px 16px;
    font-weight: 600;
}

.table-premium td, .table-modern td, .table td {
    padding: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-responsive tbody tr {
    transition: background-color 0.15s ease;
}

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

[data-theme="light"] .table-responsive tbody tr:hover,
body:not([data-theme="dark"]) .table-responsive tbody tr:hover {
    background-color: rgba(15, 23, 42, 0.02);
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    transition: var(--transition);
}

.sort-link:hover {
    color: var(--primary);
}

/* ----------------------------------------------------------
   9. BADGES, AÇÕES E ELEMENTOS VISUAIS
   ---------------------------------------------------------- */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-status { display: inline-block; padding: 4px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; text-align: center; }
.badge-mes {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #99f6e4;
}
[data-theme="dark"] .badge-mes {
    background: rgba(45, 212, 191, 0.16);
    color: #5eead4;
    border-color: rgba(45, 212, 191, 0.28);
}
.badge-ano { font-family: monospace; font-weight: 600; color: var(--muted); background: var(--border); padding: 2px 6px; border-radius: 4px; }

.bg-success, .badge-assinado, .badge-completo { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.bg-warning, .badge-gerado, .badge-falta-1 { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-falta-2 { background: #fed7aa; color: #c2410c; border: 1px solid #fdba74; }
.bg-danger, .badge-terminado, .badge-falta-3 { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

[data-theme="dark"] .badge-assinado, [data-theme="dark"] .badge-completo { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
[data-theme="dark"] .badge-gerado, [data-theme="dark"] .badge-falta-1 { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
[data-theme="dark"] .badge-falta-2 { background: rgba(249, 115, 22, 0.15); color: #fb923c; border-color: rgba(249, 115, 22, 0.3); }
[data-theme="dark"] .badge-terminado, [data-theme="dark"] .badge-falta-3 { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }

tr.row-warning { background-color: rgba(245, 158, 11, 0.03); }
tr.row-danger { background-color: rgba(239, 68, 68, 0.04); }

.actions-cell { display: flex; gap: 8px; justify-content: flex-start; }

.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    background: var(--card);
    transition: var(--transition);
    font-size: 14px;
    text-decoration: none;
}

.btn-action:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg);
    transform: scale(1.08);
}

.btn-action.btn-delete:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

.batch-bar { 
    background: var(--bg); 
    padding: 12px 16px; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    flex-wrap: wrap; 
}

.batch-btn { 
    padding: 8px 14px; 
    border-radius: 6px; 
    font-size: 12px; 
    font-weight: 600; 
    border: 1px solid transparent; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    white-space: nowrap; 
}

/* ----------------------------------------------------------
   10. TELA DE LOGIN E PÁGINAS ISOLADAS
   ---------------------------------------------------------- */
body.auth-page {
    --auth-ink: #eef3ef;
    --auth-dim: #8b9d92;
    --auth-line: rgba(190, 224, 202, 0.12);
    --auth-gold: #f5a623;
    --auth-leaf: #3dd68c;
    margin: 0;
    min-height: 100vh;
    color: var(--auth-ink);
    background:
        radial-gradient(60% 45% at 12% 8%, rgba(61, 214, 140, 0.10), transparent 60%),
        radial-gradient(55% 45% at 92% 96%, rgba(245, 166, 35, 0.08), transparent 60%),
        #060c09;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    width: 100%;
    max-width: 980px;
    min-height: 560px;
    border: 1px solid var(--auth-line);
    border-radius: 28px;
    overflow: hidden;
    background: #0a120e;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}

/* ----- Painel da marca ----- */
.auth-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 44px 40px;
    background:
        linear-gradient(155deg, #17402e 0%, #0d211a 55%, #091510 100%);
    overflow: hidden;
}
.auth-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(190, 224, 202, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(190, 224, 202, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(75% 65% at 30% 25%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(75% 65% at 30% 25%, #000 0%, transparent 78%);
    pointer-events: none;
}
.auth-stage__glow {
    position: absolute;
    top: -22%;
    right: -18%;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.24), transparent 62%);
    filter: blur(12px);
    pointer-events: none;
}
.auth-stage > *:not(.auth-stage__glow) { position: relative; z-index: 1; }
.auth-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.35),
        0 0 0 7px rgba(255, 255, 255, 0.06);
}
.auth-plate img {
    width: min(300px, 100%);
    height: auto;
    display: block;
}
.auth-stage__tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(238, 243, 239, 0.55);
}
.auth-stage__tag::before {
    content: "";
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, var(--auth-gold), rgba(245, 166, 35, 0));
}
.auth-stage__eyebrow {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--auth-gold);
}
.auth-stage__title {
    margin: 0 0 26px;
    font-size: 30px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f6faf7;
}
.auth-stage__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-stage__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(238, 243, 239, 0.72);
}
.auth-stage__list i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: rgba(61, 214, 140, 0.12);
    border: 1px solid rgba(61, 214, 140, 0.22);
    color: var(--auth-leaf);
    font-size: 13px;
}
.auth-stage__foot {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(238, 243, 239, 0.35);
}

/* ----- Painel de acesso ----- */
.auth-access {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 40px;
    background: #0b1410;
    border-left: 1px solid var(--auth-line);
}
.auth-access__inner {
    width: 100%;
    max-width: 340px;
}
.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(245, 166, 35, 0.28);
    background: rgba(245, 166, 35, 0.08);
    color: var(--auth-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-title {
    margin: 18px 0 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #f6faf7;
}
.auth-sub {
    margin: 0 0 26px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--auth-dim);
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 7px; }
.auth-field label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--auth-dim);
}
.auth-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: rgba(5, 11, 8, 0.6);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-input:focus-within {
    border-color: rgba(61, 214, 140, 0.55);
    background: rgba(5, 11, 8, 0.85);
    box-shadow: 0 0 0 3px rgba(61, 214, 140, 0.14);
}
.auth-input > i {
    flex: 0 0 auto;
    padding: 0 2px 0 14px;
    font-size: 15px;
    color: var(--auth-dim);
}
.auth-input input {
    flex: 1 1 auto;
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--auth-ink);
    font-size: 15px;
    font-weight: 600;
}
.auth-input input:focus { outline: none; }
.auth-input input::placeholder { color: rgba(139, 157, 146, 0.55); font-weight: 500; }
.auth-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--auth-ink);
    -webkit-box-shadow: 0 0 0 1000px #0a120e inset;
    caret-color: var(--auth-ink);
}
.auth-eye {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    margin-right: 4px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-dim);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.auth-eye:hover { color: var(--auth-ink); background: rgba(238, 243, 239, 0.06); }

.auth-keep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 0;
    color: var(--auth-dim);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.auth-keep input {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    accent-color: #3dd68c;
    flex: 0 0 auto;
}

.auth-go {
    margin-top: 6px;
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7b943 0%, #e2900f 100%);
    color: #1b1206;
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(226, 144, 15, 0.24);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.auth-go i { font-size: 15px; transition: transform .16s ease; }
.auth-go:hover { transform: translateY(-1px); box-shadow: 0 16px 32px rgba(226, 144, 15, 0.3); }
.auth-go:hover i { transform: translateX(3px); }
.auth-go:active { transform: translateY(0); }
.auth-go:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-erro {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 14px;
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}
.auth-erro i { margin-top: 1px; }

.auth-foot {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 24px 0 0;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(139, 157, 146, 0.7);
}

@media (max-width: 860px) {
    body.auth-page { padding: 0; align-items: stretch; }
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 100vh;
        max-width: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .auth-stage {
        gap: 22px;
        padding: 32px 26px 26px;
    }
    .auth-stage__title { font-size: 23px; margin-bottom: 0; }
    .auth-stage__list, .auth-stage__foot { display: none; }
    .auth-plate { padding: 16px 18px; border-radius: 18px; }
    .auth-plate img { width: min(240px, 100%); }
    .auth-access {
        padding: 30px 26px 40px;
        border-left: 0;
        border-top: 1px solid var(--auth-line);
        align-items: flex-start;
    }
    .auth-access__inner { max-width: none; }
}

@media (min-width: 769px) {
    .sidebar {
        transition: transform 0.22s ease;
    }
    .main-content {
        transition: margin-left 0.22s ease, width 0.22s ease;
    }
    .sidebar-collapse-btn { display: inline-flex; }

    html.sidebar-closed .sidebar {
        transform: translateX(-100%);
    }
    html.sidebar-closed .main-content {
        margin-left: 0;
        width: 100%;
    }
    html.sidebar-closed .sidebar-tab { display: flex; }
    html.sidebar-closed .sidebar-hotzone { display: block; }

    html.sidebar-closed.sidebar-peek .sidebar {
        transform: translateX(0);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.32);
        z-index: 140;
    }
    html.sidebar-closed.sidebar-peek .sidebar-tab { display: none; }
    html.sidebar-closed.sidebar-peek .sidebar-backdrop { display: block; }
}

/* ----------------------------------------------------------
   11. ADAPTAÇÃO RESPONSIVA (MEDIA QUERIES < 768px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        width: 260px;
        z-index: 999;
        transition: left 0.3s ease-in-out;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 12px;
        min-height: 100vh;
    }

    .table-responsive, .table-container {
        max-height: 60vh;
    }

    body {
        padding: 0;
        font-size: 14px;
    }

    .top-bar-modern {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }

    .live-clock-widget {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border);
        padding-top: 8px;
    }

    .kpi-grid, .premium-dashboard-grid, .grid-form, .rh-grid-cards {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .campo-full {
        grid-column: auto !important;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

    .alert-widget {
        flex-direction: column;
        align-items: flex-start;
    }

    button, 
    .btn-action, 
    .search-btn, 
    .filter-tab,
    .btn-premium-action {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ----------------------------------------------------------
   LABEL & CÁPSULA DO SWITCHER DE TEMA
   ---------------------------------------------------------- */
.theme-switcher-wrapper {
    margin: 0 auto 10px;
    text-align: center;
}

.theme-label{
    display:block;
    text-align:center;
    margin-bottom:8px;
    font-size:10px;
    font-weight:600;
    letter-spacing:.8px;
}

.theme-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px;
    width: max-content;
    margin: 0 auto;
}

.theme-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: var(--transition);
}

.theme-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.theme-btn.active:hover {
    background: var(--primary);
    transform: none;
}
/* Estado Ativo Destacado */
.theme-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Sala pinta o conteúdo; o menu lateral fica na paleta original do ERP. */
html[data-palette="sala"] .sidebar .theme-btn.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* Feedback de operação — orbe iridescente (oklch + @property + órbitas) */
@property --op-a {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}
@property --op-h {
    syntax: "<number>";
    inherits: false;
    initial-value: 225;
}
.op-fb {
    position: fixed; inset: 0; z-index: 40000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; pointer-events: none;
    view-transition-name: none;
}
.op-fb.is-on { opacity: 1; visibility: visible; pointer-events: auto; }
.op-fb.is-warm { opacity: 0 !important; visibility: visible; pointer-events: none !important; }
.op-fb[hidden] { display: none !important; }
.op-fb__defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.op-fb__scrim {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(15, 23, 42, .2), rgba(2, 6, 23, .72) 72%);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
[data-theme="light"] .op-fb__scrim {
    background: radial-gradient(ellipse at 50% 42%, rgba(255,255,255,.12), rgba(15, 23, 42, .38) 75%);
}
.op-fb__stage {
    position: relative; z-index: 1;
    display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.op-fb__card {
    display: flex; flex-direction: column; align-items: center; gap: 22px;
    background: none; border: 0; box-shadow: none; padding: 0; max-width: none;
}
.op-fb__orb { position: relative; width: 128px; height: 128px; }
.op-fb__aura {
    position: absolute; inset: -48px;
    border-radius: 50%;
    background: conic-gradient(from var(--op-a),
        oklch(0.7 0.18 230 / .0),
        oklch(0.72 0.2 200 / .45),
        oklch(0.68 0.22 280 / .4),
        oklch(0.74 0.16 160 / .35),
        oklch(0.7 0.18 230 / .0));
    filter: blur(22px);
    opacity: 0;
    pointer-events: none;
}
.op-fb.is-wait .op-fb__aura {
    opacity: 1;
    animation: op-a 3.6s linear infinite, op-fb-breathe 2.4s ease-in-out infinite;
}
.op-fb.is-ok .op-fb__aura {
    opacity: .9;
    background: radial-gradient(circle, oklch(0.78 0.18 155 / .55), transparent 70%);
    filter: blur(18px);
}
.op-fb.is-err .op-fb__aura {
    opacity: .9;
    background: radial-gradient(circle, oklch(0.68 0.22 25 / .5), transparent 70%);
    filter: blur(18px);
}
.op-fb__core {
    position: relative; z-index: 2;
    width: 128px; height: 128px;
    border-radius: 50%;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 24px 60px oklch(0.3 0.08 250 / .45),
        inset 0 1px 0 oklch(1 0 0 / .35);
}
.op-fb__core::after {
    content: "";
    position: absolute; inset: 0; border-radius: 50%;
    box-shadow: inset 0 -22px 28px oklch(0.2 0.05 250 / .35), inset 0 12px 16px oklch(1 0 0 / .18);
    pointer-events: none;
}
.op-fb__spin { position: absolute; inset: 0; }
.op-fb__mesh,
.op-fb__caustic {
    position: absolute; inset: -20%;
    border-radius: 50%;
}
.op-fb__mesh {
    background: conic-gradient(from var(--op-a),
        oklch(0.68 0.2 calc(var(--op-h) + 0)),
        oklch(0.78 0.16 calc(var(--op-h) + 55)),
        oklch(0.64 0.22 calc(var(--op-h) + 130)),
        oklch(0.74 0.18 calc(var(--op-h) + 210)),
        oklch(0.7 0.2 calc(var(--op-h) + 290)),
        oklch(0.68 0.2 calc(var(--op-h) + 360)));
}
.op-fb.is-wait .op-fb__mesh {
    animation: op-a 2.8s linear infinite, op-h 9s linear infinite;
}
.op-fb__caustic {
    background: conic-gradient(from calc(var(--op-a) * -1.4),
        transparent 0 18%,
        oklch(0.92 0.08 220 / .45) 22%,
        transparent 32% 58%,
        oklch(0.9 0.1 300 / .35) 64%,
        transparent 74% 100%);
    mix-blend-mode: screen;
    opacity: .7;
}
.op-fb.is-wait .op-fb__caustic {
    animation: op-a 4.4s linear infinite reverse;
}
.op-fb__grain { display: none; }
.op-fb__spec {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 32% 26%, oklch(1 0 0 / .72) 0 8%, oklch(1 0 0 / .14) 24%, transparent 46%);
    mix-blend-mode: soft-light;
    pointer-events: none;
}
.op-fb__sat {
    position: absolute; z-index: 3;
    width: 9px; height: 9px; border-radius: 50%;
    left: 50%; top: 50%; margin: -4.5px 0 0 -4.5px;
    background: oklch(0.92 0.08 210);
    box-shadow: 0 0 14px oklch(0.8 0.14 220 / .9);
    offset-path: circle(72px at 50% 50%);
    offset-distance: calc(var(--i) * 33.333%);
    opacity: 0;
}
.op-fb.is-wait .op-fb__sat {
    opacity: 1;
    animation: op-orbit 2.5s linear infinite;
    animation-delay: calc(var(--i) * -0.83s);
}
.op-fb.is-ok .op-fb__sat,
.op-fb.is-err .op-fb__sat {
    opacity: 0;
    transition: opacity .25s;
    animation: none;
}
.op-fb.is-ok .op-fb__mesh {
    animation: none;
    background: conic-gradient(from 210deg,
        oklch(0.78 0.17 155), oklch(0.7 0.16 145), oklch(0.82 0.12 175), oklch(0.78 0.17 155));
}
.op-fb.is-err .op-fb__mesh {
    animation: none;
    background: conic-gradient(from 210deg,
        oklch(0.68 0.2 25), oklch(0.62 0.22 15), oklch(0.72 0.16 40), oklch(0.68 0.2 25));
}
.op-fb.is-ok .op-fb__caustic,
.op-fb.is-err .op-fb__caustic { animation: none; opacity: .35; }
.op-fb__svg {
    position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px);
    z-index: 4;
}
.op-fb__mark { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.op-fb__check, .op-fb__cross { opacity: 0; }
.op-fb__check {
    stroke: #fff;
    stroke-dasharray: 52;
    stroke-dashoffset: 52;
    filter: drop-shadow(0 2px 8px oklch(0.4 0.12 155 / .5));
}
.op-fb__cross {
    stroke: #fff;
    stroke-dasharray: 34;
    stroke-dashoffset: 34;
    filter: drop-shadow(0 2px 8px oklch(0.4 0.16 25 / .5));
}
.op-fb.is-ok .op-fb__check {
    opacity: 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .55s cubic-bezier(.2,.8,.2,1) .1s, opacity .2s;
}
.op-fb.is-err .op-fb__cross {
    opacity: 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .42s cubic-bezier(.2,.8,.2,1) .1s, opacity .2s;
}
.op-fb__msg {
    min-width: 168px; max-width: 420px; padding: 11px 20px;
    border-radius: 18px;
    background: color-mix(in oklch, canvas 18%, oklch(0.22 0.04 250 / .62));
    border: 1px solid oklch(1 0 0 / .12);
    color: #f8fafc; font-size: 14px; font-weight: 700; letter-spacing: .02em;
    text-align: center; line-height: 1.35;
    box-shadow: 0 14px 40px oklch(0.2 0.05 250 / .35);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
[data-theme="light"] .op-fb__msg {
    background: oklch(1 0 0 / .86);
    color: #0f172a;
    border-color: oklch(0.3 0.02 250 / .08);
}
.op-fb__msg[hidden] { display: none !important; }
.op-fb.is-ok .op-fb__msg { border-color: oklch(0.78 0.14 155 / .45); color: oklch(0.86 0.12 155); }
.op-fb.is-err .op-fb__msg { border-color: oklch(0.72 0.16 25 / .45); color: oklch(0.84 0.12 25); }
[data-theme="light"] .op-fb.is-ok .op-fb__msg { color: #047857; }
[data-theme="light"] .op-fb.is-err .op-fb__msg { color: #b91c1c; }
.op-fb__copy { display: none !important; }
.op-fb.is-wait .op-fb__stage { animation: op-fb-in .34s cubic-bezier(.16,1,.3,1); }
.op-fb.is-ok .op-fb__core, .op-fb.is-err .op-fb__core { animation: op-fb-pop .48s cubic-bezier(.2,1.4,.3,1); }
.op-fb.is-out { animation: op-fb-out .32s ease-in forwards; }
@keyframes op-a { to { --op-a: 360deg; } }
@keyframes op-h { to { --op-h: 585; } }
@keyframes op-orbit { to { offset-distance: calc(var(--i) * 33.333% + 100%); } }
@keyframes op-fb-breathe {
    0%, 100% { transform: scale(.92); opacity: .75; }
    50% { transform: scale(1.08); opacity: 1; }
}
@keyframes op-fb-in {
    from { opacity: 0; transform: translateY(12px) scale(.86); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: none; }
}
@keyframes op-fb-pop {
    0% { transform: scale(.88); }
    55% { transform: scale(1.07); }
    100% { transform: none; }
}
@keyframes op-fb-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .op-fb.is-wait .op-fb__mesh,
    .op-fb.is-wait .op-fb__caustic,
    .op-fb.is-wait .op-fb__aura,
    .op-fb.is-wait .op-fb__sat { animation: none; }
    .op-fb.is-wait .op-fb__stage, .op-fb.is-ok .op-fb__core, .op-fb.is-err .op-fb__core, .op-fb.is-out { animation: none; }
    .op-fb__check, .op-fb__cross { transition: none; stroke-dashoffset: 0; }
    .list-orb__mesh, .list-orb__caustic, .list-orb__aura { animation: none; }
}

.table-responsive.is-filtering,
.pagination-wrapper.is-filtering,
.cadastro-list.is-filtering,
.ponto-resumo-main.is-filtering,
.ponto-table-wrap.is-filtering,
[data-clip-card="hist"].is-filtering,
.md-grid.is-filtering,
.md-lista.is-filtering,
.js-rel-list.is-filtering {
    position: relative;
    pointer-events: none;
}
.list-orb {
    position: absolute; inset: 0; z-index: 8;
    display: flex; align-items: flex-start; justify-content: center;
    pointer-events: none;
    background: color-mix(in oklch, var(--card) 42%, transparent);
    animation: list-orb-in 140ms ease-out both;
}
@keyframes list-orb-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .list-orb { animation: none; }
}
.list-orb__pin {
    position: sticky; top: 38%;
    margin-top: 36px;
}
.list-orb__orb { position: relative; width: 56px; height: 56px; }
.list-orb__aura {
    position: absolute; inset: -18px;
    border-radius: 50%;
    background: conic-gradient(from var(--op-a),
        oklch(0.7 0.18 230 / .0),
        oklch(0.72 0.2 200 / .4),
        oklch(0.68 0.22 280 / .35),
        oklch(0.74 0.16 160 / .3),
        oklch(0.7 0.18 230 / .0));
    filter: blur(10px);
    animation: op-a 3.6s linear infinite, op-fb-breathe 2.4s ease-in-out infinite;
}
.list-orb__core {
    position: relative; z-index: 2;
    width: 56px; height: 56px;
    border-radius: 50%;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 10px 24px oklch(0.3 0.08 250 / .35),
        inset 0 1px 0 oklch(1 0 0 / .35);
}
.list-orb__core::after {
    content: "";
    position: absolute; inset: 0; border-radius: 50%;
    box-shadow: inset 0 -10px 12px oklch(0.2 0.05 250 / .32), inset 0 6px 8px oklch(1 0 0 / .16);
    pointer-events: none;
}
.list-orb__spin { position: absolute; inset: 0; }
.list-orb__mesh,
.list-orb__caustic { position: absolute; inset: -20%; border-radius: 50%; }
.list-orb__mesh {
    background: conic-gradient(from var(--op-a),
        oklch(0.68 0.2 calc(var(--op-h) + 0)),
        oklch(0.78 0.16 calc(var(--op-h) + 55)),
        oklch(0.64 0.22 calc(var(--op-h) + 130)),
        oklch(0.74 0.18 calc(var(--op-h) + 210)),
        oklch(0.7 0.2 calc(var(--op-h) + 290)),
        oklch(0.68 0.2 calc(var(--op-h) + 360)));
    animation: op-a 2.8s linear infinite, op-h 9s linear infinite;
}
.list-orb__caustic {
    background: conic-gradient(from calc(var(--op-a) * -1.4),
        transparent 0 18%,
        oklch(0.92 0.08 220 / .45) 22%,
        transparent 32% 58%,
        oklch(0.9 0.1 300 / .35) 64%,
        transparent 74% 100%);
    mix-blend-mode: screen;
    opacity: .7;
    animation: op-a 4.4s linear infinite reverse;
}
.list-orb__spec {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 32% 26%, oklch(1 0 0 / .72) 0 8%, oklch(1 0 0 / .14) 24%, transparent 46%);
    mix-blend-mode: soft-light;
}

.sys-dlg {
    position: fixed; inset: 0; z-index: 45000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px 16px;
    overflow: hidden;
}
.sys-dlg[hidden] { display: none !important; }
.sys-dlg.is-on .sys-dlg__scrim { animation: sys-dlg-scrim .28s ease-out; }
.sys-dlg.is-on .sys-dlg__panel { animation: sys-dlg-in .36s cubic-bezier(.22, 1, .36, 1); }
.sys-dlg__scrim {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
[data-theme="light"] .sys-dlg__scrim { background: rgba(15, 23, 42, .38); }
.sys-dlg__panel {
    position: relative; z-index: 1;
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    display: flex; flex-direction: column;
    overflow: hidden;
    padding: 28px 24px 20px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 56px rgba(15, 23, 42, .36);
    text-align: center;
}
@keyframes sys-dlg-scrim {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes sys-dlg-in {
    from { opacity: 0; transform: translateY(calc(-50vh - 40px)); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sys-dlg.is-on .sys-dlg__scrim,
    .sys-dlg.is-on .sys-dlg__panel { animation: none; }
}
.sys-dlg__icon {
    width: 52px; height: 52px; margin: 0 auto 14px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.sys-dlg.is-danger .sys-dlg__icon,
.sys-dlg.is-error .sys-dlg__icon { background: var(--danger-bg); color: var(--danger); }
.sys-dlg.is-warn .sys-dlg__icon { background: var(--warning-bg); color: #d97706; }
.sys-dlg.is-info .sys-dlg__icon { background: #dbeafe; color: var(--primary); }
.sys-dlg.is-ok .sys-dlg__icon { background: var(--success-bg); color: var(--success); }
[data-theme="dark"] .sys-dlg.is-danger .sys-dlg__icon,
[data-theme="dark"] .sys-dlg.is-error .sys-dlg__icon { background: rgba(239, 68, 68, .16); }
[data-theme="dark"] .sys-dlg.is-warn .sys-dlg__icon { background: rgba(245, 158, 11, .16); color: #fbbf24; }
[data-theme="dark"] .sys-dlg.is-info .sys-dlg__icon { background: rgba(37, 99, 235, .18); }
[data-theme="dark"] .sys-dlg.is-ok .sys-dlg__icon { background: rgba(16, 185, 129, .16); }
.sys-dlg__title {
    margin: 0 0 8px;
    font-size: 18px; font-weight: 500; color: var(--title);
    flex-shrink: 0;
}
.sys-dlg__msg {
    margin: 0 0 16px;
    font-size: 14px; font-weight: 500; color: var(--muted);
    line-height: 1.5; white-space: pre-line;
    overflow: auto; min-height: 0; flex: 1 1 auto;
    overscroll-behavior: contain;
    text-align: left;
}
.sys-dlg__msg[hidden] { display: none !important; }
.sys-dlg__actions {
    display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
    flex-shrink: 0;
}
.sys-dlg__btn {
    min-width: 108px; height: 40px; padding: 0 16px;
    border-radius: 10px; font-weight: 700; font-size: 13px;
    cursor: pointer; border: 0; font-family: inherit;
}
.sys-dlg__btn--ghost {
    background: var(--card); color: var(--text);
    border: 1px solid var(--border);
}
.sys-dlg__btn--ghost[hidden] { display: none !important; }
.sys-dlg__btn--ok { background: var(--primary); color: #fff; }
.sys-dlg.is-danger .sys-dlg__btn--ok,
.sys-dlg.is-error .sys-dlg__btn--ok { background: var(--danger); color: #fff; }
.sys-dlg.is-warn .sys-dlg__btn--ok { background: var(--warning); color: #1c1917; }

/* ----------------------------------------------------------
   Títulos: cor em vez de bold. Tabelas/labels 500–600.
   Botões e valores KPI mantêm peso forte.
   ---------------------------------------------------------- */
.main-content .page-title,
.main-content h1 {
    font-weight: 500;
    color: var(--title);
}
.main-content table thead th,
.main-content .rh-table th,
.main-content .table-responsive thead th {
    font-weight: 600;
}
.main-content table tbody td,
.main-content .rh-table td,
.main-content .table-premium td,
.main-content .table-modern td {
    font-weight: 500;
}
.main-content table tbody td strong,
.main-content .rh-table td strong {
    font-weight: 600;
}
.main-content .sort-link {
    font-weight: 600;
}
.main-content label,
.main-content .form-label,
.main-content .summary-label,
.main-content .kpi-label,
.main-content .admin-form label {
    font-weight: 600;
}
