@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@600&family=Space+Grotesk:wght@400;600&display=swap");

:root {
    --brain-ink: #1b0f10;
    --brain-muted: #6f4b4e;
    --brain-accent: #b3261e;
    --brain-accent-soft: #f2b8b5;
    --brain-card: #fff8f7;
    --brain-bg: #f7edea;
    --brain-shadow: 0 24px 80px rgba(27, 15, 16, 0.16);
    --console-bg: #f7f5f5;
    --console-card: #ffffff;
    --console-border: #e7e0df;
    --console-ink: #1b0f10;
    --console-muted: #6f4b4e;
    --console-accent: #b3261e;
    --console-pill: #f2b8b5;
}

body {
    font-family: "Oracle Sans", "OracleSans", "Oracle Sans Text", "Helvetica Neue", Arial, sans-serif;
    color: var(--brain-ink);
    background-color: #eee;
    background-image: none;
    overflow-x: hidden;
}

.top-banner {
    position: sticky;
    top: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 20px;
    background: #3f3f3f;
    color: #f3f3f3;
    width: auto;
    justify-content: center;
    box-sizing: border-box;
}

.banner-strip {
    height: 6px;
    width: 100%;
    background-image: url("images/strip.png");
    background-repeat: repeat-x;
    background-size: auto 100%;
    position: sticky;
    top: 56px;
    z-index: 1999;
    box-sizing: border-box;
}

.access-denied-screen {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.access-denied-card {
    max-width: 520px;
    width: 100%;
    padding: 28px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.access-denied-title {
    font-size: 22px;
    font-weight: 600;
    color: #2b2b2b;
    margin-bottom: 10px;
}

.access-denied-text {
    color: #5a5a5a;
    margin-bottom: 18px;
    line-height: 1.5;
}

.banner-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 22px;
    cursor: pointer;
}

.banner-icon-button:focus-visible {
    outline: 2px solid #f2b8b5;
    outline-offset: 2px;
}

.banner-icon {
    line-height: 1;
}

.banner-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.banner-brand-logo {
    height: 18px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.banner-brand-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.5);
}

.banner-brand-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.banner-spacer {
    flex: 1;
}

.banner-avatar {
    position: relative;
}

.avatar-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: #6f4b4e;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.login-page {
    min-height: 100vh;
    padding: 24px;
    background: var(--console-bg);
}

.login-card {
    width: min(520px, 100%);
    background: var(--brain-card);
    border-radius: 20px;
    box-shadow: var(--brain-shadow);
    border: 1px solid rgba(30, 27, 22, 0.08);
    margin: 48px auto;
}

.app-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: min(1280px, 100%);
    box-sizing: border-box;
    margin: 0 auto;
    padding: 24px;
}

.app-sidebar {
    background: var(--console-card);
    border: 1px solid var(--console-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: calc(100vh - 48px);
    position: sticky;
    top: 24px;
}

.sidebar-brand {
    font-weight: 600;
    color: var(--console-ink);
}

.sidebar-nav {
    width: 100%;
}

.sidebar-nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-ontology-toggle {
    border: 1px solid var(--console-border);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: left;
    background: #ffffff;
    color: var(--console-ink);
    font-size: 14px;
    cursor: pointer;
}

.sidebar-subnav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0 0 0 6px;
}

.sidebar-ontology-toggle {
    margin-top: 0;
}

.subnav-link {
    border: 1px solid var(--console-border);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: left;
    background: #ffffff;
    color: var(--console-ink);
    font-size: 13px;
    cursor: pointer;
}

.subnav-link.is-active {
    background: #e2e8f0;
    border-color: #cbd5f5;
    font-weight: 600;
}

.header-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    grid-column: 1 / -1;
}

.header-row-actions {
    display: flex;
    gap: 8px;
    align-items: end;
}

.header-add-btn,
.header-remove-btn {
    height: 40px;
    align-self: end;
}

oj-navigation-list.sidebar-nav::part(listview) {
    border: none;
    background: transparent;
}

oj-navigation-list.sidebar-nav::part(item) {
    border: 1px solid var(--console-border);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #ffffff;
    font-size: 14px;
}

oj-navigation-list.sidebar-nav::part(item-active) {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-user {
    font-size: 13px;
    color: var(--console-muted);
    text-align: center;
}

.app-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

.app-topbar {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-kicker {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--console-muted);
    font-weight: 600;
}

.topbar-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--console-ink);
}

.topbar-subtitle {
    font-size: 14px;
    color: var(--console-muted);
}

.topbar-status {
    margin-top: 6px;
    font-size: 13px;
    color: var(--console-ink);
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pill {
    background: var(--console-pill);
    border: 1px solid var(--console-border);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--console-ink);
}

.card {
    background: var(--console-card);
    border: 1px solid var(--console-border);
    border-radius: 16px;
    padding: 16px 18px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.app-main section.card + section.card {
    margin-top: 5px;
}

.users-page > section.card {
    margin-top: 5px;
}

.integrations-page > section.card {
    margin-top: 5px;
}

.home-page > section.card {
    margin-top: 5px;
    max-width: 100%;
}

.home-page {
    min-width: 0;
    max-width: 100%;
}

.users-table {
    width: 100%;
}

oj-table.users-table::part(table) {
    width: 100%;
}

oj-table,
oj-table::part(table),
oj-table::part(header-cell),
oj-table::part(column-header-cell),
oj-table::part(header-cell-text),
oj-table::part(column-header-cell-text),
oj-table::part(data-cell) {
    --oj-collection-header-font-size: 13px;
    font-size: 13px;
}

oj-table .oj-table-column-header-cell,
oj-table .oj-table-column-header,
oj-table .oj-table-column-header-text {
    font-size: 13px;
}

oj-table .oj-table-data-cell,
oj-table .oj-table-data-cell * {
    font-size: 13px;
}

.overview-table::part(table) {
    table-layout: fixed;
}

.overview-table::part(header-cell):nth-child(1),
.overview-table::part(data-cell):nth-child(1) {
    width: 36px;
}

.overview-table::part(header-cell):nth-child(2),
.overview-table::part(data-cell):nth-child(2) {
    width: 45%;
}

.overview-table::part(header-cell):nth-child(3),
.overview-table::part(data-cell):nth-child(3) {
    width: 25%;
    text-align: right;
}

.overview-table::part(header-cell):nth-child(4),
.overview-table::part(data-cell):nth-child(4) {
    width: 20%;
    text-align: right;
}

.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--console-border);
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
    color: var(--console-ink);
}

.users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.users-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.users-cards {
    display: none;
    margin-top: 12px;
    gap: 12px;
}

.users-card {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 8px;
}

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

.users-card-name {
    font-weight: 600;
    color: #2b2b2b;
}

.users-card-status {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0f3b1f;
    background: #c9f2d3;
    padding: 2px 8px;
    border-radius: 999px;
}

.users-card-status.is-active {
    color: #0f3b1f;
    background: #c9f2d3;
}

.users-card-status.is-inactive {
    color: #7a1f1f;
    background: #f4c7c7;
}

.users-card-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: #2b2b2b;
}

.users-card-label {
    font-weight: 600;
    color: #6f4b4e;
}

.users-card-actions {
    display: flex;
    justify-content: flex-end;
}

.access-permissions {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.access-permissions-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2b2b2b;
}

.access-permissions-empty {
    color: #666666;
    margin-bottom: 6px;
}

.access-permissions-list {
    margin: 0;
    padding-left: 18px;
    color: #444444;
}

.card-body {
    margin-top: 8px;
    font-size: 13px;
    color: var(--console-ink);
}

.success-text {
    color: #116a2d;
    font-weight: 600;
}

.error-text {
    color: #b42318;
    font-weight: 400;
    font-size: 13px;
}

.loading-text {
    margin-left: 8px;
    color: var(--console-muted);
    font-size: 13px;
}

.edit-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.edit-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.delete-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.delete-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.play-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    color: var(--console-ink);
}

.play-icon svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.catalog-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.catalog-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.add-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.add-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.view-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.view-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.muted-text {
    color: var(--console-muted);
    font-size: 12px;
}

.tabs-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tabs-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ontology-config-panels {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 12px;
}

.ontology-panel {
    padding: 14px 16px;
    border-radius: 12px;
    background: #ffffff;
}

.action-card {
    padding: 12px;
    border: 1px solid var(--console-border);
    border-radius: 12px;
    background: #f8fafc;
}

.entity-fields-list {
    margin-top: 0;
}

.entity-fields-list::part(listview) {
    padding: 0 !important;
}

.entity-fields-list::part(items) {
    margin-top: 0 !important;
    padding-top: 0 !important;
    display: block !important;
}

.entity-fields-list .oj-listview-card {
    width: 100% !important;
    margin-inline-end: 0 !important;
}

.entity-fields-list .oj-listview-card {
    margin-top: 0 !important;
    margin-inline-end: 5px !important;
}

.entity-fields-list::part(item) {
    padding: 0 !important;
    margin: 0 !important;
}



.entity-fields-list .action-card {
    margin: 0 0 5px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}


.field-badge-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
    align-self: flex-end;
}

.field-display-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--console-ink);
    margin-bottom: 4px;
}

.field-name {
    font-size: 12px;
    color: var(--console-muted);
}

.entity-field-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.entity-fields-list .entity-drop-target {
    outline: 2px dashed #94a3b8;
    outline-offset: 2px;
    border-radius: 12px;
    background: #f8fafc;
}

.entity-field-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    border: none;
    background: transparent;
    background-image: none;
    box-shadow: none;
    color: var(--console-muted);
    cursor: grab;
}

.entity-field-drag-handle::before,
.entity-field-drag-handle::after {
    content: none;
    display: none;
}

.entity-field-drag-handle:active {
    cursor: grabbing;
}

.entity-field-drag-handle .drag-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.entity-field-row .action-card {
    flex: 1 1 auto;
}

.entity-field-delete {
    align-self: flex-end;
    margin-bottom: 5px;
}

.field-readonly {
    border: 1px solid var(--console-border);
    border-radius: 10px;
    padding: 10px 12px;
    background: #ffffff;
}

.field-readonly-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--console-muted);
    margin-bottom: 6px;
}

.field-readonly-value {
    font-size: 13px;
    color: var(--console-ink);
    font-weight: 600;
}

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

.entity-select-wrap {
    display: flex;
    flex-direction: column;
}

.entity-edit-link-wrap {
    margin-top: 2px;
}

.entity-edit-link {
    color: #2b5fab;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.entity-actions {
    margin-top: 8px;
}

.entity-edit-link:hover {
    text-decoration: underline;
}

.entity-row .field-input {
    width: 100%;
}

.entity-actions {
    display: flex;
    gap: 8px;
}

.entity-field-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.entity-field-actions {
    grid-column: 2 / 3;
    display: flex;
    justify-content: flex-end;
}

.tab-pill {
    display: inline-flex;
    position: relative;
}

oj-button.tab-pill::part(button) {
    border: 1px solid var(--console-border);
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
}

oj-button.tab-pill.is-active::part(button) {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: inset 0 -2px 0 #9ca3af;
}

.integrations-tabs oj-button.tab-pill.is-active::part(button) {
    background: #e5e7eb;
    color: var(--console-ink);
    border-color: #d1d5db;
    box-shadow: inset 0 -2px 0 #9ca3af;
}

.integrations-tabs oj-button.tab-pill.is-active:hover::part(button),
.integrations-tabs oj-button.tab-pill.is-active:active::part(button),
.integrations-tabs oj-button.tab-pill.is-active:focus::part(button),
.integrations-tabs oj-button.tab-pill.is-active:focus-visible::part(button) {
    background: #e5e7eb;
    color: var(--console-ink);
    border-color: #d1d5db;
    box-shadow: inset 0 -2px 0 #9ca3af;
}

.integrations-tabs oj-button.tab-pill.is-active::part(button),
.integrations-tabs oj-button.tab-pill.is-active:hover::part(button),
.integrations-tabs oj-button.tab-pill.is-active:active::part(button),
.integrations-tabs oj-button.tab-pill.is-active:focus::part(button),
.integrations-tabs oj-button.tab-pill.is-active:focus-visible::part(button) {
    background: #e5e7eb !important;
    color: var(--console-ink) !important;
    border-color: #d1d5db !important;
    box-shadow: inset 0 -2px 0 #9ca3af !important;
}

.integrations-tabs oj-button.tab-pill.is-active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -6px;
    height: 2px;
    background: #9ca3af;
    border-radius: 999px;
}

.tabs-row oj-button.tab-pill.is-active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -6px;
    height: 2px;
    background: #9ca3af;
    border-radius: 999px;
}

.meta-row {
    color: var(--console-muted);
    font-size: 12px;
}

.card-kicker {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--console-muted);
    font-weight: 600;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--console-ink);
    margin-top: 4px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--console-muted);
    margin-top: 4px;
}

.info-box {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--console-border);
    background: #f8fafc;
}

.info-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-text {
    font-size: 13px;
    color: var(--console-muted);
}

.readiness-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.readiness-line {
    font-size: 13px;
    color: var(--console-ink);
}

.form-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

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

.form-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.one-col {
    grid-template-columns: minmax(0, 1fr);
}

.auth-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 12px;
    color: var(--console-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.field-input {
    width: 100%;
}

.grid-span-all {
    grid-column: 1 / -1;
}

.helper-link {
    display: inline-block;
    margin-top: 6px;
    margin-bottom: 6px;
}

oj-select-single.field-input::part(root) {
    border-radius: 10px;
    border: 1px solid var(--console-border);
    background: #ffffff;
}

.oj-text-field.oj-form-control-text-field {
    width: 100%;
}

.password-field {
    width: 100%;
    box-sizing: border-box;
    border: var(--oj-text-field-border-width, 1px) solid var(--oj-text-field-border-color);
    border-radius: var(--oj-text-field-border-radius, 10px);
    background-color: var(--oj-text-field-bg-color, #ffffff);
    height: var(--oj-text-field-height, 2.75rem);
    min-height: var(--oj-text-field-height, 2.75rem);
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none;
    background: transparent;
    padding: 0 var(--oj-text-field-text-to-edge-padding, 12px);
    color: var(--oj-text-field-text-color, var(--console-ink));
    font-size: var(--oj-text-field-font-size, 14px);
    font-weight: var(--oj-text-field-font-weight, 400);
    font-family: inherit;
    line-height: calc(var(--oj-text-field-height, 2.75rem) - 2px);
    outline: none;
}

.password-input::placeholder {
    color: var(--oj-text-field-placeholder-color, var(--console-muted));
    font-style: var(--oj-text-field-placeholder-font-style, normal);
    font-weight: var(--oj-text-field-font-weight, 400);
}

.password-field:focus-within {
    border-color: var(--oj-text-field-border-color-focus, var(--oj-text-field-border-color));
    box-shadow: var(--oj-text-field-box-shadow-focus, none);
}


.field-actions {
    display: flex;
    align-items: flex-end;
}

.form-actions {
    display: flex;
    margin-top: 12px;
    align-items: center;
}

.form-actions.align-right {
    justify-content: flex-end;
    gap: 12px;
}

.inline-error {
    color: #b42318;
    font-size: 12px;
    margin-right: auto;
}

.inline-success {
    color: #116a2d;
    font-size: 12px;
    margin-right: auto;
}

.form-section-title {
    font-size: 14px;
    font-weight: 600;
}

.form-section-subtitle {
    font-size: 13px;
    color: var(--console-muted);
}

.endpoint-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 40px repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
}

.endpoint-row-checkbox {
    justify-self: center;
}

.endpoint-rows {
    display: contents;
}

.endpoint-catalog-dialog {
    display: flex;
    flex-direction: column;
}

.endpoint-catalog-loading {
    position: absolute;
    top: 10px;
    right: 14px;
}

.endpoint-grid-scroll {
    max-height: 360px;
    overflow: auto;
    padding-right: 6px;
}

.endpoint-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--console-muted);
}

.card-actions {
    margin-top: 12px;
}

.snapshot-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-actions .field-input {
    min-width: 220px;
}

.snapshot-accordion {
    margin-top: 16px;
}

.snapshot-accordion oj-collapsible {
    border: 1px solid var(--console-border);
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 10px;
}

.snapshot-accordion oj-collapsible::part(header) {
    font-weight: 600;
    color: var(--console-ink);
    padding: 8px 10px;
}

.snapshot-accordion oj-collapsible::part(content) {
    padding: 5px;
}
.snapshot-accordion-row {
    display: block;
}

.snapshot-refresh-btn {
    align-self: start;
    margin-top: 0;
}

.relationships-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.link-key-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.link-key-help-link {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    font-size: 12px;
}

.match-type-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.match-type-help-link {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    font-size: 12px;
}

.match-type-help-link a {
    color: #2563eb;
    text-decoration: none;
}

.match-type-help-link a:hover {
    text-decoration: underline;
}

.link-key-help-link a {
    color: #2563eb;
    text-decoration: none;
}

.link-key-help-link a:hover {
    text-decoration: underline;
}

.snapshot-accordion-row h6 {
    margin: 0;
    font-size: 13px;
}

.snapshot-accordion-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
}

.snapshot-accordion-spinner {
    margin-left: auto;
}

.snapshot-accordion-error {
    margin-left: 10px;
    color: #b42318;
    font-size: 11px;
}

.snapshot-collapsible-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 10px;
}

.snapshot-collapsible-row oj-collapsible {
    margin-bottom: 0;
}

.snapshot-refresh-btn {
    align-self: start;
    margin-top: 0;
}

.snapshot-collapsible-row oj-collapsible::part(header) {
    padding-top: 0;
}

.accordion-meta {
    display: grid;
    gap: 4px;
}

.snapshot-stop-condition {
    margin-top: 8px;
}

.snapshot-meta-spacer {
    height: 10px;
    grid-column: 1 / -1;
}

.snapshot-response {
    margin-top: 8px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    white-space: pre-wrap;
    max-width: 100%;
    overflow: auto;
    word-break: break-word;
}

.snapshot-patch-payload {
    margin-top: 12px;
}

.snapshot-patch-grid {
    row-gap: 12px;
}

.snapshot-patch-spacing {
    margin-top: 12px;
}

.snapshot-primarykey-row {
    margin-top: 12px;
}

.snapshot-patch-fields {
    margin-top: 10px;
}

.snapshot-metadata-row {
    margin-top: 10px;
    margin-bottom: 10px;
}

.snapshot-patch-fields-label {
    font-size: 12px;
    color: var(--console-muted);
    margin-bottom: 6px;
}

.snapshot-patch-belt {
    width: 100%;
}

.snapshot-field-chip {
    margin: 4px;
    white-space: nowrap;
}

.snapshot-patch-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 10px;
}

.snapshot-patch-status {
    font-size: 12px;
}

.snapshot-profile-preview {
    max-width: 100%;
    overflow: hidden;
}

.snapshot-stop-input {
    margin-top: 10px;
}

.snapshot-pagination-field {
    margin-top: 8px;
}

.snapshot-pagination-group {
    margin-top: 8px;
}

.detail-template-help {
    margin-top: 8px;
}

.form-grid.three-col {
    margin-top: 8px;
}

.identity-run-output {
    margin-top: 8px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    white-space: pre-wrap;
}

.mapping-metrics {
    margin-top: 16px;
}

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

.metrics-card {
    padding: 12px 14px;
}

.metrics-card h6 {
    margin: 0 0 10px;
    font-size: 13px;
}

.entity-tester-fields-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.entity-tester-fields-loading {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 11px;
    color: var(--console-muted);
}

.entity-tester-fields-loading .loading-text {
    font-size: 11px;
}

.entity-tester-fields-loading oj-progress-circle {
    --oj-progress-circle-size: 14px;
}

.metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    padding: 4px 0;
    color: var(--console-ink);
}

.metric-row.metric-row-left {
    justify-content: flex-start;
    gap: 6px;
}

.metric-section {
    margin-top: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #52606d;
}

.metric-list {
    margin-top: 4px;
}

.entity-related-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
    padding-left: 10px;
}

.entity-related-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.entity-related-view {
    align-self: center;
    padding: 0;
}


.entity-related-row:last-child {
    border-bottom: none;
}

.metric-subheading {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.entity-tester-search {
    display: flex;
    justify-content: flex-end;
}

.entity-tester-search .field-input {
    width: 100%;
    margin-left: auto;
}

.entity-tester-search oj-input-search::part(text-input) {
    height: 56px;
}

.entity-tester-search oj-input-search::part(root) {
    height: 56px;
    min-height: 56px;
    align-items: center;
}

.entity-tester-search oj-input-search::part(container) {
    height: 56px;
    min-height: 56px;
    align-items: center;
}

.entity-tester-search oj-input-search::part(input) {
    height: 56px;
    line-height: 56px;
}

.entity-tester-search oj-input-search::part(start) {
    align-self: center;
}

.entity-tester-search .oj-text-field,
.entity-tester-search .oj-inputsearch,
.entity-tester-search .oj-form-control-text-field {
    height: 56px;
}

.entity-tester-table {
    margin-top: 12px;
    width: 100%;
    background: #ffffff;
}

.entity-tester-value {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
}

.entity-tester-master-value {
    background: #d8f5d0;
}

.entity-tester-master-row {
    background: #d8f5d0;
    border-radius: 4px;
    padding: 2px 4px;
}

.entity-tester-table-wrap {
    max-height: 300px;
    overflow: auto;
}

.entity-jobs-table-wrap {
    margin-top: 8px;
    max-height: 260px;
    overflow: auto;
    background: #ffffff;
    width: 100%;
}

.entity-jobs-table-wrap oj-table {
    background: #ffffff;
    font-size: 13px;
    width: 100%;
}

.identity-job-detail {
    padding: 8px 6px;
    display: grid;
    gap: 6px;
}

.job-error-link {
    color: #b23b3b;
    text-decoration: underline;
    cursor: pointer;
}

.job-restart-link {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}


.entity-jobs-table-wrap .refresh-icon-slot {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


.entity-tester-results {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.35fr);
    grid-template-rows: auto auto;
    gap: 16px;
}

.entity-tester-left,
.entity-tester-right {
    display: contents;
}

.entity-tester-panel {
    margin-top: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    box-shadow: none;
    background: #ffffff;
    padding: 16px;
}

.entity-tester-resolved {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 160px;
    overflow: hidden;
    padding: 16px;
    position: relative;
}

.entity-tester-fields {
    grid-column: 1;
    grid-row: 2;
}

.entity-tester-related {
    grid-column: 2;
    grid-row: 2;
}

.entity-tester-sources {
    display: none;
}

#entityTesterDialog {
    width: min(1100px, 95vw);
    max-height: 90vh;
}

.entity-tester-dialog-body {
    margin-top: 12px;
}

.entity-resolved-header {
    position: relative;
    z-index: 2;
}

.entity-resolved-header h6,
.entity-tester-fields-header h6,
.entity-tester-related h6,
.entity-resolved-sources-inline h6 {
    margin: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.entity-resolved-hero {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.35fr) minmax(260px, 0.55fr);
    align-items: center;
    gap: 24px;
    min-height: 96px;
    margin-top: 0;
    position: static;
}

.entity-resolved-summary {
    position: relative;
    z-index: 2;
}

.entity-resolved-name {
    margin: 0 0 8px;
    color: #111827;
    font-size: 24px;
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.entity-resolved-meta,
.entity-resolved-blank {
    color: #111827;
    font-size: 13px;
    line-height: 1.7;
}

.entity-resolved-sources-inline {
    align-self: center;
    position: relative;
    z-index: 2;
}


.entity-resolved-source-list {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: #111827;
    font-size: 13px;
    line-height: 1.25;
}

.entity-resolved-art {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(34%, 380px);
    height: 100%;
    overflow: hidden;
    border-radius: 0 6px 6px 0;
    background: #f6f4ee;
    z-index: 1;
}

.entity-resolved-art-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.entity-tester-fields .metric-list {
    margin-top: 16px;
}

.entity-field-metric-row {
    grid-template-columns: minmax(120px, 0.75fr) minmax(180px, 1fr);
    align-items: start;
    column-gap: 18px;
    row-gap: 0;
}

.entity-field-label {
    color: #111827;
}

.entity-field-value {
    text-align: right;
}

.entity-tester-related .metric-subheading {
    margin: 14px 0 10px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.entity-tester-related oj-collapsible {
    display: block;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #f8fbfb;
    overflow: hidden;
}

.entity-tester-related .snapshot-accordion {
    display: grid;
    gap: 8px;
}

@media (max-width: 840px) {
    .entity-tester-results {
        grid-template-columns: minmax(0, 1fr);
    }

    .entity-tester-resolved,
    .entity-tester-fields,
    .entity-tester-related {
        grid-column: 1;
        grid-row: auto;
    }

    .entity-resolved-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .entity-resolved-art {
        position: relative;
        width: 100%;
        min-height: 92px;
    }
}

.identity-resolution-card h5 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--console-ink);
}

.identity-resolution-header {
    padding: 12px 14px 0;
}

.identity-resolution-list {
    margin-top: 8px;
}

.identity-resolution-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.identity-resolution-row .field-input {
    flex: 1;
}

.identity-resolution-row .entity-actions {
    justify-content: flex-end;
}

.identity-resolution-row .entity-actions {
    align-self: flex-start;
}

.identity-resolution-drag-handle {
    display: flex;
    align-items: center;
    padding: 0 6px;
    cursor: grab;
}

.identity-resolution-rule {
    flex: 1;
    min-width: 0;
}

.identity-resolution-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--console-ink);
}

.identity-resolution-meta {
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: var(--console-muted);
    margin-top: 2px;
}

.identity-resolution-preview {
    margin-top: 12px;
}

.identity-resolution-preview-list {
    margin-top: 5px;
}

.identity-resolution-preview-empty {
    margin-top: 12px;
    color: var(--oj-text-color-secondary);
    font-style: italic;
}

.identity-resolution-preview-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.identity-resolution-preview-commit-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.identity-resolution-preview-counts {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--console-muted);
}

.identity-resolution-preview-count {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--console-ink);
    font-weight: 600;
}

.identity-resolution-preview-count-label {
    font-weight: 500;
    color: var(--console-muted);
}

.identity-resolution-preview-count-excluded {
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b91c1c;
}

.identity-resolution-preview-actions-bar .form-actions {
    margin-left: auto;
}

.identity-resolution-preview-collapsible {
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.identity-resolution-preview-collapsible[data-excluded="true"] {
    border: 1px solid #fecaca;
    background: #fff5f5;
}

.identity-resolution-preview-collapsible[data-has-excluded="true"][data-excluded="false"] {
    border: 1px solid #fecaca;
}

.undo-icon svg {
    width: 18px;
    height: 18px;
}

.identity-resolution-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px 6px;
}

.identity-resolution-preview-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.identity-resolution-preview-body {
    padding: 0 10px 8px;
}

.identity-resolution-preview-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--console-ink);
}

.identity-resolution-preview-rule {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--console-muted);
    margin-bottom: 6px;
}

.identity-resolution-preview-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.identity-resolution-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--console-ink);
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}

.identity-resolution-preview-radio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    margin-right: 6px;
}

.identity-resolution-preview-item > .identity-resolution-preview-text {
    flex: 1;
}

.identity-resolution-preview-option .identity-resolution-preview-item {
    width: 100%;
}

.identity-resolution-preview-item > .identity-resolution-preview-text {
    flex: 1;
}

.identity-resolution-preview-item[data-excluded="true"],
.identity-resolution-preview-item[data-cluster-excluded="true"] {
    background: #fff5f5;
    border-radius: 6px;
    padding: 4px 6px;
}

.identity-resolution-preview-item:last-child {
    border-bottom: none;
}

.identity-resolution-preview-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.identity-resolution-field-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr)) minmax(140px, 0.7fr) auto;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
    border-left: 1px solid #e2e8f0;
    padding-left: 12px;
}

.identity-resolution-field-row .oj-button {
    align-self: center;
    justify-self: start;
}

.identity-resolution-fields-grid {
    min-width: 760px;
    align-items: start;
    align-content: start;
}

.identity-resolution-dialog-hint {
    margin-top: 0;
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .identity-resolution-field-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .identity-resolution-fields-grid {
        min-width: 0;
    }
}

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

.dialog-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dialog-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dialog-error {
    color: #b91c1c;
    font-size: 12px;
    margin-right: 6px;
}

.dialog-body .field-input + .field-input {
    margin-top: 12px;
}

.dialog-body .widget-section {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-section + .help-section {
    margin-top: 16px;
}

.help-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.help-text {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.45;
}

#overviewWidgetDialog .dialog-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

#overviewWidgetDialog .overview-preview {
    overflow-x: hidden;
}

#overviewWidgetDialog .overview-chart {
    width: 100%;
}

#overviewWidgetDialog::part(content) {
    display: flex;
    flex-direction: column;
    height: min(80vh, 720px);
    max-height: 80vh;
    max-width: 100%;
    overflow: hidden;
}

#overviewWidgetDialog::part(body) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 100%;
}

#overviewWidgetDialog::part(container) {
    overflow: hidden;
}

#overviewWidgetDialog::part(footer) {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    background: #fff;
}

#overviewWidgetDialog .field-input,
#overviewWidgetDialog oj-input-text,
#overviewWidgetDialog oj-select-single,
#overviewWidgetDialog oj-switch,
#overviewWidgetDialog oj-table {
    width: 100%;
    max-width: 100%;
}

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

.overview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 4px;
}

.overview-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--console-ink);
}

.overview-subtitle {
    font-size: 13px;
    color: var(--console-muted);
    margin-top: 4px;
}

.overview-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-toolbar-left {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
}

.overview-toolbar-left .field-input {
    min-width: 240px;
}

.overview-toolbar-left .field-input {
    flex: 1 1 auto;
}

.overview-card {
    min-height: 220px;
}

.ai-explanation-widget {
    min-height: 180px;
}

.ai-explanation-kicker {
    margin-bottom: 8px;
    color: var(--console-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-explanation-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ai-explanation-summary {
    color: var(--console-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.ai-explanation-section {
    margin-top: 14px;
}

.ai-explanation-section-title {
    color: var(--console-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ai-explanation-text,
.ai-explanation-list {
    color: var(--console-text);
    font-size: 13px;
    line-height: 1.45;
}

.ai-explanation-list {
    margin: 0;
    padding-left: 18px;
}

.ai-explanation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--console-muted);
    font-size: 11px;
}

.ai-explanation-refresh {
    border: 0;
    background: transparent;
    color: #2f6f70;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.ai-explanation-refresh:hover {
    text-decoration: underline;
}

.overview-card.overview-dragging {
    opacity: 0.6;
}

.overview-card.overview-drag-over {
    outline: 2px dashed rgba(140, 60, 45, 0.5);
    outline-offset: 2px;
}

.overview-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

.overview-filter-header {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.overview-filter-title {
    font-size: 12px;
    color: var(--console-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.overview-filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.overview-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
    gap: 8px;
    align-items: end;
}

.overview-filter-remove {
    margin-top: 16px;
}

.overview-widget-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.overview-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.overview-time-window {
    min-width: 200px;
}

.kpi-scroll-section {
    margin-top: 2px;
    margin-bottom: 6px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    min-width: 0;
}

.kpi-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.kpi-track {
    display: inline-block;
    white-space: nowrap;
    padding-bottom: 2px;
}

.kpi-card {
    min-width: 220px;
    display: inline-flex;
    padding: 14px 16px;
    flex-direction: column;
    gap: 8px;
    margin-right: 10px;
    vertical-align: top;
    white-space: normal;
    position: relative;
}

.kpi-card-menu {
    position: absolute;
    top: 6px;
    right: 6px;
}

.kpi-card-menu-btn {
    padding: 0;
}

.menu-ellipsis {
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--console-muted);
}

.kpi-card-title {
    padding-right: 24px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--console-muted);
}

.kpi-card-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--console-ink);
}

.kpi-card-delta {
    font-size: 12px;
    color: var(--console-text);
}

.kpi-card-delta.up {
    color: #16a34a;
}

.kpi-card-delta.down {
    color: #dc2626;
}

.kpi-card-snapshot-section {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.kpi-card-snapshot-heading {
    margin-bottom: 4px;
    color: var(--console-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kpi-card-snapshot {
    font-size: 12px;
    color: var(--console-muted);
}

.kpi-card-snapshot-value {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--console-text);
}

.overview-table-pager {
    margin: 8px auto 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--console-muted);
    padding: 4px 6px;
    border: none;
    border-radius: 0;
    background: transparent;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.overview-table-pager .pager-label {
    min-width: 88px;
    text-align: center;
    color: var(--console-muted);
    font-size: 12px;
}

.overview-table-pager oj-button {
    --oj-button-borderless-chrome-text-color: var(--console-muted);
    --oj-button-borderless-chrome-text-color-hover: var(--console-ink);
    --oj-button-borderless-chrome-text-color-active: var(--console-ink);
    --oj-button-borderless-chrome-text-color-disabled: #cbd5e1;
    padding: 0;
    min-width: 24px;
}
.kpi-card-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    width: fit-content;
}

.kpi-status-running {
    background: #fef3c7;
    color: #92400e;
}

.kpi-status-current {
    background: #dcfce7;
    color: #166534;
}

.kpi-status-none {
    background: #e5e7eb;
    color: #374151;
}

.kpi-status-error {
    background: #fee2e2;
    color: #991b1b;
}


.command-center-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -8px;
    font-size: 12px;
    color: var(--console-muted);
}

.command-center-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.command-center-breadcrumb a:hover {
    text-decoration: underline;
}

.command-center-breadcrumb-sep {
    color: var(--console-muted);
}

.command-center2-list-view {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-center2-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.command-center2-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    flex: 1;
}

.command-center2-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.command-center2-list-view .oj-listview-card {
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
}

.command-center2-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--console-text);
}

.command-center2-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--console-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}


.overview-widget-menu-btn {
    margin-left: auto;
}

.overview-widget-menu-btn::part(end) {
    display: none;
}

.overview-widget-menu-btn::part(endIcon) {
    display: none;
}

.overview-widget-menu-btn::part(dropdown) {
    display: none;
}

.overview-widget-menu-end {
    display: none;
}

.overview-refresh-link,
.overview-remove-link {
    color: var(--console-muted);
    font-size: 12px;
    text-decoration: none;
}

.overview-refresh-link:hover,
.overview-remove-link:hover {
    color: var(--console-ink);
}

.overview-widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-drag-handle {
    cursor: grab;
    font-size: 16px;
    line-height: 1;
    color: var(--console-muted);
}

.overview-drag-handle:active {
    cursor: grabbing;
}

.overview-remove-link {
    font-size: 12px;
    color: var(--console-muted);
    text-decoration: none;
}

.overview-remove-link:hover {
    color: var(--console-ink);
}

.overview-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 8px;
}

.overview-stat-value {
    font-size: 30px;
    font-weight: 600;
    color: var(--console-ink);
}

.overview-stat-label {
    font-size: 12px;
    color: var(--console-muted);
}

.overview-wide {
    grid-column: 1 / -1;
    min-height: 360px;
}

.overview-chart {
    height: 220px;
    width: 100%;
}

.overview-blank-link {
    padding: 0;
    min-height: auto;
    color: var(--console-accent);
    font-weight: 500;
}

.overview-blank-link::part(button) {
    padding: 0;
}

.overview-blank-link::part(label) {
    text-decoration: underline;
}

.overview-diagram {
    height: 340px;
    width: 100%;
}

.overview-empty {
    border: 1px dashed rgba(120, 120, 120, 0.25);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 12px;
}

.overview-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--console-ink);
}

.overview-empty-subtitle {
    font-size: 13px;
    color: var(--console-muted);
    margin: 6px 0 12px;
}

.schedule-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--console-border);
}

.schedule-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.schedule-row {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr 0.8fr 0.8fr 1fr 0.8fr 1.4fr;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fffdfc;
    border: 1px solid rgba(30, 27, 22, 0.08);
}

.schedule-header {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--console-muted);
    background: transparent;
    border: none;
    padding: 0 0 6px;
}

.schedule-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.schedule-link {
    font-size: 12px;
    color: var(--console-accent);
    text-decoration: none;
}

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

.schedule-link.danger {
    color: #b91c1c;
}

.schedule-empty {
    font-size: 13px;
    color: var(--console-muted);
    margin-top: 10px;
}


.entity-resolved-name {
    margin: 6px 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--console-ink);
}
.entity-resolved-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.entity-resolved-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.entity-break-message,
.entity-break-error {
    margin-left: 0;
    margin-right: auto;
}
.entity-resolved-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.entity-tester-resolved .entity-resolved-header {
    padding-right: calc(min(34%, 380px) + 12px);
}

@media (max-width: 840px) {
    .entity-tester-resolved .entity-resolved-header {
        padding-right: 0;
    }
}
.entity-resolved-menu .oj-button-button {
    padding: 0;
}
.entity-resolved-menu .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--console-ink);
}
.entity-resolved-menu .menu-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}
.entity-break-message {
    font-size: 12px;
    color: #2e7d32;
}
.entity-break-error {
    font-size: 12px;
    color: #c62828;
}

.entity-field-value {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.entity-field-metric-row {
    align-items: flex-start;
    flex-wrap: wrap;
}

.entity-field-label {
    flex: 1 1 45%;
}

.entity-field-metric-row .entity-field-value {
    flex: 0 1 50%;
}

.entity-field-value-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.entity-field-lineage {
    flex: 1 0 100%;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.entity-field-edit-btn {
    padding: 0;
    min-width: 20px;
    height: 20px;
}

.entity-field-edit-btn .edit-icon svg {
    width: 14px;
    height: 14px;
}

.relationships-run-output {
    margin-top: 8px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    white-space: pre-wrap;
}


.accordion-body {
    margin-top: 8px;
    font-size: 12px;
    color: var(--console-muted);
    display: grid;
    gap: 4px;
}

.endpoint-catalog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.endpoint-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.login-pill {
    font-family: "Fraunces", Georgia, serif;
    font-size: 18px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--brain-accent-soft);
    color: var(--brain-ink);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-meta {
    color: var(--brain-muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-title {
    margin: 0 0 8px 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 34px;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .app-sidebar {
        position: static;
        height: auto;
    }

    .form-grid,
    .form-grid.two-col {
        grid-template-columns: 1fr;
    }

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

    .endpoint-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .top-banner {
        height: auto;
        padding: 10px 12px;
        flex-wrap: wrap;
        row-gap: 8px;
        width: 100%;
        margin-left: 0;
    }

    .app-shell {
        padding: 12px;
    }

    .app-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .overview-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .overview-toolbar-left {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .overview-toolbar-left .field-input {
        min-width: 0;
        width: 100%;
    }

    .overview-toolbar-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
    }

    .overview-toolbar-actions oj-button,
    .overview-toolbar-left oj-button {
        width: 100%;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-filter-row {
        grid-template-columns: 1fr;
    }

    .users-page .users-table {
        display: none;
    }

    .users-cards {
        display: grid;
    }

    .entity-tester-results {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .entity-tester-related,
    .entity-tester-resolved,
    .entity-tester-fields,
    .entity-tester-sources {
        grid-column: 1;
        grid-row: auto;
    }

    .entity-tester-table-wrap,
    .entity-jobs-table-wrap {
        max-height: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.login-subtitle {
    margin: 0 0 20px 0;
    color: var(--brain-muted);
}

.login-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-start;
    gap: 12px;
}

.login-status {
    margin-top: 16px;
    font-size: 13px;
    color: var(--brain-muted);
}

.login-error {
    margin-top: 10px;
    color: #b43b1f;
    font-size: 13px;
}

.login-token {
    margin-top: 16px;
    padding: 12px;
    background: rgba(30, 27, 22, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(30, 27, 22, 0.1);
}

.login-token-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brain-muted);
    margin-bottom: 6px;
}

.login-token-pre {
    margin: 0;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
}

.widget-explain-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    background: #fffdfc;
}

.widget-explain-severity {
    width: fit-content;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: #e5e7eb;
    color: #374151;
}

.widget-explain-severity-healthy {
    background: #dcfce7;
    color: #166534;
}

.widget-explain-severity-warning {
    background: #fef3c7;
    color: #92400e;
}

.widget-explain-severity-critical,
.widget-explain-severity-unhealthy {
    background: #fee2e2;
    color: #991b1b;
}

.widget-explain-severity-informational {
    background: #e0f2fe;
    color: #075985;
}

.widget-explain-actions ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--console-text);
    font-size: 13px;
    line-height: 1.4;
}

.widget-explain-meta {
    color: var(--console-muted);
    font-size: 11px;
    line-height: 1.4;
}

.login-screen {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background:
    radial-gradient(circle at 18% 20%, rgba(54, 101, 107, 0.16), transparent 28%),
    linear-gradient(135deg, #f7faf7 0%, #eef4f2 48%, #f8f5ec 100%);
}

.login-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid rgba(37, 74, 78, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(19, 45, 47, 0.14);
  backdrop-filter: blur(14px);
}

.login-eyebrow {
  margin-bottom: 10px;
  color: #32656b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-title {
  color: #172f32;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-subtitle {
  margin: 8px 0 24px;
  color: #66777a;
  font-size: 0.94rem;
}

.login-field-label {
  display: block;
  margin: 16px 0 7px;
  color: #24474b;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(50, 101, 107, 0.22);
  border-radius: 14px;
  padding: 13px 14px;
  color: #172f32;
  background: #ffffff;
  font-size: 0.95rem;
  outline: none;
}

.login-input:focus {
  border-color: #32656b;
  box-shadow: 0 0 0 3px rgba(50, 101, 107, 0.14);
}

.login-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff0ee;
  color: #a13b2b;
  font-size: 0.86rem;
}

.login-button {
  width: 100%;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  color: #ffffff;
  background: #244f55;
  font-weight: 800;
  cursor: pointer;
}

.login-button:disabled {
  opacity: 0.58;
  cursor: wait;
}
