:root {
    --prv-primary: #3b6da5;
    --prv-primary-soft: #edf4fb;
    --prv-primary-muted: #6b9fd4;
    --prv-surface-muted: #f8f9fb;
    --prv-surface-subtle: #f1f3f7;
    --prv-sidebar-bg: #0a0f1a;
    --prv-page-bg: #f0f4f8;
    --prv-surface: #ffffff;
    --prv-border-soft: #dbe4ef;
    --prv-meta: #94a3b8;
    --prv-radius-input: 12px;
    --prv-radius-btn: 14px;
    --prv-radius-strip: 1.25rem;
    --prv-radius-soft: 12px;
    --prv-radius-panel: 24px;
    --prv-shadow-soft: 0 8px 30px rgba(15, 23, 42, 0.08);
    --prv-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.05);
    --prv-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --prv-layout-offset: 224px;
    --prv-success: #10b981;
    --prv-success-soft: #ecfdf5;
    --prv-danger: #dc2626;
    --prv-danger-soft: #fef2f2;
    --prv-warning: #d97706;
    --prv-warning-soft: #fffbeb;
    --prv-purple: #7c3aed;
    --prv-purple-soft: #f5f3ff;
    --prv-cyan: #0891b2;
    --prv-cyan-soft: #ecfeff;
    --prv-pink: #db2777;
    --prv-pink-soft: #fdf2f8;
    --prv-indigo: #4f46e5;
    --prv-indigo-soft: #eef2ff;
    --prv-teal: #0d9488;
    --prv-teal-soft: #f0fdfa;
    --prv-rose: #e11d48;
    --prv-rose-soft: #fff1f2;
    --bg: var(--prv-page-bg);
    --surface: var(--prv-surface);
    --surface-2: var(--prv-surface-muted);
    --surface-3: var(--prv-surface-subtle);
    --border: var(--prv-border-soft);
    --border-light: #eef0f4;
    --text-1: #0f172a;
    --text-2: #475569;
    --text-3: var(--prv-meta);
    --blue: var(--prv-primary);
    --blue-soft: var(--prv-primary-soft);
    --blue-muted: var(--prv-primary-muted);
    --green: var(--prv-success);
    --green-soft: var(--prv-success-soft);
    --red: var(--prv-danger);
    --red-soft: var(--prv-danger-soft);
    --amber: var(--prv-warning);
    --amber-soft: var(--prv-warning-soft);
    --purple: var(--prv-purple);
    --purple-soft: var(--prv-purple-soft);
    --cyan: var(--prv-cyan);
    --cyan-soft: var(--prv-cyan-soft);
    --pink: var(--prv-pink);
    --pink-soft: var(--prv-pink-soft);
    --indigo: var(--prv-indigo);
    --indigo-soft: var(--prv-indigo-soft);
    --teal: var(--prv-teal);
    --teal-soft: var(--prv-teal-soft);
    --rose: var(--prv-rose);
    --rose-soft: var(--prv-rose-soft);
    --R: 16px;
    --Rs: 12px;
    --Rl: 24px;
    --sh: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02);
    --sh-md: var(--prv-shadow-md);
    --sh-lg: var(--prv-shadow-lg);
    --T: .25s cubic-bezier(.4,0,.2,1);
}

body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
    background: var(--prv-page-bg) !important;
}

#content {
    margin-left: var(--prv-layout-offset) !important;
    background: var(--prv-page-bg) !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Many legacy pages use wrappers other than #content. */
.main-container,
.main-content,
.page-content,
.content-area,
.dashboard-content {
    margin-left: var(--prv-layout-offset) !important;
    margin-top: 88px !important;
    padding: 24px !important;
    background: var(--prv-page-bg) !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.prv-main-root {
    margin-left: var(--prv-layout-offset) !important;
    margin-top: 88px !important;
    padding: 24px !important;
    min-height: calc(100vh - 88px);
    background: var(--prv-page-bg) !important;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Keep content aligned with the real sidebar state (full/mini/hover). */
#sidebar.mini ~ #content,
#sidebar.mini ~ div#content,
#sidebar.mini ~ .main-container,
#sidebar.mini ~ .main-content,
#sidebar.mini ~ .page-content,
#sidebar.mini ~ .content-area,
#sidebar.mini ~ .dashboard-content,
#content.mini {
    margin-left: 70px !important;
}

#sidebar.mini:hover ~ #content,
#sidebar.mini:hover ~ div#content,
#sidebar.mini:hover ~ .main-container,
#sidebar.mini:hover ~ .main-content,
#sidebar.mini:hover ~ .page-content,
#sidebar.mini:hover ~ .content-area,
#sidebar.mini:hover ~ .dashboard-content,
#sidebar:not(.mini) ~ #content,
#sidebar:not(.mini) ~ div#content,
#sidebar:not(.mini) ~ .main-container,
#sidebar:not(.mini) ~ .main-content,
#sidebar:not(.mini) ~ .page-content,
#sidebar:not(.mini) ~ .content-area,
#sidebar:not(.mini) ~ .dashboard-content {
    margin-left: 224px !important;
}

body.prv-sidebar-mini {
    --prv-layout-offset: 70px;
}

body.prv-sidebar-full {
    --prv-layout-offset: 224px;
}

body.prv-sidebar-mobile {
    --prv-layout-offset: 0px;
}

body.prv-no-top-header #content,
body.prv-no-top-header .main-container,
body.prv-no-top-header .main-content,
body.prv-no-top-header .page-content,
body.prv-no-top-header .content-area,
body.prv-no-top-header .dashboard-content,
body.prv-no-top-header .prv-main-root {
    margin-top: 24px !important;
}

@media (max-width: 768px) {
    #content,
    .main-container,
    .main-content,
    .page-content,
    .content-area,
    .dashboard-content {
        margin-left: 0 !important;
        margin-top: 84px !important;
        padding: 16px !important;
    }

    .prv-main-root {
        margin-left: 0 !important;
        margin-top: 84px !important;
        padding: 16px !important;
    }
}

/* Home-derived visual system */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1a2a44 100%) !important;
    border-radius: 2rem !important;
    padding: 38px 42px !important;
    margin-bottom: 24px !important;
    position: relative;
    overflow: hidden;
    box-shadow: var(--sh-lg) !important;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(59,109,165,.2) 0%, transparent 50%);
    pointer-events: none;
}

.hero::before,
.hero-scan {
    display: none !important;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 3;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-greeting {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.58rem;
    font-weight: 800;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 14px;
}

.hero-greeting::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: pulseDot 2s ease infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(1.8rem, 2.6vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-style: italic;
}

.hero-title span {
    color: var(--blue);
    font-style: normal;
}

.hero-clock {
    font-size: 0.82rem;
    color: rgba(148,163,184,0.8);
    font-weight: 400;
}

.hero-subtitle {
    font-size: 0.82rem;
    color: rgba(226, 232, 240, 0.9);
    font-weight: 500;
    max-width: 60rem;
}

.hero-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--T);
}

.badge-live {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.8);
    border: 1px solid rgba(255,255,255,.1);
}

.badge-alerts {
    background: var(--blue);
    color: #fff;
    border: none;
    box-shadow: 0 10px 20px rgba(59,109,165,0.35);
}

.hero-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 3;
}

.hk {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 12px 14px;
    transition: var(--T);
}

.hk:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(59,109,165,0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.hk-label {
    font-size: 0.5rem;
    font-weight: 800;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 4px;
}

.hk-val {
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hk-sub {
    font-size: 0.55rem;
    color: rgba(255,255,255,.4);
    margin-top: 4px;
    font-weight: 500;
}

.hk-bar {
    margin-top: 10px;
    height: 3px;
    background: rgba(255,255,255,.06);
    border-radius: 10px;
    overflow: hidden;
}

.hk-bar-fill {
    height: 100%;
    width: var(--bar-width, 100%);
    border-radius: 10px;
    transition: width .8s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 10px rgba(59,109,165,0.5);
    background: var(--bar-bg, linear-gradient(90deg,#3b6da5,#6b9fd4));
}

.filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.filter input[type="date"] {
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-1);
    background: var(--surface);
    transition: var(--T);
}

.filter input[type="date"]:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,109,165,.1);
}

.filter-between {
    color: var(--text-3);
    font-size: 12px;
}

.qb {
    height: 40px;
    padding: 0 18px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--T);
    white-space: nowrap;
}

.qb:hover {
    border-color: #cbd5e1;
    color: var(--text-1);
    transform: translateY(-1px);
}

.qb.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 8px 20px rgba(59,109,165,0.25);
}

.f-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

.f-period {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mod-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.mod-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 16px 14px;
    text-decoration: none;
    color: inherit;
    transition: var(--T);
    position: relative;
    overflow: hidden;
}

.mod-tile:hover {
    border-color: var(--blue);
    box-shadow: var(--sh-md);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.mod-tile-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 10px;
    background: var(--tone-bg, var(--blue-soft));
    color: var(--tone-color, var(--blue));
}

.mod-tile-val {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text-1);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.mod-tile-val.sm {
    font-size: 1rem;
}

.mod-tile-label {
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.mod-tile-sub {
    font-size: 0.55rem;
    color: var(--text-3);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.pnl {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--sh);
    transition: var(--T);
}

.pnl:hover {
    box-shadow: var(--sh-md);
}

.pnl.h-100,
.pnl.pnl-flat-bottom {
    margin-bottom: 0;
}

.pnl-h {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pnl-t {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    letter-spacing: -0.01em;
}

.pnl-t i {
    font-size: 1.1rem;
    color: var(--tone-color, var(--blue));
}

.pnl-s {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 4px;
    font-weight: 500;
}

.pnl-b {
    padding: 20px 24px;
}

.pnl-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--T);
}

.pnl-link:hover {
    gap: 10px;
    color: var(--blue-muted);
}

.pg {
    display: grid;
    gap: 14px;
}

.pg-7 { grid-template-columns: repeat(7, 1fr); }
.pg-6 { grid-template-columns: repeat(6, 1fr); }
.pg-5 { grid-template-columns: repeat(5, 1fr); }
.pg-4 { grid-template-columns: repeat(4, 1fr); }
.pg-3 { grid-template-columns: repeat(3, 1fr); }
.pg-2 { grid-template-columns: repeat(2, 1fr); }

.pill {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--T);
    position: relative;
}

.pill::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--pill-c, var(--blue));
}

.pill:hover {
    background: var(--surface);
    border-color: var(--blue-muted);
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}

.pill-l {
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .1em;
    padding-left: 12px;
}

.pill-v {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-1);
    line-height: 1;
    padding-left: 12px;
    letter-spacing: -0.03em;
}

.pill-v.sm {
    font-size: 1rem;
}

.pill-d {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-3);
    padding-left: 12px;
}

.fin-g {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fin-c {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    padding: 20px;
    position: relative;
    transition: var(--T);
}

.fin-c:hover {
    background: var(--surface);
    box-shadow: var(--sh-md);
}

.fin-c::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 0 4px 4px 0;
}

.fin-c.ro::before { background: var(--blue); }
.fin-c.so::before { background: var(--cyan); }

.fin-ct {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 16px;
    padding-left: 12px;
}

.fin-r {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 10px 12px;
}

.fin-r + .fin-r {
    border-top: 1px solid var(--border-light);
}

.fin-rl {
    font-size: 0.75rem;
    color: var(--text-2);
    font-weight: 600;
}

.fin-rv {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.fin-rv.rev { color: var(--text-1); }
.fin-rv.col { color: var(--green); }
.fin-rv.bal { color: var(--red); }

.ws-g {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.ws-c {
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 18px;
    transition: var(--T);
}

.ws-c:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
    background: var(--surface);
}

.ws-c.stuck {
    background: var(--red-soft);
    border-color: #fecaca;
}

.ws-ro {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--blue);
}

.ws-v {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-2);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-st {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 6px 14px;
    border-radius: 10px;
}

.ws-c.stuck .ws-st {
    color: var(--red);
    background: var(--surface);
    border: 1px solid #fecaca;
}

.ws-el {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-3);
}

.ws-el strong {
    color: var(--text-1);
    font-weight: 800;
}

.ws-c.stuck .ws-el strong {
    color: var(--red);
}

.feed-i {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: var(--T);
}

.feed-i:last-child {
    border-bottom: none;
}

.feed-i:hover {
    background: var(--surface-2);
    margin: 0 -24px;
    padding: 14px 24px;
    border-radius: 1rem;
    color: inherit;
    text-decoration: none;
}

.feed-i__meta {
    text-align: right;
}

.feed-n {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--blue);
}

.feed-cl {
    font-size: 0.75rem;
    color: var(--text-2);
    font-weight: 600;
}

.feed-time {
    font-size: 0.65rem;
    color: var(--text-3);
    margin-top: 4px;
    font-weight: 600;
}

.sec-div {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 36px 0 20px;
}

.sec-div-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.sec-div-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .15em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sec-div-label i {
    font-size: 0.8rem;
}

.empty,
.prv-empty,
.dashboard-empty {
    border: 1px dashed var(--border);
    border-radius: 1rem;
    background: var(--surface-2);
    color: var(--text-3);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px;
    text-align: center;
    font-weight: 700;
}

.empty.full-span {
    grid-column: 1 / -1;
}

.dashboard-detail-grid {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.dashboard-detail-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.dashboard-detail-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.dashboard-detail-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.dashboard-detail-item {
    min-width: 0;
}

.dashboard-detail-item.center {
    text-align: center;
}

.dashboard-metric {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-1);
    margin-top: 4px;
}

.dashboard-metric.compact {
    font-size: 14px;
}

.dashboard-metric.blue { color: var(--blue); }
.dashboard-metric.green { color: var(--green); }
.dashboard-metric.red { color: var(--red); }
.dashboard-metric.amber { color: var(--amber); }
.dashboard-metric.pink { color: var(--pink); }
.dashboard-metric.text { color: var(--text-1); }

.prv-overview-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.prv-overview-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--sh);
    transition: var(--T);
}

.prv-overview-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}

.prv-overview-chip__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--tone-color, var(--blue));
    color: #fff;
    box-shadow: 0 8px 20px rgba(59, 109, 165, 0.22);
}

.prv-alert.prv-alert-inline {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prv-alert__content {
    flex: 1;
}

.prv-alert__dismiss {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: currentColor;
    padding: 4px;
}

.prv-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--status-bg, #f9fafb);
    color: var(--status-fg, #6b7280);
}

.prv-status-badge--pending { --status-fg: #f59e0b; --status-bg: #fffbeb; }
.prv-status-badge--on-hold { --status-fg: #6b7280; --status-bg: #f9fafb; }
.prv-status-badge--work-in-process,
.prv-status-badge--in-progress,
.prv-status-badge--partially-closed { --status-fg: #3b6da5; --status-bg: #edf4fb; }
.prv-status-badge--completed { --status-fg: #10b981; --status-bg: #edf4fb; }
.prv-status-badge--closed { --status-fg: #1e293b; --status-bg: #f1f5f9; }
.prv-status-badge--cancelled { --status-fg: #ef4444; --status-bg: #fef2f2; }

.tone-blue { --tone-color: var(--blue); --tone-bg: var(--blue-soft); --pill-c: var(--blue); }
.tone-cyan { --tone-color: var(--cyan); --tone-bg: var(--cyan-soft); --pill-c: var(--cyan); }
.tone-green { --tone-color: var(--green); --tone-bg: var(--green-soft); --pill-c: var(--green); }
.tone-amber { --tone-color: var(--amber); --tone-bg: var(--amber-soft); --pill-c: var(--amber); }
.tone-purple { --tone-color: var(--purple); --tone-bg: var(--purple-soft); --pill-c: var(--purple); }
.tone-pink { --tone-color: var(--pink); --tone-bg: var(--pink-soft); --pill-c: var(--pink); }
.tone-indigo { --tone-color: var(--indigo); --tone-bg: var(--indigo-soft); --pill-c: var(--indigo); }
.tone-teal { --tone-color: var(--teal); --tone-bg: var(--teal-soft); --pill-c: var(--teal); }
.tone-rose { --tone-color: var(--rose); --tone-bg: var(--rose-soft); --pill-c: var(--rose); }
.tone-red { --tone-color: var(--red); --tone-bg: var(--red-soft); --pill-c: var(--red); }
.tone-text { --tone-color: #1e293b; --tone-bg: #f1f5f9; --pill-c: #1e293b; }

@media (max-width: 1400px) {
    .mod-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1200px) {
    .hero-kpis { grid-template-columns: repeat(3, 1fr); }
    .pg-7 { grid-template-columns: repeat(4, 1fr); }
    .ws-g { grid-template-columns: repeat(2, 1fr); }
    .pg-6,
    .pg-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .mod-grid { grid-template-columns: repeat(3, 1fr); }
    .pg-7 { grid-template-columns: repeat(3, 1fr); }
    .fin-g { grid-template-columns: 1fr; }
    .hero-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero {
        padding: 24px !important;
        border-radius: 1.5rem !important;
    }

    .hero-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .mod-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pg-7,
    .pg-6,
    .pg-5,
    .pg-4,
    .pg-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ws-g,
    .dashboard-detail-grid.cols-4,
    .dashboard-detail-grid.cols-3,
    .dashboard-detail-grid.cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .mod-grid { grid-template-columns: 1fr; }
    .filter { flex-direction: column; align-items: stretch; }
    .f-sep { display: none; }
    .f-period { margin-left: 0; justify-content: center; }
    .hero-kpis { grid-template-columns: 1fr; }
}

.card,
.panel,
.widget,
.stat-card,
.pnl,
.md-card,
.box,
.content-box,
.card-custom,
.type-card,
.user-card,
.list-card {
    background: var(--prv-surface);
    border-radius: var(--prv-radius-strip) !important;
    border: 1px solid var(--prv-border-soft) !important;
    box-shadow: var(--prv-shadow-soft);
}

.page-header-modern,
.page-header-actions,
.page-header,
.hero,
.hero-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0b1731 0%, #1b3d6b 62%, #244f86 100%) !important;
    border-radius: 1.5rem !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 16px 34px rgba(10, 26, 52, 0.4) !important;
    padding: 1.65rem 1.75rem !important;
    margin-bottom: 1rem !important;
}

.page-header-modern::before,
.page-header-actions::before,
.page-header::before,
.hero::before,
.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(140% 100% at 100% 50%, rgba(96, 165, 250, 0.2) 0%, rgba(96, 165, 250, 0.08) 38%, transparent 66%),
        radial-gradient(100% 130% at 0% 100%, rgba(59, 109, 165, 0.16) 0%, transparent 70%);
    pointer-events: none;
}

.page-header-modern > *,
.page-header-actions > *,
.page-header > *,
.hero > *,
.hero-card > * {
    position: relative;
    z-index: 1;
}

.page-header-modern h1,
.page-header-modern h2,
.page-header-modern h3,
.page-header-modern h4,
.page-header h1,
.page-header h2,
.page-header h3,
.page-header h4,
.page-header-modern p,
.page-header-modern .subtitle,
.page-header-modern .text-muted,
.page-header-actions h1,
.page-header-actions h2,
.page-header-actions h3,
.page-header-actions h4,
.page-header-actions .text-muted,
.hero h1, .hero h2, .hero h3, .hero h4,
.hero-card h1, .hero-card h2, .hero-card h3, .hero-card h4 {
    color: #fff !important;
}

.page-header-modern h1,
.page-header-modern h2,
.page-header h1,
.page-header h2,
.hero h1,
.hero h2,
.hero-card h1,
.hero-card h2 {
    font-style: italic;
    font-weight: 900 !important;
    letter-spacing: 0.01em;
}

.page-header-modern__meta-chip,
.page-header-modern__eyebrow,
.page-header-modern__meta span,
[class*="page-header__meta-chip"],
[class*="page-header__eyebrow"] {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #eef6ff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.75rem !important;
    padding: 0.42rem 0.72rem !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.04em;
}

.page-header-modern .btn,
.page-header-actions .btn,
.page-header .btn,
.hero .btn,
.hero-card .btn,
.page-header-modern .btn-new-type,
.page-header-modern .btn-add-modern,
.page-header-modern .btn-cancel-modern {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 0.8rem !important;
    box-shadow: none !important;
}

.page-header-modern .btn:hover,
.page-header-actions .btn:hover,
.page-header .btn:hover,
.hero .btn:hover,
.hero-card .btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.prv-hero-standard .page-header-modern__grid,
.prv-hero-standard .page-header-actions__layout,
.prv-hero-standard .page-header-actions__grid,
.prv-hero-standard .hero-grid {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.prv-hero-standard .page-header-modern__grid > :first-child,
.prv-hero-standard .page-header-actions__grid > :first-child,
.prv-hero-standard .page-header-actions__layout > :first-child {
    flex: 1 1 420px;
    min-width: 0;
}

.prv-hero-standard .page-header-modern__meta,
.prv-hero-standard .page-header-modern__hero-actions,
.prv-hero-standard .page-header-actions__buttons,
.prv-hero-standard .page-header-modern__actions,
.prv-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.prv-hero-standard .page-header-modern__meta,
.prv-hero-standard .page-header-actions__meta,
.prv-hero-meta {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
}

.prv-hero-standard .page-header-modern__summary {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
}

.prv-hero-standard .page-header-modern__subtitle,
.prv-hero-standard .page-header-actions__subtitle,
.prv-hero-standard .page-header-modern .subtitle,
.prv-hero-standard .page-subtitle,
.prv-hero-standard .page-header-actions .text-muted,
.prv-hero-standard .page-header-modern .text-muted {
    color: rgba(237, 246, 255, 0.82) !important;
    max-width: 62rem;
}

.prv-hero-standard .page-header-modern__eyebrow,
.prv-hero-standard .page-header-actions__eyebrow {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    color: #93c5fd !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 14px;
}

.prv-hero-standard .page-header-modern__eyebrow .pulse-dot,
.prv-hero-standard .page-header-actions__eyebrow .pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    flex: 0 0 auto;
}

.prv-hero-standard .page-header-modern__title,
.prv-hero-standard .page-header-actions__title,
.prv-hero-standard h3.page-header-modern__title,
.prv-hero-standard h3.page-header-actions__title,
.prv-hero-standard .page-title {
    font-size: clamp(1.8rem, 2.6vw, 2.6rem) !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin: 0 0 10px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.04em !important;
    font-style: italic !important;
}

.prv-hero-standard .page-header-modern__title span,
.prv-hero-standard .page-header-actions__title span,
.prv-hero-standard h3.page-header-modern__title span,
.prv-hero-standard h3.page-header-actions__title span,
.prv-hero-standard .page-title span {
    color: var(--blue) !important;
    font-style: normal !important;
}

.prv-hero-btn,
.prv-hero-standard .btn-hero,
.prv-hero-standard .page-header-modern__back,
.prv-hero-standard .clients-hero-btn,
.prv-hero-standard .fin-btn,
.prv-hero-standard .btn-back-modern,
.prv-hero-standard .btn-print-modern,
.prv-hero-standard .btn-find,
.prv-hero-standard .btn-custom-primary,
.prv-hero-standard .btn-add-modern,
.prv-hero-standard .btn-new-type {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.9rem;
    padding: 0.78rem 1.1rem !important;
    border-radius: 0.95rem !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    text-transform: none !important;
    box-shadow: none !important;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.prv-hero-btn:hover,
.prv-hero-standard .btn-hero:hover,
.prv-hero-standard .page-header-modern__back:hover,
.prv-hero-standard .clients-hero-btn:hover,
.prv-hero-standard .fin-btn:hover,
.prv-hero-standard .btn-back-modern:hover,
.prv-hero-standard .btn-print-modern:hover,
.prv-hero-standard .btn-find:hover,
.prv-hero-standard .btn-custom-primary:hover,
.prv-hero-standard .btn-add-modern:hover,
.prv-hero-standard .btn-new-type:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.36) !important;
    box-shadow: 0 12px 26px rgba(10, 26, 52, 0.22) !important;
}

.prv-hero-btn--primary,
.prv-hero-standard .btn-hero-primary,
.prv-hero-standard .btn-primary,
.prv-hero-standard .btn-success,
.prv-hero-standard .btn-custom-primary.prv-hero-btn--primary {
    background: linear-gradient(135deg, #3b6da5 0%, #5388c5 100%) !important;
    border-color: rgba(163, 205, 255, 0.32) !important;
    box-shadow: 0 14px 32px rgba(59, 109, 165, 0.3) !important;
}

.prv-hero-btn--primary:hover,
.prv-hero-standard .btn-hero-primary:hover,
.prv-hero-standard .btn-primary:hover,
.prv-hero-standard .btn-success:hover {
    background: linear-gradient(135deg, #315f91 0%, #4677af 100%) !important;
}

.prv-hero-standard [class*="overview-chip__label"],
.prv-hero-standard [class*="hero-glass-stat__label"],
.prv-hero-standard [class*="summary-chip__label"] {
    color: #c5d7ef !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700 !important;
}

.prv-hero-standard [class*="overview-chip__value"],
.prv-hero-standard [class*="hero-glass-stat__value"],
.prv-hero-standard [class*="summary-chip__value"] {
    color: #ffffff !important;
    font-weight: 800 !important;
}

.prv-hero-standard .hero-glass-stat,
.prv-hero-standard .page-header-modern__meta-chip,
.prv-hero-standard .page-header-actions__meta-chip {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 1rem !important;
    box-shadow: none !important;
    backdrop-filter: blur(10px);
    padding: 0.9rem 1rem !important;
    min-height: 88px;
    align-content: center;
}

.prv-hero-standard .page-header-modern__meta-chip,
.prv-hero-standard .page-header-actions__meta-chip {
    display: flex !important;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    white-space: normal !important;
}

.prv-hero-standard .page-header-modern__meta-chip i,
.prv-hero-standard .page-header-actions__meta-chip i {
    color: #93c5fd !important;
    font-size: 1rem;
    margin-top: 0.05rem;
}

@media (max-width: 768px) {
    .prv-hero-standard .page-header-modern__grid,
    .prv-hero-standard .page-header-actions__layout,
    .prv-hero-standard .page-header-actions__grid,
    .prv-hero-standard .hero-grid {
        align-items: stretch;
    }

    .prv-hero-btn,
    .prv-hero-standard .btn-hero,
    .prv-hero-standard .page-header-modern__back,
    .prv-hero-standard .btn-custom-primary,
    .prv-hero-standard .btn-add-modern,
    .prv-hero-standard .btn-new-type {
        width: 100%;
    }
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
textarea,
select,
.form-control,
.form-select {
    border-radius: var(--prv-radius-input) !important;
    border: 1px solid var(--prv-border-soft) !important;
    background: #fff !important;
    box-shadow: none !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--prv-meta) !important;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--prv-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 109, 165, 0.2) !important;
}

.btn,
button.btn {
    border-radius: var(--prv-radius-btn) !important;
    font-weight: 700 !important;
}

.btn-primary,
.btn-success,
.md-btn-primary {
    background: var(--prv-primary) !important;
    border-color: var(--prv-primary) !important;
    color: #fff !important;
}

.btn-outline-primary,
.btn-light,
.btn-secondary,
.md-btn-outline {
    background: #fff !important;
    border-color: var(--prv-primary) !important;
    color: var(--prv-primary) !important;
}

.btn-custom-primary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.8rem;
    padding: 0.78rem 1.05rem !important;
    border: 1px solid #3b6da5 !important;
    border-radius: 0.95rem !important;
    background: linear-gradient(135deg, #3b6da5 0%, #4f86c0 100%) !important;
    color: #fff !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(59, 109, 165, 0.22) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
}

.btn-custom-primary:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(59, 109, 165, 0.28) !important;
    filter: saturate(1.06);
}

label,
.form-label,
th,
.meta-label,
.field-label {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--prv-meta) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 900 !important;
}

.prv-title-italic,
.page-title em,
.heading-emphasis {
    font-style: italic;
}

table {
    border-collapse: separate !important;
    border-spacing: 0 10px !important;
}

table tbody tr {
    background: #fff;
    box-shadow: var(--prv-shadow-soft);
}

table tbody tr td:first-child {
    border-top-left-radius: var(--prv-radius-strip);
    border-bottom-left-radius: var(--prv-radius-strip);
}

table tbody tr td:last-child {
    border-top-right-radius: var(--prv-radius-strip);
    border-bottom-right-radius: var(--prv-radius-strip);
}

.filter-bar,
.filters-wrap,
.search-wrap,
.stats-wrap,
.data-wrap,
.module-section {
    background: #fff;
    border: 1px solid var(--prv-border-soft);
    border-radius: var(--prv-radius-strip);
    padding: 20px !important;
}

[class*="section-card"],
[class*="form-card"],
[class*="summary-card"],
[class*="detail-card"],
[class*="workspace-card"],
[class*="table-card"],
[class*="report-card"],
[class*="section-panel"],
[class*="workspace-panel"] {
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 1.15rem !important;
    box-shadow: var(--prv-shadow-soft) !important;
    padding: 1.1rem !important;
    margin-bottom: 1rem !important;
}

[class*="section-toolbar"],
[class*="toolbar-modern"],
[class*="card-header-modern"],
[class*="workspace-toolbar"],
[class*="filter-toolbar"] {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 0.95rem;
}

[class*="section-toolbar"] h5,
[class*="toolbar-modern"] h5,
[class*="card-header-modern"] h5,
[class*="workspace-toolbar"] h5,
[class*="filter-toolbar"] h5 {
    margin: 0;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

[class*="section-toolbar"] small,
[class*="toolbar-modern"] small,
[class*="card-header-modern"] small,
[class*="workspace-toolbar"] small,
[class*="filter-toolbar"] small {
    color: var(--prv-meta) !important;
}

.form-card-modern,
.summary-card-modern,
.detail-card-modern,
.workspace-card-modern {
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 1.25rem !important;
    box-shadow: var(--prv-shadow-soft) !important;
}

.form-card-modern .section-title,
.summary-card-modern .section-title,
.detail-card-modern .section-title,
.workspace-card-modern .section-title {
    margin: 0;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.sec-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-toolbar__title {
    margin: 0;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.filter-toolbar__subtitle {
    font-size: 0.8rem;
    color: #718096;
}

.summary-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.hero-glass-stat {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 1rem !important;
    box-shadow: none !important;
    backdrop-filter: blur(10px);
}

.btn-hero,
.page-header-modern__back {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Generic fallback styling for pages with modern-* class naming */
[class*="overview-strip"],
[class*="stats-row"],
[class*="summary-strip"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

[class*="overview-chip"]:not([class*="__"]),
[class*="stat-card-modern"],
[class*="summary-chip"]:not([class*="__"]) {
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 16px !important;
    box-shadow: var(--prv-shadow-soft);
    padding: 14px 16px !important;
}

[class*="overview-chip__label"],
[class*="summary-chip__label"] {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 0 7px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #64748b !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    line-height: 1.25 !important;
    text-transform: uppercase !important;
    white-space: normal !important;
}

[class*="overview-chip__value"],
[class*="summary-chip__value"] {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #0f172a !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    font-variant-numeric: tabular-nums !important;
}

[class*="overview-chip__hint"],
[class*="summary-chip__hint"] {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #94a3b8 !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
}

[class*="overview-chip__icon"],
[class*="summary-chip__icon"] {
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.stats-row,
.types-grid,
.users-grid,
.cards-grid,
.dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px !important;
}

.stats-row > *,
.types-grid > *,
.users-grid > *,
.cards-grid > *,
.dashboard-grid > * {
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 16px !important;
    box-shadow: var(--prv-shadow-soft);
    padding: 14px 16px !important;
}

.filter-bar-modern,
.search-panel-modern {
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 16px !important;
    padding: 14px 16px !important;
    margin-bottom: 14px !important;
}

.search-box-modern input,
.search-box-modern .form-control {
    min-height: 40px;
}

.table-responsive,
.table-wrap,
.list-wrap {
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 1rem !important;
    padding: 10px !important;
}

.is-active-glow:focus,
.is-active-glow.active,
.btn-primary:focus,
.btn-primary.active {
    box-shadow: 0 0 0 0.2rem rgba(59, 109, 165, 0.25), 0 0 16px rgba(59, 109, 165, 0.3) !important;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 40px !important;
    border-radius: var(--prv-radius-input) !important;
    border: 1px solid var(--prv-border-soft) !important;
    background: #fff !important;
}

.select2-dropdown {
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15) !important;
    backdrop-filter: blur(8px);
}

.flatpickr-calendar {
    border-radius: 14px !important;
    border: 1px solid var(--prv-border-soft) !important;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--prv-primary) !important;
    border-color: var(--prv-primary) !important;
}

/* Unified report polish for legacy report pages.
   Keeps old markup working while matching the newer finance report layout. */
.kpi-card {
    min-height: 128px !important;
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 18px !important;
    padding: 18px !important;
    box-shadow: var(--prv-shadow-soft) !important;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--prv-shadow-card) !important;
    border-color: rgba(59, 109, 165, .24) !important;
}

.kpi-icon-wrapper {
    width: 48px !important;
    height: 48px !important;
    border-radius: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 14px !important;
    color: #fff !important;
    font-size: 1.2rem !important;
    box-shadow: 0 14px 26px rgba(15, 23, 42, .14) !important;
}

.card-blue .kpi-icon-wrapper { background: linear-gradient(135deg, #3b6da5, #60a5fa) !important; }
.card-green .kpi-icon-wrapper { background: linear-gradient(135deg, #16a34a, #22c55e) !important; }
.card-purple .kpi-icon-wrapper { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; }
.card-orange .kpi-icon-wrapper { background: linear-gradient(135deg, #f59e0b, #f97316) !important; }

.kpi-title {
    color: #64748b !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    margin-bottom: 6px !important;
}

.kpi-value {
    color: #0f172a !important;
    font-size: 1.35rem !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    font-variant-numeric: tabular-nums !important;
}

.kpi-sub {
    margin-top: 12px !important;
    color: #94a3b8 !important;
    font-size: .72rem !important;
    font-weight: 600 !important;
}

.filter-container,
.filter-container-modern,
.table-container,
.table-card-modern {
    background: #fff !important;
    border: 1px solid var(--prv-border-soft) !important;
    border-radius: 18px !important;
    box-shadow: var(--prv-shadow-soft) !important;
}

.filter-container,
.filter-container-modern {
    padding: 18px !important;
    margin-bottom: 18px !important;
}

.table-container,
.table-card-modern {
    overflow: hidden !important;
    margin-bottom: 18px !important;
}

.table-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    padding: 16px 18px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
    margin: 0 !important;
}

.filter-badge-modern {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 7px 12px !important;
    border-radius: 999px !important;
    background: rgba(59, 109, 165, .08) !important;
    border: 1px solid rgba(59, 109, 165, .14) !important;
    color: var(--prv-primary, #3b6da5) !important;
    font-size: .73rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.custom-table,
.table-modern {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: .8rem !important;
}

.custom-table thead,
.table-modern thead {
    background: #f8fafc !important;
    border-bottom: 1px solid rgba(148, 163, 184, .22) !important;
}

.custom-table th,
.table-modern th {
    padding: 11px 14px !important;
    color: #64748b !important;
    font-size: .67rem !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.custom-table td,
.table-modern td {
    padding: 11px 14px !important;
    border-bottom: 1px solid rgba(148, 163, 184, .12) !important;
    color: #334155 !important;
    vertical-align: middle !important;
}

.custom-table tbody tr:hover,
.table-modern tbody tr:hover {
    background: rgba(59, 109, 165, .055) !important;
}

.amount-cell,
.fin-mono {
    font-family: "Courier New", Consolas, monospace !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums !important;
}

.order-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 9px !important;
    border-radius: 8px !important;
    background: rgba(59, 109, 165, .09) !important;
    color: var(--prv-primary, #3b6da5) !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-size: .73rem !important;
    font-weight: 800 !important;
}

.badge-status {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 9px !important;
    border-radius: 999px !important;
    font-size: .68rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.badge-success { background: #dcfce7 !important; color: #15803d !important; }
.badge-warning { background: #fef9c3 !important; color: #a16207 !important; }
.badge-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.badge-secondary { background: #f1f5f9 !important; color: #475569 !important; }

.btn-excel-custom,
.btn-filter,
.btn-custom-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 42px !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    border: 0 !important;
    font-size: .78rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    transition: transform .14s ease, filter .14s ease, box-shadow .14s ease !important;
}

.btn-excel-custom {
    background: linear-gradient(135deg, #16a34a, #22c55e) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(22, 163, 74, .16) !important;
}

.btn-filter,
.btn-custom-primary {
    background: linear-gradient(135deg, var(--prv-primary, #3b6da5), #1d4ed8) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(59, 109, 165, .16) !important;
}

.btn-excel-custom:hover,
.btn-filter:hover,
.btn-custom-primary:hover {
    transform: translateY(-1px) !important;
    filter: brightness(1.04) !important;
    color: #fff !important;
}

.btn-light-custom {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 36px !important;
    padding: 7px 12px !important;
    border-radius: 9px !important;
    border: 1px solid var(--prv-border-soft) !important;
    background: #fff !important;
    color: #64748b !important;
    font-size: .75rem !important;
    font-weight: 800 !important;
}

.btn-view,
.action-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    border: 1px solid var(--prv-border-soft) !important;
    background: #fff !important;
    color: #64748b !important;
    text-decoration: none !important;
    transition: all .14s ease !important;
}

.btn-view:hover,
.action-icon:hover {
    background: var(--prv-primary, #3b6da5) !important;
    border-color: var(--prv-primary, #3b6da5) !important;
    color: #fff !important;
}

.service-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 12px !important;
}

.service-card {
    background: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, .16) !important;
    border-radius: 14px !important;
    padding: 14px !important;
}

.service-card .card-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

.service-card h6 {
    margin: 0 !important;
    color: #0f172a !important;
    font-size: .78rem !important;
    font-weight: 800 !important;
}

.service-card .count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 24px !important;
    height: 24px !important;
    border-radius: 999px !important;
    background: rgba(59, 109, 165, .1) !important;
    color: var(--prv-primary, #3b6da5) !important;
    font-size: .7rem !important;
    font-weight: 800 !important;
}

.service-card .value {
    margin-top: 10px !important;
    color: #0f172a !important;
    font-family: "Courier New", Consolas, monospace !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
}

/* System-wide scrollbar size override. Loaded last from head.php. */
html,
body,
#content,
body.content-scroll-page #content,
.modal-body,
.dropdown-menu,
.table-responsive,
[style*="overflow-y: auto"],
[style*="overflow-y:auto"],
[style*="overflow: auto"],
[style*="overflow:auto"] {
    scrollbar-width: auto !important;
    scrollbar-color: #3b6da5 rgba(59,109,165, 0.15) !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
#content::-webkit-scrollbar,
body.content-scroll-page #content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
[style*="overflow-y: auto"]::-webkit-scrollbar,
[style*="overflow-y:auto"]::-webkit-scrollbar,
[style*="overflow: auto"]::-webkit-scrollbar,
[style*="overflow:auto"]::-webkit-scrollbar {
    display: block !important;
    width: 32px !important;
    height: 32px !important;
    visibility: visible !important;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
#content::-webkit-scrollbar-track,
body.content-scroll-page #content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.dropdown-menu::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
[style*="overflow-y: auto"]::-webkit-scrollbar-track,
[style*="overflow-y:auto"]::-webkit-scrollbar-track,
[style*="overflow: auto"]::-webkit-scrollbar-track,
[style*="overflow:auto"]::-webkit-scrollbar-track {
    background: rgba(59,109,165, 0.12) !important;
    border-left: 1px solid rgba(59,109,165, 0.2) !important;
    border-radius: 0 !important;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
#content::-webkit-scrollbar-thumb,
body.content-scroll-page #content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
[style*="overflow-y: auto"]::-webkit-scrollbar-thumb,
[style*="overflow-y:auto"]::-webkit-scrollbar-thumb,
[style*="overflow: auto"]::-webkit-scrollbar-thumb,
[style*="overflow:auto"]::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b6da5 0%, #6b9fd4 100%) !important;
    border: 3px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 16px !important;
    min-height: 48px !important;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
#content::-webkit-scrollbar-thumb:hover,
body.content-scroll-page #content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.dropdown-menu::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
[style*="overflow-y: auto"]::-webkit-scrollbar-thumb:hover,
[style*="overflow-y:auto"]::-webkit-scrollbar-thumb:hover,
[style*="overflow: auto"]::-webkit-scrollbar-thumb:hover,
[style*="overflow:auto"]::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2d5580 0%, #15588f 100%) !important;
}
