:root {
    --bg:       #F0F2F5;
    --surface:  #FFFFFF;
    --bar:      #1C2033;
    --accent:   #2563EB;
    --accent-lt:#EEF3FD;
    --border:   #E3E7F0;
    --text:     #1C2033;
    --sub:      #6B738A;
    --radius:   4px;
    --radius-lg:8px;
    --font:     system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0; padding: 0;
    font-family: var(--font);
    background: var(--bg);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--text);
}

#topBar.brand-collapsed #topBarBrand > span { display: none !important; }
#topBar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--bar);
    display: flex;
    align-items: center;
    padding: 14px 20px;
    gap: 14px;
    z-index: 400;
    flex-shrink: 0;
}
#topBarBrand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
#topBarBrand svg { flex-shrink: 0; }
#topBarDivider {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,0.45);
    flex-shrink: 0;
}
#topBarNav {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    gap: 8px;
    min-width: 0;
}
#btnBackToConsole {
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    flex-shrink: 0;
    padding: 0;
}
#btnBackToConsole:hover { background: rgba(255,255,255,0.22); color: #fff; }
#topBarSection {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    padding-bottom: 1px;
}
#topBarRight {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
}
#userAvatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}
#userLabel {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}
#userAvatar { cursor: default; }
#userFlyout {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(82,63,105,0.18);
    min-width: 180px;
    z-index: 600;
    overflow: hidden;
}
#userFlyout.open { display: block; }
#userFlyoutName {
    padding: 12px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#userFlyoutSignOut {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    font-size: 13px;
    font-family: var(--font);
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
}
#userFlyoutSignOut:hover { background: var(--bg); }
.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.8);
    padding: 5px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.45);
    color: #fff;
}

#appShell {
    margin-top: 63px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.page { display: none; flex: 1; min-height: 0; overflow: auto; }
.page.active { display: flex; flex-direction: column; }

#consolePage {
    align-items: center;
    justify-content: flex-start;
    padding: 56px 20px 40px;
}
#consoleInner {
    max-width: 720px;
    width: 100%;
    text-align: center;
}
#consoleEyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sub);
    margin-bottom: 12px;
}
#consoleTitle {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 32px;
}
#consoleCards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}
.console-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    flex: 1 1 260px;
    max-width: 320px;
    text-align: left;
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.console-card:hover {
    box-shadow: 0 6px 24px rgba(37,99,235,0.12);
    border-color: var(--accent);
    transform: translateY(-2px);
}
.console-card { position: relative; }
.console-card--source-disabled:hover {
    box-shadow: none;
    border-color: var(--border);
    transform: none;
}
.token-source-group {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: default;
}
.token-source-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sub);
    margin: 0 0 2px;
}
.token-source-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.token-source-option input[type="radio"] {
    accent-color: var(--accent);
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}
.token-source-msg { font-size: 11.5px; min-height: 1em; }
.token-source-msg--ok  { color: #16a34a; }
.token-source-msg--err { color: #ef4444; }
.token-source-detail-card {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    cursor: default;
}
.token-source-detail-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 10px;
}
.token-source-detail-loading {
    font-size: 12.5px;
    color: var(--sub);
}
.token-source-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.token-source-detail-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.token-source-detail-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sub);
}
.token-source-detail-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.token-source-detail-sub {
    font-size: 11.5px;
    color: var(--sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.token-source-detail-error {
    font-size: 12px;
    color: #DC2626;
    margin: 8px 0 0;
}
.console-card--needs-action { border-color: #DC2626; }
.console-card--needs-action:hover { border-color: #DC2626; }
#consoleIssueBanner {
    display: none;
    align-items: center;
    gap: 10px;
    text-align: left;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 20px;
}
#consoleIssueBanner a { color: #991B1B; font-weight: 600; text-decoration: underline; cursor: pointer; }
.card-icon {
    position: relative;
    width: 44px;
    height: 44px;
    background: var(--accent-lt);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
.card-icon-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #DC2626;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--surface);
    line-height: 1;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}
.card-desc {
    font-size: 13px;
    color: var(--sub);
    line-height: 1.5;
}
.token-management-external-message {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    text-align: center;
}

#policiesPage {
    padding: 28px 28px 20px;
    overflow: hidden;
    min-height: 0;
    max-width: 1400px;
    width: 100%;
    margin-inline: auto;
}
#policiesPage.active {
    display: flex;
    flex-direction: column;
}
.page-breadcrumb {
    font-size: 12px;
    color: var(--sub);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
body.embed-mode #createAppRegPage .page-breadcrumb,
body.embed-mode #createAppRegPage .page-title-row {
    display: none;
}
.embed-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px 16px; font-size: 13px; color: var(--sub); }
body.embed-mode #portalVersionFooter,
body.embed-mode #portalCopyrightFooter {
    display: none;
}
body.embed-mode {
    background: var(--bg);
}
body.embed-mode #createAppRegPage {
    position: fixed;
    inset: 0;
    padding: 16px 20px 20px;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
body.embed-mode .car-tenant-info,
body.embed-mode .car-existing {
    align-self: center;
    margin-inline: auto;
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}
body.embed-mode .car-existing {
    text-align: center;
}
body.embed-mode .car-existing-header {
    display: none;
}
.car-embed-finishing {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--sub);
    font-size: 13px;
}
.car-embed-reload-btn { flex-basis: auto; }
body.embed-mode #createAppRegPage.embed-finishing > *:not(#carEmbedFinishing) {
    display: none !important;
}
body.embed-mode #createAppRegPage.embed-finishing {
    justify-content: center;
}
body.embed-mode .token-modal-backdrop {
    background: none;
}
body.embed-mode .car-tenant-info,
body.embed-mode .car-existing-row {
    box-shadow: none;
}
body.embed-mode .token-modal-backdrop .dialog-panel {
    max-width: calc(100% - 24px);
    box-shadow: none;
    max-height: none;
}
.page-breadcrumb a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}
.page-breadcrumb a:hover { text-decoration: underline; }
.page-breadcrumb-sep { color: var(--text); }
.page-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 4px;
}
.page-subtitle {
    font-size: 13px;
    color: var(--sub);
    margin: 0;
}
.section-heading {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px;
}
.ua-list-sticky-heading {
    position: sticky;
    top: 0;
    z-index: 5;
    isolation: isolate;
    will-change: transform;
    background: #F8FAFC;
    border: 1px solid var(--border);
    padding: 8px 10px;
    cursor: default;
    flex-shrink: 0;
    margin: 0;
    border-radius: 6px;
}
.ua-list-sticky-heading--clickable { cursor: pointer; }
.ua-list-sticky-heading--clickable:hover { background: #eef2f7; color: var(--accent); }

.ua-split-pane { flex: 1 1 50%; min-height: 0; overflow-y: auto; }
.ua-split-pane + .ua-split-pane { border-top: 2px solid var(--border); }
.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-danger {
    background: #DC2626;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-danger:hover { background: #B91C1C; }
.btn-danger:disabled { background: #F3A6A6; cursor: default; }

.table-toolbar-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.table-toolbar-panel .table-toolbar { border-bottom: none; }
.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    gap: 8px;
}
.table-search {
    flex: 1;
    min-width: 160px;
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 0.42rem;
    background: #F3F6F9;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.table-search:focus {
    border-color: #3699FF;
    box-shadow: 0 0 0 0.2rem rgba(54,153,255,0.15);
    background: #fff;
}
.table-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.settings-policies-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.settings-section-row { margin-bottom: 20px; }
.settings-section-heading { margin-bottom: 14px; }
.settings-section-warning { font-size: 14px; line-height: 1; }
.settings-section-title-wrap { display: inline-flex; align-items: center; gap: 8px; }
.settings-section-title-wrap--needs-action {
    border: 1px solid #DC2626;
    border-radius: var(--radius);
    padding: 4px 8px;
    background: #FEF2F2;
}
@media (min-width: 900px) {
    .settings-section-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 18px;
        row-gap: 10px;
    }
    .settings-section-heading { margin-bottom: 0; flex-shrink: 0; }
    .settings-section-row .settings-policies-body { flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
}
.settings-policy-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    min-width: 220px;
}
.settings-policy-card--needs-action { border-color: #DC2626; }
.settings-policy-card .settings-policy-icon {
    display: inline-flex;
    align-items: center;
    color: #475569;
    flex-shrink: 0;
}
.settings-policy-card .settings-policy-icon svg { display: block; width: 30px; height: 30px; }
.settings-policy-warning { font-size: 15px; line-height: 1; margin-right: 3px; }
.settings-policy-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: auto;
    min-width: 0;
}
.settings-policy-card .settings-policy-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}
.settings-policy-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.settings-policy-status--loading    { background: #F1F5F9; padding: 4px; justify-content: center; min-width: 21px; }
.settings-policy-status--active     { background: #DCFCE7; color: #15803D; }
.settings-policy-status--incomplete { background: #FEF3C7; color: #B45309; }
.settings-policy-modified {
    font-size: 11px;
    color: var(--sub);
    white-space: nowrap;
    flex-shrink: 0;
}
.table-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
}
.table-panel-loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-policies-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}
.policies-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.policies-table th {
    background: #F8FAFC;
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--sub);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.policies-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.policies-table tr:last-child td { border-bottom: none; }
.policies-table tbody tr:hover td { background: #F8FAFC; }
.policy-name-cell { font-weight: 600; white-space: normal; word-break: break-word; }
.policy-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
}
.policy-type-icon-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: var(--accent-lt);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.policy-type-icon-frame svg { width: 13px; height: 13px; }
.col-status-na { color: var(--sub); font-size: 12px; }
.policy-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 4px 20px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    transition: background-color .15s;
}
.policy-toggle--active   { background: #16A34A; }
.policy-toggle--inactive { background: #DC2626; }
.policy-toggle:disabled  { cursor: not-allowed; opacity: .55; }
.policy-toggle-knob {
    position: absolute;
    top: 50%;
    left: 6px;
    width: 10px; height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    transition: left .18s ease;
}
.policy-toggle--active .policy-toggle-knob { left: calc(100% - 16px); }
.policy-toggle-label { pointer-events: none; flex: 1; text-align: center; }
.table-empty-row td, .table-loading-row td {
    text-align: center;
    padding: 40px 16px;
}
.table-spinner {
    width: 22px; height: 22px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
.status-cell-spinner {
    width: 13px; height: 13px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
.tm-actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) {
    .tm-actions { display: grid; grid-template-columns: repeat(2, auto); gap: 6px; justify-content: end; }
    .tm-actions > *:last-child:nth-child(odd) { grid-column: 2; justify-self: end; }
}
@media (max-width: 640px) {
    .car-existing-row .car-actions {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }
}
.icon-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--sub);
    width: 30px;
    height: 30px;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.icon-btn:hover { background: var(--accent-lt); border-color: var(--accent); color: var(--accent); }
.icon-btn.danger:hover { background: #FEF2F2; border-color: #EF4444; color: #EF4444; }
.col-type, .col-scope, .col-status, .col-modified { display: table-cell; }
.policy-meta-cell { display: none !important; }
.policy-name-chips { display: none; }
.policy-chips-col, .policy-chips-cell { display: none; }
.policies-med1 .col-type,
.policies-med1 .col-scope,
.policies-med1 .col-status,
.policies-med1 .col-modified { display: none; }
.policies-med1 .policy-meta-cell { display: none !important; }
.policies-med1 .policy-chips-col,
.policies-med1 .policy-chips-cell { display: table-cell; }
.policies-med1 .policy-chips-cell { text-align: left; vertical-align: middle; }
.policies-med1 .policy-chips-inline {
    display: grid;
    grid-template-columns: var(--cgw1, max-content) var(--cgw2, max-content) var(--cgw3, max-content) max-content;
    align-items: center;
    justify-items: start;
    column-gap: 8px;
}
.policies-med1b .col-type,
.policies-med1b .col-scope,
.policies-med1b .col-status,
.policies-med1b .col-modified { display: none; }
.policies-med1b .policy-meta-cell { display: none !important; }
.policies-med1b .policy-chips-col,
.policies-med1b .policy-chips-cell { display: table-cell; }
.policies-med1b .policy-chips-cell { text-align: left; vertical-align: middle; }
.policies-med1b .policy-chips-inline { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.policies-med2 .col-type,
.policies-med2 .col-scope,
.policies-med2 .col-status,
.policies-med2 .col-modified { display: none; }
.policies-med2 .policy-meta-cell { display: none !important; }
.policies-med2 .policy-name-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; align-items: center; }
.policies-narrow .col-type,
.policies-narrow .col-scope,
.policies-narrow .col-status,
.policies-narrow .col-modified { display: none; }
.policies-narrow .policy-meta-cell { display: table-cell !important; }
.name-chip {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 7px; border-radius: 10px;
    background: #F1F5F9; color: #475569;
    font-size: 10px; font-weight: 500; white-space: nowrap;
    font-family: inherit; border: 1px solid transparent;
}
.name-chip-date { color: #94A3B8; }

#tokenSettingsBackdrop .dialog-body { overflow: visible; }
.info-tooltip { position: relative; display: inline-flex; color: var(--sub); cursor: help; }
.info-tooltip::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    width: max-content; max-width: 240px;
    background: #1f2937; color: #fff; font-size: 12px; font-weight: 400; font-style: normal;
    line-height: 1.4; padding: 8px 10px; border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0; visibility: hidden; transition: opacity 0.15s ease;
    pointer-events: none; z-index: 20;
}
.info-tooltip::before {
    content: ''; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: #1f2937;
    opacity: 0; visibility: hidden; transition: opacity 0.15s ease; z-index: 20;
}
.info-tooltip:hover::after, .info-tooltip:hover::before,
.info-tooltip:focus::after, .info-tooltip:focus::before { opacity: 1; visibility: visible; }
@keyframes csvExpirationCheckboxShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}
#csvExpirationNeverLabel.invalid {
    border-color: #ef4444; background: rgba(239,68,68,0.06);
    animation: csvExpirationCheckboxShake 0.4s ease;
}
.name-chip-multiline { display: inline-block; white-space: normal; }
button.name-chip { cursor: pointer; }
button.name-chip:hover { border-color: var(--accent); background: var(--accent-lt); color: var(--accent); }
button.name-chip:hover > span { text-decoration: underline; text-decoration-color: currentColor; }
.policy-meta-cell { position: relative; width: 36px; min-width: 36px; text-align: center; }
.policies-table td:last-child, .policies-table th:last-child {
    min-width: 76px;
    padding-right: 16px;
    position: sticky;
    right: 0;
    background: var(--surface);
}
.policies-table th:last-child { background: #F8FAFC; }
.policies-table tbody tr:hover td:last-child { background: #F8FAFC; }
.policy-meta-btn {
    background: none; border: 1px solid var(--border); border-radius: var(--radius);
    width: 28px; height: 28px; cursor: pointer; color: var(--sub);
    font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.policy-meta-btn:hover { background: var(--accent-lt); color: var(--accent); border-color: var(--accent); }
#policyMetaPopup {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 2000;
    align-items: center; justify-content: center; padding: 24px;
}
#policyMetaPopup.open { display: flex; }
.meta-dialog {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
    width: 100%; max-width: 340px;
    padding: 20px 20px 16px;
}
.meta-dialog-title {
    font-size: 15px; font-weight: 600; margin: 0 0 14px;
    padding-right: 24px; word-break: break-word;
}
.meta-dialog-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; cursor: pointer;
    color: var(--sub); font-size: 18px; line-height: 1; padding: 2px;
}
.meta-dialog-close:hover { color: var(--text); }
#policyMetaPopup .meta-dialog { position: relative; }
#configJsonPopup {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 2100;
    align-items: center; justify-content: center; padding: 24px;
}
#configJsonPopup.open { display: flex; }
.config-json-tabs { display: none; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.config-json-tab {
    background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
    padding: 10px 14px; font-size: 12px; font-weight: 500; color: var(--sub);
    margin-bottom: -1px; font-family: inherit; transition: color .12s, border-color .12s;
}
.config-json-tab:hover { color: var(--text); }
.config-json-tab.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.config-json-dialog {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0,0,0,.28);
    width: 100%; max-width: 680px; max-height: 80vh;
    display: flex; flex-direction: column; position: relative;
}
.config-json-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 12px; border-bottom: 1px solid #F0F0F5; flex-shrink: 0;
}
.config-json-title {
    font-size: 14px; font-weight: 600; color: var(--text);
    margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding-right: 12px;
}
.config-json-body {
    flex: 1; overflow-y: auto; padding: 16px 20px;
}
.config-json-pre {
    margin: 0; font-family: 'Consolas','Cascadia Code','Menlo',monospace;
    font-size: 12px; line-height: 1.6; color: #334155;
    white-space: pre; overflow-x: auto;
    background: #F8FAFC; border: 1px solid #E8ECF2;
    border-radius: 6px; padding: 14px 16px;
}
.config-json-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    padding: 12px 20px 16px; border-top: 1px solid #F0F0F5; flex-shrink: 0;
}
.config-json-dl-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent); color: #fff; border: none; border-radius: 6px;
    padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.config-json-dl-btn:hover { background: #1a7de0; }
.config-json-cancel-btn {
    background: #F3F6F9; color: var(--text); border: none; border-radius: 6px;
    padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.config-json-cancel-btn:hover { background: #E8ECF2; }
.filter-tags-row {
    display: none; flex-wrap: wrap; gap: 6px;
    padding: 6px 16px 10px; border-bottom: 1px solid var(--border);
}
.filter-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 6px 2px 10px; border-radius: 12px;
    background: var(--accent-lt); color: var(--accent);
    font-size: 11px; font-weight: 600;
}
.filter-tag button {
    background: none; border: none; cursor: pointer;
    color: var(--accent); font-size: 14px; line-height: 1;
    padding: 0 2px; opacity: 0.7; display: flex; align-items: center;
}
.filter-tag button:hover { opacity: 1; }
.filter-btn {
    flex-shrink: 0; height: 32px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 0.42rem;
    background: #F3F6F9; font-size: 12px; font-family: inherit;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    color: var(--sub); white-space: nowrap; transition: all 0.12s;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }
.filter-btn.active { border-color: var(--accent); background: var(--accent-lt); color: var(--accent); font-weight: 600; }
.th-sort {
    display: inline-flex; align-items: center; gap: 5px;
    cursor: pointer; user-select: none;
    background: none; border: none; padding: 0;
    font: inherit; color: inherit;
    letter-spacing: inherit; text-transform: inherit;
}
.th-sort:hover { color: var(--accent); }
.th-sort.active { color: var(--accent); }
.sort-icon { font-size: 10px; opacity: 0.45; }
.th-sort.active .sort-icon { opacity: 1; }
.th-priority-wrap { display: inline-flex; align-items: center; gap: 5px; }
.th-priority-btn {
    background: none; border: none; cursor: pointer; padding: 1px 3px;
    color: #9CA3AF; font-size: 11px; line-height: 1; border-radius: 3px;
    transition: all 0.12s; pointer-events: auto;
}
.th-priority-btn:hover { color: #0078D4; background: #EFF6FF; }
.th-priority-btn.active { color: #0078D4; background: #DBEAFE; }
#priorityFlyout, #tokenPriorityFlyout {
    display: none; position: fixed;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(82,63,105,0.14); min-width: 200px; z-index: 1002; padding: 4px 0;
    max-height: calc(100vh - 40px); overflow-y: auto;
}
#priorityFlyout.open, #tokenPriorityFlyout.open { display: block; }
.priority-section-label {
    font-size: 10px; font-weight: 700; color: var(--sub);
    letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 14px 4px;
}
.priority-section-sep { height: 1px; background: var(--border); margin: 4px 0; }
.priority-opt {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 8px 14px; border: none; background: none;
    font: inherit; font-size: 12px; color: var(--text); cursor: pointer; text-align: left;
    transition: background 0.1s;
}
.priority-opt:hover { background: var(--accent-lt); color: var(--accent); }
.priority-opt.active { color: var(--accent); font-weight: 600; }
.priority-dot { font-size: 7px; opacity: 0.25; }
.priority-dot.on { opacity: 1; color: var(--accent); }
.policy-group-row.priority-first td { background: #EFF6FF; color: #1D4ED8; }
.priority-star { margin-right: 2px; }
.th-name-wrap { display: inline-flex; align-items: center; gap: 6px; }
.sort-dir-btns { display: inline-flex; gap: 2px; }
.sort-dir-btn {
    background: none; border: 1px solid var(--border); border-radius: 3px;
    width: 20px; height: 20px; cursor: pointer; font-size: 10px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    color: #9CA3AF; padding: 0; transition: all 0.12s;
}
.sort-dir-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }
.sort-dir-btn.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.policy-group-row td {
    background: #F1F5F9; color: var(--sub);
    font-size: 11px; font-weight: 700; padding: 5px 16px;
    letter-spacing: 0.07em; text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}
mark.search-hl { background: #FEF08A; color: inherit; border-radius: 2px; padding: 0 1px; font-style: normal; }
#filterPopup, #tokenFilterPopup, #csvFilterPopupBackdropV2, #uaFilterPopup {
    display: none; position: fixed; inset: 0;
    z-index: 1001; background: rgba(24,28,50,0.45);
    align-items: center; justify-content: center;
}
#filterPopup.open, #tokenFilterPopup.open, #csvFilterPopupBackdropV2.open, #uaFilterPopup.open { display: flex; }
.filter-dialog-panel {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: 0 8px 40px rgba(82,63,105,0.22);
    width: calc(100% - 48px); max-width: 360px;
    display: flex; flex-direction: column;
    max-height: calc(100vh - 80px);
}
.filter-dialog-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.filter-dialog-title { font-size: 15px; font-weight: 600; }
.filter-dialog-body { overflow-y: auto; flex: 1; padding: 4px 0; }
.filter-dialog-footer {
    padding: 10px 16px; border-top: 1px solid var(--border);
    display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
}
.filter-popup-section { padding: 10px 16px; }
.filter-popup-label {
    font-size: 10px; font-weight: 700; color: var(--sub);
    letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 6px;
}
.filter-popup-options { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-popup-sep { height: 1px; background: var(--border); }
.filter-popup-range-group { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
#uaFilterPopup .filter-popup-options { flex-direction: column; }
#uaFilterPopup .filter-popup-options .ua-filter-role-option {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
}
@media (max-width: 480px) {
    #uaFilterPopup .filter-popup-options { flex-direction: row; flex-wrap: wrap; }
    #uaFilterPopup .filter-popup-options .ua-filter-role-option {
        width: auto;
        justify-content: center;
        padding: 8px;
    }
    #uaFilterPopup .filter-popup-options .ua-filter-role-label { display: none; }
}
.col-sort-modal-btn {
    display: none; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: var(--radius); border: 1px solid var(--border);
    background: #F3F6F9; font-size: 11px; font-weight: 600; color: var(--sub);
    cursor: pointer; font-family: inherit; white-space: nowrap;
}
.col-sort-modal-btn:hover { background: #EFF6FF; color: var(--accent); border-color: var(--accent); }
.col-sort-modal-btn.active { background: #DBEAFE; color: var(--accent); border-color: var(--accent); }
.policies-med1 .col-sort-modal-btn, .policies-med1b .col-sort-modal-btn,
.policies-med2 .col-sort-modal-btn, .policies-narrow .col-sort-modal-btn { display: inline-flex; }
#colSortModal, #tokenColSortModal {
    display: none; position: fixed; inset: 0; z-index: 1001;
    background: rgba(24,28,50,0.45); align-items: center; justify-content: center;
}
#colSortModal.open, #tokenColSortModal.open { display: flex; }
.col-sort-panel {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: 0 8px 40px rgba(82,63,105,0.22);
    width: calc(100% - 48px); max-width: 360px;
    display: flex; flex-direction: column; max-height: calc(100vh - 80px);
}
.col-sort-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.col-sort-title { font-size: 15px; font-weight: 600; }
.col-sort-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.col-sort-tab {
    flex: 1; padding: 9px 4px; border: none; background: none;
    font-size: 12px; font-weight: 600; color: var(--sub); cursor: pointer;
    font-family: inherit; border-bottom: 2px solid transparent;
    transition: color 0.12s, border-color 0.12s;
}
.col-sort-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.col-sort-tab:hover:not(.active) { color: var(--text); }
.col-sort-body { overflow-y: auto; flex: 1; padding: 4px 0; }
.col-sort-section { padding: 10px 16px; }
.col-sort-section-label {
    font-size: 10px; font-weight: 700; color: var(--sub);
    letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 8px;
}
.col-sort-opts { display: flex; flex-direction: column; gap: 2px; }
.col-sort-opt {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 12px; border: 1px solid transparent;
    border-radius: var(--radius); background: none;
    font-size: 13px; cursor: pointer; font-family: inherit; text-align: left;
}
.col-sort-opt:hover { background: #F8FAFC; border-color: var(--border); }
.col-sort-opt.active { background: #EFF6FF; color: var(--accent); border-color: #BFDBFE; }
.col-sort-dot { font-size: 8px; flex-shrink: 0; color: #CBD5E1; }
.col-sort-dot.on { color: var(--accent); }
.col-sort-sep { height: 1px; background: var(--border); }
.col-sort-footer {
    padding: 10px 16px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; flex-shrink: 0;
}
.token-col-sort-panel { max-width: 640px; }
.token-col-sort-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px; padding: 14px 16px;
}
.col-sort-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: #FAFBFC; }
.col-sort-card .col-sort-opts { gap: 1px; }
.col-sort-card .col-sort-opt { padding: 7px 10px; font-size: 12.5px; }
.filter-option {
    padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border);
    background: #F3F6F9; font-size: 11px; cursor: pointer; font-family: inherit;
    color: var(--text); transition: all 0.12s;
}
.filter-option:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }
.filter-option.sel { border-color: var(--accent); background: var(--accent-lt); color: var(--accent); font-weight: 600; }
.filter-option--static { cursor: default; }
.filter-option--static:hover { border-color: var(--border); color: var(--text); background: #F3F6F9; }
.filter-clear { width: 100%; text-align: center; color: var(--sub); }
.filter-clear:hover { color: #EF4444; border-color: #EF4444; background: #FEF2F2; }
.policy-meta-row {
    display: flex; align-items: baseline; gap: 8px;
    padding: 3px 12px; font-size: 12px;
}
.policy-meta-key { color: var(--sub); flex: 0 0 80px; font-weight: 500; }
.policy-meta-val { color: var(--text); }

#createPolicyDialog {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(24,28,50,0.45);
    align-items: center;
    justify-content: center;
}
.dialog-panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 420px;
    width: calc(100% - 48px);
    box-shadow: 0 8px 40px rgba(82,63,105,0.22);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    transition: max-width 0.28s cubic-bezier(0.4,0,0.2,1);
}
.dialog-header {
    padding: 16px 18px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}
.dialog-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.dialog-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 2px;
    color: var(--text);
}
.dialog-subtitle {
    font-size: 13px;
    color: var(--sub);
    margin: 0 0 12px;
}
.form-row {
    margin-bottom: 8px;
}
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}
.form-input,
.form-select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font);
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-input:disabled {
    background: #f4f5f7;
    color: var(--sub);
    cursor: default;
}
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B738A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}
.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 10px 18px 14px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.dialog-form-cols {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.dialog-form-left {
    flex: 1;
    min-width: 0;
    padding: 16px 18px;
}
.dialog-form-right {
    min-width: 0;
    padding: 16px 18px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}
.btn-secondary {
    background: #fff;
    color: var(--sub);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.12s;
}
.btn-secondary:hover { background: var(--bg); }

#editorPage {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 28px 28px 16px;
    overflow-y: auto;
    max-width: 1400px;
    width: 100%;
    margin-inline: auto;
}
#editorPage.active { display: flex; }

.editor-header {
    flex-shrink: 0;
    margin-bottom: 8px;
}
#editorScopePanel {
    flex-shrink: 0; margin-bottom: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: visible;
}
.editor-scope-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; user-select: none;
    font-size: 13px; font-weight: 600; color: var(--text);
}
.editor-scope-title { flex: 1; }
.editor-scope-header-btns { display: flex; align-items: center; gap: 6px; }
#editorScopePanelBody {
    padding: 14px; border-top: 1px solid var(--border); overflow: visible;
}
.editor-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.editor-title-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
#editorPolicyTitle {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#editorSchemaPill {
    display: inline-flex;
    align-items: center;
    color: #475569;
    flex-shrink: 0;
}
#editorSchemaPill svg { display: block; width: 30px; height: 30px; }
#editorPolicyToggleWrap { display: inline-flex; flex-shrink: 0; }
.editor-title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}
@media (max-width: 640px) {
    .editor-title-row {
        flex-direction: column;
        align-items: stretch;
    }
    .editor-title-actions {
        width: 100%;
        margin-left: 0;
    }
    #saveStatus {
        flex: none;
    }
}
#btnSave {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font);
    display: none;
}
#btnDiscard {
    background: #E53935;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font);
    display: none;
}
#saveStatus {
    font-size: 12px;
    color: #555;
    white-space: pre-line;
    flex: 1 1 auto;
    min-width: 0;
}
#btnReloadPolicy {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 8px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font);
    display: none;
}

#tokenManagerPage {
    padding: 28px 28px 20px;
    overflow: hidden;
    min-height: 0;
    max-width: 1400px;
    width: 100%;
    margin-inline: auto;
}
#tokenManagerPage.active { display: flex; flex-direction: column; }

.source-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: #E8EBF1; border-radius: var(--radius); padding: 3px; width: fit-content; max-width: 100%; margin-bottom: 16px; }
.source-tabs button {
    border: none; background: none; padding: 6px 14px; border-radius: 3px; font-size: 12.5px; font-weight: 600;
    font-family: var(--font); color: var(--sub); cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.source-tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.source-tabs .count { background: var(--border); color: var(--sub); font-size: 10.5px; padding: 1px 6px; border-radius: 8px; display: inline-flex; align-items: center; }
.count-spinner {
    display: inline-block; width: 8px; height: 8px;
    border: 1.5px solid rgba(107,115,138,0.35); border-top-color: var(--sub);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
.source-tabs button.active .count { background: var(--accent-lt); color: var(--accent); }
.count-pulse { animation: countPulse 1.6s ease-out 1; }
@keyframes countPulse {
    0%   { background: #16A34A; color: #fff; }
    100% { background: var(--border); color: var(--sub); }
}

.token-serial { font-weight: 600; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 12.5px; }
.token-meta { color: var(--sub); font-size: 12px; }
.status-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.status-pill.unassigned  { background: #F1F5F9; color: #475569; }
.status-pill.assigned    { background: var(--accent-lt); color: var(--accent); }
.status-pill-icon { line-height: 1; }

.otp-mode-pill {
    display: inline-flex; align-items: center;
    padding: 1px 8px; border-radius: 10px; font-size: 10.5px; font-weight: 700;
    letter-spacing: .02em; vertical-align: middle;
}
.otp-mode-pill.totp { background: #EFF6FF; color: #2563EB; }
.otp-mode-pill.hotp { background: #FDF2FE; color: #A21CAF; }

.token-name-chips { display: none; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.token-name-chips .token-name-chip-full { flex-basis: 100%; }
#tokenTableScrollArea.tm-collapsed .tm-col-manuf,
#tokenTableScrollArea.tm-collapsed .tm-col-assignedto,
#tokenTableScrollArea.tm-collapsed .tm-col-status,
#tokenTableScrollArea.tm-collapsed .tm-col-created,
#tokenTableScrollArea.tm-collapsed .tm-col-expir,
#tokenTableScrollArea.tm-collapsed .tm-col-enabled { display: none; }
#tokenTableScrollArea.tm-collapsed .token-name-chips { display: flex; }

.token-status-select {
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 20px 3px 6px;
    width: fit-content;
    max-width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none' stroke='%236B738A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3.5L5 6.5L8 3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
}
.token-status-select--ACTIVE   { color: #16A34A; border-color: #16A34A; }
.token-status-select--DISABLED { color: #DC2626; border-color: #DC2626; }
.token-status-select:disabled  { cursor: not-allowed; opacity: .55; }
.token-status-option-color--ACTIVE   { color: #16A34A; }
.token-status-option-color--DISABLED { color: #DC2626; }
.csv-v2-color--green  { color: #1f8f5e; }
.csv-v2-color--amber  { color: #966b0a; }
.csv-v2-color--purple { color: #7b3fbd; }
.csv-v2-color--grey   { color: #5C6672; }
.csv-v2-color--red    { color: #c73838; }
.th-label-collapsed { display: none; }
#tokenTableScrollArea.tm-collapsed .th-label-full { display: none; }
#tokenTableScrollArea.tm-collapsed .th-label-collapsed { display: inline; }
#tokenTableScrollArea.tm-collapsed .token-col-sort-modal-btn { display: inline-flex; }
#tokenTableScrollArea.tm-collapsed .tm-actions-label { display: none; }

.csv-name-chips { display: none; flex-direction: column; gap: 5px; margin-top: 6px; }
.csv-name-chips .assign-cell-filled { white-space: normal; }
.csv-scroll.csv-collapsed .csv-col-model,
.csv-scroll.csv-collapsed .csv-col-assignto,
.csv-scroll.csv-collapsed .csv-col-status { display: none; }
.csv-scroll.csv-collapsed .csv-name-chips { display: flex; }
.csv-scroll.csv-collapsed .th-label-full { display: none; }
.csv-scroll.csv-collapsed .th-label-collapsed { display: inline; }

.token-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--border); }
.token-modal-backdrop {
    display: none; position: fixed; inset: 0; z-index: 500;
    background: rgba(24,28,50,0.45); align-items: center; justify-content: center;
}

.soft-token-preview { background: #FAFBFC; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.soft-token-preview .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12.5px; }
.soft-token-preview .row .k { color: var(--sub); }
.soft-token-preview .row .v { font-family: ui-monospace, monospace; font-weight: 600; }
.preview-note {
    background: var(--accent-lt); border: 1px solid #C7D9FB; color: #1E3A8A; border-radius: var(--radius);
    padding: 10px 12px; font-size: 12px; line-height: 1.5; margin-top: 4px; display: flex; gap: 9px;
}
.preview-note.danger { background: #FEF2F2; border-color: #FCA5A5; color: #7F1D1D; }
.preview-note svg { flex-shrink: 0; margin-top: 1px; }
.preview-note > div { min-width: 0; overflow-wrap: anywhere; }


#importCsvDialog .dialog-body { overflow: hidden; padding: 16px 18px; }
#importCsvDialog .dialog-body > * { flex-shrink: 0; }
#importCsvDialog #csvPreviewArea {
    flex: 1; min-height: 0; flex-direction: column; overflow: hidden;
}
#importCsvDialog #csvPreviewArea > * { flex-shrink: 0; }
#importCsvDialog #csvPreviewArea > .csv-scroll { flex: 1; min-height: 0; }
@media (max-width: 640px) {
    #importCsvDialog .dialog-body { padding: 12px 14px; }
}

#importCsvDialogV2 .dialog-panel--wide { position: relative; }
#importCsvDialogV2 .dialog-body { overflow: hidden; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
#importCsvDialogV2 .dialog-body > * { flex-shrink: 0; }
#importCsvDialogV2 #csvTableCardV2 { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
#importCsvDialogV2 #csvTableCardV2 > * { flex-shrink: 0; }
#importCsvDialogV2 #csvTableCardV2 .csv-scroll { flex: 1; min-height: 0; }
@media (max-width: 640px) {
    #importCsvDialogV2 .dialog-body { padding: 12px 14px; }
}

#importCsvDialogV2 .csv-summary-sticky {
    background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 14px; position: sticky; top: 0; z-index: 5; isolation: isolate;
    box-shadow: 0 6px 10px -8px rgba(0,0,0,.25);
}
.summary-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.summary-header-actions { display: contents; }
.csv-load-trigger {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
    padding: 9px 16px; border-radius: var(--radius); border: 1px dashed var(--border);
    background: #F3F6F9; color: var(--text); cursor: pointer; font-family: inherit;
}
.csv-load-trigger:hover { border-color: var(--accent); color: var(--accent); }
.summary-collapse-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
    border-radius: 6px; border: 1px solid var(--border); background: var(--surface, #fff); color: var(--sub);
    cursor: pointer; flex-shrink: 0; transition: transform .15s;
}
.summary-collapse-btn:hover { border-color: var(--accent); color: var(--accent); }
.summary-collapse-btn.collapsed svg { transform: rotate(-90deg); }
.summary-groups { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.summary-groups.collapsed { display: none; }
.summary-group {
    flex: 1 1 240px; min-width: 220px; background: #F3F6F9; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 14px;
}
.summary-group-divider { border-top: 1px solid var(--border); margin: 10px 0; }
.summary-group-total { display: flex; align-items: baseline; gap: 8px; }
.summary-sub-list { display: flex; flex-direction: column; gap: 5px; }
.summary-sub-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.summary-section-label {
    font-size: 10px; font-weight: 700; color: var(--sub); letter-spacing: 0.07em; text-transform: uppercase;
    padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border);
}
.summary-section-label:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.preview-empty { color: var(--sub); font-size: 13px; font-style: italic; padding: 6px 2px; }
@media (max-width: 640px) {
    #importCsvDialogV2 .summary-header { flex-direction: column; align-items: stretch; gap: 8px; }
    #importCsvDialogV2 #csvSummaryHeadingV2 { white-space: normal; }
    #importCsvDialogV2 .summary-header-actions {
        display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; width: 100%;
    }
    #importCsvDialogV2 #btnRemoveInvalidV2 span { display: none; }
}

#importCsvDialogV2 .csv-row-purple { color: #7b3fbd; font-size: 11px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; white-space: normal; }
#importCsvDialogV2 .csv-row-purple-detail { color: var(--sub); font-size: 10.5px; font-weight: 400; }

#importCsvDialogV2 .csv-submit-overlay {
    display: none; position: absolute; inset: 0; z-index: 200; align-items: center; justify-content: center;
    flex-direction: column; gap: 10px; background: rgba(20, 22, 34, 0.55); border-radius: var(--radius);
}
:root[data-theme="light"] #importCsvDialogV2 .csv-submit-overlay { background: rgba(255,255,255,0.6); }
#importCsvDialogV2 .csv-submit-spinner {
    width: 34px; height: 34px; border: 3px solid rgba(255,255,255,0.35); border-top-color: #fff;
    border-radius: 50%; animation: csv-spin-v2 0.8s linear infinite;
}
@keyframes csv-spin-v2 { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #importCsvDialogV2 .csv-submit-spinner { animation: none; } }
#importCsvDialogV2 .csv-submit-check { color: #4caf87; }
#importCsvDialogV2 .csv-submit-overlay-label { color: #F5F7FA; font-size: 13px; font-weight: 600; margin: 0; }
:root[data-theme="light"] #importCsvDialogV2 .csv-submit-overlay-label { color: var(--ink, #1a1a1a); }
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) #importCsvDialogV2 .csv-submit-overlay-label { color: var(--ink, #1a1a1a); }
}
#importCsvDialogV2 tr.csv-row-committing td { background: #E3F7EC !important; transition: background 0.3s; }

.csv-scroll { overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.csv-preview-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11.5px; }
.csv-preview-table th, .csv-preview-table td { padding: 7px 9px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.csv-preview-table th { color: var(--sub); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: .04em; background: #F8FAFC; position: sticky; top: 0; z-index: 100; will-change: transform; isolation: isolate; }
.csv-row-ok   { color: #16A34A; font-size: 11px; font-weight: 600; }
.csv-row-err  { color: #DC2626; font-size: 11px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.csv-row-err-detail { color: var(--sub); font-size: 10.5px; font-weight: 400; }
.csv-row-amber { color: #B45309; font-size: 11px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.csv-row-amber-detail { color: var(--sub); font-size: 10.5px; font-weight: 400; }
.search-hit { background: #FDE68A; color: inherit; border-radius: 2px; padding: 0 1px; }
.status-locked { display: block; color: var(--sub); font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.csv-cell-dim { color: var(--sub); font-size: 12px; }
.tag-new, .tag-existing, .tag-error {
    display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    padding: 1px 6px; border-radius: 8px; margin-right: 5px;
}
.tag-new { background: var(--accent-lt); color: var(--accent); }
.tag-existing { background: #F1F5F9; color: #475569; }
.tag-error { background: rgba(220,38,38,.1); color: #DC2626; }
.exclude-cell { width: 1%; white-space: nowrap; padding-left: 4px; padding-right: 8px; text-align: center; }
.row-exclude-btn {
    background: none; border: 1px solid var(--border); border-radius: var(--radius); color: var(--sub); cursor: pointer;
    width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.row-exclude-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.row-exclude-btn:hover { border-color: #DC2626; color: #DC2626; background: rgba(220,38,38,.08); }
.row-exclude-btn--restore:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }
.commit-confirm-warning {
    background: #FEF3C7; border: 1px solid #F59E0B; color: #92400E;
    border-radius: var(--radius); padding: 7px 10px; font-size: 11.5px; font-weight: 600; margin-bottom: 14px;
}
.commit-confirm-actions { display: flex; flex-direction: column; gap: 8px; }
.commit-confirm-actions button { width: 100%; text-align: center; justify-content: center; }
.btn-outline {
    background: #fff; color: var(--accent); border: 1px solid var(--accent);
    padding: 8px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: var(--font); transition: background 0.12s;
}
.btn-outline:hover { background: var(--accent-lt); }
.csv-preview-table tr.csv-divider-row { cursor: pointer; }
.csv-preview-table tr.csv-divider-row td {
    position: sticky; padding: 5px 9px; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--sub); background: #F8FAFC; border-bottom: 1px solid var(--border);
    transition: background .15s, color .15s; will-change: transform; isolation: isolate;
}
.csv-preview-table tr.csv-divider-row:hover td { background: var(--accent-lt); color: var(--accent); }
.tag-completed {
    display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; padding: 1px 7px; border-radius: 8px; background: #DCFCE7; color: #16A34A;
}
.csv-preview-table td.assign-cell { white-space: normal; max-width: 260px; }
.assign-cell-filled { display: flex; align-items: center; gap: 6px; }
.assign-cell-filled .upn { font-size: 12px; }
.assign-pencil {
    background: none; border: 1px solid var(--border); border-radius: var(--radius); color: var(--sub); cursor: pointer;
    width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.assign-pencil svg { width: 14px; height: 14px; flex-shrink: 0; }
.assign-pencil:hover { color: var(--accent); }
.assign-pencil--unassign:hover { border-color: #DC2626; color: #DC2626; }
.assign-warn-badge { display: inline-flex; align-items: center; justify-content: center; color: #DC2626; flex-shrink: 0; }
.assign-choose-btn {
    background: none; border: 1px dashed var(--border); color: var(--sub); font-size: 11px;
    padding: 3px 8px; border-radius: var(--radius); cursor: pointer; font-family: var(--font);
}

.csv-mode-picker-box {
    border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 12px;
    font-size: 12.5px; color: var(--sub); background: #FAFBFC; margin-bottom: 14px; cursor: pointer;
}
.csv-mode-picker-box:hover { border-color: var(--accent); color: var(--accent); }
.csv-mode-picker-box[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.csv-mode-picker-label { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.expected-columns-hint {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px;
    background: var(--accent-lt); margin-bottom: 14px;
}
.expected-columns-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin: 0 0 6px; }
.expected-columns-row { font-size: 11.5px; color: var(--text); margin: 0 0 3px; line-height: 1.5; }
.expected-columns-row:last-child { margin-bottom: 0; }
.expected-columns-row code { background: rgba(0,0,0,.06); border-radius: 3px; padding: 1px 4px; font-size: 11px; }
.spec-mode-card-list {
    max-height: 460px; overflow-y: auto; display: flex; flex-direction: column;
    gap: 10px; margin: 0 -4px 4px; padding: 4px;
}
.spec-mode-card {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
    text-align: left; background: var(--surface);
}
.spec-mode-card:hover { border-color: var(--accent); background: var(--accent-lt); }
.spec-mode-card--selected { border-color: var(--accent); border-width: 2px; background: var(--accent-lt); }
.spec-mode-card-icon {
    flex-shrink: 0; width: 60px; height: 60px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-lt); border: 1px solid var(--accent); color: var(--accent);
}
.spec-mode-card-icon svg { width: 38px; height: 38px; display: block; overflow: visible; }
.spec-mode-card-title { font-size: 14.5px; font-weight: 700; color: var(--text); margin-top: 5px; }
.spec-mode-card-title .tag-current { margin-left: 6px; vertical-align: 1px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 8px; background: var(--accent-lt); color: var(--accent); }
.spec-mode-card-brief { font-size: 12.5px; color: var(--sub); margin-top: 4px; line-height: 1.5; }
.spec-trigger-icon { display: inline-flex; width: 20px; height: 20px; vertical-align: -5px; color: var(--accent); margin-right: 4px; }
.spec-trigger-icon svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mode-chooser-card { display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.mode-chooser-card .spec-mode-card-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }

.csv-file-chosen-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 12px;
    font-size: 12.5px; color: var(--text); background: #FAFBFC; margin-bottom: 14px; cursor: pointer;
}
.csv-file-chosen-row:hover { border-color: var(--accent); }
.change-file-link { font-size: 11.5px; font-weight: 600; color: var(--accent); flex-shrink: 0; }
.csv-slot-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.csv-slot-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 12.5px;
}
.csv-slot-item .clear-slot-link { font-size: 11.5px; font-weight: 600; color: #DC2626; cursor: pointer; flex-shrink: 0; }
.csv-add-slot-btn {
    display: block; width: 100%; border: 1px dashed var(--border); border-radius: var(--radius);
    padding: 10px 12px; font-size: 12.5px; color: var(--sub); background: #FAFBFC; cursor: pointer;
    font-family: var(--font); text-align: center;
}
.csv-add-slot-btn:hover { border-color: var(--accent); color: var(--accent); }

.token-side-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 360px; background: var(--surface);
    box-shadow: -8px 0 30px rgba(0,0,0,0.15); z-index: 700; display: none; flex-direction: column;
}
.token-side-panel.open { display: flex; }
.token-side-panel-head { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.token-side-panel-head h3 { margin: 0 0 3px; font-size: 15px; font-weight: 600; }
.token-side-panel-head p { margin: 0; font-size: 12px; color: var(--sub); }
.token-side-panel-search { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.token-side-panel-search input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12.5px; font-family: var(--font); }
.token-side-panel-list { flex: 1; overflow-y: auto; }
.token-side-panel-item { padding: 10px 16px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; gap: 10px; }
.token-side-panel-item:hover { background: var(--accent-lt); }
.token-side-panel-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-lt); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.token-side-panel-item .name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.token-side-panel-item .upn { font-size: 11.5px; color: var(--sub); }
#tokenSidePanelBackdrop { display: none; position: fixed; inset: 0; z-index: 690; background: rgba(0,0,0,0.15); }
#tokenSidePanelBackdrop.open { display: block; }

.token-side-panel-filter-btn {
    width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--sub); cursor: pointer;
}
.token-side-panel-filter-btn:hover { background: var(--accent-lt); color: var(--accent); }
.token-side-panel-filter-btn.active { background: var(--accent-lt); color: var(--accent); border-color: var(--accent); }
.token-side-panel-filter-chip {
    display: none; align-items: center; gap: 6px; margin-top: 8px;
    padding: 4px 8px; border-radius: 99px; background: var(--accent-lt); color: var(--accent);
    font-size: 11.5px; font-weight: 600; width: fit-content;
}
.token-side-panel-filter-chip.active { display: inline-flex; }
.token-side-panel-filter-chip button { border: none; background: none; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }

.group-filter-search { padding: 0 0 12px; }
.group-filter-search input { width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12.5px; font-family: var(--font); }
.group-filter-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.group-filter-item { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.group-filter-item:last-child { border-bottom: none; }
.group-filter-item:hover { background: var(--accent-lt); }
.group-filter-item .name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-filter-item .count { font-size: 11px; color: var(--sub); flex-shrink: 0; white-space: nowrap; }

.token-empty-state { text-align: center; padding: 60px 20px; color: var(--sub); }
.token-empty-state svg { margin-bottom: 14px; opacity: .5; }
.token-empty-state h3 { font-size: 15px; color: var(--text); margin: 0 0 6px; }
.token-empty-state p { font-size: 13px; margin: 0 0 4px; }

.car-create-panel { max-width: 480px; }
.car-fixed-width-panel { max-width: 420px; }
#createAppRegPage {
    flex-direction: column;
    padding: 32px 40px;
    overflow-y: auto;
    max-width: 1400px;
    width: 100%;
    margin-inline: auto;
}
#userAccessPage {
    flex-direction: column;
    padding: 32px 40px 12px;
    overflow: hidden;
    max-width: 1400px;
    width: 100%;
    margin-inline: auto;
}
#userAccessPage.active { display: flex; }
#userAccessList { max-width: 640px; }
.car-form { max-width: 480px; margin-top: 8px; }
.car-tenant-info { display: flex; flex-direction: column; align-self: flex-start; gap: 2px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 20px; }
#carDeleteConfirmBackdrop .dialog-header, #carGoneBackdrop .dialog-header { border-bottom: none; padding-bottom: 20px; }
#carDeleteConfirmBackdrop .dialog-actions, #carGoneBackdrop .dialog-actions { border-top: none; padding-top: 20px; }
#carDeleteConfirmBackdrop .car-tenant-info, #carGoneBackdrop .car-tenant-info {
    align-self: stretch !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-inline: 0 !important;
    border-top: 1px solid #000 !important;
    border-color: #000;
}
#carEditModalBackdrop .dialog-header { border-bottom: none; padding-bottom: 20px; }
#carEditModalBackdrop .dialog-actions { border-top: none; padding-top: 20px; }
.car-tenant-label { font-size: 11px; font-weight: 600; color: var(--sub); text-transform: uppercase; letter-spacing: 0.05em; }
.car-tenant-name  { font-size: 13px; font-weight: 500; color: var(--text); }
.car-tenant-id    { font-size: 11px; font-family: monospace; color: var(--sub); }
.car-field { margin-bottom: 20px; }
.car-hint  { font-size: 12px; color: var(--sub); margin: 6px 0 0; }
.car-progress { max-width: 480px; margin-top: 8px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.car-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.car-step  { font-size: 13px; color: var(--sub); padding-left: 22px; position: relative; }
.car-step::before { content: '○'; position: absolute; left: 0; font-size: 12px; }
.car-step--active  { color: var(--text); }
.car-step--active::before  { content: ''; top: 2px; width: 10px; height: 10px; border: 2px solid var(--border); border-top-color: #3699FF; border-radius: 50%; animation: spin 0.8s linear infinite; }
.car-role-notice { margin-bottom: 12px; padding: 12px 14px; border: 1px solid #fcd34d; background: #fffbeb; color: #92400e; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.car-role-notice-text { white-space: pre-line; }
#createAppRegErrorMsg, #carEditErrorMsg, #carDeleteConfirmErrorMsg { white-space: pre-line; }
.car-role-notice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.car-role-notice-status { font-size: 12px; color: #92400e; white-space: pre-line; flex-basis: 100%; }
.car-role-notice-diag { margin-top: 8px; font-size: 11px; color: #a16207; overflow-wrap: anywhere; }
.car-role-notice-status.car-role-notice-error { color: #b91c1c; }
.car-log-panel { margin-top: 14px; font-size: 12px; color: var(--sub); }
.car-log-panel--empty { display: none; }
.car-log-panel > summary { cursor: pointer; user-select: none; }
.car-log-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.car-log-download { margin-left: 0; border-color: var(--border); color: var(--text); }
.car-log-download:hover { background: var(--accent-lt); }
.car-log { margin-top: 6px; max-height: 170px; overflow-y: auto; padding: 8px 10px; background: var(--bg, #f8fafc); border: 1px solid var(--border); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.5; color: var(--sub); }
.car-log-line { overflow-wrap: anywhere; }
.car-log-time { color: var(--text); margin-right: 6px; }
.car-log-line--error { color: #b91c1c; }
.car-step--done::before    { content: '✓'; color: #22c55e; }
.car-step--failed::before  { content: '✕'; color: #ef4444; }
.car-result { max-width: 480px; margin-top: 8px; padding: 24px; background: var(--surface); border: 1px solid #22c55e40; border-radius: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.car-result-icon  { margin-bottom: 4px; }
.car-result-title { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.car-result-fields { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.car-result-row   { display: flex; flex-direction: column; gap: 2px; }
.car-result-label { font-size: 11px; color: var(--sub); text-transform: uppercase; letter-spacing: 0.04em; }
.car-result-value { font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.car-result-mono  { font-family: monospace; font-size: 12px; }
.car-copy-btn     { background: none; border: 1px solid var(--border); cursor: pointer; color: var(--sub); padding: 6px; border-radius: 4px; display: flex; align-items: center; }
.car-copy-btn:hover { color: var(--text); background: var(--bg); border-color: var(--sub); }
.car-delete-btn:hover { color: #ef4444; background: #fef2f2; }
.btn-busy-spinner { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .btn-busy-spinner { animation: none; } }
.car-row-spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--sub); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.car-row-deleting-label { font-size: 12px; color: var(--sub); font-style: italic; }
.car-error  { max-width: 480px; margin-top: 8px; padding: 14px 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; display: none; align-items: flex-start; gap: 10px; font-size: 13px; color: #b91c1c; }
.car-retry-btn { margin-left: auto; background: none; border: 1px solid #fca5a5; border-radius: 6px; padding: 4px 12px; font-size: 12px; color: #b91c1c; cursor: pointer; white-space: nowrap; }
.car-retry-btn:hover { background: #fee2e2; }
.car-badge-audience { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 600; background: var(--accent-lt); color: var(--accent); flex-shrink: 0; white-space: nowrap; }
.car-badge-current  { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 600; background: #dcfce7; color: #15803d; flex-shrink: 0; white-space: nowrap; }
.car-existing-row--current { border-left: 3px solid #22c55e; }
.car-existing { max-width: 640px; width: 100%; align-self: flex-start; margin-top: 32px; border-top: 1px solid var(--border); padding-top: 24px; }
.car-existing-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.car-existing-title  { font-size: 13px; font-weight: 600; color: var(--text); }
.car-refresh-btn     { background: none; border: none; cursor: pointer; color: var(--sub); padding: 4px; border-radius: 4px; display: flex; align-items: center; }
.car-refresh-btn:hover { color: var(--text); background: var(--bg); }
.car-existing-list   { display: flex; flex-direction: column; gap: 1px; max-height: 360px; overflow-y: auto; }
body.embed-mode .car-existing-list { max-height: none; overflow-y: visible; }
.car-existing-empty  { font-size: 13px; color: var(--sub); font-style: italic; }
.car-existing-row    { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.car-existing-row + .car-existing-row { border-radius: 0; border-top: none; }
.car-existing-row:first-child { border-radius: 6px 6px 0 0; }
.car-existing-row:last-child  { border-radius: 0 0 6px 6px; }
.car-existing-row:only-child  { border-radius: 6px; }
.car-existing-name  { font-size: 13px; font-weight: 500; color: var(--text); white-space: normal; word-break: break-word; }
.car-existing-badges { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.car-existing-id    { font-size: 11px; font-family: monospace; color: var(--sub); flex-shrink: 0; }
.car-badge-warn      { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 600; background: #fef3c7; color: #92400e; flex-shrink: 0; }

.ua-tabs { display: flex; gap: 6px; }
.ua-tab { flex: 1; padding: 8px 0; border: 1px solid var(--border); background: var(--bg); color: var(--sub); font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; }
.ua-tab--active { background: var(--accent); border-color: var(--accent); color: #fff; }
.ua-role-badge { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 600; background: var(--accent-lt); color: var(--accent); flex-shrink: 0; white-space: nowrap; }
.ua-principal-type { font-size: 11px; color: var(--sub); }

.ua-list { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.ua-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); }
.ua-avatar { margin-top: 1px; }
.ua-row--principal {
    display: grid;
    grid-template-columns: 28px 4px 170px 14px 220px 4px 1fr;
    grid-template-areas: "avatar avatar-gap info info-gap chips chips-gap actions";
    align-items: start;
    position: relative;
}
.ua-row--principal > .ua-avatar    { grid-area: avatar; justify-self: start; }
.ua-row--principal > .ua-row-info  { grid-area: info; min-width: 0; max-width: 170px; justify-self: start; padding-right: 6px; }
.ua-row--principal > .ua-row-info > * { overflow-wrap: break-word; white-space: normal; }
.ua-row--principal > .ua-chips     { grid-area: chips; justify-self: start; position: relative; }
.ua-chips-inner { position: absolute; left: 0; top: 0; width: 220px; }
.ua-row--principal > .tm-actions   { grid-area: actions; justify-self: end; display: flex; flex-wrap: nowrap; justify-content: flex-end; margin-top: 1px; }
@media (max-width: 640px) {
    .ua-row--principal {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "avatar info actions"
            "chips  chips  chips";
    }
    .ua-chips-inner { position: static; }
}
.ua-row + .ua-row { border-top: none; }
.ua-row:first-child { border-radius: 6px 6px 0 0; }
.ua-row:last-child  { border-radius: 0 0 6px 6px; }
.ua-row:only-child  { border-radius: 6px; }
.ua-row--result { cursor: pointer; }
.ua-row--result.ua-row--disabled { opacity: .45; cursor: default; }
.ua-empty-row { padding: 10px 12px; font-size: 13px; color: var(--sub); font-style: italic; }

.ua-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: #1C2033; }
.ua-avatar--user  { background: #7ea6f7; }
.ua-avatar--group { background: #8fd6c4; }

.ua-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ua-row-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ua-row-sub  { font-size: 11px; color: var(--sub); }
.ua-row-note { font-size: 10.5px; color: #92400e; margin-top: 1px; }

.ua-select-circle { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0; }
.ua-select-circle.ua-selected { border-color: var(--accent); background: var(--accent); }
.ua-included-badge {
    display: flex; align-items: center; gap: 5px; flex-shrink: 0;
    font-size: 10.5px; font-weight: 600; color: var(--sub);
}
.ua-included-badge .ua-included-dot {
    width: 15px; height: 15px; border-radius: 50%; background: #2e7d32; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}

.ua-chips-inner { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 5px; justify-content: flex-start; }
.ua-chip { display: inline-flex; align-items: center; padding: 4px 6px; border-radius: 99px; background: var(--accent-lt); color: var(--accent); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ua-chip > .ua-pill-icon { width: 13px; height: 13px; }
.ua-chip-label {
    display: inline-block;
    max-width: 0;
    margin-left: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width .2s ease, margin-left .2s ease;
}
.ua-chip:hover .ua-chip-label, .ua-chip:focus-within .ua-chip-label {
    max-width: var(--ua-chip-max, 190px);
    margin-left: 5px;
}
.ua-chip-remove { background: none; border: none; color: inherit; cursor: pointer; font-weight: 700; font-size: 10px; padding: 0; line-height: 1; }
.ua-chip-remove--disabled { color: var(--sub); opacity: .4; cursor: default; }
.ua-row-remove { background: none; border: none; color: var(--sub); cursor: pointer; font-size: 15px; padding: 4px; flex-shrink: 0; }
.ua-row-remove:hover { color: #ef4444; }

.ua-role-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; margin-top: 6px; cursor: pointer; }
.ua-role-icon-frame {
    width: 48px; height: 48px; flex-shrink: 0;
    background: var(--accent-lt); border: 1px solid var(--border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    padding: 6px; box-sizing: border-box; color: var(--text);
}
.ua-role-icon-svg { width: 100%; height: 100%; }
.ua-role-card.ua-selected { border-color: var(--accent); background: var(--accent-lt); }
.ua-role-card.ua-role-card--disabled { opacity: .55; cursor: default; }
.ua-role-card-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.ua-role-card-desc { font-size: 11px; color: var(--sub); margin-top: 2px; }
.ua-role-card--disabled .ua-role-card-desc { color: #92400e; font-style: italic; }

.ua-filter-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--sub); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ua-pill-icon { display: inline-flex; width: 26px; height: 26px; flex-shrink: 0; }
.ua-pill-icon svg { width: 100%; height: 100%; }
.ua-icon-pill {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 50%; background: var(--accent-lt); color: var(--accent);
}
.ua-filter-pill.ua-selected { background: var(--accent); border-color: var(--accent); color: #fff; }

.ua-mini-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--accent-lt); color: var(--accent); font-size: 11px; font-weight: 600; }
.ua-mini-avatar { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #1C2033; flex-shrink: 0; }
.ua-mini-avatar--user  { background: #7ea6f7; }
.ua-mini-avatar--group { background: #8fd6c4; }

mark.search-highlight {
    background: rgba(54,153,255,0.15);
    color: #3699FF;
    font-weight: 700;
    border-radius: 2px;
    padding: 0 1px;
}
.ext-search-result {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 12px;
    color: #3F4254;
    border-bottom: 2px solid #EBEDF3;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.ext-search-result:last-child  { border-bottom: none; }
.ext-search-result:hover       { background: #F3F6F9; }
.ext-search-result--group-disabled { opacity: 0.7; }
.ext-search-result-top {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}
.ext-search-result-prefix {
    color: #181C32;
    font-size: 12px;
}
.ext-search-result-label {
    font-weight: 600;
    color: #3F4254;
}
.ext-search-result-group-hint {
    font-size: 11px;
    color: #E65100;
    font-style: italic;
}
.ext-search-result-description {
    font-size: 11px;
    color: #B5B5C3;
    font-style: italic;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ext-search-result-description p { margin: 0; }
.ext-search-result-description b,
.ext-search-result-description strong { font-weight: 600; font-style: normal; }
.spinner {
    width: 28px; height: 28px;
    border: 3px solid #E4E6EF;
    border-top-color: #0078D4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tenantLoginBar { 0%{transform:translateX(-100%)} 50%{transform:translateX(150%)} 100%{transform:translateX(-100%)} }
#connectingOverlay { transition: opacity 0.25s ease; }
#connectingOverlay.fading { opacity: 0; pointer-events: none; }
#schemaBarToc, #schemaBarLabel { white-space: nowrap; }
@media (max-width: 768px) {
    #btnSchema > span:last-child { display: none !important; }
    #btnSchema {
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        justify-content: center !important;
        flex-shrink: 0;
        gap: 0 !important;
    }
    #btnSchema > span:first-child { font-size: 20px !important; }
}

@media (max-width: 640px) {
    #userLabel { display: none; }
    #topBarNav { min-width: 0; flex-shrink: 1; }
    #topBarSection { max-width: none; }
    #topBarBrand { gap: 8px; }
}
@media (max-width: 480px) {
    #topBarBrand span span:last-child { display: none; }
    #topBarBrand span span:first-child { font-size: 13px; }
    #btnSignOut { display: none; }
    #userAvatar { cursor: pointer; }
}

@media (max-width: 480px) {
    #consolePage { padding: 32px 16px 32px; }
    #consoleTitle { font-size: 22px; margin-bottom: 24px; }
    .console-card { max-width: 100%; }
}

.dialog-panel--wide { max-width: min(90vw, 1100px); }
.users-count-link { display:inline-flex; align-items:center; gap:5px; background:none; border:none; cursor:pointer; color:var(--accent); font-size:12px; font-weight:500; padding:4px 0; font-family:inherit; }
.users-count-link:hover { text-decoration:underline; }
.scope-count-link { display:inline-flex; align-items:center; gap:4px; background:none; border:none; cursor:pointer; color:var(--accent); font-size:11px; font-weight:500; padding:1px 0; font-family:inherit; }
.scope-count-link:hover > span { text-decoration:underline; text-decoration-color: currentColor; }
.scope-right-header { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.scope-right-title { flex:1; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--sub); }
.scope-collapse-btn {
    display: none; align-items: center; justify-content: center;
    width: 20px; height: 20px; padding: 0; margin: 0 -2px 0 0;
    background: none; border: none; color: var(--sub); cursor: pointer;
    transition: transform .15s ease;
}
.scope-collapse-btn svg { display: block; }
.scope-collapse-btn.is-collapsed { transform: rotate(-90deg); }
.collapse-btn-circle { background: #64748B; border-radius: 50%; color: #fff; margin: 0; }
.collapse-btn-circle:hover { background: #475569; }
.scope-edit-btn { background:none; border:1px solid var(--border); border-radius:4px; padding:3px 10px; font-size:12px; font-weight:500; color:var(--sub); cursor:pointer; font-family:inherit; }
.scope-edit-btn:hover { border-color:var(--accent); color:var(--accent); }
.scope-all-users-row { margin-bottom:10px; }
.scope-all-users-label { display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-size:13px; font-weight:500; color:var(--text); user-select:none; }
.scope-all-users-label input[type=checkbox] { width:15px; height:15px; cursor:pointer; accent-color:var(--accent); }
.scope-boxes-grid.scope-disabled .scope-tags-area { cursor:default; }
.scope-boxes-grid.scope-disabled .scope-input { pointer-events:none; }
.scope-boxes-grid.scope-disabled .scope-add-btn { opacity:0.3; pointer-events:none; }
.scope-boxes-grid.scope-disabled .scope-tag-x { display:none; }
.scope-boxes-grid.scope-disabled .scope-footer { pointer-events:none; cursor:default; }
.domain-side-panel { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); }
.domain-side-tags { margin-top:4px; min-height:36px; display:flex; flex-wrap:wrap; gap:4px; align-content:flex-start; padding:6px 8px; border:1px solid var(--border); border-radius:var(--radius); background:#fff; }
.domain-input-error { border-color:#E53935 !important; animation:domainShake 0.3s ease; }
@keyframes domainShake { 0%,100% { transform:translateX(0); } 25% { transform:translateX(-4px); } 75% { transform:translateX(4px); } }
@media (min-width: 600px) {
    .dialog-panel--wide .dialog-body { overflow: hidden; }
    .dialog-panel--wide .dialog-form-cols { flex-direction: row; overflow: hidden; }
    .dialog-panel--wide .dialog-form-left { width: 300px; flex: none; overflow-y: auto; border-right: 1px solid var(--border); }
    .dialog-panel--wide .dialog-form-right { flex: 1; overflow-y: auto; border-top: none; }
}
@media (max-width: 599px) {
    .scope-collapse-btn { display: inline-flex; }
    .scope-collapsible.is-collapsed { display: none; }
    .scope-view-grid.is-collapsed { display: none; }
    #editorScopePanelBody.is-collapsed { display: none; }
    .settings-policies-body.is-collapsed { display: none; }
}
.scope-section-label {
    font-size: 13px; font-weight: 600; color: var(--text);
    margin: 20px 0 4px;
}
.scope-section-sub {
    font-size: 12px; color: var(--sub); margin-bottom: 14px;
}
.scope-boxes-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
    margin-bottom: 4px; width: 100%;
}
.scope-box-group { display: flex; flex-direction: column; gap: 5px; }
.scope-box-label { font-size: 11.5px; font-weight: 500; color: var(--sub); }
.scope-box {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); position: relative; overflow: visible;
    display: flex; flex-direction: column;
}
.scope-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.scope-tags-area {
    display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px;
    align-items: flex-start; align-content: flex-start;
    padding: 7px 7px 4px; min-height: 64px; max-height: 100px; overflow-y: auto;
}
.scope-tag {
    display: inline-flex; align-items: center; gap: 3px;
    border-radius: 3px; padding: 2px 5px 2px 7px;
    font-size: 11.5px; font-weight: 500; white-space: nowrap;
    animation: stIn .1s ease;
}
@keyframes stIn { from { opacity:0; transform:scale(.9); } to { opacity:1; transform:scale(1); } }
.scope-tag--inc { background: #dcfce7; color: #166534; border: 1px solid rgba(22,101,52,.18); }
.scope-tag--exc { background: #fee2e2; color: #991b1b; border: 1px solid rgba(153,27,27,.18); }
.scope-tag-x {
    background: none; border: none; color: inherit; opacity: .5;
    cursor: pointer; font-size: 13px; line-height: 1; padding: 0 1px;
}
.scope-tag-x:hover { opacity: 1; }
.scope-footer {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 7px; cursor: text;
}
.scope-box:focus-within .scope-hint { opacity: 0; }
.scope-hint { flex: 1; font-size: 11px; color: var(--sub); pointer-events: none; transition: opacity .1s; }
.scope-input {
    border: none; outline: none; background: transparent;
    font-size: 11.5px; color: var(--text); min-width: 60px; flex: 1;
    font-family: inherit; padding: 1px 2px; height: 22px; align-self: center;
}
.scope-add-btn {
    background: none; border: none; color: var(--accent);
    font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .7; font-weight: 300;
}
.scope-add-btn:hover { opacity: 1; }
.scope-dropdown {
    display: none; position: absolute; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.1); z-index: 1500;
    max-height: 180px; overflow-y: auto; width: max-content; min-width: 160px;
    white-space: normal; word-break: break-word;
}
.scope-dropdown.open { display: block; }
.scope-dd-item {
    padding: 6px 12px; cursor: pointer; font-size: 12px; white-space: nowrap;
}
.scope-dd-item:hover, .scope-dd-item.hl { background: var(--accent-lt); }
.scope-dd-item--disabled { cursor: not-allowed; opacity: .55; }
.scope-dd-item--disabled:hover, .scope-dd-item--disabled.hl { background: none; }
.scope-dd-sub { font-size: 10.5px; color: var(--sub); }
.scope-dd-badges { margin-top: 3px; }
.scope-opp-badge {
    display: inline-block; margin-left: 5px;
    padding: 0px 5px; border-radius: 99px;
    font-size: 9.5px; font-weight: 600; vertical-align: middle;
}
.scope-opp-badge--inc { background: #dcfce7; color: #166534; }
.scope-opp-badge--exc { background: #fee2e2; color: #991b1b; }
.scope-opp-badge--arrow { font-size: 9.5px; color: var(--sub); margin: 0 2px; vertical-align: middle; }
.scope-dup-badge { background: #fef3c7; color: #92400e; }
.scope-conflict-badge { background: #fee2e2; color: #991b1b; }
#scopeConfirmBackdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 9999; align-items: center; justify-content: center;
}
#scopeConfirmBackdrop.visible { display: flex; }
#scopeConfirmBox {
    background: var(--surface); border-radius: var(--radius-lg);
    padding: 24px 24px 20px; width: 320px; max-width: calc(100vw - 40px);
    box-shadow: 0 8px 40px rgba(82,63,105,.22);
}
.scope-confirm-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.scope-confirm-msg   { font-size: 13px; color: var(--sub); margin-bottom: 20px; line-height: 1.55; }
.scope-confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }
#activateConfirmBackdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 9999; align-items: center; justify-content: center;
}
#activateConfirmBackdrop.visible { display: flex; }
#activateConfirmBox {
    background: var(--surface); border-radius: var(--radius-lg);
    padding: 24px 24px 20px; width: 340px; max-width: calc(100vw - 40px);
    box-shadow: 0 8px 40px rgba(82,63,105,.22);
}
#scopePanelOverlay, #domainPanelOverlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.15);
    z-index: 1600; opacity: 0; pointer-events: none; transition: opacity .2s;
}
#scopePanelOverlay.visible, #domainPanelOverlay.visible { opacity: 1; pointer-events: all; }
#scopePanel, #domainPanel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 300px;
    background: var(--surface); border-left: 1px solid var(--border);
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform .2s cubic-bezier(.4,0,.2,1);
    z-index: 1650;
}
#scopePanel.open, #domainPanel.open { transform: translateX(0); }
.scope-panel-header {
    padding: 14px 14px 12px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.scope-panel-title { font-size: 13px; font-weight: 600; flex: 1; color: var(--text); }
.scope-panel-close { background: none; border: none; cursor: pointer; color: var(--sub); font-size: 18px; line-height: 1; padding: 0 2px; }
.scope-panel-close:hover { color: var(--text); }
.scope-panel-create-bar { padding: 8px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.scope-panel-create-btn {
    width: 100%; background: none; border: 1px dashed var(--border); border-radius: var(--radius);
    padding: 6px 10px; font-size: 12px; color: var(--accent); cursor: pointer;
    display: flex; align-items: center; gap: 6px; font-family: inherit;
}
.scope-panel-create-btn:hover { background: var(--accent-lt); border-color: var(--accent); }
.scope-panel-create-form { padding: 8px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.scope-panel-create-form input {
    width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 6px 9px; font-size: 12.5px; color: var(--text);
    outline: none; background: var(--bg); font-family: inherit; box-sizing: border-box;
}
.scope-panel-create-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,99,235,.1); }
.scope-panel-create-actions { display: flex; gap: 6px; justify-content: flex-end; }
.scope-panel-create-actions button { padding: 4px 12px; font-size: 12px; }
.scope-panel-search { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.scope-panel-search-input {
    width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 6px 9px; font-size: 12.5px; color: var(--text);
    outline: none; background: var(--bg); font-family: inherit;
}
.scope-panel-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,99,235,.1); }
.scope-panel-filter-btn {
    flex-shrink: 0; width: 28px; height: 28px; border: 1px solid var(--border);
    border-radius: var(--radius); background: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--sub);
}
.scope-panel-filter-btn:hover { background: var(--accent-lt); color: var(--accent); border-color: var(--accent); }
.scope-panel-filter-btn--on { background: var(--accent-lt); color: var(--accent); border-color: var(--accent); }
.scope-panel-filter-drop { border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--surface); }
.scope-panel-filter-opt {
    display: block; width: 100%; text-align: left; background: none; border: none;
    padding: 7px 14px; font-size: 12px; cursor: pointer; color: var(--text); font-family: inherit;
}
.scope-panel-filter-opt:hover { background: var(--accent-lt); }
.scope-panel-filter-opt--active { color: var(--accent); font-weight: 600; }
.scope-panel-active-filter {
    display: flex; align-items: center; gap: 6px; padding: 5px 12px;
    background: var(--accent-lt); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.scope-panel-active-filter-label { flex: 1; font-size: 11.5px; color: var(--accent); font-weight: 500; }
.scope-panel-active-filter-clear { background: none; border: none; cursor: pointer; color: var(--accent); font-size: 16px; line-height: 1; padding: 0; opacity: 0.7; }
.scope-panel-active-filter-clear:hover { opacity: 1; }
.scope-panel-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.scope-panel-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 14px; cursor: pointer;
}
.scope-panel-item:hover { background: #f5f8ff; }
.scope-panel-item input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; margin-top: 2px; flex-shrink: 0; }
.scope-panel-item-label { font-size: 12.5px; color: var(--text); }
.scope-panel-item-sub { font-size: 11px; color: var(--sub); }
.scope-panel-item-badge { margin-top: 3px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.scope-panel-item--pending { background: #eff6ff; }
.scope-panel-item--disabled { cursor: not-allowed; opacity: .55; }
.scope-panel-item--disabled:hover { background: none; }
.scope-panel-item--disabled input[type="checkbox"] { cursor: not-allowed; }
.scope-panel-empty { padding: 24px 14px; text-align: center; color: var(--sub); font-size: 12.5px; }
.scope-group-badge { display: inline-block; font-size: 10.5px; font-weight: 500; border-radius: 10px; padding: 1px 7px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.scope-group-badge--inc { color: #0e7490; background: #cffafe; }
.scope-group-badge--exc { color: #b45309; background: #fef3c7; }
.scope-panel-count {
    padding: 4px 12px; font-size: 11px; color: var(--muted);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.scope-panel-pages {
    display: flex; align-items: center; gap: 4px; padding: 6px 12px;
    border-top: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap;
}
.scope-page-btn {
    min-width: 28px; height: 26px; border: 1px solid var(--border); border-radius: var(--radius);
    background: none; cursor: pointer; font-size: 12px; font-family: inherit;
    color: var(--text); padding: 0 6px; line-height: 1;
}
.scope-page-btn:hover:not(:disabled) { background: var(--surface); }
.scope-page-btn--active { background: var(--accent); color: #fff; border-color: var(--accent); }
.scope-page-btn:disabled { opacity: 0.35; cursor: default; }
.scope-page-ellipsis { font-size: 12px; color: var(--muted); padding: 0 2px; line-height: 26px; }
.scope-page-label { font-size: 12px; color: var(--sub); padding: 0 6px; line-height: 26px; }
.scope-panel-footer {
    padding: 10px 14px; border-top: 1px solid var(--border);
    display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
}
.scope-box--active { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(37,99,235,.1) !important; }
#scopeViewBackdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 700; align-items: center; justify-content: center;
}
#scopeViewBackdrop.visible { display: flex; }
#scopeViewBox {
    background: var(--surface); border-radius: var(--radius-lg);
    padding: 24px; width: min(1200px, calc(100vw - 60px));
    max-height: calc(100vh - 80px); overflow-y: auto;
    box-shadow: 0 8px 40px rgba(82,63,105,.22);
}
.scope-view-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 20px; gap: 12px;
}
.scope-view-title   { font-size: 15px; font-weight: 600; }
.scope-view-subtitle{ font-size: 12px; color: var(--sub); margin-top: 3px; }
.scope-view-close {
    background: none; border: none; cursor: pointer; padding: 2px 6px;
    color: var(--sub); font-size: 18px; line-height: 1; flex-shrink: 0;
    border-radius: var(--radius);
}
.scope-view-close:hover { color: var(--text); background: var(--bg); }
.scope-view-grid { display: block; }
.scope-view-section-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em; color: var(--sub); margin-bottom: 7px;
}
.scope-view-tags {
    display: flex; flex-wrap: wrap; gap: 5px;
    min-height: 38px; padding: 7px 8px; border-radius: var(--radius);
    border: 1px solid var(--border); background: #FAFBFD;
}
.scope-view-tag-empty { font-size: 12px; color: #BCC1D0; align-self: center; font-style: italic; }
.scope-view-tag {
    display: inline-flex; align-items: center;
    padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.scope-view-tag--inc { background: #dcfce7; color: #166534; }
.scope-view-tag--exc { background: #fee2e2; color: #991b1b; }

@keyframes appUpdateBannerFlash {
    0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 0 3px #DC2626; }
    50%      { box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 0 3px transparent; }
}
#appUpdateBanner { animation: appUpdateBannerFlash 1s ease-in-out infinite; }


            #portalSettingsPage { flex-direction: column; padding: 24px 28px; overflow-y: auto; max-width: 1400px; width: 100%; margin-inline: auto; }
            #portalSettingsPage .ps-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 14px; }
            #portalSettingsPage .ps-section { flex: 1 1 420px; min-width: 320px; max-width: 560px;
                background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
            #portalSettingsPage .ps-actions { display: flex; gap: 8px; margin-top: 10px;
                justify-content: flex-end; align-items: center; flex-wrap: wrap; }
            #portalSettingsPage .ps-actions .ps-cancel { margin-left: 12px; }
            #portalSettingsPage .ps-current { display: flex; align-items: center; justify-content: space-between;
                gap: 12px; flex-wrap: wrap; border: 1px solid var(--border);
                border-radius: var(--radius); padding: 12px 14px; }
            #portalSettingsPage .ps-current .ps-state,
            #portalSettingsPage .ps-current .ps-actions { margin: 0; }
            #portalSettingsPage .ps-current strong { color: var(--text); font-weight: 700; }
            #portalSettingsPage .ps-msg { font-size: 12px; margin: 8px 0 0; min-height: 1em; }
            #portalSettingsPage .ps-msg--ok  { color: #16a34a; }
            #portalSettingsPage .ps-msg--err { color: #ef4444; }
            #portalSettingsPage .ps-warning-card {
                background: #FEF3C7; border: 1px solid #F59E0B; color: #92400E;
                border-radius: var(--radius); padding: 10px 12px; font-size: 13px; line-height: 1.4;
                margin-top: 12px;
            }
            #portalSettingsPage .ps-warning-card .ps-perm-list {
                margin: 6px 0; padding-left: 20px;
            }
            #portalSettingsPage .ps-warning-card .ps-perm-list code {
                font-size: 12px; background: rgba(0,0,0,0.06); padding: 1px 4px; border-radius: 4px;
            }
            #portalSettingsPage .ps-warning-card .ps-perm-details summary {
                cursor: pointer; font-weight: 600;
            }
            #portalSettingsPage .ps-warning-card .ps-perm-details .ps-perm-list {
                margin-top: 4px;
            }
            #portalSettingsPage .ps-warning-card .ps-stacked-item + .ps-stacked-item {
                margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(146,64,14,0.25);
            }
            #portalSettingsPage .ps-checking {
                display: none; align-items: center; gap: 6px; font-size: 12.5px; color: var(--sub);
            }
            #portalSettingsPage .ps-checking .ps-row-spinner {
                width: 13px; height: 13px; border: 2px solid var(--border); border-top-color: var(--sub);
                border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0;
            }
            #portalSettingsPage .ps-msg--wait { color: #4f8ef7; text-align: center; }
            #portalSettingsPage .ps-wait-spinner {
                width: 22px; height: 22px; margin: 0 auto 8px; border: 3px solid var(--border);
                border-top-color: #4f8ef7; border-radius: 50%; animation: spin 0.8s linear infinite;
            }
            #portalSettingsPage .ps-state { font-size: 12.5px; color: var(--sub); margin: 12px 0 0; }
            #portalSettingsPage .ps-cert { display: none; }
            #portalSettingsPage .ps-cert-line { font-size: 12.5px; color: var(--sub); margin: 10px 0 0; }
            #portalSettingsPage .ps-cert-pending,
            #portalSettingsPage .ps-cert-expiry,
            #portalSettingsPage #psCertManageRow,
            #portalSettingsPage #psDomainStep4 { display: none; }
            #portalSettingsPage .ps-cert-pending { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
            #portalSettingsPage .ps-cert-pending-line,
            #portalSettingsPage .ps-cert-pending-need { font-size: 13px; margin: 0 0 6px; }
            #portalSettingsPage .ps-cert-expiry-text { margin: 0; }
            #portalSettingsPage .ps-cert-azure,
            #psCertDialog .ps-cert-azure { text-decoration: none; display: inline-flex; align-items: center; }
            #psCertDialog { display: none; position: fixed; inset: 0; z-index: 500; background: rgba(24,28,50,0.45);
                align-items: center; justify-content: center; }
            #psCertDialog .ps-cert-panel { max-width: 600px; }
            #psCertDialog .ps-cert-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
                border-bottom: 1px solid var(--border); }
            #psCertDialog .ps-cert-chip { display: inline-block; margin-top: 6px; font-size: 11.5px; font-weight: 600;
                border-radius: 999px; padding: 2px 10px; border: 1px solid #F59E0B; color: #92400E; background: #FEF3C7; }
            #psCertDialog .ps-cert-chip--ok { border-color: #86EFAC; color: #166534; background: #DCFCE7; }
            #psCertDialog .ps-cert-chip--err { border-color: #FCA5A5; color: #991B1B; background: #FEE2E2; }
            #psCertDialog .ps-cert-close { padding: 4px 10px; }
            #psCertDialog .ps-cert-body { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 14px 20px 16px; }
            #psCertDialog .ps-cert-azure { align-self: flex-start; }
            #psCertDialog .ps-cert-details { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
                background: var(--bg); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; }
            #psCertDialog .ps-cert-details > div { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
            #psCertDialog .ps-cert-k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--sub); }
            #psCertDialog .ps-cert-intro { margin: 0; font-size: 13px; line-height: 1.55; color: #3d4459; }
            #psCertDialog .ps-cert-group { display: flex; flex-direction: column; gap: 4px; }
            #psCertDialog .ps-cert-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--sub); }
            #psCertDialog .ps-cert-path { font-size: 12.5px; line-height: 1.6; background: var(--bg); border: 1px solid var(--border);
                border-radius: var(--radius); padding: 8px 12px; overflow-wrap: anywhere; }
            #psCertDialog .ps-cert-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
            #psCertDialog .ps-cert-option { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font-size: 13px; }
            #psCertDialog .ps-cert-option p { margin: 0; }
            #psCertDialog .ps-cert-option-text { margin-top: 6px !important; font-size: 12px; line-height: 1.5; color: var(--sub); }
            #psCertDialog .ps-cert-rec { font-size: 11px; font-weight: 700; color: #166534; background: #DCFCE7; border-radius: 999px; padding: 2px 8px; }
            #psCertDialog .ps-warning-card { background: #FEF3C7; border: 1px solid #F59E0B; color: #92400E;
                border-radius: var(--radius); padding: 10px 12px; font-size: 12.5px; line-height: 1.45; }
            #psCertDialog .ps-cert-kv p { margin: 0 0 6px; }
            #psCertDialog .ps-cert-tree,
            #psCertDialog .ps-cert-tree ul { list-style: none; margin: 0; padding-left: 18px; }
            #psCertDialog .ps-cert-tree { padding-left: 4px; }
            #psCertDialog .ps-cert-tree ul li::before { content: "└ "; color: #B45309; }
            #psCertDialog .ps-cert-tree .ps-cert-k { color: #B45309; }
            #psCertDialog .ps-cert-tree b { overflow-wrap: anywhere; }
            #psCertDialog .ps-cert-req { margin: 0; font-size: 12px; color: var(--sub); }
            #psCertDialog .ps-msg { font-size: 12.5px; margin: 0; min-height: 0; }
            #psCertDialog .ps-msg--ok  { color: #16a34a; }
            #psCertDialog .ps-msg--warn { color: #B45309; }
            #psCertDialog .ps-msg--err { color: #ef4444; }
            #psCertDialog .ps-cert-footer { display: flex; justify-content: flex-end; align-items: center; gap: 8px;
                padding: 12px 18px 16px; border-top: 1px solid var(--border); }
            #psCertDialog .ps-cert-spinner { display: none; width: 14px; height: 14px; border: 2px solid var(--border);
                border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
            #portalSettingsPage .ps-dns { margin: 12px 0 0; border: 1px solid var(--border); border-radius: var(--radius);
                padding: 10px 12px; background: var(--bg, transparent); display: grid; gap: 6px; }
            #portalSettingsPage .ps-dns-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; }
            #portalSettingsPage .ps-dns-key { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--sub); }
            #portalSettingsPage .ps-dns-val { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
                word-break: break-all; color: var(--text); }
            #portalSettingsPage .ps-dns-copy { background: none; border: 1px solid var(--border); border-radius: 6px;
                padding: 2px 6px; cursor: pointer; color: var(--sub); line-height: 1; }
            #portalSettingsPage .ps-steps { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 6px;
                margin: 4px 0 0; list-style: none; padding: 0; }
            #portalSettingsPage .ps-steps li { display: contents; }
            #portalSettingsPage .ps-steps .ps-step-num { font-weight: 600; font-size: 12px; color: #4f8ef7; white-space: nowrap; }
            #portalSettingsPage .ps-steps .ps-step-text { font-size: 12px; color: var(--sub); }
            #portalSettingsPage .ps-domain-parts { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
                column-gap: 6px; align-items: end; margin: 12px 0 0; }
            #portalSettingsPage .ps-domain-part { display: grid; gap: 4px; min-width: 0; }
            #portalSettingsPage .ps-domain-part .form-input { width: 100%; box-sizing: border-box; }
            #portalSettingsPage .ps-domain-dot { font-weight: 700; color: var(--sub); padding-bottom: 9px; }
            #portalSettingsPage .ps-domain-preview { font-size: 12.5px; color: var(--sub); margin: 8px 0 0; word-break: break-all; }
            #portalSettingsPage .ps-domain-preview b { color: var(--text); }
            @media (max-width: 640px) {
                #portalSettingsPage { padding: 20px 16px; }
            }

.conflict-label { font-weight: 600; color: #181C32; }
.conflict-crumb { color: #7E8299; font-size: 11.5px; margin: 2px 0 6px; }
.conflict-label:has(.conflict-raw) { margin-bottom: 6px; }
.conflict-raw { font-family: monospace; }
.conflict-raw-note { font-weight: 400; color: #7E8299; }
.conflict-value-sub { color: #7E8299; font-size: 11px; font-family: monospace; margin-top: 2px; }
