:root {
    --lux-ocean-deep: #0B6DAE;
    --lux-ocean: #2A9ED4;
    --lux-ocean-soft: #e0f7ff;
    --lux-aqua: #14b8a6;
    --lux-mint: #ccfbf1;
    --lux-ice: #f8fdff;
    --lux-cloud: #eef8fb;
    --lux-surface: rgba(255, 255, 255, 0.94);
    --lux-surface-solid: #ffffff;
    --lux-border: rgba(125, 178, 196, 0.34);
    --lux-text: #0f2437;
    --lux-muted: #334155;
    --lux-danger: #b91c1c;
    --lux-warning: #92400e;
    --lux-success: #0f766e;
    --lux-shadow: 0 22px 58px rgba(7, 89, 133, 0.10), 0 8px 20px rgba(15, 36, 55, 0.05);
    --lux-shadow-soft: 0 12px 30px rgba(7, 89, 133, 0.08);
    --lux-radius: 22px;
    --lux-radius-md: 16px;
    --lux-radius-sm: 12px;
    --nefro-primary: var(--lux-ocean);
    --nefro-primary-dark: var(--lux-ocean-deep);
    --nefro-primary-soft: var(--lux-ocean-soft);
    --nefro-accent: var(--lux-aqua);
    --nefro-bg: var(--lux-ice);
    --nefro-surface: var(--lux-surface);
    --nefro-surface-soft: rgba(246, 252, 255, 0.94);
    --nefro-text: var(--lux-text);
    --nefro-muted: var(--lux-muted);
    --nefro-border: var(--lux-border);
    --nefro-shadow: var(--lux-shadow-soft);
    --primary: var(--lux-ocean);
    --primary-dark: var(--lux-ocean-deep);
    --bg: var(--lux-ice);
    --bg-body: var(--lux-ice);
    --surface: var(--lux-surface);
    --text: var(--lux-text);
    --text-main: var(--lux-text);
    --text-muted: var(--lux-muted);
    --border: var(--lux-border);
}

html {
    color-scheme: light;
    background: linear-gradient(135deg, #f8fdff 0%, #eef8fb 52%, #e5f7fb 100%);
}

html::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 5px;
    z-index: 2147483000;
    pointer-events: none;
    background: linear-gradient(90deg, #0B6DAE 0%, #2A9ED4 35%, #14b8a6 72%, #7dd3fc 100%);
    box-shadow: 0 2px 14px rgba(2, 132, 199, 0.16);
}

body {
    color: var(--lux-text);
    background:
        radial-gradient(900px 440px at 6% -8%, rgba(20, 184, 166, 0.13), transparent 62%),
        radial-gradient(820px 400px at 92% 2%, rgba(2, 132, 199, 0.12), transparent 64%),
        linear-gradient(135deg, #fbfeff 0%, #f0f9ff 48%, #ecfeff 100%);
    font-family: "Inter", "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.70), rgba(255, 255, 255, 0.18)),
        radial-gradient(circle at 18% 24%, rgba(125, 211, 252, 0.11), transparent 28%),
        radial-gradient(circle at 80% 18%, rgba(153, 246, 228, 0.13), transparent 30%);
}

:where(body, p, span, label, td, th, input, select, textarea, button, a, small, li) {
    letter-spacing: -0.005em;
}

:where(a) {
    color: var(--lux-ocean-deep);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

:where(h1, h2, h3, h4, h5, h6, .page-title, .section-title, .card-title, .module-title, .dashboard-title) {
    color: var(--lux-text);
    letter-spacing: -0.025em;
    text-wrap: balance;
}

:where(.ocean-gradient-text, .lux-gradient-title) {
    background: linear-gradient(110deg, var(--lux-ocean-deep), var(--lux-ocean), var(--lux-aqua));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

:where(.container, .page-container, .page-shell, .shell, .app-shell, .layout, .sistema-wrapper, main.container) {
    max-width: min(1540px, calc(100vw - 32px));
}

:where(header:not(.festival-header):not(.login-card header):not(.modal-header), .main-header, .dashboard-header, .module-hero, .topbar, .portal-operational-head, .config-header, .inventory-header, .reports-header, .proposal-head, .os-topbar, .ponto-header) {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.82)),
        radial-gradient(500px 180px at 100% 0%, rgba(20, 184, 166, 0.14), transparent 68%);
    border: 1px solid var(--lux-border);
    border-radius: var(--lux-radius);
    box-shadow: var(--lux-shadow-soft);
    color: var(--lux-text);
}

:where(.card, .module-card, .dashboard-card, .metric-card, .stat-card, .summary-card, .panel, .box, .tile, .widget, .list-card, .form-card, .table-card, .portal-card, .service-card, .action-card, .feature-card, .info-card, .glass-card, .kpi-card, .section-card, .sistema-card, .user-card, .budget-card, .queue-card, .timeline-card, .data-card, .finance-card, .permission-card, .module-tile, .menu-card, .shortcut-card) {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 253, 255, 0.88));
    border: 1px solid var(--lux-border);
    border-radius: var(--lux-radius);
    box-shadow: var(--lux-shadow-soft);
    color: var(--lux-text);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

:where(.card, .module-card, .dashboard-card, .metric-card, .stat-card, .tile, .widget, .portal-card, .service-card, .action-card, .feature-card, .menu-card, .shortcut-card) {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

:where(.card, .module-card, .dashboard-card, .metric-card, .stat-card, .tile, .widget, .portal-card, .service-card, .action-card, .feature-card, .menu-card, .shortcut-card):hover {
    border-color: rgba(2, 132, 199, 0.30);
    box-shadow: var(--lux-shadow);
    transform: translateY(-2px);
}

:where(.sistema-btn, .btn-premium, .btn-primary, .primary-action, .action-primary) {
    border-radius: 999px;
    border: 1px solid rgba(2, 132, 199, 0.20);
    background: linear-gradient(135deg, var(--lux-ocean-deep), var(--lux-ocean), var(--lux-aqua));
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(2, 132, 199, 0.18);
    font-weight: 700;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

:where(.sistema-btn, .btn-premium, .btn-primary, .primary-action, .action-primary):hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(2, 132, 199, 0.22);
}

:where(.btn-secondary, .secondary-action, .btn-light, .btn-outline, button[data-variant="secondary"], a.secondary) {
    background: rgba(255, 255, 255, 0.90);
    color: var(--lux-ocean-deep);
    border-color: rgba(2, 132, 199, 0.26);
    box-shadow: 0 10px 22px rgba(7, 89, 133, 0.08);
}

:where(.btn-danger, button[data-action*="excluir"], button[data-action*="delete"]) {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #ffffff;
    border-color: rgba(220, 38, 38, 0.28);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.16);
}

:where(.btn-warning, button[data-action*="reprovar"], button[data-action*="recusar"]) {
    background: linear-gradient(135deg, #b7791f, #f59e0b);
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.30);
}

:where(input, select, textarea, .input, .form-control, .form-select, .sistema-input) {
    background: rgba(255, 255, 255, 0.94);
    color: var(--lux-text);
    border: 1px solid rgba(148, 190, 205, 0.44);
    border-radius: var(--lux-radius-sm);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 18px rgba(7, 89, 133, 0.04);
    outline: none;
}

:where(input, select, textarea, .input, .form-control, .form-select, .sistema-input):focus {
    border-color: rgba(2, 132, 199, 0.70);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14), 0 12px 26px rgba(7, 89, 133, 0.08);
}

:where(label, .form-label) {
    color: var(--lux-ocean-deep);
    font-weight: 700;
}

:where(fieldset, .fieldset, .form-section, .filter-box, .filters, .search-box, .toolbar, .actions-bar) {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--lux-border);
    border-radius: var(--lux-radius-md);
    box-shadow: 0 10px 28px rgba(7, 89, 133, 0.05);
}

:where(.data-table, .sistema-table, table.lux-table, .table-card table, .table-panel table, .table-responsive table) {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

:where(.data-table thead, .sistema-table thead, table.lux-table thead, .table-card table thead, .table-panel table thead, .table-responsive table thead) {
    color: var(--lux-ocean-deep);
}

:where(.data-table th, .sistema-table th, table.lux-table th, .table-card table th, .table-panel table th, .table-responsive table th) {
    background: rgba(224, 247, 255, 0.72);
    color: var(--lux-ocean-deep);
    border: none;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

:where(.data-table td, .sistema-table td, table.lux-table td, .table-card table td, .table-panel table td, .table-responsive table td) {
    background: rgba(255, 255, 255, 0.90);
    color: var(--lux-text);
    border-top: 1px solid rgba(148, 190, 205, 0.20);
    border-bottom: 1px solid rgba(148, 190, 205, 0.20);
}

:where(.data-table tr td:first-child, .data-table tr th:first-child, .sistema-table tr td:first-child, .sistema-table tr th:first-child, table.lux-table tr td:first-child, table.lux-table tr th:first-child, .table-card table tr td:first-child, .table-card table tr th:first-child, .table-panel table tr td:first-child, .table-panel table tr th:first-child, .table-responsive table tr td:first-child, .table-responsive table tr th:first-child) {
    border-radius: 14px 0 0 14px;
}

:where(.data-table tr td:last-child, .data-table tr th:last-child, .sistema-table tr td:last-child, .sistema-table tr th:last-child, table.lux-table tr td:last-child, table.lux-table tr th:last-child, .table-card table tr td:last-child, .table-card table tr th:last-child, .table-panel table tr td:last-child, .table-panel table tr th:last-child, .table-responsive table tr td:last-child, .table-responsive table tr th:last-child) {
    border-radius: 0 14px 14px 0;
}

:where(.data-table tbody tr, .sistema-table tbody tr, table.lux-table tbody tr, .table-card table tbody tr, .table-panel table tbody tr, .table-responsive table tbody tr) {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

:where(.data-table tbody tr:hover, .sistema-table tbody tr:hover, table.lux-table tbody tr:hover, .table-card table tbody tr:hover, .table-panel table tbody tr:hover, .table-responsive table tbody tr:hover) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(7, 89, 133, 0.08);
}

:where(.badge, .status-badge, .pill, .tag, .chip, .label-status) {
    border-radius: 999px;
    border: 1px solid rgba(2, 132, 199, 0.20);
    background: rgba(224, 247, 255, 0.82);
    color: var(--lux-ocean-deep);
    font-weight: 800;
}

:where(.status-success, .badge-success, .badge.aprovado, .badge.ativo) {
    background: rgba(204, 251, 241, 0.86);
    color: var(--lux-success);
}

:where(.status-danger, .badge-danger, .badge.reprovado, .badge.bloqueado) {
    background: rgba(254, 226, 226, 0.88);
    color: var(--lux-danger);
}

:where(.status-warning, .badge-warning, .badge.pendente) {
    background: rgba(254, 243, 199, 0.90);
    color: var(--lux-warning);
}

.badge.bg-success,
.badge.text-bg-success,
.btn-success {
    background: #0f766e !important;
    color: #ffffff !important;
    border-color: rgba(15, 118, 110, 0.32) !important;
}

.badge.bg-danger,
.badge.text-bg-danger,
.btn-danger {
    background: #b91c1c !important;
    color: #ffffff !important;
    border-color: rgba(185, 28, 28, 0.32) !important;
}

.badge.bg-warning,
.badge.text-bg-warning,
.btn-warning {
    background: #f59e0b !important;
    color: #111827 !important;
    border-color: rgba(245, 158, 11, 0.34) !important;
}

.badge.bg-info,
.badge.text-bg-info,
.btn-info {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: rgba(2, 132, 199, 0.32) !important;
}

.pill-success,
.chip-success,
.status-success {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.pill-warning,
.chip-warning,
.status-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.pill-danger,
.chip-danger,
.status-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

:where(input:disabled, select:disabled, textarea:disabled) {
    opacity: 1;
    background: #f1f5f9;
    color: #475569;
}

:where(nav, .sidebar, .side-nav, .menu, .top-nav, .navbar) {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--lux-border);
    box-shadow: 0 14px 34px rgba(7, 89, 133, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

:where(.modal-content, dialog, .drawer, .popover, .dropdown-menu) {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--lux-border);
    border-radius: var(--lux-radius);
    box-shadow: var(--lux-shadow);
    color: var(--lux-text);
}

:where(hr, .divider) {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.24), transparent);
}

:where(.text-white, .text-light, [style*="color:white"], [style*="color: white"], [style*="color:#fff"], [style*="color: #fff"]) {
    text-shadow: 0 1px 3px rgba(6, 37, 58, 0.18);
}

:where(.fin-hero, .cli-hero, .tech-hero, .supv-hero, .ger-hero, .dir-hero, .ceo-hero, .portal-hero, .hero-dark, .dark-hero) :where(h1, h2, h3, h4, h5, h6, p, span, small) {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(224, 247, 255, 0.45);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--lux-ocean), var(--lux-aqua));
    border-radius: 999px;
    border: 2px solid rgba(248, 253, 255, 0.92);
}

@media (max-width: 900px) {
    html::before {
        height: 4px;
    }

    :where(.container, .page-container, .page-shell, .shell, .app-shell, .layout, .sistema-wrapper, main.container) {
        max-width: calc(100vw - 20px);
    }

    :where(header:not(.festival-header):not(.login-card header):not(.modal-header), .main-header, .dashboard-header, .module-hero, .topbar, .portal-operational-head, .card, .module-card, .dashboard-card, .metric-card, .stat-card, .panel, .box, .tile, .widget, .portal-card, .service-card, .action-card, .feature-card) {
        border-radius: 18px;
    }
}
