body.iv-polished-shell {
    --iv-ink: oklch(25% 0.035 248);
    --iv-muted: oklch(48% 0.026 248);
    --iv-border: oklch(90% 0.018 228);
    --iv-border-strong: oklch(84% 0.03 228);
    --iv-surface: oklch(99% 0.006 218);
    --iv-surface-soft: oklch(97% 0.012 226);
    --iv-surface-muted: oklch(95% 0.018 226);
    --iv-primary: oklch(54% 0.17 252);
    --iv-primary-deep: oklch(40% 0.12 252);
    --iv-primary-soft: oklch(95% 0.032 252);
    --iv-green: oklch(58% 0.14 158);
    --iv-green-deep: oklch(38% 0.1 158);
    --iv-green-soft: oklch(95% 0.042 158);
    --iv-amber: oklch(72% 0.145 82);
    --iv-amber-deep: oklch(43% 0.12 82);
    --iv-amber-soft: oklch(96% 0.05 82);
    --iv-rose: oklch(62% 0.18 23);
    --iv-rose-deep: oklch(42% 0.12 23);
    --iv-rose-soft: oklch(96% 0.035 23);
    --iv-shadow: 0 14px 30px oklch(36% 0.045 248 / 0.06);
    --iv-shadow-strong: 0 18px 42px oklch(36% 0.055 248 / 0.1);
    background:
        linear-gradient(135deg, oklch(97% 0.018 232), oklch(98% 0.014 156) 42%, oklch(98% 0.008 226));
    color: var(--iv-ink);
}

body.iv-polished-shell .kt-wrapper {
    background:
        linear-gradient(180deg, oklch(98% 0.012 226 / .82), oklch(97% 0.01 226 / .94));
}

body.iv-polished-shell #content {
    padding-top: 1.25rem;
}

body.iv-polished-shell .kt-header {
    background: oklch(99.3% 0.002 226 / .9) !important;
    border-bottom: 1px solid oklch(91% 0.01 228 / .72);
    box-shadow: 0 10px 28px oklch(36% 0.03 248 / 0.045);
    backdrop-filter: blur(18px) saturate(138%);
    -webkit-backdrop-filter: blur(18px) saturate(138%);
}

body.iv-polished-shell .kt-header.iv-header-scrolled,
body.iv-polished-shell .kt-header.border-b {
    background: oklch(99.2% 0.002 226 / .94) !important;
    box-shadow: 0 16px 36px oklch(36% 0.03 248 / 0.065);
}

body.iv-polished-shell .kt-card {
    border-color: var(--iv-border);
    background:
        linear-gradient(180deg, var(--iv-surface), oklch(98% 0.008 226));
    box-shadow: var(--iv-shadow);
}

body.iv-polished-shell .kt-card-header,
body.iv-polished-shell .kt-card-footer {
    border-color: oklch(91% 0.014 226);
    background: oklch(98% 0.01 226 / .78);
}

body.iv-polished-shell .kt-card-title,
body.iv-polished-shell .text-mono,
body.iv-polished-shell h1,
body.iv-polished-shell h2,
body.iv-polished-shell h3 {
    color: var(--iv-ink);
}

body.iv-polished-shell .text-secondary-foreground,
body.iv-polished-shell .text-muted-foreground {
    color: var(--iv-muted);
}

body.iv-polished-shell .kt-btn {
    border-radius: .625rem;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

body.iv-polished-shell .kt-btn:hover {
    transform: translateY(-1px);
}

body.iv-polished-shell .kt-btn-primary {
    background: var(--iv-primary) !important;
    border-color: var(--iv-primary) !important;
    box-shadow: 0 10px 22px oklch(42% 0.13 252 / .18);
}

body.iv-polished-shell .kt-btn-outline {
    border-color: var(--iv-border-strong);
    background: oklch(99% 0.006 226 / .74);
    color: var(--iv-ink);
}

body.iv-polished-shell .kt-btn-outline:hover {
    border-color: oklch(84% 0.055 252);
    background: var(--iv-primary-soft);
    color: var(--iv-primary-deep);
}

body.iv-polished-shell :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid oklch(64% 0.11 252 / .42);
    outline-offset: 2px;
}

body.iv-polished-shell .kt-input,
body.iv-polished-shell .kt-select,
body.iv-polished-shell .form-control,
body.iv-polished-shell .form-select,
body.iv-polished-shell .input-group-text,
body.iv-polished-shell textarea.kt-input {
    border-color: oklch(88% 0.018 226);
    background-color: oklch(99% 0.006 226);
    color: var(--iv-ink);
}

body.iv-polished-shell .kt-input:focus-within,
body.iv-polished-shell .kt-input:focus,
body.iv-polished-shell .kt-select:focus,
body.iv-polished-shell .form-control:focus,
body.iv-polished-shell .form-select:focus {
    border-color: oklch(74% 0.09 252);
    box-shadow: 0 0 0 3px oklch(78% 0.09 252 / .2);
}

body.iv-polished-shell .kt-form-label,
body.iv-polished-shell .form-label {
    color: oklch(34% 0.035 248);
    font-weight: 650;
}

body.iv-polished-shell .kt-table,
body.iv-polished-shell .table {
    color: var(--iv-ink);
}

body.iv-polished-shell .kt-table thead th,
body.iv-polished-shell .table thead th,
body.iv-polished-shell .bootstrap-table .fixed-table-container thead th {
    background: var(--iv-surface-muted);
    color: var(--iv-muted);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

body.iv-polished-shell .kt-table tbody td,
body.iv-polished-shell .table tbody td,
body.iv-polished-shell .bootstrap-table .fixed-table-container tbody td {
    border-color: oklch(92% 0.012 226);
    color: var(--iv-ink);
}

body.iv-polished-shell .kt-table tbody tr:hover td,
body.iv-polished-shell .table-hover tbody tr:hover td,
body.iv-polished-shell .bootstrap-table .fixed-table-container tbody tr:hover td {
    background: oklch(98% 0.016 226);
}

body.iv-polished-shell .fixed-table-toolbar,
body.iv-polished-shell .fixed-table-pagination {
    color: var(--iv-muted);
}

body.iv-polished-shell .fixed-table-container,
body.iv-polished-shell .fixed-table-pagination,
body.iv-polished-shell .pagination .page-link {
    border-color: var(--iv-border);
}

body.iv-polished-shell .pagination .page-link {
    background: oklch(99% 0.006 226);
    color: var(--iv-ink);
}

body.iv-polished-shell .pagination .active > .page-link,
body.iv-polished-shell .page-item.active .page-link {
    background: var(--iv-primary);
    border-color: var(--iv-primary);
    color: oklch(99% 0.006 226);
}

body.iv-polished-shell .kt-badge {
    border-radius: 999px;
    font-weight: 700;
}

body.iv-polished-shell .kt-badge-outline {
    border-color: var(--iv-border-strong);
    background: oklch(99% 0.006 226 / .74);
    color: var(--iv-muted);
}

body.iv-polished-shell .kt-badge-success {
    border-color: oklch(84% 0.07 158);
    background: var(--iv-green-soft);
    color: var(--iv-green-deep);
}

body.iv-polished-shell .kt-badge-warning {
    border-color: oklch(86% 0.09 82);
    background: var(--iv-amber-soft);
    color: var(--iv-amber-deep);
}

body.iv-polished-shell .kt-badge-destructive,
body.iv-polished-shell .kt-badge-danger {
    border-color: oklch(86% 0.06 23);
    background: var(--iv-rose-soft);
    color: var(--iv-rose-deep);
}

body.iv-polished-shell .kt-dropdown-menu,
body.iv-polished-shell .kt-modal-content {
    border-color: var(--iv-border);
    background: oklch(99% 0.006 226 / .94);
    box-shadow: var(--iv-shadow-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.iv-polished-shell .iv-page-header {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--iv-border);
    border-radius: .75rem;
    background: var(--iv-surface);
    box-shadow: 0 8px 22px oklch(36% .03 248 / .045);
}

body.iv-polished-shell .iv-page-header__eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: .45rem;
    padding: .35rem .6rem;
    border: 1px solid oklch(86% 0.04 232);
    border-radius: 999px;
    background: oklch(99% 0.01 232 / .72);
    color: var(--iv-primary-deep);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

body.iv-polished-shell .iv-page-header h1 {
    color: var(--iv-ink);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.08;
}

body.iv-polished-shell .iv-page-header p {
    color: var(--iv-muted);
}

body.iv-polished-shell .iv-page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .625rem;
}

/* Lenguaje compartido de listados, formularios y detalle. */
body.iv-polished-shell .kt-card-header {
    min-height: 4.25rem;
    padding-inline: 1.5rem;
}

body.iv-polished-shell .kt-card-title {
    font-size: .95rem;
    font-weight: 720;
    letter-spacing: -.01em;
}

body.iv-polished-shell .bootstrap-table .fixed-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    padding: 0 0 1rem;
}

body.iv-polished-shell .bootstrap-table .fixed-table-toolbar .search,
body.iv-polished-shell .bootstrap-table .fixed-table-toolbar .columns,
body.iv-polished-shell .bootstrap-table .fixed-table-toolbar .keep-open {
    margin: 0 !important;
}

body.iv-polished-shell .bootstrap-table .search input,
body.iv-polished-shell .bootstrap-table .filter-control input,
body.iv-polished-shell .bootstrap-table .filter-control select {
    min-height: 2.35rem !important;
    border-radius: .5rem !important;
    font-size: .82rem;
}

body.iv-polished-shell .bootstrap-table .fixed-table-container {
    overflow: hidden;
    border: 1px solid var(--iv-border);
    border-radius: .625rem;
}

body.iv-polished-shell .bootstrap-table .fixed-table-container thead th {
    height: 3.1rem;
    padding: .55rem .9rem !important;
    background: oklch(96.5% .015 226);
    vertical-align: middle;
}

body.iv-polished-shell .bootstrap-table .fixed-table-container thead .th-inner {
    overflow: visible;
    line-height: 1.25;
    white-space: normal;
}

body.iv-polished-shell .bootstrap-table .fixed-table-container tbody td {
    padding: .85rem .9rem !important;
    vertical-align: middle;
}

body.iv-polished-shell .bootstrap-table .fixed-table-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem;
    padding-top: 1rem;
}

body.iv-polished-shell .iv-form-shell .form-label,
body.iv-polished-shell .iv-form-shell label {
    font-size: .82rem;
}

body.iv-polished-shell .iv-form-shell .form-control-static {
    min-height: 2.5rem;
    margin: .35rem 0 0;
    padding: .65rem .75rem;
    border: 1px solid var(--iv-border);
    border-radius: .5rem;
    background: var(--iv-surface-soft);
    color: var(--iv-ink);
}

body.iv-polished-shell .kt-alert,
body.iv-polished-shell .alert {
    border-radius: .625rem;
}

body.iv-polished-shell .iv-error-shell {
    display: grid;
    min-height: 58vh;
    place-items: center;
    padding: 1.5rem;
}

body.iv-polished-shell .iv-error-card {
    display: grid;
    max-width: 34rem;
    justify-items: center;
    gap: 1rem;
    padding: 3rem 2rem;
    text-align: center;
}

body.iv-polished-shell .iv-error-card h1 { margin: 0; font-size: 1.5rem; }
body.iv-polished-shell .iv-error-card p { max-width: 42ch; margin: 0; color: var(--iv-muted); line-height: 1.6; }
body.iv-polished-shell .iv-error-code { color: var(--iv-primary-deep); font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }

/* Dashboard: prioridad operativa antes que decoración. */
body.iv-polished-shell .iv-dashboard-overview {
    overflow: hidden;
    border: 1px solid var(--iv-border);
    border-radius: .875rem;
    background: var(--iv-surface);
    box-shadow: var(--iv-shadow);
}

body.iv-polished-shell .iv-dashboard-overview__intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--iv-border);
}

body.iv-polished-shell .iv-dashboard-kicker { display: inline-flex; align-items: center; gap: .45rem; color: var(--iv-primary-deep); font-size: .75rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
body.iv-polished-shell .iv-dashboard-overview h2 { margin: .45rem 0 .35rem; font-size: 1.35rem; font-weight: 750; letter-spacing: -.025em; }
body.iv-polished-shell .iv-dashboard-overview p { max-width: 62ch; margin: 0; color: var(--iv-muted); font-size: .875rem; line-height: 1.5; }
body.iv-polished-shell .iv-dashboard-overview__score { display: grid; min-width: 8.25rem; justify-items: end; gap: .25rem; color: var(--iv-muted); font-size: .75rem; }
body.iv-polished-shell .iv-dashboard-overview__score strong { color: var(--iv-ink); font-size: 2rem; font-weight: 750; letter-spacing: -.05em; line-height: 1; }

body.iv-polished-shell .iv-dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.iv-polished-shell .iv-dashboard-metric { display: grid; grid-template-columns: auto 1fr; column-gap: .7rem; align-content: start; min-height: 8.5rem; padding: 1.25rem 1.5rem; border-inline-end: 1px solid var(--iv-border); }
body.iv-polished-shell .iv-dashboard-metric:last-child { border-inline-end: 0; }
body.iv-polished-shell .iv-dashboard-metric > i { grid-row: span 2; color: var(--iv-primary); font-size: 1.1rem; }
body.iv-polished-shell .iv-dashboard-metric > span { color: var(--iv-muted); font-size: .8rem; line-height: 1.25; }
body.iv-polished-shell .iv-dashboard-metric > strong { color: var(--iv-ink); font-size: 1.7rem; font-weight: 750; line-height: 1.2; }
body.iv-polished-shell .iv-dashboard-metric > small { grid-column: 1 / -1; margin-top: .6rem; color: var(--iv-muted); font-size: .72rem; }

body.iv-polished-shell .iv-dashboard-signal,
body.iv-polished-shell .iv-dashboard-stage { display: flex; align-items: flex-start; gap: .75rem; padding: .75rem; border: 1px solid var(--iv-border); border-radius: .625rem; background: var(--iv-surface-soft); }
body.iv-polished-shell .iv-dashboard-signal > i { margin-top: .1rem; color: var(--iv-primary); }
body.iv-polished-shell .iv-dashboard-signal--warning > i { color: var(--iv-amber-deep); }
body.iv-polished-shell .iv-dashboard-signal--danger > i { color: var(--iv-rose-deep); }
body.iv-polished-shell .iv-dashboard-signal--success > i { color: var(--iv-green-deep); }
body.iv-polished-shell .iv-dashboard-signal strong,
body.iv-polished-shell .iv-dashboard-stage strong { display: block; color: var(--iv-ink); font-size: .82rem; font-weight: 700; line-height: 1.3; }
body.iv-polished-shell .iv-dashboard-signal span,
body.iv-polished-shell .iv-dashboard-stage span { display: block; margin-top: .18rem; color: var(--iv-muted); font-size: .75rem; line-height: 1.4; }
body.iv-polished-shell .iv-dashboard-stage { padding: .7rem .75rem; }
body.iv-polished-shell .iv-dashboard-stage__dot { flex: 0 0 auto; width: .56rem; height: .56rem; margin-top: .32rem; border-radius: 999px; background: oklch(72% .03 248); }
body.iv-polished-shell .iv-dashboard-stage__dot--ready { background: var(--iv-green-deep); }
body.iv-polished-shell .iv-dashboard-stage__dot--attention { background: var(--iv-amber-deep); }
body.iv-polished-shell .iv-dashboard-stage__dot--pending { background: var(--iv-primary); }

body.iv-polished-shell code {
    border: 1px solid oklch(88% 0.018 226);
    background: oklch(98% 0.012 226);
    color: oklch(35% 0.05 248);
}

@media (max-width: 767px) {
    body.iv-polished-shell .iv-page-header {
        align-items: flex-start;
    }

    body.iv-polished-shell .kt-card-header {
        gap: .75rem;
    }

    body.iv-polished-shell .iv-page-header__actions {
        width: 100%;
        justify-content: flex-start;
    }

    body.iv-polished-shell .iv-dashboard-overview__intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    body.iv-polished-shell .iv-dashboard-overview__score { justify-items: start; }
    body.iv-polished-shell .iv-dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.iv-polished-shell .iv-dashboard-metric { min-height: 7.75rem; padding: 1rem; }
    body.iv-polished-shell .iv-dashboard-metric:nth-child(2) { border-inline-end: 0; }
    body.iv-polished-shell .iv-dashboard-metric:nth-child(n + 3) { border-top: 1px solid var(--iv-border); }

    body.iv-polished-shell .kt-btn:not(.kt-btn-icon),
    body.iv-polished-shell .kt-input,
    body.iv-polished-shell .kt-select {
        min-height: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.iv-polished-shell *,
    body.iv-polished-shell *::before,
    body.iv-polished-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
