:root {
    --brand-start: #667eea;
    --brand-end: #764ba2;
    --brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border: #e0e0e0;
    --bg: #f0f0f0;
    --surface: #ffffff;
    --surface-soft: #f9f9f9;
    --surface-muted: #f6f7fb;
    --error: #cc3333;
    --error-bg: #ffeeee;
    --success: #33cc33;
    --success-bg: #eeffee;
    --warning: #9a6500;
    --warning-bg: #fff4dc;
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 10px 30px rgba(102, 126, 234, 0.16);
    --shadow-md: 0 10px 20px rgba(102, 126, 234, 0.3);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --focus-ring: 0 0 0 3px rgba(102, 126, 234, 0.1);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --tab-bg: rgba(255, 255, 255, 0.9);
    --tab-border: rgba(102, 126, 234, 0.2);
    --tab-text: var(--text-secondary);
    --tab-active-bg: linear-gradient(180deg, rgba(237, 241, 255, 0.98), rgba(226, 233, 255, 0.98));
    --tab-active-border: rgba(102, 126, 234, 0.48);
    --tab-active-text: #2f417d;
    --tab-count-bg: rgba(102, 126, 234, 0.16);
    --tab-count-text: #4f5e9f;
    --page-max: 1280px;
    --transition: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(102, 126, 234, 0.08), transparent 28%),
        linear-gradient(180deg, #f7f8fc 0%, var(--bg) 100%);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: var(--brand-start);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--brand-end);
}

code {
    background: #f4f5fb;
    color: var(--brand-end);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.92em;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    outline: none;
    border-color: var(--brand-start);
    box-shadow: var(--focus-ring);
}

button {
    border: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th,
td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

#judicialCausasDenunciadoTable,
#judicialCausasDemandanteTable {
    border: 1px solid rgba(102, 126, 234, 0.24);
    border-radius: var(--radius-md);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(102, 126, 234, 0.06), rgba(118, 75, 162, 0.03) 28%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.1);
}

#judicialCausasDenunciadoTable thead th,
#judicialCausasDemandanteTable thead th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.16), rgba(118, 75, 162, 0.12));
    color: #3a2c66;
    border-bottom-color: rgba(102, 126, 234, 0.28);
}

/* RUC a wider fixed column to avoid last digit wrapping */
#judicialCausasDenunciadoTable thead th:first-child,
#judicialCausasDenunciadoTable tbody tr > td:first-child,
#judicialCausasDemandanteTable thead th:first-child,
#judicialCausasDemandanteTable tbody tr > td:first-child {
    min-width: 132px;
    width: 132px;
    white-space: nowrap;
}

/* Main row per RUC */
#judicialCausasDenunciadoTable > tbody > tr:nth-child(odd) > td,
#judicialCausasDemandanteTable > tbody > tr:nth-child(odd) > td {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.04));
    border-top: 1px solid rgba(102, 126, 234, 0.18);
    border-bottom-color: rgba(102, 126, 234, 0.18);
}

#judicialCausasDenunciadoTable > tbody > tr:nth-child(odd) > td:first-child,
#judicialCausasDemandanteTable > tbody > tr:nth-child(odd) > td:first-child {
    font-variant-numeric: tabular-nums;
}

/* Nested variable timeline row */
#judicialCausasDenunciadoTable .nested-table-cell,
#judicialCausasDemandanteTable .nested-table-cell {
    padding: 10px;
    background: rgba(102, 126, 234, 0.03);
    border-bottom-color: rgba(102, 126, 234, 0.18);
}

#judicialCausasDenunciadoTable .nested-table,
#judicialCausasDemandanteTable .nested-table {
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
}

#judicialCausasDenunciadoTable .nested-table thead th,
#judicialCausasDemandanteTable .nested-table thead th {
    background: rgba(102, 126, 234, 0.08);
    color: #4d3b87;
    border-bottom-color: rgba(102, 126, 234, 0.22);
}

#judicialCausasDenunciadoTable .nested-table td,
#judicialCausasDenunciadoTable .nested-table th,
#judicialCausasDemandanteTable .nested-table td,
#judicialCausasDemandanteTable .nested-table th {
    padding-top: 7px;
    padding-bottom: 7px;
}

.judicial-main-table-wrap {
    margin-top: 8px;
}

#sanctionsSourceTable,
#openSanctionsContainedTable,
#crimeContainedTable {
    font-size: 12px;
    line-height: 1.2;
}

#sanctionsSourceTable th,
#sanctionsSourceTable td,
#openSanctionsContainedTable th,
#openSanctionsContainedTable td,
#crimeContainedTable th,
#crimeContainedTable td {
    padding: 6px 8px;
    vertical-align: middle;
}

#sanctionsSourceTable th,
#openSanctionsContainedTable th,
#crimeContainedTable th {
    font-size: 10px;
    letter-spacing: 0.04em;
}

#sanctionsSourceTable th:nth-child(3),
#sanctionsSourceTable td:nth-child(3) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#openSanctionsContainedTable th:nth-child(5),
#openSanctionsContainedTable td:nth-child(5) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

#crimeContainedTable th:nth-child(5),
#crimeContainedTable td:nth-child(5) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tenant-users-table {
    table-layout: fixed;
}

.tenant-users-table :is(th, td):nth-child(1),
.tenant-users-table :is(th, td):nth-child(2),
.tenant-users-table :is(th, td):nth-child(3) {
    width: 18%;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--brand-gradient);
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.auth-page::before {
    width: 300px;
    height: 300px;
    top: -50px;
    right: -50px;
}

.auth-page::after {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

.auth-card,
.card,
.service-card {
    position: relative;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
}

.auth-card {
    width: min(440px, 100%);
    padding: 40px;
    z-index: 1;
    animation: fadeIn var(--transition);
}

.page {
    width: min(calc(100% - 40px), var(--page-max));
    margin: 0 auto;
    padding: 30px 0 40px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(135deg, rgba(102, 126, 234, 0.96), rgba(118, 75, 162, 0.96));
    backdrop-filter: blur(16px);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(63, 70, 113, 0.25);
}

.topbar-leading {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.topbar-branding {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.topbar-tenant-name {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.96);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-icon {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.96);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.18));
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.login-brand .brand-icon {
    color: var(--brand-start);
    text-shadow: none;
}

.login-header {
    margin-bottom: 26px;
    text-align: center;
}

.tagline {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    letter-spacing: 1px;
}

.topbar-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    color: rgba(255, 255, 255, 0.92);
}

.topbar-alert-link {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar-alert-link svg {
    width: 18px;
    height: 18px;
}

.topbar-alert-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.topbar-alert-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: #d92d20;
    color: #ffffff;
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    text-align: center;
}

.topbar-user-block {
    display: grid;
    gap: 2px;
    text-align: right;
}

.topbar-user-name {
    font-size: 14px;
    line-height: 1.2;
    color: #ffffff;
}

.topbar-user-role {
    font-size: 12px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.82);
}

.hero-action-form {
    display: inline-flex;
}

.locale-form {
    display: inline-flex;
    align-items: center;
}

.locale-select {
    width: auto;
    min-width: 154px;
    padding: 10px 38px 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
}

.topbar-meta .locale-select {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.topbar-meta .locale-select:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.auth-locale-form {
    justify-content: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.sidebar-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.tenant-branding-slot {
    width: 120px;
    height: 60px;
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.34);
}

.tenant-branding-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.tenant-branding-placeholder {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    text-align: center;
}

.nav {
    position: fixed;
    top: 102px;
    left: 20px;
    bottom: 20px;
    z-index: 9;
    width: 186px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 10px;
    overflow: hidden;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    transition: transform var(--transition), opacity var(--transition);
}

.nav-main {
    flex: 1;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    padding-right: 2px;
}

.nav-group {
    display: grid;
    gap: 2px;
}

.nav-heading {
    padding: 0 6px 1px;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    padding: 3px 5px;
    font-size: 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    background: transparent;
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    color: currentColor;
}

.nav-link-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.nav-link-label {
    white-space: nowrap;
    font-size: 11px !important;
    line-height: 1.2;
}

.nav-link:hover {
    color: var(--brand-end);
    border-color: rgba(102, 126, 234, 0.14);
    background: rgba(102, 126, 234, 0.08);
}

.nav-link.is-active {
    color: var(--brand-end);
    border-color: rgba(102, 126, 234, 0.18);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.16), rgba(118, 75, 162, 0.12));
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.05);
}

.nav-link.is-disabled,
.nav-link.is-disabled:hover {
    color: rgba(114, 124, 148, 0.75);
    border-color: rgba(114, 124, 148, 0.2);
    background: rgba(148, 163, 184, 0.12);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.nav + .page {
    width: auto;
    margin: 0 24px 0 234px;
    padding-top: 30px;
}

body.nav-collapsed .nav {
    width: 62px;
    padding: 12px 8px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

body.nav-collapsed .nav-group {
    gap: 5px;
}

body.nav-collapsed .nav-main {
    overflow: visible;
    padding-right: 0;
}

body.nav-collapsed .nav-heading {
    display: block;
    position: relative;
    height: 10px;
    margin: 4px 6px;
    padding: 0;
    font-size: 0;
    color: transparent;
    letter-spacing: 0;
    overflow: hidden;
    text-transform: none;
}

body.nav-collapsed .nav-heading::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

body.nav-collapsed .nav-link {
    justify-content: center;
    padding: 5px;
}

body.nav-collapsed .nav-link-label {
    display: none;
}

body.nav-collapsed .nav-footer {
    gap: 6px;
    padding-top: 8px;
}

body.nav-collapsed .nav-locale-form {
    display: none;
}

body.nav-collapsed .nav + .page {
    margin-left: 116px;
}

.nav-footer {
    flex: 0 0 auto;
    display: grid;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(102, 126, 234, 0.12);
}

.nav-locale-form {
    display: grid;
    gap: 6px;
}

.nav-footer-label {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-locale-select {
    width: 100%;
    min-width: 0;
    padding: 6px 28px 6px 10px;
    font-size: 11px !important;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.96);
}

.nav-locale-select option {
    font-size: 11px;
}

.nav-footer-link {
    justify-content: center;
}

.nav-footer-settings-link {
    justify-content: flex-start;
}

.nav-build-version {
    margin: 2px 0 0;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 11px;
    letter-spacing: 0.08em;
}

body.nav-collapsed .nav-build-version {
    display: none;
}

.hero {
    margin: 18px 0 30px;
}

.hero-panel {
    position: relative;
    overflow: visible;
    padding: 28px 30px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.35), transparent 30%),
        linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(102, 126, 234, 0.14);
    box-shadow: var(--shadow-sm);
    display: block;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--brand-end);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-hero-title-row .hero-kicker {
    margin-bottom: 0;
}

.dashboard-hero-title-row h1 {
    margin: 0;
}

.search-hero-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-hero-title-row .hero-kicker {
    margin-bottom: 0;
}

.search-hero-title-row h1 {
    margin: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

/* Private Lists hero: keep content at left and 2x2 stats grid at right */
.private-lists-hero.hero.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    align-items: start;
    gap: 24px;
}

.private-lists-hero.hero.hero-panel .hero-content {
    min-width: 0;
}

.private-lists-hero.hero.hero-panel .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    justify-self: end;
    width: 100%;
    max-width: 420px;
}

.private-lists-hero.hero.hero-panel .hero-stats .stat-card {
    margin: 0;
}

/* Conflicts hero: mirror Private Lists 2x2 stats placement (top-right) */
.conflicts-hero.hero.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    align-items: start;
    gap: 24px;
}

.conflicts-hero.hero.hero-panel .hero-content {
    min-width: 0;
}

.conflicts-hero.hero.hero-panel .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    justify-self: end;
    width: 100%;
    max-width: 420px;
}

.conflicts-hero.hero.hero-panel .hero-stats .stat-card {
    margin: 0;
}

.history-hero.search-hero.hero.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    align-items: start;
    gap: 24px;
}

.history-hero.search-hero.hero.hero-panel .hero-content {
    min-width: 0;
}

.history-hero.search-hero.hero.hero-panel .hero-stats {
    display: grid;
    grid-template-columns: minmax(132px, 0.72fr) minmax(260px, 1.28fr);
    grid-template-rows: auto;
    grid-auto-rows: auto;
    align-content: start;
    gap: 10px;
    justify-self: end;
    width: 100%;
    max-width: 520px;
}

.history-hero.search-hero.hero.hero-panel .hero-stats .stat-card {
    margin: 0;
    padding: 12px 14px;
}

.history-hero.search-hero.hero.hero-panel .hero-stats .stat-card .label {
    margin-bottom: 5px;
    line-height: 1.2;
}

.history-hero.search-hero.hero.hero-panel .hero-stats .stat-card strong {
    margin-top: 2px;
    font-size: 24px;
}

.hero h1,
.auth-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.auth-card h1 {
    color: var(--brand-start);
}

.auth-card .login-tagline {
    margin-top: 5px;
    text-align: center;
    font-size: 14px;
    letter-spacing: 1px;
}

.monitoring-hero-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.monitoring-run-now-form {
    margin-left: auto;
}

.monitoring-run-now-form .btn {
    white-space: nowrap;
}

.monitoring-risk-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.monitoring-risk-summary-cards .card.stat-card {
    margin: 0;
    padding: 14px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.monitoring-risk-summary-cards .stat-card .label {
    text-align: center;
}

.monitoring-risk-summary-cards .stat-card strong {
    margin-top: 4px;
    font-size: 22px;
}

.tabs,
.monitoring-groups-tabs,
.tenant-status-tabs,
.monitoring-groups-frequency-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tab,
.monitoring-group-tab,
.tenant-user-filter-chip,
.monitoring-group-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--tab-border);
    border-radius: 999px;
    background: var(--tab-bg);
    color: var(--tab-text);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.tab:hover,
.monitoring-group-tab:hover,
.tenant-user-filter-chip:hover,
.monitoring-group-filter-chip:hover {
    border-color: rgba(102, 126, 234, 0.36);
    color: #3d4d84;
}

.tab:focus-visible,
.monitoring-group-tab:focus-visible,
.tenant-user-filter-chip:focus-visible,
.monitoring-group-filter-chip:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.tab span,
.monitoring-group-tab span,
.tenant-user-filter-chip span,
.monitoring-group-filter-chip span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.tab small,
.monitoring-group-tab small,
.tenant-user-filter-chip small,
.monitoring-group-filter-chip small {
    font-size: 11px;
    color: var(--text-tertiary);
}

.tab em,
.monitoring-group-tab em,
.tenant-user-filter-chip em,
.monitoring-group-filter-chip em {
    font-style: normal;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--tab-count-bg);
    color: var(--tab-count-text);
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

.tab.is-active,
.monitoring-group-tab.is-active,
.tenant-user-filter-chip.is-active,
.monitoring-group-filter-chip.is-active {
    border-color: var(--tab-active-border);
    background: var(--tab-active-bg);
    color: var(--tab-active-text);
}

.monitoring-group-log-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.monitoring-group-log-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.monitoring-group-log-card.is-active {
    border-color: var(--tab-active-border);
    box-shadow: 0 0 0 1px var(--tab-active-border);
}

.monitoring-group-log-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.monitoring-group-log-card-header h3 {
    margin: 0;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.monitoring-group-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.12);
    font-size: 13px;
}

.monitoring-group-log-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 760px) {
    .monitoring-group-log-card-meta {
        grid-template-columns: 1fr;
    }
}

.tabs--underline,
.login-mode-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 26px;
    border-bottom: 2px solid var(--surface-muted);
}

.tab--underline,
.login-mode-tab {
    flex: 1;
    padding: 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.tab--underline.is-active,
.login-mode-tab.is-active {
    color: var(--brand-start);
    border-bottom-color: var(--brand-start);
}

.auth-panel[hidden] {
    display: none;
}

.login-intro {
    margin-bottom: 22px;
}

.login-intro h2 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 22px;
    font-weight: 600;
}

.login-intro p {
    font-size: 14px;
}

.auth-form label {
    gap: 8px;
}

.login-form-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: -2px 0 4px;
    font-size: 13px;
}

.login-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    cursor: pointer;
}

.login-checkbox input {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.login-support-link {
    color: var(--brand-start);
    font-weight: 700;
    text-decoration: none;
}

.login-support-link:hover {
    color: var(--brand-end);
}

.signup-terms {
    align-items: flex-start;
    line-height: 1.45;
}

.btn-block {
    width: 100%;
}

.login-footer {
    margin-top: 18px;
    text-align: center;
}

.login-footer p {
    color: var(--text-tertiary);
    font-size: 12px;
}

.login-build-version {
    margin-top: 4px;
    font-size: 11px;
    letter-spacing: 0.06em;
}

.auth-inspiration {
    position: fixed;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    margin: 0;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 2;
    pointer-events: none;
}

.hero p,
.auth-card p {
    margin: 0;
}

.muted {
    color: var(--text-secondary);
}

.cards,
.grid {
    display: grid;
    gap: 20px;
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 30px;
}

.grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 20px;
}

.query-layout {
    align-items: start;
}

.toolbar,
.toolbar-inline {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.toolbar-field {
    display: grid;
    gap: 8px;
}

.toolbar-field.grow {
    flex: 1;
}

.push-top {
    margin-top: 12px;
}

.checkbox-row {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-row input {
    width: auto;
    margin-right: 6px;
}

.card,
.service-card {
    padding: 24px;
    animation: fadeIn var(--transition);
}

.settings-page > .card {
    margin-top: 16px;
}

.card h2,
.card h3,
.service-card h2,
.service-card h3 {
    margin-top: 0;
}

.stat-card {
    overflow: hidden;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card-timestamp {
    display: flex;
    flex-direction: column;
    margin-top: 6px;
    line-height: 1.2;
}

.stat-card-date {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.stat-card-time {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.stat-card-subtle {
    margin-top: 0;
    font-size: 11px;
    color: var(--text-tertiary);
}

.registry-page .stat-card strong {
    font-size: 22px;
}

.registry-page .stat-card-date {
    font-size: 22px;
}

.registry-page .stat-card .label {
    font-size: 12px;
}

.registry-page .stat-card-entity-breakdown {
    display: grid;
    gap: 8px;
}

.registry-page .stat-card-entity-breakdown > .label {
    margin-bottom: 2px;
}

.registry-page .stat-card-entity-row {
    display: grid;
    grid-template-columns: 74px 1fr;
    align-items: baseline;
    column-gap: 10px;
}

.registry-page .stat-card-entity-row strong {
    margin: 0;
    text-align: right;
    line-height: 1;
}

.registry-page .stat-card-entity-row span {
    font-size: 13px;
    color: var(--text-secondary);
}

.registry-page .hero-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
}

.registry-page .hero-actions > .btn,
.registry-page .hero-actions > .toolbar-inline {
    width: 100%;
}

.registry-page .hero-actions > .btn {
    min-height: 46px;
}

.registry-page .hero-actions > .toolbar-inline {
    align-items: stretch;
    gap: 10px;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.registry-page .hero-actions > .toolbar-inline .toolbar-field {
    min-width: 0;
    gap: 6px;
    flex: 1;
}

.registry-page .hero-actions > .toolbar-inline .toolbar-field span {
    display: none;
}

.registry-page .hero-actions > .toolbar-inline .btn,
.registry-page .hero-actions > .toolbar-inline input {
    min-height: 44px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.14);
}

.progress-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.monitoring-completion-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.monitoring-completion-inline .progress-bar {
    margin-top: 0;
    flex: 1;
    min-width: 80px;
}

.monitoring-completion-value {
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    color: var(--text-secondary);
}

.monitoring-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.monitoring-settings-form {
    margin-top: 12px;
}

.monitoring-settings-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto;
    align-items: end;
    gap: 12px 16px;
}

.monitoring-enabled-checkbox {
    align-self: center;
    margin-bottom: 4px;
}

.monitoring-alert-sections {
    margin-top: 10px;
}

.monitoring-alert-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
    margin-top: 8px;
}

.monitoring-groups-discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
    justify-content: start;
    gap: 14px;
}

.monitoring-group-discover-card {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    gap: 10px;
    aspect-ratio: 1 / 1;
    min-height: 230px;
    padding: 12px;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 16px rgba(67, 82, 138, 0.08);
}

.monitoring-group-discover-card[hidden] {
    display: none;
}

.monitoring-group-card-banner {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--group-color), #ffffff 10%), color-mix(in srgb, var(--group-color), #0f172a 15%));
}

.monitoring-group-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.monitoring-group-card-avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: color-mix(in srgb, var(--group-color), #ffffff 78%);
    font-size: 16px;
}

.monitoring-group-card-identity {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.monitoring-group-card-identity strong {
    font-size: 14px;
    line-height: 1.2;
    color: #1f2b4d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monitoring-group-frequency-badge {
    display: inline-flex;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--group-color), #ffffff 82%);
    color: color-mix(in srgb, var(--group-color), #111827 28%);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.monitoring-group-card-description {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.monitoring-group-card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.monitoring-group-card-metrics span {
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.08);
}

.monitoring-group-card-metrics small {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.monitoring-group-card-metrics strong {
    color: #1f2b4d;
    font-size: 12px;
    line-height: 1.2;
}

.monitoring-group-card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.monitoring-group-card-actions .btn {
    min-height: 32px;
    padding: 6px 10px;
}

.monitoring-groups-create-actions {
    margin-top: 12px;
}

.risk-bar {
    width: 120px;
    height: 10px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.12);
    overflow: hidden;
}

.risk-bar-fill {
    height: 100%;
    border-radius: inherit;
}

.risk-bar-fill-unreviewed {
    background: #9aa2b0;
}

.risk-bar-fill-low {
    background: #2aa662;
}

.risk-bar-fill-medium {
    background: #d8a200;
}

.risk-bar-fill-high {
    background: #cb4e4e;
}

.risk-score-pill {
    border: 1px solid rgba(70, 88, 155, 0.28);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.12), rgba(102, 126, 234, 0.03));
    color: #29345f;
    min-width: 74px;
    min-height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.monitoring-risk-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.monitoring-risk-score-inline {
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.progress-caption {
    display: inline-block;
    margin-top: 8px;
}

.ddc-page .hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ddc-hero-charts {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 14px;
}

.ddc-hero-chart-card {
    padding: 14px;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.78);
}

.ddc-hero-chart-card h2 {
    margin: 0 0 10px;
    font-size: 15px;
}

.ddc-vertical-chart {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
}

.ddc-vertical-col {
    display: grid;
    gap: 6px;
    justify-items: center;
}

.ddc-vertical-bar-wrap {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: end;
    padding: 0 2px;
    border-radius: var(--radius-sm);
    background: rgba(102, 126, 234, 0.1);
}

.ddc-vertical-bar {
    width: 100%;
    min-height: 6px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #7f95ee 0%, #5c6fd9 100%);
}

.ddc-vertical-label {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.1;
}

.ddc-vertical-count {
    font-size: 12px;
}

.ddc-donut-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.ddc-donut {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.ddc-donut-hole {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #ffffff;
    display: grid;
    place-items: center;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.1);
}

.ddc-donut-hole strong {
    font-size: 22px;
    line-height: 1;
}

.ddc-donut-hole span {
    font-size: 11px;
    color: var(--text-secondary);
}

.ddc-donut-legend {
    display: grid;
    gap: 8px;
}

.ddc-donut-legend-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.ddc-donut-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.ddc-chart-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 36px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.ddc-chart-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.15);
    overflow: hidden;
}

.ddc-chart-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
}

.ddc-chart-fill-borrador {
    background: #9aa2b0;
}

.ddc-chart-fill-en_revision {
    background: #d8a200;
}

.ddc-chart-fill-aprobada {
    background: #2aa662;
}

.ddc-chart-fill-vencida {
    background: #cb4e4e;
}

.ddc-check {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ddc-check-ok {
    border-left: 4px solid #2aa662;
}

.ddc-check-missing {
    border-left: 4px solid #d8a200;
}

.field-missing {
    padding: 10px;
    border: 1px dashed #d8a200;
    border-radius: var(--radius-sm);
    background: #fff9ea;
}

.status-inline-form .toolbar-field {
    min-width: 170px;
}

.status-inline-form select {
    width: auto;
    min-width: 170px;
}

.ddc-id-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
}

.ddc-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
    gap: 12px;
    align-items: start;
}

.ddc-subfield-label {
    margin-top: 8px;
}

.ddc-relationship-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.ddc-relationship-card {
    display: grid;
    gap: 2px;
    padding-left: 12px;
}

.ddc-relationship-card > span {
    font-weight: 700;
}

.ddc-relationship-options {
    display: grid;
    gap: 0;
}

.ddc-relationship-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-right: 4px;
    min-height: 18px;
    line-height: 1.05;
}

.ddc-relationship-option-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ddc-relationship-option-check span {
    display: inline;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.05;
}

.ddc-relationship-option-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.ddc-relationship-options input[type="text"] {
    flex: 1;
    min-width: 180px;
}

.ddc-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.ddc-switch-caption {
    display: inline;
    margin: 0;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1;
}

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

.ddc-switch-slider {
    position: relative;
    width: 34px;
    height: 18px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.2);
    transition: background-color var(--transition);
}

.ddc-switch-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform var(--transition);
}

.ddc-switch-input:checked + .ddc-switch-slider {
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
}

.ddc-switch-input:checked + .ddc-switch-slider::after {
    transform: translateX(16px);
}

.ddc-switch-input:disabled + .ddc-switch-slider {
    opacity: 0.45;
}

.ddc-rutdv-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.ddc-rutdv-row[hidden] {
    display: none !important;
}

.ddc-other-id-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.ddc-other-id-row[hidden] {
    display: none !important;
}

#naturalPersonFields[hidden] {
    display: none !important;
}

#nonNaturalCommercialField[hidden] {
    display: none !important;
}

#companyStartField[hidden],
#companyEndField[hidden],
#naturalBirthField[hidden],
#naturalDeathField[hidden] {
    display: none !important;
}

/* Denser, Klara-themed controls for Fichas form only. */
#profileForm.stack {
    gap: 14px;
}

#profileForm .split {
    gap: 12px;
}

#profileForm label span {
    margin-bottom: 6px;
    font-size: 13px;
}

#profileForm input:not([type="checkbox"]),
#profileForm select,
#profileForm textarea {
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: rgba(102, 126, 234, 0.05);
}

#profileForm input:not([type="checkbox"]):focus,
#profileForm select:focus,
#profileForm textarea:focus {
    border-color: rgba(102, 126, 234, 0.32);
    background: rgba(102, 126, 234, 0.08);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.11);
}

#profileForm .btn {
    min-height: 40px;
    padding: 10px 18px;
}

#profileForm .toolbar,
#profileForm .toolbar-inline,
#profileForm .toolbar-field {
    gap: 8px;
}

@media (max-width: 980px) {
    .ddc-hero-charts {
        grid-template-columns: 1fr;
    }

    .ddc-donut-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .ddc-donut-legend {
        width: 100%;
    }

    .ddc-relationship-row {
        grid-template-columns: 1fr;
    }

    .monitoring-risk-summary-cards {
        grid-template-columns: 1fr;
    }
}

.admin-progress-active {
    cursor: progress;
}

.admin-progress-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(20, 24, 40, 0.34);
    backdrop-filter: blur(5px);
}

.admin-progress-overlay[hidden] {
    display: none;
}

.admin-progress-panel {
    width: min(460px, 100%);
    padding: 22px;
    border: 1px solid rgba(102, 126, 234, 0.18);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    animation: fadeIn 0.18s ease;
}

.admin-progress-header {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: start;
}

.admin-progress-header strong {
    display: block;
    font-size: 18px;
    line-height: 1.25;
}

.admin-progress-header p {
    margin: 4px 0 0;
}

.admin-progress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.16);
    border-top-color: var(--brand-start);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.admin-progress-track {
    position: relative;
    height: 10px;
    margin-top: 20px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.14);
}

.admin-progress-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -42%;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    animation: progressSweep 1.3s ease-in-out infinite;
}

.admin-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 13px;
}

.btn.is-working {
    opacity: 0.72;
    cursor: progress;
}

.label {
    display: block;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stack {
    display: grid;
    gap: 20px;
}

label span {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background-color var(--transition), color var(--transition), opacity var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
    transform: none;
}

.btn-primary {
    border: none;
    color: #ffffff;
    background: var(--brand-gradient);
    box-shadow: var(--shadow-md);
}

.btn-success {
    border: none;
    color: #ffffff;
    background: color-mix(in srgb, var(--success) 82%, #000 18%);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--success) 30%, transparent 70%);
}

.btn-success:hover {
    background: color-mix(in srgb, var(--success) 82%, #000 18%);
    color: #ffffff;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--success) 30%, transparent 70%);
}

.btn-danger {
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.family-badges-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.btn-family-badges {
    min-height: 32px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    background: #1d4ed8;
    box-shadow: 0 8px 16px rgba(29, 78, 216, 0.28);
}

.btn-family-badges:hover {
    color: #ffffff;
    background: #1e40af;
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.36);
}

.btn-link {
    width: 100%;
}

.sanctions-bulk-discard-btn {
    min-height: 32px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    background: #1d4ed8;
    box-shadow: 0 8px 16px rgba(29, 78, 216, 0.28);
}

.sanctions-bulk-discard-btn:hover:not(:disabled) {
    color: #ffffff;
    background: #1e40af;
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.36);
}

.link-button {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.link-button:hover {
    text-decoration: underline;
}

.btn-oauth {
    width: 100%;
    justify-content: space-between;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
}

.btn-oauth:hover {
    background: var(--surface-soft);
    border-color: var(--text-tertiary);
    box-shadow: var(--shadow-sm);
}

.btn-google .oauth-mark {
    color: #db4437;
}

.btn-microsoft .oauth-mark {
    color: #00a4ef;
}

.oauth-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #f5f5f5;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.oauth-pill {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f4f5fb;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.alert.error {
    border-color: rgba(204, 51, 51, 0.18);
    background: var(--error-bg);
    color: var(--error);
}

.alert.success {
    border-color: rgba(51, 204, 51, 0.22);
    background: var(--success-bg);
    color: var(--success);
}

.credentials {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.auth-divider {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 25px 0 20px;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    position: relative;
    padding: 0 12px;
    background: var(--surface);
    color: var(--text-tertiary);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.oauth-grid {
    display: grid;
    gap: 12px;
}

.auth-helper {
    margin: 16px 0 0;
    font-size: 13px;
}

.table-card {
    overflow: hidden;
}

.tenant-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tenant-table-header h2 {
    margin: 0;
}

.admin-tenant-create,
.admin-create-panel {
    margin-bottom: 20px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.admin-user-edit-layout {
    align-items: start;
}

.tenant-create-form {
    gap: 22px;
}

.tenant-create-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.tenant-col-12 { grid-column: span 12; }
.tenant-col-6 { grid-column: span 6; }
.tenant-col-4 { grid-column: span 4; }
.tenant-col-3 { grid-column: span 3; }
.tenant-col-2 { grid-column: span 2; }

.tenant-inline-field {
    display: grid;
    gap: 8px;
    align-content: start;
}

.tenant-create-grid > label {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0;
}

.tenant-create-grid > label > span {
    margin: 0;
}

.tenant-create-grid > label > :not(span) {
    grid-column: 2;
    min-width: 0;
    width: 100%;
}

.tenant-input-with-counter {
    position: relative;
}

.tenant-input-with-counter input {
    padding-right: 66px;
}

.tenant-input-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    font-size: 12px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
}

.tenant-input-counter span {
    display: inline;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    font-weight: 400;
}

.tenant-rut-input-wrap {
    position: relative;
}

.tenant-rut-input-wrap input {
    padding-right: 42px;
}

.tenant-rut-indicator {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    text-align: center;
    line-height: 1;
    pointer-events: none;
}

.tenant-rut-indicator-valid {
    color: #1f8b1f;
    font-weight: 700;
}

.tenant-rut-indicator-invalid {
    font-size: 13px;
    color: var(--error);
    font-weight: 700;
}

.tenant-oauth-fieldset {
    margin: 2px 0 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.98));
}

.tenant-oauth-fieldset legend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    font-weight: 700;
}

.tenant-oauth-grid {
    margin-top: 12px;
}

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

.service-catalog-option {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.service-catalog-option > label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.service-catalog-option-name {
    color: var(--text);
    font-weight: 700;
}

.service-catalog-option-meta {
    color: var(--text-secondary);
    font-size: 13px;
}

.service-catalog-option-on {
    border-color: rgba(51, 204, 51, 0.32);
    background: linear-gradient(180deg, rgba(51, 204, 51, 0.08), #ffffff);
}

.service-catalog-option-off {
    border-color: rgba(148, 163, 184, 0.4);
    background: #f8fafc;
}

.service-catalog-option-coming-soon {
    border-style: dashed;
    opacity: 0.82;
}

.service-catalog-option .btn {
    justify-self: start;
    min-height: 38px;
    padding: 8px 14px;
}

@media (max-width: 1100px) {
    .tenant-col-4,
    .tenant-col-3 {
        grid-column: span 6;
    }

    .tenant-col-2 {
        grid-column: span 4;
    }
}

@media (max-width: 760px) {
    .tenant-create-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-col-12,
    .tenant-col-6,
    .tenant-col-4,
    .tenant-col-3,
    .tenant-col-2 {
        grid-column: span 1;
    }

    .tenant-create-grid > label {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 8px;
    }

    .tenant-create-grid > label > :not(span) {
        grid-column: 1;
    }

    .service-catalog-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-user-edit-row-2,
    .tenant-user-edit-row-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-user-edit-inline-field {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 8px;
    }

    .tenant-user-edit-inline-field > span {
        margin-bottom: 0;
    }
}

.service-access-block {
    display: grid;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.service-access-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.service-access-head h3 {
    margin: 0;
}

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

.tenant-user-edit-fields {
    display: grid;
    gap: 12px;
}

.tenant-user-edit-row {
    display: grid;
    gap: 12px;
}

.tenant-user-edit-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-user-edit-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tenant-user-edit-inline-field {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.tenant-user-edit-inline-field > span {
    margin: 0;
    white-space: nowrap;
}

.tenant-user-edit-inline-field > :is(input, select) {
    min-width: 0;
}

.service-access-option {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.service-access-option-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.service-access-option-name {
    font-weight: 600;
    color: var(--text);
}

.service-access-option-meta {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
}

.service-access-default-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
}

.service-access-default-toggle > span:first-child {
    font-size: 14px;
    color: var(--text);
}

.service-access-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    flex: 0 0 auto;
}

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

.service-access-toggle-slider {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #c6ceda;
    transition: background-color var(--transition);
}

.service-access-toggle-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition);
}

.service-access-toggle-input:checked + .service-access-toggle-slider {
    background: #2f6df3;
}

.service-access-toggle-input:checked + .service-access-toggle-slider::after {
    transform: translateX(16px);
}

.service-access-toggle-input:focus-visible + .service-access-toggle-slider {
    box-shadow: var(--focus-ring);
}

.service-access-toggle-input:disabled + .service-access-toggle-slider {
    opacity: 0.45;
}

.compact-stack {
    gap: 12px;
}

.metric-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.metric-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.panel-note,
.empty-state {
    padding: 16px 18px;
    border: 1px dashed rgba(102, 126, 234, 0.18);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.04), rgba(255, 255, 255, 0.9));
}

.search-page .panel-note,
.search-page .empty-state {
    border: 1.5px solid rgba(90, 98, 143, 0.34);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.1), rgba(255, 255, 255, 0.98));
    box-shadow: 0 4px 12px rgba(63, 70, 113, 0.08);
}

.empty-state {
    text-align: center;
}

.empty-state h2,
.panel-note h2,
.panel-note h3 {
    margin-top: 0;
}

.eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.section-heading,
.service-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin: 4px 0 8px;
}

.section-heading h2 {
    margin: 0;
    line-height: 1.2;
}

.service-card {
    background:
        linear-gradient(180deg, rgba(102, 126, 234, 0.04), transparent 40%),
        var(--surface);
}

.service-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f2f8;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge.enabled,
.badge.live,
.badge.completed,
.badge.queued,
.badge.clear,
.badge.active {
    background: rgba(51, 204, 51, 0.12);
    color: #1f8b1f;
}

.badge.pilot,
.badge.review,
.badge.running {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge.coming_soon,
.badge.coming-soon,
.badge.person,
.badge.company {
    background: #eef0f8;
    color: #5a628f;
}

.badge.match,
.badge.failed,
.badge.enhanced_review,
.badge.manual_followup {
    background: var(--error-bg);
    color: var(--error);
}

.badge.sanctions-near {
    background: var(--error-bg);
    color: var(--error);
}

.badge.sanctions-far {
    background: var(--warning-bg);
    color: var(--warning);
}

.refresh-countdown {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 118px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.refresh-countdown-value {
    font-size: 13px;
    font-weight: 700;
}

.refresh-countdown-caption {
    margin-top: 2px;
    font-size: 11px;
    color: inherit;
    opacity: 0.72;
}

.refresh-countdown.fresh {
    border-color: rgba(51, 204, 51, 0.22);
    background: var(--success-bg);
    color: #1f8b1f;
}

.refresh-countdown.warning {
    border-color: rgba(154, 101, 0, 0.2);
    background: var(--warning-bg);
    color: var(--warning);
}

.refresh-countdown.overdue {
    border-color: rgba(204, 51, 51, 0.2);
    background: var(--error-bg);
    color: var(--error);
}

.badge.pep-level {
    min-width: 0;
    gap: 6px;
    text-transform: none;
}

.badge.pep-level-1 {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.badge.pep-level-2 {
    background: rgba(249, 115, 22, 0.14);
    color: #c2410c;
}

.badge.pep-level-3 {
    background: rgba(234, 179, 8, 0.18);
    color: #a16207;
}

.badge.pep-status-current {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.badge.pep-status-former {
    background: rgba(234, 179, 8, 0.18);
    color: #a16207;
}

.badge.pep-status-associate {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.badge.cae-status-pending {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.badge.cae-status-cancelled {
    background: rgba(234, 179, 8, 0.18);
    color: #a16207;
}

.badge.attention-compact {
    min-width: 0;
    padding: 1px 6px;
    font-size: 9px;
    line-height: 1.1;
    text-transform: none;
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.pep-level-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 8px;
}

.badge[data-tooltip] {
    position: relative;
    cursor: help;
}

.badge[data-tooltip]:hover::after,
.badge[data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    max-width: 320px;
    min-width: 180px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    text-transform: none;
    white-space: normal;
    z-index: 40;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
    pointer-events: none;
}

.badge[data-tooltip]:hover::before,
.badge[data-tooltip]:focus-visible::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
    z-index: 40;
    pointer-events: none;
}

.table-cell-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

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

.list-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.list-item:last-child {
    border-bottom: 0;
}

.list-item.compact {
    padding: 10px 0;
}

.chart-box {
    min-height: 320px;
    position: relative;
}

.rutdv-query-timeline-chart-box {
    min-height: 160px;
}

.monitoring-risk-timeline-canvas {
    display: block;
    width: 100% !important;
    height: 180px !important;
    max-height: 180px;
}

.management-timeline-chart-box {
    min-height: 0;
}

.financial-risk-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.financial-risk-card {
    padding: 18px 20px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.04), rgba(255, 255, 255, 0.98));
}

.financial-risk-card strong {
    display: block;
    margin: 8px 0 6px;
    font-size: 28px;
    line-height: 1.1;
    color: var(--brand-end);
}

.financial-risk-card p {
    margin: 0;
}

.financial-risk-status-card .badge {
    margin-top: 8px;
}

.status-with-help {
    white-space: nowrap;
}

.inline-info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.08);
    color: var(--brand-end);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
}

.environmental-case-card {
    gap: 14px;
}

.environmental-case-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 0;
    padding: 10px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.environmental-case-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.environmental-case-heading h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.environmental-case-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 18px;
    align-items: start;
}

.environmental-case-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.environmental-case-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.environmental-case-columns .label {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.environmental-case-value {
    display: block;
    color: var(--text);
    font-weight: 400;
    line-height: 1.35;
}

.environmental-case-value-center {
    text-align: center;
}

.environmental-case-amount {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.07);
    width: fit-content;
    align-items: center;
}

.environmental-case-amount .environmental-case-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-end);
}

.environmental-case-amount small {
    font-size: 0.8rem;
    color: var(--muted);
}

.environmental-case-duration {
    color: var(--muted);
    font-size: 0.92em;
}

.environmental-case-column-center {
    align-items: center;
    text-align: center;
}

.environmental-case-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

.environmental-case-facts-panel {
    padding: 12px 14px;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.04);
}

.environmental-facts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.environmental-facts-table th,
.environmental-facts-table td {
    padding: 10px 12px;
    border: 1px solid rgba(102, 126, 234, 0.16);
    text-align: left;
    vertical-align: top;
}

.environmental-facts-table th {
    background: rgba(102, 126, 234, 0.08);
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.environmental-facts-table td {
    color: var(--text);
}

.bankruptcy-procedure-card {
    display: grid;
    gap: 16px;
}

.bankruptcy-procedure-header {
    display: grid;
    gap: 10px;
    margin-bottom: 0;
}

.bankruptcy-procedure-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bankruptcy-procedure-heading h3 {
    margin: 0;
}

.bankruptcy-procedure-toggle {
    margin-left: auto;
}

.ownership-source-cell {
    width: 220px;
    max-width: 220px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.table-sort-arrows {
    font-size: 10px;
    letter-spacing: -1px;
    color: var(--text-tertiary);
}

.table-sort-button.is-sorted-asc .table-sort-arrows,
.table-sort-button.is-sorted-desc .table-sort-arrows {
    color: var(--brand-end);
}

.json-box {
    margin: 0;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.row-highlight td {
    background: rgba(102, 126, 234, 0.06);
}

.api-doc-row-unread td {
    background: rgba(245, 158, 11, 0.08);
}

.inner-card {
    box-shadow: var(--shadow-sm);
}

.error-shell {
    min-height: calc(100vh - 140px);
    display: grid;
    place-items: center;
}

.error-card {
    width: min(680px, 100%);
    text-align: center;
}

.search-page {
    width: min(calc(100% - 40px), 1500px);
}

.settings-branding-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 20px;
    align-items: start;
}

.settings-policy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    margin-top: 16px;
}

.settings-policy-grid > .card {
    margin-top: 0;
}

.branding-preview-card,
.branding-settings-card {
    padding: 22px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.97));
}

.branding-main-preview-card {
    display: grid;
    gap: 14px;
}

.branding-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.branding-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.branding-status-badge-active {
    background: rgba(42, 166, 98, 0.14);
    color: #1b7b47;
}

.branding-status-badge-empty {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.branding-preview-context {
    padding: 16px;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(241, 245, 255, 0.92), rgba(255, 255, 255, 0.95));
}

.branding-context-bar {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(95, 114, 201, 0.14);
    background: linear-gradient(135deg, rgba(81, 95, 168, 0.94), rgba(72, 127, 178, 0.9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.branding-context-brand {
    color: rgba(255, 255, 255, 0.96);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.branding-context-slot {
    width: 170px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.16);
}

.branding-preview-frame {
    width: 100%;
    max-width: 100%;
    min-height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin-top: 14px;
    border: 1px dashed rgba(102, 126, 234, 0.2);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.branding-preview-image {
    width: 120px;
    height: 60px;
    object-fit: contain;
}

.branding-preview-empty {
    color: rgba(255, 255, 255, 0.88);
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
}

.branding-preview-meta {
    display: grid;
    gap: 2px;
}

.branding-preview-meta .muted {
    margin: 0;
    line-height: 1.2;
}

.branding-guidance {
    display: grid;
    gap: 4px;
}

.branding-actions-card {
    display: grid;
}

.branding-actions-stack {
    gap: 14px;
}

.branding-upload-preview .branding-preview-frame {
    margin-top: 10px;
    min-height: 104px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.branding-actions-toolbar {
    margin-top: auto;
}

.branding-guidance p,
.push-top-none {
    margin-top: 0;
}

#brandingUploadMessage:empty {
    display: none;
}

.branding-upload-preview[hidden] {
    display: none;
}

.upload-error {
    color: var(--error);
}

.search-query-section,
.report-section {
    margin-bottom: 24px;
    padding: 18px 28px 24px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.workflow-panels {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.workflow-panel {
    padding: 18px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.04), rgba(255, 255, 255, 0.96));
}

.workflow-panel[hidden] {
    display: none;
}

.create-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.create-profile-comments-col,
.create-profile-groups-col,
.create-profile-actions-col {
    min-width: 0;
}

.create-profile-comments-label {
    display: grid;
    gap: 8px;
    width: 100%;
}

.create-profile-comments-box {
    position: relative;
}

.create-profile-comments-box textarea {
    margin: 0;
    min-height: 132px;
    padding-bottom: 34px;
}

.create-profile-char-counter {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    color: var(--text-secondary);
    pointer-events: none;
}

.create-profile-char-counter span {
    display: inline;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.create-profile-groups-col {
    display: grid;
}

.create-profile-groups {
    display: grid;
    gap: 8px;
    align-content: start;
}

.create-profile-groups .label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.create-profile-groups .search-group-picker-grid {
    display: grid;
    gap: 2px;
    max-height: 132px;
    overflow: auto;
    align-content: start;
}

.create-profile-groups .checkbox-row span {
    display: inline;
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;
}

.search-rutdv-comments-head {
    margin-top: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.search-rutdv-comment-head-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
    line-height: 1.25;
    color: #36425d;
    min-height: 30px;
}

.search-rutdv-comment-head-row strong {
    font-size: 12px;
    font-weight: 600;
}

.search-rutdv-comments-actions {
    margin-top: 0;
    display: flex;
    justify-content: flex-end;
}

.search-rutdv-comments-add-btn {
    background: #1f6fe8;
    border-color: #1f6fe8;
    color: #fff;
    min-height: 30px;
    font-size: 12px;
    padding: 6px 10px;
}

.search-rutdv-comments-add-btn.is-disabled,
.search-rutdv-comments-add-btn:disabled {
    background: #c4c8d2;
    border-color: #c4c8d2;
    color: #5a6272;
    cursor: not-allowed;
}

.search-rutdv-comment-composer {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.search-rutdv-comment-composer[hidden] {
    display: none;
}

.search-rutdv-comment-composer textarea {
    margin: 0;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    resize: none;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 12px;
}

.search-rutdv-comment-composer-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    justify-content: flex-end;
}

.search-rutdv-comment-composer-actions small {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 11px;
}

.search-rutdv-comment-composer-actions .btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.search-rutdv-comments-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: grid;
    gap: 4px;
}

.search-rutdv-comments-list li {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
    line-height: 1.25;
    color: #36425d;
}

.search-rutdv-comments-list strong {
    font-size: 12px;
    font-weight: 600;
}

.search-rutdv-comments-bullet {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #1f6fe8;
    display: inline-block;
    transform: translateY(-1px);
    flex: 0 0 auto;
}

.source-access-card-note-row {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.source-access-card-note-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: min(100%, 420px);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(31, 111, 232, 0.16);
    background: rgba(31, 111, 232, 0.06);
    color: #36425d;
    font-size: 12px;
    line-height: 1.25;
    text-align: right;
}

.source-access-card-note-pill .search-rutdv-comments-bullet {
    transform: none;
}

.create-profile-actions-col {
    display: grid;
    gap: 10px;
    align-content: start;
}

.create-profile-actions-col .search-monitoring-toggle {
    margin-right: 0;
}

.create-profile-actions-col .btn {
    width: 100%;
}

.search-workflow-actions {
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.search-monitoring-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 18px;
    white-space: nowrap;
}

.search-monitoring-toggle > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 18px;
}

.search-monitoring-toggle .ddc-switch {
    margin-left: 0;
    align-self: center;
    line-height: 0;
}

.monitoring-field-value {
    display: inline-block;
    vertical-align: middle;
}

.monitoring-field-edit {
    margin-left: 6px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.workflow-actions-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.workflow-actions-row form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.workflow-actions-move-form select {
    min-width: 180px;
    max-width: 260px;
}

.identification-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(320px, 0.95fr);
    gap: 18px;
}

.identity-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.96);
    overflow: hidden;
}

.search-page .identity-panel {
    border: 1.5px solid rgba(90, 98, 143, 0.35);
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(63, 70, 113, 0.1);
}

.identity-panel table {
    margin: 0;
}

.identity-risk-panel {
    display: grid;
    gap: 16px;
    padding: 18px;
    align-content: start;
}

.risk-gauge-card {
    padding: 16px;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.04), rgba(255, 255, 255, 0.96));
}

.risk-gauge-trigger {
    width: 100%;
    border: 1px solid rgba(90, 98, 143, 0.2);
    border-radius: var(--radius-md);
    text-align: left;
    cursor: pointer;
}

.risk-gauge-trigger:hover {
    box-shadow: 0 8px 18px rgba(63, 70, 113, 0.12);
}

.search-page .risk-gauge-card {
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.12), rgba(255, 255, 255, 1));
}

.risk-gauge-header {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

.risk-gauge-header strong {
    font-size: 18px;
    color: var(--text);
}

.risk-score-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(140px, 1fr);
    gap: 16px;
    align-items: stretch;
}

.risk-score-gauge-column {
    min-width: 0;
}

.risk-score-summary-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 0 0 1px rgba(90, 98, 143, 0.12);
    text-align: center;
}

.risk-score-summary-value {
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.risk-score-summary-message {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 10px;
    min-height: 14px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--muted);
}

@media (max-width: 720px) {
    .risk-score-layout {
        grid-template-columns: 1fr;
    }
}

.risk-gauge-track {
    position: relative;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e 0%, #a3e635 24%, #facc15 52%, #fb923c 76%, #ef4444 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.risk-gauge-marker {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
    transform: translateY(-50%);
}

.risk-gauge-marker.risk-low {
    background: #16a34a;
}

.risk-gauge-marker.risk-medium {
    background: #f59e0b;
}

.risk-gauge-marker.risk-high {
    background: #dc2626;
}

.risk-gauge-marker.risk-unreviewed {
    background: #94a3b8;
}

.risk-gauge-scale {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.identity-risk-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.identity-risk-item {
    padding: 14px 16px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-md);
    background: rgba(102, 126, 234, 0.04);
}

.identity-risk-item-centered {
    text-align: center;
}

.identity-risk-item strong {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: var(--text);
}

.risk-matrix-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.risk-matrix-weight-card {
    width: 100%;
    max-width: 405px;
    justify-self: end;
}

.risk-matrix-weight-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.risk-matrix-weight-card-row strong {
    margin-top: 0;
    line-height: 1;
}

.btn-mini-blue {
    min-height: 28px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    background: #2563eb;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.22);
}

.btn-mini-blue:hover {
    color: #ffffff;
    background: #1d4ed8;
    box-shadow: 0 10px 18px rgba(29, 78, 216, 0.28);
}

.risk-matrix-actions {
    display: grid;
    gap: 10px;
}

.risk-matrix-note-field {
    display: grid;
    gap: 6px;
}

.risk-matrix-note-field input {
    width: 100%;
}

.risk-matrix-versions-range {
    width: 100%;
    margin-top: 8px;
}

.risk-matrix-slider-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.risk-matrix-slider-inline input[type='range'] {
    flex: 1;
    min-width: 130px;
}

.risk-matrix-slider-inline span {
    width: 42px;
    text-align: right;
    font-weight: 600;
}

#riskMatrixSettingsCard .table-wrap table th,
#riskMatrixSettingsCard .table-wrap table td {
    vertical-align: middle;
}

#riskMatrixSettingsCard .table-wrap table th,
#riskMatrixSettingsCard .table-wrap table td {
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1.05;
}

#riskMatrixSettingsCard .table-wrap input[type='checkbox'] {
    vertical-align: middle;
}

#riskMatrixSettingsCard .table-wrap input[type='range'] {
    margin: 0;
}

#riskMatrixSettingsCard .risk-matrix-slider-inline {
    gap: 2px;
}

#riskMatrixSettingsCard .risk-matrix-slider-inline span {
    width: 26px;
    font-size: 10px;
}

#riskMatrixSettingsCard .table-wrap input[type='checkbox'] {
    width: 12px;
    height: 12px;
}

#riskMatrixSettingsCard .risk-matrix-slider-inline input[type='range'] {
    height: 12px;
}

#riskMatrixSettingsCard .table-wrap input[data-risk-severity] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
}

#riskMatrixSettingsCard .table-wrap input[data-risk-weight] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
}

#riskMatrixSettingsCard .table-wrap input[data-risk-weight]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd 0%, #60a5fa 45%, #3b82f6 100%);
    border: none !important;
}

#riskMatrixSettingsCard .table-wrap input[data-risk-weight]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd 0%, #60a5fa 45%, #3b82f6 100%);
    border: none !important;
}

#riskMatrixSettingsCard .table-wrap input[data-risk-severity]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #16a34a 0%, #facc15 50%, #dc2626 100%);
    border: none !important;
}

#riskMatrixSettingsCard .table-wrap input[data-risk-severity]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #16a34a 0%, #facc15 50%, #dc2626 100%);
    border: none !important;
}

#riskMatrixSettingsCard .table-wrap input[data-risk-severity]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 10px;
    border-radius: 999px;
    margin-top: -1px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

#riskMatrixSettingsCard .table-wrap input[data-risk-severity]::-moz-range-thumb {
    width: 16px;
    height: 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

#riskMatrixSettingsCard .table-wrap input[data-risk-weight]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 10px;
    border-radius: 999px;
    margin-top: -1px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

#riskMatrixSettingsCard .table-wrap input[data-risk-weight]::-moz-range-thumb {
    width: 16px;
    height: 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
}

#riskMatrixSettingsCard .table-wrap tr.is-inactive [data-risk-severity-label],
#riskMatrixSettingsCard .table-wrap tr.is-inactive [data-risk-weight-label],
#riskMatrixSettingsCard .table-wrap tr.is-inactive td {
    color: #8a93a3;
}

#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-severity]::-webkit-slider-runnable-track,
#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-weight]::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, #d6dbe4 0%, #c8ced9 100%);
}

#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-severity]::-moz-range-track,
#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-weight]::-moz-range-track {
    background: linear-gradient(90deg, #d6dbe4 0%, #c8ced9 100%);
}

#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-severity]::-webkit-slider-thumb,
#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-weight]::-webkit-slider-thumb,
#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-severity]::-moz-range-thumb,
#riskMatrixSettingsCard .table-wrap tr.is-inactive input[data-risk-weight]::-moz-range-thumb {
    background: #f7f8fa;
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 1px 3px rgba(148, 163, 184, 0.22);
}

#searchRiskMatrixModal .risk-matrix-slider-readonly,
#riskMatrixTimelineModal .risk-matrix-slider-readonly {
    gap: 6px;
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[type='range'],
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[type='range'] {
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    margin: 0;
    height: 12px;
}

#searchRiskMatrixModal .risk-matrix-slider-readonly span,
#riskMatrixTimelineModal .risk-matrix-slider-readonly span {
    min-width: 24px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-severity]::-webkit-slider-runnable-track,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-severity]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #16a34a 0%, #facc15 50%, #dc2626 100%);
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-severity]::-moz-range-track,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-severity]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #16a34a 0%, #facc15 50%, #dc2626 100%);
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-weight]::-webkit-slider-runnable-track,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-weight]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd 0%, #60a5fa 45%, #3b82f6 100%);
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-weight]::-moz-range-track,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-weight]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd 0%, #60a5fa 45%, #3b82f6 100%);
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-severity]::-webkit-slider-thumb,
#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-weight]::-webkit-slider-thumb,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-severity]::-webkit-slider-thumb,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-weight]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 9px;
    border-radius: 999px;
    margin-top: -1px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-severity]::-moz-range-thumb,
#searchRiskMatrixModal .risk-matrix-slider-readonly input[data-risk-weight]::-moz-range-thumb,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-severity]::-moz-range-thumb,
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[data-risk-weight]::-moz-range-thumb {
    width: 14px;
    height: 9px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}

.risk-gauge-modal-card {
    cursor: default;
}

.history-risk-score-trigger.risk-gauge-mini {
    width: 100%;
    max-width: 96px;
    min-width: 96px;
    padding: 4px 6px 5px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.04);
    cursor: pointer;
}

.history-risk-score-trigger {
    display: block;
    width: 100%;
    min-width: 130px;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.history-risk-gauge-mini {
    min-width: 130px;
    gap: 4px;
    padding: 4px 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.history-risk-gauge-mini strong {
    font-size: 12px;
    line-height: 1.1;
}

.history-risk-gauge-mini .registry-risk-gauge-track {
    height: 8px;
}

.history-risk-gauge-mini .risk-gauge-marker {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.history-risk-score-trigger.risk-gauge-mini .risk-gauge-header {
    margin-bottom: 4px;
}

.history-risk-score-trigger.risk-gauge-mini .risk-gauge-header .label {
    font-size: 10px;
}

.history-risk-score-trigger.risk-gauge-mini .risk-gauge-header strong {
    font-size: 12px;
}

.history-risk-score-trigger.risk-gauge-mini .risk-gauge-track {
    height: 8px;
}

.history-risk-score-trigger.risk-gauge-mini .risk-gauge-marker {
    width: 10px;
    height: 10px;
    top: -1px;
}

#searchRiskMatrixModal .table-wrap table th,
#searchRiskMatrixModal .table-wrap table td,
#riskMatrixTimelineModal .table-wrap table th,
#riskMatrixTimelineModal .table-wrap table td {
    padding: 2px 4px;
    font-size: 11px;
    line-height: 1.05;
    vertical-align: middle;
}

#searchRiskMatrixModal .table-wrap input[type='checkbox'],
#riskMatrixTimelineModal .table-wrap input[type='checkbox'] {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

#searchRiskMatrixModal .risk-matrix-slider-inline,
#riskMatrixTimelineModal .risk-matrix-slider-inline {
    gap: 2px;
}

#searchRiskMatrixModal .risk-matrix-slider-readonly input[type='range'],
#riskMatrixTimelineModal .risk-matrix-slider-readonly input[type='range'] {
    height: 10px;
}

#searchRiskMatrixModal .risk-matrix-slider-readonly span,
#riskMatrixTimelineModal .risk-matrix-slider-readonly span {
    min-width: 20px;
    font-size: 10px;
}

.identity-risk-login {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.sanctions-legal-disclaimer {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.35;
}

.threshold-slider-shell {
    display: grid;
    gap: 10px;
}

.threshold-static-summary {
    display: block;
}

.threshold-double-slider {
    --threshold-thumb-size: 30;
    position: relative;
    height: 72px;
    margin-top: 2px;
}

.threshold-segment {
    position: absolute;
    top: 30px;
    height: 16px;
    pointer-events: none;
}

.threshold-segment-excluded {
    border-radius: 999px 0 0 999px;
    background: rgba(125, 121, 232, 0.5);
}

.threshold-segment-hidden {
    background: rgba(123, 97, 195, 0.8);
}

.threshold-segment-visible {
    border-radius: 0 999px 999px 0;
    background: rgba(124, 75, 164, 1);
}

.threshold-thumb-value {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    min-width: 56px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.1;
    text-align: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
    pointer-events: none;
    z-index: 2;
}

.threshold-thumb-value-hidden {
    background: rgba(123, 97, 195, 0.95);
}

.threshold-thumb-value-visible {
    background: rgba(124, 75, 164, 0.96);
}

.threshold-double-slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.threshold-double-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 16px;
    background: transparent;
}

.threshold-double-slider input[type="range"]::-moz-range-track {
    height: 16px;
    background: transparent;
}

.threshold-double-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 22px;
    width: calc(var(--threshold-thumb-size) * 1px);
    height: calc(var(--threshold-thumb-size) * 1px);
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #7c4ba4;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    position: relative;
    transform: translateY(-34px);
    z-index: 3;
}

.threshold-double-slider input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: calc(var(--threshold-thumb-size) * 1px);
    height: calc(var(--threshold-thumb-size) * 1px);
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid #7c4ba4;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    position: relative;
    transform: translateY(-34px);
    z-index: 3;
}

.threshold-ruler {
    position: relative;
    height: 14px;
    margin-top: -4px;
    margin-inline: calc(var(--threshold-thumb-size, 30) * 0.5px);
    box-sizing: border-box;
}

.threshold-ruler-tick {
    position: absolute;
    left: calc(var(--mark) * 1%);
    top: 50%;
    transform: translate(-50%, -50%);
    width: 1px;
    height: 8px;
    border-radius: 1px;
    background: rgba(51, 65, 85, 0.42);
}

.threshold-ruler-tick:nth-child(1),
.threshold-ruler-tick:nth-child(6),
.threshold-ruler-tick:nth-child(11) {
    width: 2px;
    height: 11px;
    background: rgba(51, 65, 85, 0.72);
}

.threshold-ruler-tick.is-start {
    transform: translateY(-50%);
}

.threshold-ruler-tick.is-end {
    transform: translate(-100%, -50%);
}

.threshold-ruler-labels {
    position: relative;
    height: 14px;
    margin-top: -1px;
    margin-inline: calc(var(--threshold-thumb-size, 30) * 0.5px);
    box-sizing: border-box;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 400;
}

.threshold-ruler-label {
    position: absolute;
    left: calc(var(--mark) * 1%);
    transform: translateX(-50%);
    line-height: 1;
    font-weight: 400;
}

.threshold-ruler-label.is-start {
    transform: translateX(0);
}

.threshold-ruler-label.is-end {
    transform: translateX(-100%);
}

.threshold-segment-captions {
    position: relative;
    height: 18px;
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 12px;
}

.threshold-segment-captions span {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.sanctions-threshold-lab {
    margin-top: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(124, 75, 164, 0.05) 0%, rgba(124, 75, 164, 0.01) 100%);
    padding: 12px;
}

.sanctions-threshold-lab-header h3 {
    margin: 0;
    font-size: 16px;
}

.sanctions-threshold-lab-header .muted {
    margin-top: 6px;
}

.sanctions-threshold-lab-reference {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sanctions-threshold-lab-table th,
.sanctions-threshold-lab-table td {
    vertical-align: middle;
}

.sanctions-threshold-lab-table th {
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 11px;
    line-height: 1.1;
}

.sanctions-threshold-lab-table td {
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 12px;
    line-height: 1.15;
}

.sanctions-threshold-lab-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    border: 1px solid transparent;
}

.sanctions-threshold-lab-chip-excluded {
    background: rgba(125, 121, 232, 0.18);
    color: #4f46b6;
    border-color: rgba(125, 121, 232, 0.45);
}

.sanctions-threshold-lab-chip-hidden {
    background: rgba(123, 97, 195, 0.16);
    color: #5f33a3;
    border-color: rgba(123, 97, 195, 0.4);
}

.sanctions-threshold-lab-chip-visible {
    background: rgba(124, 75, 164, 0.16);
    color: #4d1f7f;
    border-color: rgba(124, 75, 164, 0.4);
}

.sanctions-threshold-form {
    position: relative;
}

.sanctions-threshold-hover-hint {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
    z-index: 4;
}

.sanctions-threshold-hover-hint.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.sanctions-threshold-hover-hint svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.sanctions-threshold-hover-hint-outline {
    display: none;
}

.sanctions-threshold-hover-hint-fill {
    fill: none;
    stroke: #ff8b1f;
    stroke-width: 14;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 10px rgba(255, 139, 31, 0.35));
}

.sanctions-threshold-hover-hint-head {
    fill: #ff8b1f;
    filter: drop-shadow(0 3px 8px rgba(255, 139, 31, 0.35));
}

.sanctions-threshold-hover-hint span {
    position: absolute;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #152238;
    background: #ffe86c;
    box-shadow: 0 4px 12px rgba(21, 34, 56, 0.2);
}

.toolbar-center {
    justify-content: center;
}

.security-policy-controls {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.security-policy-controls label {
    flex: 1;
}

.security-policy-controls .btn {
    white-space: nowrap;
}

.search-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}

.search-hero-monitoring-entity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 720px);
    align-items: stretch;
    column-gap: 16px;
    row-gap: 12px;
}

.search-hero-monitoring-entity .hero-copy,
.search-hero-monitoring-entity .search-hero-actions {
    align-self: stretch;
}

.search-hero-monitoring-entity .search-hero-actions {
    height: 100%;
}

.registry-risk-gauge {
    min-width: 180px;
    display: grid;
    gap: 8px;
}

.registry-risk-gauge strong {
    font-size: 13px;
    line-height: 1.2;
    color: var(--text);
}

.registry-risk-gauge-track {
    height: 12px;
}

.registry-risk-gauge .risk-gauge-marker {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.risk-distribution-bar {
    width: 100%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    border: 1px solid var(--border);
    background: var(--surface-soft);
}

.risk-distribution-segment {
    height: 100%;
    min-width: 0;
}

.risk-distribution-segment.risk-high {
    background: #ef4444;
}

.risk-distribution-segment.risk-medium {
    background: #f59e0b;
}

.risk-distribution-segment.risk-low {
    background: #10b981;
}

.risk-distribution-segment.risk-unreviewed {
    background: #94a3b8;
}

.group-name-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.group-name-edit-trigger {
    font-size: 15px;
    line-height: 1;
    text-decoration: none !important;
}

.group-name-edit-form {
    display: inline-flex;
    align-items: center;
}

.group-name-edit-form[hidden] {
    display: none !important;
}

.group-name-edit-form input {
    min-width: 240px;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px 8px;
}

.search-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.search-hero-actions-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
}

.search-hero-report-column {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.search-hero-report-btn {
    width: auto;
}

.search-hero-workflow-column {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
}

.search-hero-action-form {
    width: auto;
}

.search-hero-workflow-btn {
    width: auto;
    justify-content: flex-start;
    gap: 10px;
}

.search-hero-action-icon {
    display: inline-flex;
    width: 20px;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
    opacity: 0.8;
    line-height: 1;
}

.search-hero-action-icon-monitoring {
    color: #2e9b57;
}

.search-hero-action-icon-pending {
    color: #d4a019;
}

.search-hero-action-icon-rejected {
    color: #d74b4b;
}

.search-hero-feedback {
    width: min(100%, 560px);
    margin: 0;
    text-align: right;
}

.monitoring-hero-actions-grid {
    width: min(100%, 720px);
    height: 100%;
    margin-left: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.monitoring-hero-action-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    height: 100%;
}

.monitoring-hero-action-title {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
}

.monitoring-hero-action-card .search-group-picker {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 100%;
}

.monitoring-hero-action-card .search-group-picker-grid {
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 2px;
}

.monitoring-hero-groups-grid {
    gap: 2px;
}

.monitoring-hero-groups-grid .checkbox-row {
    margin: 0;
    padding: 0;
    line-height: 1.05;
    min-height: 0;
    font-size: 12px;
}

.monitoring-hero-groups-grid .checkbox-row input[type="checkbox"] {
    margin: 0;
    transform: scale(0.9);
    transform-origin: left center;
}

.monitoring-hero-groups-grid .checkbox-row span {
    font-size: 12px;
    font-weight: 400;
}

.search-hero-monitoring-groups-badges {
    margin-top: 4px;
    gap: 6px;
}

.search-hero-monitoring-groups-badges .badge {
    font-weight: 500;
    padding: 2px 8px;
}

.monitoring-hero-risk-card {
    margin-top: 6px;
    min-height: 196px;
    height: 196px;
    display: flex;
    flex-direction: column;
}

.monitoring-hero-risk-card .monitoring-risk-timeline-canvas {
    min-height: 0;
    flex: 1;
}

.monitoring-hero-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.monitoring-hero-action-buttons form,
.monitoring-hero-action-buttons .btn {
    width: 100%;
}

.monitoring-hero-action-card-actions .search-monitoring-toggle {
    margin-right: 0;
    justify-content: space-between;
}

.section-heading.compact-heading {
    margin-top: 14px;
    margin-bottom: 8px;
}

.section-heading.compact-heading.push-top-none {
    margin-top: 0;
}

.section-heading h3 {
    margin: 0;
    font-size: 17px;
    color: var(--text);
}

.search-page .section-heading h2 {
    font-size: 23px;
}

.search-page .section-heading h3 {
    font-size: 16px;
}

.search-page .card h3 {
    font-size: 15px;
}

.section-title-toggle {
    padding: 0;
    border: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.section-title-toggle:hover {
    text-decoration: underline;
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 920px;
    margin: 0;
}

.search-form-wrap {
    width: 100%;
    max-width: 920px;
}

.search-input-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 720px;
}

.search-input {
    max-width: none;
    min-height: 56px;
    font-size: 18px;
    border-radius: 999px;
    padding-inline: 22px;
}

.search-submit {
    min-width: 140px;
    min-height: 56px;
    border-radius: 999px;
}

.search-query-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
}

.search-progress-track {
    position: relative;
    width: 100%;
    height: 2px;
    margin-top: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.search-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 32%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8), rgba(102, 126, 234, 0.8));
    transform: translateX(-110%);
}

.search-form-wrap.is-loading .search-progress-track {
    opacity: 1;
}

.search-form-wrap.is-loading .search-progress-bar {
    animation: searchBarPingPong 1.15s ease-in-out infinite alternate;
}

.search-name-loading .report-section {
    display: none;
}

.search-name-skeleton {
    margin-top: 20px;
}

.search-name-skeleton-flow {
    display: grid;
    gap: 16px;
}

.search-name-skeleton-panel {
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.search-name-skeleton-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.search-name-skeleton-title {
    width: min(340px, 64%);
    height: 20px;
    border-radius: 999px;
}

.search-name-skeleton-action {
    width: 108px;
    height: 30px;
    border-radius: 999px;
}

.search-name-skeleton-ident-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(200px, 0.8fr);
    gap: 14px;
}

.search-name-skeleton-ident-card {
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.96);
    padding: 14px;
    display: grid;
    gap: 10px;
}

.search-name-skeleton-line {
    width: 62%;
    height: 14px;
    border-radius: 999px;
}

.search-name-skeleton-line-lg {
    width: 86%;
}

.search-name-skeleton-line-sm {
    width: 42%;
}

.search-name-skeleton-subtitle {
    width: min(440px, 72%);
    height: 14px;
    border-radius: 999px;
    margin-top: 18px;
}

.search-name-skeleton-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.search-name-skeleton-pill {
    width: 138px;
    height: 30px;
    border-radius: 999px;
}

.search-name-skeleton-table {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.search-name-skeleton-row {
    display: grid;
    grid-template-columns: minmax(84px, 0.8fr) minmax(140px, 2fr) minmax(60px, 0.8fr) minmax(80px, 1.2fr) minmax(90px, 1fr);
    gap: 10px;
}

.search-name-skeleton-row span {
    height: 14px;
    border-radius: 999px;
    display: block;
}

.search-name-skeleton-row-head span {
    height: 11px;
    opacity: 0.92;
}

.search-name-skeleton-row span:nth-child(1) {
    width: 86%;
}

.search-name-skeleton-row span:nth-child(2) {
    width: 100%;
}

.search-name-skeleton-row span:nth-child(3) {
    width: 66%;
}

.search-name-skeleton-row span:nth-child(4) {
    width: 84%;
}

.search-name-skeleton-row span:nth-child(5) {
    width: 74%;
}

@media (max-width: 720px) {
    .search-name-skeleton-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .search-name-skeleton-ident-grid,
    .search-name-skeleton-row {
        grid-template-columns: 1fr;
    }

    .search-name-skeleton-title,
    .search-name-skeleton-action,
    .search-name-skeleton-subtitle,
    .search-name-skeleton-pill,
    .search-name-skeleton-line,
    .search-name-skeleton-line-lg,
    .search-name-skeleton-line-sm,
    .search-name-skeleton-row span {
        width: 100%;
    }
}

.skeleton-shimmer {
    background: linear-gradient(95deg, rgba(237, 242, 255, 0.82) 20%, rgba(201, 214, 255, 0.9) 50%, rgba(237, 242, 255, 0.82) 80%);
    background-size: 220% 100%;
    animation: searchNameSkeletonShimmer 1.25s linear infinite;
}

.batch-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.batch-sources-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.batch-sources-header .label {
    margin: 0;
}

.batch-source-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-muted);
    cursor: pointer;
}

.batch-source-content {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.batch-source-title {
    display: block;
    font-weight: 700;
    line-height: 1.15;
}

.batch-source-description {
    display: block;
    font-weight: 400;
    line-height: 1.3;
}

.batch-progress-cell {
    min-width: 120px;
}

#batchRutdvCounter.text-danger {
    color: #b42318;
    font-weight: 600;
}

.search-history-link {
    min-height: 56px;
    padding-inline: 24px;
    border-radius: 999px;
    white-space: nowrap;
}

.history-table-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
}

.history-table th,
.history-table td {
    padding: 8px 8px;
}

.history-timestamp {
    display: inline-grid;
    gap: 1px;
    white-space: nowrap;
    line-height: 1.15;
}

.history-table-action-btn {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.05;
    white-space: nowrap;
}

.history-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.history-pagination-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.history-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #ffffff;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: border-color var(--transition), box-shadow var(--transition), color var(--transition), background-color var(--transition), transform var(--transition);
}

.history-pagination-link:hover {
    border-color: rgba(47, 109, 243, 0.48);
    color: #2f6df3;
    transform: translateY(-1px);
}

.history-pagination-link.is-active {
    border-color: #2f6df3;
    color: #2f6df3;
    background: rgba(47, 109, 243, 0.08);
    box-shadow: 0 4px 12px rgba(47, 109, 243, 0.16);
}

.history-pagination-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    background: #f8fafc;
}

.history-pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: var(--text-tertiary);
    font-size: 11px;
    letter-spacing: 0.08em;
}

.history-pagination-total,
.history-pagination-status {
    font-size: 12px;
}

.history-section-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.history-section-heading h2 {
    text-align: center;
}

.history-pagination-top {
    justify-content: center;
    width: 100%;
}

@media (max-width: 768px) {
    .history-pagination {
        justify-content: center;
    }

    .history-pagination-total,
    .history-pagination-status,
    .history-pagination-item.is-mobile-optional,
    .history-pagination-item-dots {
        display: none;
    }

    .history-pagination-list {
        gap: 4px;
    }

    .history-pagination-link {
        min-width: 28px;
        height: 28px;
        padding: 0 6px;
        border-radius: 7px;
        font-size: 12px;
    }
}

.btn-copy {
    margin-top: 0;
}

.ccs-morosidad-copy {
    margin-left: auto;
}

.collapsible-table[hidden] {
    display: none;
}

.collapsible-table {
    padding-top: 2px;
}

.table-wrap-ultra-dense {
    max-height: 520px;
    overflow: auto;
}

.relationship-mesh-table-wrap {
    max-height: 560px;
    overflow: auto;
}

.relationship-mesh-table {
    font-size: 12px;
    line-height: 1.2;
}

.relationship-mesh-table th,
.relationship-mesh-table td {
    padding: 6px 8px;
}

.relationship-mesh-table th {
    font-size: 10px;
}

.relationship-mesh-query-actions {
    width: 100%;
}

.relationship-mesh-mode-link.is-disabled,
.relationship-mesh-mode-link.is-disabled:hover {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(114, 124, 148, 0.2);
    color: rgba(114, 124, 148, 0.75);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.relationship-mesh-search-form {
    max-width: none;
}

.relationship-mesh-degree-wrap {
    margin: 0;
    flex: 0 0 120px;
}

.relationship-mesh-degree-select {
    min-height: 56px;
    width: 100%;
    border-radius: 999px;
    padding-inline: 16px;
}

.table-ultra-dense {
    font-size: 10px;
    line-height: 1.1;
}

.table-ultra-dense th,
.table-ultra-dense td {
    padding: 2px 4px;
}

.table-ultra-dense th {
    font-size: 9px;
    letter-spacing: 0.03em;
}

#stateTransfersTable {
    table-layout: fixed;
}

#stateTransfersTable th,
#stateTransfersTable td {
    padding: 1px 4px !important;
    line-height: 1.08 !important;
}

#stateTransfersTable thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface);
}

#stateTransfersTable th:first-child,
#stateTransfersTable td:first-child,
#stateTransfersTable th:last-child,
#stateTransfersTable td:last-child {
    white-space: nowrap;
}

#stateTransfersTable td {
    font-size: 10px;
    word-break: break-word;
}

#stateSalesOcTable {
    table-layout: fixed;
}

#stateSalesOcTable th,
#stateSalesOcTable td {
    padding: 1px 4px !important;
    line-height: 1.08 !important;
}

#stateSalesOcTable thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface);
    font-size: 9px !important;
    letter-spacing: 0.03em !important;
}

#stateSalesOcTable td {
    font-size: 10px !important;
    word-break: break-word;
}

#stateSalesOcTable th:nth-child(1),
#stateSalesOcTable td:nth-child(1),
#stateSalesOcTable th:nth-child(2),
#stateSalesOcTable td:nth-child(2),
#stateSalesOcTable th:nth-child(8),
#stateSalesOcTable td:nth-child(8) {
    white-space: nowrap;
}

#stateSalesOcTable th:nth-child(1),
#stateSalesOcTable td:nth-child(1),
#stateSalesOcTable th:nth-child(2),
#stateSalesOcTable td:nth-child(2) {
    width: 7%;
}

#stateSalesOcTable th:nth-child(8),
#stateSalesOcTable td:nth-child(8) {
    width: 10%;
}

#stateSalesOcTable th:nth-child(3),
#stateSalesOcTable td:nth-child(3) {
    width: 8%;
    white-space: nowrap;
}

#stateSalesOcTable th:nth-child(6),
#stateSalesOcTable td:nth-child(6) {
    width: 24%;
}

.trademark-pairs-table th,
.trademark-pairs-table td {
    min-width: 180px;
}

.trademark-pairs-table th:nth-child(2),
.trademark-pairs-table td:nth-child(2),
.trademark-pairs-table th:nth-child(4),
.trademark-pairs-table td:nth-child(4) {
    min-width: 130px;
}

.niza-class-token {
    display: inline-block;
    border-bottom: 1px dotted rgba(51, 51, 51, 0.45);
    cursor: help;
}

.pjud-modal[hidden] {
    display: none;
}

.pjud-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 22px;
}

.pjud-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.52);
}

.pjud-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1080px);
    max-height: min(90vh, 980px);
    display: grid;
    grid-template-rows: auto auto 1fr;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.pjud-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.pjud-modal-header h3 {
    margin: 0;
}

.pjud-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-soft);
}

.pjud-summary-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.pjud-summary-slider-wrap {
    display: grid;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 260px;
    max-width: 520px;
}

.pjud-summary-slider {
    width: 100%;
    height: 24px;
    margin: 0;
    padding: 0;
    background: transparent;
    --pjud-summary-progress: 25%;
    -webkit-appearance: none;
    appearance: none;
}

.pjud-summary-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--brand-start) 0%,
        var(--brand-end) var(--pjud-summary-progress),
        rgba(102, 126, 234, 0.16) var(--pjud-summary-progress),
        rgba(102, 126, 234, 0.16) 100%
    );
}

.pjud-summary-slider::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--brand-start) 0%,
        var(--brand-end) var(--pjud-summary-progress),
        rgba(102, 126, 234, 0.16) var(--pjud-summary-progress),
        rgba(102, 126, 234, 0.16) 100%
    );
}

.pjud-summary-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -4px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--brand-end);
    box-shadow: 0 1px 6px rgba(17, 24, 39, 0.25);
    cursor: pointer;
}

.pjud-summary-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--brand-end);
    box-shadow: 0 1px 6px rgba(17, 24, 39, 0.25);
    cursor: pointer;
}

.pjud-summary-slider:disabled::-webkit-slider-thumb,
.pjud-summary-slider:disabled::-moz-range-thumb {
    cursor: not-allowed;
    opacity: 0.65;
}

.pjud-summary-marks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.pjud-summary-value {
    min-width: 44px;
    color: var(--text);
    font-weight: 700;
    text-align: right;
}

.pjud-modal-content {
    padding: 12px 16px 16px;
    overflow: auto;
}

.history-result-modal-header {
    justify-content: space-between;
    gap: 12px;
}

.history-result-modal-close-btn {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.1;
    flex: 0 0 auto;
}

.session-security-modal-dialog {
    width: min(100%, 460px);
    max-height: none;
    grid-template-rows: auto 1fr;
    border: 1px solid rgba(102, 126, 234, 0.18);
    box-shadow: var(--shadow-xl);
}

.session-security-modal-content {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.session-security-modal-content p {
    margin: 0;
}

.session-security-progress-track {
    position: relative;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.14);
}

.session-security-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    transition: width 0.1s linear;
}

.session-security-modal-actions {
    display: flex;
    justify-content: flex-end;
}

.pjud-sentence-text {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcff;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.62;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    font-size: 14px;
}

.deceased-publication-trigger {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.deceased-publication-modal-dialog {
    width: min(100%, 760px);
}

.deceased-publication-text {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fbfcff;
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

.deceased-publication-text p {
    margin: 0 0 10px;
}

.deceased-publication-text p:last-child {
    margin-bottom: 0;
}

.sanctions-detail-row[hidden] {
    display: none;
}

.sanctions-detail-panel {
    margin: 8px 0;
}

.chart-surface {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.95));
}

.ownership-taxid-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ownership-table-actions {
    justify-content: flex-end;
}

.ownership-summary-panel {
    margin-bottom: 6px;
    padding: 8px 10px;
}

.ownership-summary-panel h3 {
    margin-bottom: 2px;
    line-height: 1.15;
}

.ownership-summary-panel p {
    line-height: 1.15;
}

.ownership-table-wrap {
    margin-top: 4px;
}

.ownership-tree-panel {
    position: relative;
    margin: 8px 0 10px;
    padding: 10px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.96));
}

.ownership-tree-panel .section-heading.compact-heading {
    margin-bottom: 8px;
}

.ownership-tree-status {
    margin-bottom: 6px;
    font-size: 12px;
}

.ownership-tree-scroll {
    overflow: auto;
    max-height: 520px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.ownership-tree-scroll svg {
    display: block;
    min-width: 100%;
}

.ownership-tree-link {
    fill: none;
    stroke: rgba(102, 126, 234, 0.44);
    stroke-linecap: round;
}

.ownership-tree-link-hitbox {
    fill: none;
    stroke: transparent;
    stroke-linecap: round;
    cursor: pointer;
    pointer-events: stroke;
}

.ownership-tree-tooltip {
    position: fixed;
    z-index: 1000;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(44, 50, 86, 0.96);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    transform: translate(0, -50%);
    box-shadow: 0 8px 22px rgba(44, 50, 86, 0.22);
}

.ownership-tree-tooltip[hidden] {
    display: none;
}

.ownership-tree-node {
    cursor: default;
}

.ownership-tree-node.is-expandable {
    cursor: pointer;
}

.ownership-tree-node circle {
    fill: #ffffff;
    stroke: var(--brand-start);
    stroke-width: 2;
}

.ownership-tree-node.is-loaded circle {
    fill: rgba(102, 126, 234, 0.08);
}

.ownership-tree-node.is-loading circle {
    fill: rgba(234, 179, 8, 0.2);
    stroke: #d4a019;
}

.ownership-tree-node-title {
    font-size: 12px;
    font-weight: 700;
    fill: var(--text);
}

.ownership-tree-node-rutdv {
    font-size: 11px;
    fill: var(--text-secondary);
}

.ownership-tree-percent {
    font-size: 10px;
    font-weight: 700;
    fill: var(--brand-end);
    paint-order: stroke;
    stroke: #ffffff;
    stroke-width: 3px;
}

.conflict-row-detail-btn {
    white-space: nowrap;
    text-decoration: underline;
}

.conflict-row-detail-btn.is-open {
    font-weight: 700;
}

.conflict-badge {
    border-width: 1px;
    border-style: solid;
}

.conflict-badge--activo {
    background: rgba(220, 38, 38, 0.16);
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.3);
}

.conflict-badge--subsanado {
    background: rgba(22, 163, 74, 0.16);
    color: #166534;
    border-color: rgba(22, 163, 74, 0.32);
}

.conflict-badge--vigente {
    background: rgba(250, 204, 21, 0.22);
    color: #854d0e;
    border-color: rgba(202, 138, 4, 0.36);
}

.conflict-badge--pasado {
    background: rgba(100, 116, 139, 0.16);
    color: #334155;
    border-color: rgba(100, 116, 139, 0.32);
}

.conflict-anchor-target {
    scroll-margin-top: 92px;
}

.conflict-drawer-row[hidden] {
    display: none;
}

.conflict-drawer-row td {
    padding: 0;
    border-bottom: 0;
}

.conflict-drawer-content {
    padding: 12px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    border-bottom: 1px solid rgba(102, 126, 234, 0.12);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.98));
}

.conflict-drawer-subtitle {
    margin-bottom: 10px;
}

.conflict-drawer-tree-placeholder,
.conflict-drawer-detail-placeholder {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid rgba(102, 126, 234, 0.18);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.conflict-detail-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    align-items: start;
    gap: 14px;
}

.conflict-detail-main-group {
    min-width: 0;
}

.conflict-detail-heading {
    margin-bottom: 6px;
}

.conflict-detail-description {
    margin: 0;
}

.conflict-detail-close-comment {
    margin-top: 10px;
}

.conflict-detail-comments-wrap {
    margin-top: 10px;
}

.conflict-detail-comments-title {
    margin-bottom: 8px;
}

.conflict-detail-indicators-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(102, 126, 234, 0.18);
    border-radius: var(--radius-md);
    background: rgba(102, 126, 234, 0.03);
}

.conflict-detail-indicators-group .badge {
    width: fit-content;
}

.conflict-indicator-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conflict-indicator-item span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.conflict-indicator-item strong {
    font-size: 13px;
    color: var(--text);
}

.conflict-action-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
    align-items: end;
    gap: 12px;
}

.conflict-action-comment-field {
    min-width: 0;
    margin: 0;
}

.conflict-action-comment-field textarea {
    width: 100%;
    min-height: 112px;
    resize: vertical;
}

.conflict-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.conflict-action-buttons .btn {
    width: 100%;
    justify-content: center;
}

.conflict-drawer-canvas-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    margin-top: 8px;
    border: 1px dashed rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-md);
    background: repeating-linear-gradient(
        -45deg,
        rgba(102, 126, 234, 0.03),
        rgba(102, 126, 234, 0.03) 12px,
        rgba(102, 126, 234, 0.07) 12px,
        rgba(102, 126, 234, 0.07) 24px
    );
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.conflict-tree-mvp-lane {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(102, 126, 234, 0.22);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.05), rgba(255, 255, 255, 0.98));
}

.conflict-tree-mvp-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.conflict-tree-mvp-node {
    min-width: 210px;
    max-width: 280px;
    padding: 8px 10px;
    border: 1px solid rgba(102, 126, 234, 0.24);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.conflict-tree-mvp-node strong {
    display: block;
    font-size: 13px;
    line-height: 1.2;
}

.conflict-tree-mvp-node small {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 11px;
}

.conflict-tree-mvp-kind {
    display: inline-flex;
    align-items: center;
    margin-bottom: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.12);
    color: var(--brand-end);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.conflict-tree-mvp-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 88px;
    gap: 3px;
}

.conflict-tree-mvp-arrow {
    color: var(--brand-end);
    font-size: 15px;
    font-weight: 700;
}

.conflict-tree-mvp-edge-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.conflict-tree-mvp-edge-meta {
    font-size: 10px;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .conflict-detail-top-grid {
        grid-template-columns: 1fr;
    }

    .conflict-action-row {
        grid-template-columns: 1fr;
    }

    .conflict-tree-mvp-lane {
        flex-direction: column;
        align-items: stretch;
    }

    .conflict-tree-mvp-step {
        flex-direction: column;
        align-items: stretch;
    }

    .conflict-tree-mvp-node {
        min-width: 0;
        max-width: none;
    }

    .conflict-tree-mvp-connector {
        flex-direction: row;
        justify-content: flex-start;
        min-width: 0;
    }
}

.ownership-col-taxid {
    width: 19%;
}

.ownership-col-name {
    width: 27%;
}

.ownership-col-type {
    width: 16%;
}

.ownership-col-share {
    width: 12%;
}

.ownership-col-date {
    width: 12%;
}

.ownership-col-source {
    width: 14%;
}

.ownership-chevron,
.ownership-chevron-placeholder {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.ownership-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 999px;
    background: rgba(102, 126, 234, 0.08);
    color: var(--brand-end);
    cursor: pointer;
    transition: transform var(--transition), background-color var(--transition), border-color var(--transition);
}

.ownership-chevron:hover {
    background: rgba(102, 126, 234, 0.14);
    border-color: rgba(102, 126, 234, 0.28);
}

.ownership-chevron.is-open span {
    transform: rotate(180deg);
}

.ownership-chevron span {
    display: inline-block;
    line-height: 1;
    transition: transform var(--transition);
}

.ownership-chevron-placeholder {
    display: inline-block;
}

.ownership-branch-row[hidden] {
    display: none;
}

.ownership-branch-row td {
    padding: 0;
    border-bottom: 0;
}

.nested-ownership-panel {
    margin: 2px 0 1px;
    padding: 5px 8px;
    border-style: solid;
    border-width: 1px 0 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.03), rgba(255, 255, 255, 0.92));
}

.nested-ownership-panel .table-wrap {
    margin-top: 4px;
}

.nested-ownership-panel[data-level="2"],
.nested-ownership-panel[data-level="3"],
.nested-ownership-panel[data-level="4"],
.nested-ownership-panel[data-level="5"],
.nested-ownership-panel[data-level="6"] {
    border-color: rgba(102, 126, 234, 0.16);
}

.ownership-row td,
.ownership-nested-table td,
.ownership-nested-table th {
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1.15;
}

.ownership-nested-table thead th {
    background: rgba(102, 126, 234, 0.04);
}

#ownershipTable th,
#ownershipTable td,
.ownership-nested-table th,
.ownership-nested-table td {
    padding-left: 8px;
    padding-right: 8px;
}

#ownershipTable th,
.ownership-nested-table th {
    padding-top: 5px;
    padding-bottom: 5px;
    line-height: 1.15;
}

#ownershipTable .ownership-branch-row td {
    padding: 0;
    border-bottom: 0;
}

.click-row {
    cursor: pointer;
    transition: background-color var(--transition);
}

.click-row:hover td {
    background: rgba(102, 126, 234, 0.06);
}

.dashboard-filters-card {
    margin-bottom: 24px;
}

.dashboard-range-select {
    height: 40px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background-color: #ffffff;
}

.dashboard-range-select:focus {
    border-color: #4096ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.16);
}

.dashboard-filters-form,
.dashboard-filters-grid {
    display: grid;
    gap: 16px;
}

.dashboard-filters-grid {
    grid-template-columns: minmax(320px, 1.2fr);
    align-items: end;
}

.dashboard-custom-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-custom-range[hidden] {
    display: none;
}

.dashboard-monitoring-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;
}

.dashboard-monitoring-bar-card {
    grid-column: span 3;
}

.dashboard-mini-card,
.dashboard-monitoring-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(102, 126, 234, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    text-align: center;
}

.dashboard-mini-card strong,
.dashboard-monitoring-item strong {
    display: block;
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.1;
}

.dashboard-mini-card .label,
.dashboard-monitoring-item .label {
    text-align: center;
}

.dashboard-mini-card-normal {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(102, 126, 234, 0.16);
}

.dashboard-mini-card-monitoring {
    background: rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.32);
}

.dashboard-mini-card-pending {
    background: rgba(255, 196, 77, 0.3);
    border-color: rgba(203, 138, 0, 0.28);
}

.dashboard-mini-card-rejected {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(204, 51, 51, 0.24);
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-chart-card {
    display: flex;
    flex-direction: column;
}

.dashboard-chart-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.dashboard-chart-heading-row h3 {
    margin-right: auto;
}

.dashboard-chart-month-controls {
    margin-left: auto;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-chart-month-controls .dashboard-range-select {
    width: 220px;
}

.dashboard-quota-alert {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(234, 179, 8, 0.36);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 252, 235, 0.96), rgba(255, 248, 213, 0.96));
}

.dashboard-quota-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #b45309;
    background: rgba(255, 237, 184, 0.9);
}

.dashboard-quota-alert-copy {
    display: grid;
    gap: 4px;
    color: #7c4500;
    line-height: 1.35;
}

.dashboard-quota-alert-copy strong {
    margin: 0;
    font-size: 14px;
}

.dashboard-quota-alert-copy span {
    margin: 0;
    font-size: 13px;
}

.dashboard-quota-alert-warning {
    border-color: rgba(234, 179, 8, 0.4);
    background: linear-gradient(180deg, rgba(255, 252, 235, 0.96), rgba(255, 248, 213, 0.96));
}

.dashboard-quota-alert-exceeded {
    border-color: rgba(220, 38, 38, 0.35);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.98));
}

.dashboard-quota-alert-exceeded .dashboard-quota-alert-icon {
    color: #b42318;
    background: rgba(254, 205, 211, 0.95);
}

.dashboard-quota-alert-exceeded .dashboard-quota-alert-copy {
    color: #7f1d1d;
}

.dashboard-bar-card {
    grid-column: span 3;
}

.dashboard-activity-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 6px;
}

.dashboard-activity-stack .dashboard-mini-card {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    column-gap: 12px;
    padding: 14px 16px;
}

.dashboard-activity-stack .dashboard-mini-card strong {
    margin: 0;
    font-size: 30px;
    line-height: 1;
}

.dashboard-activity-stack .dashboard-mini-card .label {
    margin: 0;
    text-align: left;
    font-size: 13px;
    line-height: 1.25;
}

.dashboard-chart-note {
    margin-top: 4px;
    margin-bottom: 14px;
}

.dashboard-chart-wrap {
    position: relative;
    margin-top: auto;
    border: 1px solid rgba(102, 126, 234, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(249, 250, 255, 0.9), rgba(255, 255, 255, 0.95));
    padding: 8px;
}

.dashboard-chart-svg {
    width: 100%;
    height: 270px;
    display: block;
}

.dashboard-axis-line {
    stroke: rgba(58, 70, 116, 0.38);
    stroke-width: 1.2;
}

.dashboard-grid-line {
    stroke: rgba(102, 126, 234, 0.14);
    stroke-width: 1;
}

.dashboard-axis-label {
    fill: #657091;
    font-size: 11px;
}

.dashboard-bar-value-label {
    fill: #ffffff;
    font-size: 24px;
    font-weight: 700;
    paint-order: stroke;
    stroke: rgba(17, 24, 39, 0.35);
    stroke-width: 1.2px;
}

.dashboard-average-line {
    stroke: #f08a24;
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
}

.dashboard-average-label {
    fill: #c86c0d;
    font-size: 11px;
    font-weight: 700;
}

.dashboard-chart-empty {
    fill: #7682a3;
    font-size: 13px;
}

.dashboard-chart-tooltip {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(32, 40, 64, 0.5);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    transform: translateY(-100%);
    white-space: nowrap;
}

.dashboard-bar {
    fill: var(--dashboard-bar-fill, rgba(102, 126, 234, 0.72));
    cursor: pointer;
    transition: opacity var(--transition);
}

.dashboard-bar:hover {
    opacity: 0.9;
}

.dashboard-bar-risk-low {
    fill: rgba(22, 163, 74, 0.75);
}

.dashboard-bar-risk-low:hover {
    fill: rgba(22, 163, 74, 0.95);
}

.dashboard-bar-risk-medium {
    fill: rgba(234, 179, 8, 0.78);
}

.dashboard-bar-risk-medium:hover {
    fill: rgba(234, 179, 8, 0.95);
}

.dashboard-bar-risk-high {
    fill: rgba(220, 38, 38, 0.78);
}

.dashboard-bar-risk-high:hover {
    fill: rgba(220, 38, 38, 0.95);
}

.dashboard-bar-monitoring-pep {
    fill: #0f766e;
}

.dashboard-bar-monitoring-pep-monthly {
    fill: rgba(88, 101, 242, 0.82);
}

.dashboard-side-chart-wrap {
    padding: 8px 6px;
}

.dashboard-bar-risk-unreviewed {
    fill: rgba(107, 114, 128, 0.78);
}

.dashboard-bar-risk-unreviewed:hover {
    fill: rgba(107, 114, 128, 0.95);
}

.admin-hero-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 75%) minmax(0, 25%);
    gap: 20px;
    align-items: stretch;
}

.admin-hero-main {
    min-width: 0;
}

.admin-hero-stat-card {
    padding: 10px 12px;
    border: 1px solid rgba(63, 81, 145, 0.18);
    background: linear-gradient(180deg, rgba(246, 247, 255, 0.96), rgba(236, 239, 253, 0.98));
    box-shadow: 0 8px 18px rgba(55, 73, 137, 0.09);
}

.admin-hero-stat-card .label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #506091;
}

.admin-hero-stat-card strong {
    color: #1a2140;
    margin-top: 4px;
    font-size: 24px;
}

.admin-hero-stats.tenant-hero-stats {
    width: fit-content;
    max-width: 100%;
    margin-top: 0;
    margin-left: 0;
    grid-template-columns: repeat(2, minmax(170px, 170px));
    justify-content: start;
}

.admin-hero-layout.tenant-hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(350px, max-content);
    align-items: start;
}

.admin-hero-stat-card-warning {
    border-color: rgba(220, 38, 38, 0.35);
    background: linear-gradient(180deg, rgba(255, 238, 238, 0.98), rgba(255, 228, 228, 0.98));
}

.admin-hero-stat-card-warning .label,
.admin-hero-stat-card-warning strong {
    color: #b42318;
}

.admin-hero-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-dashboard-charts {
    margin-top: 20px;
}

.admin-dashboard-bar-card {
    grid-column: 1 / -1;
}

.admin-dashboard-legend {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.admin-dashboard-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(102, 126, 234, 0.16);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.86);
}

.admin-dashboard-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex-shrink: 0;
}

.admin-dashboard-legend-item strong {
    font-size: 12px;
    font-weight: 600;
    margin-right: auto;
}

.admin-dashboard-legend-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

.admin-chart-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    user-select: none;
}

.admin-chart-mode-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-chart-mode-slider {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(102, 126, 234, 0.35);
    background: rgba(102, 126, 234, 0.14);
    position: relative;
    transition: background var(--transition), border-color var(--transition);
    display: inline-block;
}

.admin-chart-mode-slider::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition);
}

.admin-chart-mode-toggle input:checked + .admin-chart-mode-slider {
    background: rgba(37, 99, 235, 0.24);
    border-color: rgba(37, 99, 235, 0.46);
}

.admin-chart-mode-toggle input:checked + .admin-chart-mode-slider::after {
    transform: translateX(18px);
}

.admin-chart-mode-toggle input:focus-visible + .admin-chart-mode-slider {
    outline: 2px solid rgba(37, 99, 235, 0.42);
    outline-offset: 2px;
}


@media print {
    .topbar,
    .nav,
    .hero-actions,
    .search-form,
    .btn,
    .locale-form,
    .sidebar-toggle {
        display: none !important;
    }

    body,
    .page,
    .search-page {
        background: #ffffff !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .search-query-section,
    .report-section,
    .hero-panel {
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
        margin-bottom: 18px !important;
        background: #ffffff !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes progressSweep {
    0% {
        left: -42%;
    }

    55% {
        left: 36%;
    }

    100% {
        left: 100%;
    }
}

@keyframes searchBarPingPong {
    0% {
        transform: translateX(-110%);
    }

    100% {
        transform: translateX(325%);
    }
}

@keyframes searchNameSkeletonShimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 1024px) {
    .page {
        width: min(calc(100% - 32px), var(--page-max));
    }

    body.nav-open {
        overflow: hidden;
    }

    .topbar {
        gap: 14px;
        padding: 18px 20px;
    }

    .nav {
        top: 88px;
        left: 16px;
        bottom: 16px;
        width: min(82vw, 300px);
        padding: 20px 16px;
        transform: translateX(calc(-100% - 24px));
        opacity: 1;
        pointer-events: auto;
        transition: transform var(--transition);
    }

    .nav.is-open {
        transform: translateX(0);
    }

    .nav + .page {
        width: min(calc(100% - 32px), var(--page-max));
        margin: 0 auto;
        padding-top: 24px;
    }

    .dashboard-monitoring-overview,
    .dashboard-charts,
    .dashboard-filters-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-bar-card,
    .dashboard-monitoring-bar-card {
        grid-column: auto;
    }

    .dashboard-quota-alert {
        grid-template-columns: 1fr;
    }

    .dashboard-quota-alert-icon {
        width: 22px;
        height: 22px;
    }

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

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

    body.nav-collapsed .nav {
        transform: translateX(calc(-100% - 24px));
        opacity: 1;
        pointer-events: auto;
    }

    body.nav-collapsed .nav + .page {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .page {
        width: min(calc(100% - 24px), var(--page-max));
        padding: 20px 0 32px;
    }

    .split {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
    }

    .topbar-leading {
        width: auto;
        min-width: 0;
        min-width: 260px;
        gap: 10px;
        align-items: center;
    }

    .topbar-branding {
        background: transparent;
        --pjud-summary-progress: 25%;
        width: auto;
        min-width: 0;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .brand-lockup {
        min-width: 0;
    }

    .brand {
        background: linear-gradient(to right, var(--brand-start) 0%, var(--brand-end) var(--pjud-summary-progress), rgba(102, 126, 234, 0.14) var(--pjud-summary-progress), rgba(102, 126, 234, 0.14) 100%);
        font-weight: 400 !important;
        line-height: 1.1;
    }

    .brand span {
        background: linear-gradient(to right, var(--brand-start) 0%, var(--brand-end) var(--pjud-summary-progress), rgba(102, 126, 234, 0.14) var(--pjud-summary-progress), rgba(102, 126, 234, 0.14) 100%);
    }

    .tagline {
        display: none;
    }

    .topbar-tenant-name {
        padding: 4px 8px;
        font-size: 11px;
        font-weight: 400;
        max-width: 128px;
        margin-top: -4px;
    }

    .tenant-branding-slot {
        display: none;
    }

    .topbar-meta {
        width: auto;
        justify-content: flex-end;
        gap: 8px;
        flex-shrink: 0;
    }
    .topbar-alert-link {
        width: 32px;
        height: 32px;
    }

    .topbar-user-role {
        display: none;
    }

    .topbar-user-name {
        font-size: 12px;
        font-weight: 400;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 96px;
    }

    .topbar-user-role,
    .topbar-alert-badge,
    .sidebar-toggle,
    .topbar,
    .topbar * {
        font-weight: 400 !important;
    }

    .sidebar-toggle {
        width: 38px;
        height: 38px;
        padding: 0 9px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .search-hero,
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .history-hero.search-hero.hero.hero-panel {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .history-hero.search-hero.hero.hero-panel .hero-stats {
        max-width: none;
    }

    .search-hero-monitoring-entity {
        display: flex;
        flex-direction: column;
        column-gap: 0;
        row-gap: 12px;
    }

    .search-query-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-hero-actions {
        width: 100%;
        min-width: 0;
    }

    .search-hero-actions-grid {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .monitoring-hero-actions-grid {
        width: 100%;
        margin-left: 0;
        grid-template-columns: 1fr;
    }

    .monitoring-hero-action-card .search-group-picker-grid {
        grid-template-columns: 1fr;
    }

    .search-hero-report-column {
        justify-content: stretch;
    }

    .search-hero-workflow-column {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .search-workflow-actions {
        flex-wrap: wrap;
    }

    .create-profile-layout {
        grid-template-columns: 1fr;
    }

    .search-monitoring-toggle {
        margin-right: 0;
    }
    .search-hero-action-form,
    .search-hero-workflow-btn,
    .search-hero-report-btn {
        width: 100%;
    }

    .monitoring-settings-grid,
    .monitoring-alert-grid {
        grid-template-columns: 1fr;
    }

    .security-policy-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .monitoring-groups-discover-grid {
        grid-template-columns: 1fr;
    }

    .identification-grid {
        grid-template-columns: 1fr;
    }

    .identity-risk-meta {
        grid-template-columns: 1fr;
    }

    .settings-branding-grid {
        grid-template-columns: 1fr;
    }

    .settings-policy-grid {
        grid-template-columns: 1fr;
    }

    .sanctions-threshold-lab {
        padding: 10px;
    }

    .sanctions-threshold-lab-table {
        font-size: 12px;
    }

    .sanctions-threshold-hover-hint span {
        font-size: 14px;
    }

    .branding-preview-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .branding-context-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .branding-context-slot {
        width: 100%;
        min-height: 84px;
    }

    .branding-actions-toolbar {
        width: 100%;
    }

    .branding-actions-toolbar .btn {
        width: 100%;
    }

    .dashboard-filters-grid,
    .dashboard-monitoring-overview,
    .dashboard-charts,
    .dashboard-custom-range {
        grid-template-columns: 1fr;
    }

    .dashboard-bar-card,
    .dashboard-monitoring-bar-card {
        grid-column: auto;
    }

    .admin-hero-layout,
    .admin-hero-stats,
    .admin-dashboard-legend {
        grid-template-columns: 1fr;
    }

    .financial-risk-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .environmental-case-columns {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .auth-card h1,
    .brand {
        font-size: 24px;
    }

    .hero-panel {
        padding: 22px 20px;
    }

    .card,
    .service-card {
        padding: 20px;
    }
}

@media (max-width: 1024px) and (max-height: 520px) and (orientation: landscape) {
    body {
        font-size: 12px;
    }

    .topbar {
        padding: 8px 12px;
        gap: 8px;
        min-height: 56px;
        align-items: center;
    }

    .topbar-leading {
        gap: 8px;
        min-width: 0;
        flex: 1;
    }

    .topbar-branding {
        gap: 8px;
        min-width: 0;
        flex-wrap: nowrap;
    }

    .brand {
        font-size: 15px;
        line-height: 1.05;
        font-weight: 400 !important;
    }

    .brand span,
    .topbar,
    .topbar * {
        font-weight: 400 !important;
    }

    .tagline,
    .topbar-user-block,
    .tenant-branding-slot {
        display: none;
    }

    .topbar-tenant-name {
        max-width: 120px;
        padding: 3px 7px;
        font-size: 10px;
        line-height: 1.2;
    }

    .topbar-meta {
        width: auto;
        gap: 6px;
        flex-shrink: 0;
    }

    .topbar-alert-link {
        width: 30px;
        height: 30px;
    }

    .topbar-alert-link svg {
        width: 16px;
        height: 16px;
    }

    .topbar-alert-badge {
        min-width: 16px;
        height: 16px;
        line-height: 14px;
        font-size: 10px;
        padding: 0 4px;
    }

    .sidebar-toggle {
        width: 34px;
        height: 34px;
        padding: 0 8px;
        border-radius: 12px;
        gap: 3px;
    }

    .page {
        width: min(calc(100% - 16px), var(--page-max));
        padding: 12px 0 20px;
    }

    .service-card,
    .card,
    .search-query-section,
    .report-section,
    .hero-panel {
        border-radius: 16px;
    }
}

/* ── Consumption detail modal ──────────────────────────────────────── */

.consumption-alerts-cell {
    vertical-align: middle;
    white-space: nowrap;
}

.consumption-alerts-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.consumption-detail-btn {
    padding: 2px 7px;
    font-size: 11px;
    min-height: 22px;
    line-height: 1.2;
    flex-shrink: 0;
}

.consumption-export-detail-btn {
    border: 1px solid color-mix(in srgb, #7f1d1d 60%, transparent 40%);
    color: #fff7f7;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 52%, #ef4444 100%);
    box-shadow: 0 10px 20px color-mix(in srgb, #b91c1c 36%, transparent 64%);
}

.consumption-export-detail-btn:hover {
    border-color: color-mix(in srgb, #7f1d1d 72%, transparent 28%);
    color: #ffffff;
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 48%, #dc2626 100%);
    box-shadow: 0 14px 28px color-mix(in srgb, #b91c1c 46%, transparent 54%);
}

.consumption-detail-modal-dialog {
    width: min(100%, 1280px);
    max-height: min(92vh, 1040px);
}

.consumption-detail-toolbar {
    flex-wrap: wrap;
    align-items: flex-end;
}

.consumption-detail-modal-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px 16px;
    overflow: auto;
}

.consumption-detail-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.consumption-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.consumption-detail-table th,
.consumption-detail-table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.consumption-detail-table th {
    background: var(--surface-soft);
    font-weight: 600;
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.consumption-detail-table tbody tr:last-child td {
    border-bottom: none;
}

.consumption-detail-table tbody tr:hover td {
    background: rgba(102, 126, 234, 0.04);
}

.consumption-detail-querytext {
    white-space: normal;
    word-break: break-word;
    max-width: 340px;
}

.consumption-detail-rutdv {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
}

.consumption-detail-count {
    text-align: right;
}

.consumption-detail-load-more {
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

/* ============ PRIVATE LISTS STYLES ============ */

.private-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.private-list-table thead {
    background: #f5f6fb;
    border-bottom: 2px solid #e0e0e0;
}

.private-list-table thead tr:first-child th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

.private-list-table thead tr:last-child th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #666;
    font-size: 12px;
}

.private-list-table tbody tr {
    border-bottom: 1px solid #e8e8e8;
}

.private-list-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.04);
}

.private-list-table tbody td {
    padding: 10px;
    vertical-align: middle;
}

.private-list-table tbody tr[onclick] {
    cursor: pointer;
}

/* Score badges */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.score-badge.score-100 {
    background: rgba(51, 102, 204, 0.15);
    color: #0052cc;
}

.score-badge.score-92 {
    background: rgba(0, 128, 191, 0.15);
    color: #0066aa;
}

.score-badge.score-70 {
    background: rgba(100, 150, 200, 0.15);
    color: #4a7ba7;
}

.badge.score-100 {
    background: rgba(51, 102, 204, 0.15);
    color: #0052cc;
    min-width: 0;
}

.badge.score-92 {
    background: rgba(0, 128, 191, 0.15);
    color: #0066aa;
    min-width: 0;
}

.badge.score-70 {
    background: rgba(100, 150, 200, 0.15);
    color: #4a7ba7;
    min-width: 0;
}

.badge.badge-active {
    background: rgba(51, 204, 51, 0.12);
    color: #1f8b1f;
    min-width: 0;
}

.badge.badge-inactive {
    background: #f1f2f8;
    color: #999;
    min-width: 0;
}

.badge.success {
    background: rgba(51, 204, 51, 0.12);
    color: #1f8b1f;
}

/* Detail panel for private list entries */
.detail-panel {
    padding: 12px;
    background: #f9fafb;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    line-height: 1.5;
}

.detail-panel strong {
    color: #333;
}

.detail-panel p {
    margin: 6px 0 0 0;
    color: #666;
    font-size: 13px;
}

/* New Private Lists Management Layout */

.hero-content {
    flex: 2 1 auto;
    min-width: 0;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.hero-stats .stat-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-md);
    box-shadow: none;
    text-align: center;
}

.hero-stats .stat-card .label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    display: block;
    margin-bottom: 8px;
}

.hero-stats .stat-card strong {
    font-size: 20px;
    color: var(--brand-start);
}

.full-width {
    width: 100%;
}

.full-width .card {
    width: 100%;
}

.private-lists-table-wrap {
    margin-top: 12px;
}

.available-lists-table {
    width: 100%;
    border-collapse: collapse;
}

.available-lists-table thead {
    background: var(--surface-muted);
}

.available-lists-table th,
.available-lists-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.available-lists-table .list-name-text {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: normal;
    color: var(--text);
    line-height: 1.35;
}

.list-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.available-lists-table td .list-row-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.list-row-actions .btn-sm {
    white-space: nowrap;
}

.list-delete-row td {
    background: rgba(204, 51, 51, 0.06);
}

.list-delete-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    width: 50%;
    margin: 0 auto;
}

.list-delete-form .btn-danger:disabled {
    background: #c7ccd5;
    color: #ffffff;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.list-delete-form label {
    min-width: 280px;
}

.list-delete-form span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.available-lists-table .list-name-trigger {
    cursor: pointer;
    user-select: none;
}

.list-details-row td {
    background: var(--surface-soft);
    padding: 16px;
}

.list-details-content {
    display: grid;
    gap: 16px;
}

/* Private Lists Container */
.private-lists-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.private-list-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.private-list-item:hover {
    box-shadow: var(--shadow-sm);
}

.list-header {
    padding: 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.private-list-item:hover .list-header {
    background: var(--surface-muted);
}

.list-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.list-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}

.list-toggle:hover {
    color: var(--brand-start);
}

.toggle-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.list-title .badge {
    margin-left: auto;
}

.list-metadata {
    font-size: 13px;
    margin-bottom: 8px;
}

.list-description {
    font-size: 13px;
    margin: 8px 0 0 0;
    line-height: 1.4;
}

.list-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.list-actions form {
    display: inline;
}

.btn-sm {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.1;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-sm.search-rutdv-comments-add-btn {
    background: #1f6fe8;
    border-color: #1f6fe8;
    color: #fff;
}

.btn-sm.search-rutdv-comments-add-btn:hover {
    background: #1b63cf;
    border-color: #1b63cf;
    color: #fff;
}

.list-details {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.list-details[style*="display: block"] {
    max-height: 2000px;
    overflow: visible;
    padding: 20px;
    background: var(--surface-soft);
    border-top: 1px solid var(--border);
}

.list-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-content h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.list-content fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.list-content legend {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 0;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.entries-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.entries-container h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.entries-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.entries-table thead {
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border);
}

.entries-table th {
    padding: 8px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.entries-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    line-height: 1.2;
}

.entries-table td:last-child {
    white-space: nowrap;
}

.btn-icon-xs {
    min-height: 20px;
    min-width: 20px;
    padding: 1px 5px;
    font-size: 10px;
    line-height: 1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.entries-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.03);
}

.entry-edit-row td {
    background: rgba(102, 126, 234, 0.04);
}

.entry-inline-form {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr 0.75fr 1fr 0.8fr 0.8fr 0.6fr 1fr auto;
    gap: 8px;
    align-items: end;
}

.entry-inline-form label {
    margin: 0;
}

.entry-inline-form span {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.entry-inline-form .checkbox-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 68px;
}

.entry-inline-form .checkbox-field .checkbox-control {
    min-height: 42px;
    display: flex;
    align-items: center;
}

.entry-inline-form .checkbox-field input[type="checkbox"] {
    width: auto;
    min-height: 16px;
    margin-top: 0;
    justify-self: start;
}

.entry-inline-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.add-entry-panel {
    margin-top: 8px;
}

.add-entry-toolbar {
    display: flex;
    justify-content: flex-end;
}

.add-entry-form {
    margin-top: 10px;
}

.add-entry-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.batch-panel {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.batch-actions-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.batch-actions-row label {
    margin: 0;
}

.batch-actions-buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.batch-apply-scope-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.batch-apply-scope-inline span {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
}

.batch-lines-counter {
    display: block;
    margin-top: 4px;
    font-size: 12px;
}

.batch-lines-counter-warning {
    color: #9a6500;
}

.batch-lines-counter-limit {
    color: var(--error);
    font-weight: 600;
}

.batch-validation-summary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.batch-validation-table {
    border-collapse: collapse;
}

.batch-validation-table td,
.batch-validation-table th {
    font-size: 11px;
    line-height: 1.2;
    padding-top: 4px;
    padding-bottom: 4px;
}

.batch-panel .table-wrap {
    margin-top: 6px;
}

#create-list-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1300;
    padding: 24px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.5);
}

#create-list-modal:target {
    display: block;
}

#create-list-modal .split.query-layout {
    max-width: 1120px;
    margin: 40px auto;
}

#create-list-modal .card {
    box-shadow: var(--shadow-xl);
}

.modal-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-header-inline h2 {
    margin: 0;
}

.modal-create-actions {
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
}

@media (max-width: 768px) {
    #create-list-modal {
        padding: 12px;
    }

    .monitoring-hero-header {
        align-items: stretch;
    }

    .monitoring-run-now-form {
        margin-left: 0;
        width: 100%;
    }

    .monitoring-run-now-form .btn {
        width: 100%;
    }

    #create-list-modal .split.query-layout {
        margin: 16px auto;
    }

    .hero-panel {
        flex-direction: column;
        gap: 20px;
    }

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

    .hero-stats {
        width: 100%;
        min-width: auto;
    }

    .list-header {
        padding: 12px;
    }

    .list-actions {
        flex-wrap: wrap;
    }

    .entries-table {
        font-size: 12px;
    }

    .entries-table th,
    .entries-table td {
        padding: 8px;
    }

    .entry-inline-form {
        grid-template-columns: 1fr;
    }

    .batch-actions-row {
        align-items: stretch;
    }

    .batch-actions-buttons {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .list-row-actions {
        justify-content: flex-start;
    }

    .list-delete-form {
        width: 100%;
    }
}
