/* ekSIM enterprise console. Bootstrap supplies behaviour; these components own presentation. */
/* Base and typography */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ek-bg); color: var(--ek-ink); font: 400 16px/1.5 var(--ek-font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { color: var(--ek-ink); font-weight: 600; letter-spacing: -.025em; }
h1 { font-size: 32px; } h2 { font-size: 24px; } h3 { font-size: 20px; } h4, h5 { font-size: 16px; } h6 { font-size: 14px; }
a { color: var(--ek-link); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: 12px; }
.text-muted, .text-secondary, .helper-text { color: var(--ek-muted) !important; }
.text-danger { color: var(--ek-danger) !important; }
.text-success { color: var(--ek-success) !important; }
.text-primary { color: var(--ek-link) !important; }
:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 3px; }
.icon { width: 18px; height: 18px; display: inline-block; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; flex: 0 0 auto; }
.technical-reference, code, pre { font-family: var(--ek-mono); font-size: 12px; overflow-wrap: anywhere; }
pre { padding: 16px; background: var(--ek-surface-subtle); border: 1px solid var(--ek-line); border-radius: var(--ek-radius); color: var(--ek-ink); white-space: pre-wrap; max-height: 480px; overflow: auto; }
.money, .metric-value, strong { font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 1200; background: var(--ek-surface); padding: 12px; }
.skip-link:focus { top: 8px; }
.brand-panel { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 8px; padding: 8px; }
.brand-logo { display: block; width: 140px; height: auto; object-fit: contain; }
.brand-icon { display: block; width: 48px; height: auto; object-fit: contain; }
/* Application shell */
.console-shell { padding-left: var(--ek-sidebar); padding-top: var(--ek-header); }
.console-main { padding: 28px 32px 48px; max-width: 1760px; margin: auto; min-width: 0; }
.console-topbar { position: fixed; inset: 0 0 auto var(--ek-sidebar); height: var(--ek-header); background: var(--ek-surface); border-bottom: 1px solid var(--ek-line); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; z-index: 1030; }
.topbar-context, .topbar-actions, .toolbar, .toolbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar-title { margin: 0; line-height: 1.35; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }
.topbar-context .context-label { color: var(--ek-muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--ek-line); border-radius: 6px; background: var(--ek-surface); color: var(--ek-ink); cursor: pointer; }
.icon-button:hover { background: var(--ek-surface-hover); }
.navigation-button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--ek-line); background: var(--ek-surface-subtle); color: var(--ek-muted); border-radius: 6px; padding: 7px 10px; font-size: 13px; }
kbd { font: 11px var(--ek-font); background: var(--ek-surface); color: var(--ek-muted); border: 1px solid var(--ek-line); border-radius: 4px; padding: 2px 4px; }
.console-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--ek-sidebar); z-index: 1040; border-right: 1px solid var(--ek-line); background: var(--ek-surface); display: flex; flex-direction: column; }
.sidebar-brand { min-height: 104px; padding: 12px 16px 8px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-brand a:hover { text-decoration: none; }
.sidebar-brand .brand-icon { display: none; }
.sidebar-close { display: none; }
.sidebar-scroll { padding: 8px 12px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.console-menu, .nav-submenu { list-style: none; margin: 0; padding: 0; }
.menu-section-label { color: var(--ek-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin: 24px 12px 8px; }
.console-menu > li > a, .nav-group-toggle { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 2px 0; border: 0; border-radius: 6px; color: var(--ek-muted); background: transparent; text-align: left; font-size: 13px; font-weight: 500; }
.console-menu a:hover, .nav-group-toggle:hover { background: var(--ek-surface-hover); color: var(--ek-ink); text-decoration: none; }
.console-menu > li.active > a, .console-menu > li.active > .nav-group-toggle { color: var(--ek-link); background: var(--ek-primary-soft); }
.nav-group-toggle .menu-chevron { margin-left: auto; width: 14px; transition: transform var(--ek-motion); }
.nav-group-toggle[aria-expanded='true'] .menu-chevron { transform: rotate(90deg); }
.nav-submenu { margin: 4px 0 8px 20px; border-left: 1px solid var(--ek-line); }
.nav-submenu li a { display: block; color: var(--ek-muted); font-size: 12px; padding: 8px 12px; margin: 0 0 0 8px; border-radius: 4px; }
.nav-submenu li.active a { color: var(--ek-link); font-weight: 600; background: var(--ek-primary-soft); }
.sidebar-account { border-top: 1px solid var(--ek-line); padding: 16px; display: flex; gap: 10px; align-items: center; font-size: 12px; }
.sidebar-account .account-meta { min-width: 0; }
.sidebar-account strong { display: block; white-space: normal; overflow-wrap: anywhere; }
.account-avatar { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--ek-line); border-radius: 6px; background: var(--ek-surface-subtle); }
.sidebar-backdrop { display: none; }
.console-shell.is-collapsed { --ek-sidebar: 80px; }
.is-collapsed .sidebar-brand { padding: 16px 8px; justify-content: center; }
.is-collapsed .sidebar-brand .brand-logo { display: none; }
.is-collapsed .sidebar-brand .brand-icon { display: block; }
.is-collapsed .console-menu > li > a, .is-collapsed .nav-group-toggle { justify-content: center; padding: 12px; }
.is-collapsed .menu-label, .is-collapsed .menu-chevron, .is-collapsed .menu-section-label, .is-collapsed .nav-submenu, .is-collapsed .sidebar-account .account-meta { display: none; }
.is-collapsed .sidebar-account { justify-content: center; }
/* Page hierarchy and shared components */
.page-toolbar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 16px; min-width: 0; }
.page-toolbar--actions { justify-content: flex-end; }
.page-toolbar > nav { flex: 1 1 240px; min-width: 0; }
.page-toolbar .breadcrumb { flex-wrap: wrap; overflow-wrap: anywhere; }
.breadcrumb { margin: 0; font-size: 12px; color: var(--ek-muted); --bs-breadcrumb-divider-color: var(--ek-muted); }
.breadcrumb a { color: var(--ek-muted); }
.breadcrumb-item.active { color: var(--ek-muted); }
.card { background: var(--ek-surface); border: 1px solid var(--ek-line); border-radius: var(--ek-radius); box-shadow: var(--ek-shadow); color: var(--ek-ink); margin-bottom: 24px; overflow: visible; }
.card-header { background: transparent; border-bottom: 1px solid var(--ek-line); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.card-header h2 { font-size: 14px; letter-spacing: -.01em; margin: 0; }
.card-header h2 small { margin-left: 8px; color: var(--ek-muted); font-weight: 400; }
.card-body { padding: 20px; min-width: 0; }
.card-body > :last-child { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.detail-label, .eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ek-muted); }
.field { margin-bottom: 20px; }
label { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.form-control, .form-select { font-size: 14px; min-height: 38px; color: var(--ek-ink); background-color: var(--ek-surface); border: 1px solid var(--ek-control-line); border-radius: 6px; }
.form-control::placeholder { color: var(--ek-muted); opacity: .8; }
.form-control:focus, .form-select:focus { border-color: var(--ek-focus); box-shadow: 0 0 0 2px var(--ek-primary-soft); background-color: var(--ek-surface); color: var(--ek-ink); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: var(--ek-surface-subtle); color: var(--ek-muted); }
.form-control-sm, .form-select-sm { font-size: 13px; min-height: 32px; }
.form-check-input:checked { background-color: var(--ek-blue); border-color: var(--ek-blue); }
.btn { font-size: 13px; font-weight: 500; border-radius: 6px; padding: 8px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none !important; transition: background-color var(--ek-motion), border-color var(--ek-motion); }
.btn-sm { padding: 5px 9px; min-height: 30px; font-size: 12px; }
.btn-lg { padding: 12px 18px; font-size: 14px; }
.btn-primary { --bs-btn-bg: var(--ek-blue); --bs-btn-border-color: var(--ek-blue); --bs-btn-hover-bg: var(--ek-deep-blue); --bs-btn-hover-border-color: var(--ek-deep-blue); --bs-btn-active-bg: var(--ek-deep-blue); --bs-btn-active-border-color: var(--ek-deep-blue); --bs-btn-disabled-bg: var(--ek-blue); color: #fff; }
.btn-secondary, .btn-outline-secondary { --bs-btn-bg: var(--ek-surface); --bs-btn-color: var(--ek-ink); --bs-btn-border-color: var(--ek-line); --bs-btn-hover-bg: var(--ek-surface-hover); --bs-btn-hover-color: var(--ek-ink); --bs-btn-hover-border-color: var(--ek-line); --bs-btn-active-bg: var(--ek-surface-hover); --bs-btn-active-color: var(--ek-ink); }
.btn-outline-primary { --bs-btn-color: var(--ek-link); --bs-btn-border-color: var(--ek-line); --bs-btn-hover-bg: var(--ek-primary-soft); --bs-btn-hover-color: var(--ek-link); --bs-btn-hover-border-color: var(--ek-focus); }
.btn-outline-danger { --bs-btn-color: var(--ek-danger); --bs-btn-border-color: var(--ek-line); --bs-btn-hover-bg: var(--ek-danger-soft); --bs-btn-hover-color: var(--ek-danger); --bs-btn-hover-border-color: var(--ek-danger); }
.btn-outline-warning { --bs-btn-color: var(--ek-warning); --bs-btn-border-color: var(--ek-warning); --bs-btn-hover-bg: var(--ek-warning-soft); --bs-btn-hover-color: var(--ek-warning); --bs-btn-hover-border-color: var(--ek-warning); --bs-btn-active-bg: var(--ek-warning-soft); --bs-btn-active-color: var(--ek-warning); --bs-btn-active-border-color: var(--ek-warning); }
.btn-danger { background: #b42332; border-color: #b42332; color: #fff; }
.btn-success { background: #166534; border-color: #166534; color: #fff; }
.btn-warning { background: var(--ek-orange); color: #132c47; border-color: var(--ek-orange); }
.badge, .status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; font: 500 11px/1.35 var(--ek-font); letter-spacing: 0; border: 1px solid var(--ek-line); border-radius: 4px; white-space: nowrap; background: var(--ek-surface-subtle); color: var(--ek-muted); }
.status-badge--success, .badge.bg-success { background: var(--ek-success-soft) !important; color: var(--ek-success) !important; border-color: transparent; }
.status-badge--warning, .status-badge--pending, .badge.bg-warning { background: var(--ek-warning-soft) !important; color: var(--ek-warning) !important; border-color: transparent; }
.status-badge--danger, .badge.bg-danger { background: var(--ek-danger-soft) !important; color: var(--ek-danger) !important; border-color: transparent; }
.status-badge--info, .status-badge--refunded, .badge.bg-info, .badge.bg-primary { background: var(--ek-info-soft) !important; color: var(--ek-info) !important; border-color: transparent; }
.alert { border-radius: var(--ek-radius); font-size: 13px; border: 1px solid var(--ek-line); padding: 14px 16px; }
.alert-danger { background: var(--ek-danger-soft); color: var(--ek-danger); }
.alert-success { background: var(--ek-success-soft); color: var(--ek-success); }
.alert-warning { background: var(--ek-warning-soft); color: var(--ek-warning); }
.alert-info { background: var(--ek-info-soft); color: var(--ek-info); }
/* Operational tables and browser-only view controls */
.table-responsive { border-radius: var(--ek-radius); }
.table { --bs-table-bg: var(--ek-surface); --bs-table-color: var(--ek-ink); --bs-table-border-color: var(--ek-line); --bs-table-striped-bg: var(--ek-surface-subtle); --bs-table-striped-color: var(--ek-ink); --bs-table-hover-bg: var(--ek-surface-hover); --bs-table-hover-color: var(--ek-ink); font-size: 13px; line-height: 1.35; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: 6px 10px; vertical-align: middle; }
.table th { background: var(--ek-surface-subtle); height: 36px; font-size: 12px; color: var(--ek-muted); font-weight: 500; letter-spacing: .025em; white-space: nowrap; border-bottom-width: 1px; }
.table td { height: 44px; font-variant-numeric: tabular-nums; }
.table td strong { font-weight: 600; }
.table td small, .table td .small { color: var(--ek-muted); font-size: 12px; }
.table td .badge, .table td .status-badge { font-size: 12px; line-height: 1.35; padding: 3px 6px; }
.table thead th { position: sticky; top: 0; z-index: 1; }
.table td:last-child { white-space: nowrap; }
.table .btn { white-space: nowrap; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 8px; width: max-content; min-width: 100%; }
.table-actions form { margin: 0; }
.action-button { --action-color: var(--ek-muted); --action-soft: var(--ek-surface-hover); --bs-btn-color: var(--action-color); --bs-btn-bg: transparent; --bs-btn-border-color: var(--action-color); --bs-btn-hover-color: var(--action-color); --bs-btn-hover-bg: var(--action-soft); --bs-btn-hover-border-color: var(--action-color); --bs-btn-active-color: var(--action-color); --bs-btn-active-bg: var(--action-soft); --bs-btn-active-border-color: var(--action-color); --bs-btn-disabled-color: var(--ek-muted); --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: var(--ek-control-line); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 8px; vertical-align: middle; }
.action-button .icon { width: 18px; height: 18px; margin: 0; }
.action-button--view { --action-color: var(--ek-link); --action-soft: var(--ek-primary-soft); }
.action-button--related { --action-color: var(--ek-info); --action-soft: var(--ek-info-soft); }
.action-button--warning { --action-color: var(--ek-warning); --action-soft: var(--ek-warning-soft); }
.action-button--success { --action-color: var(--ek-success); --action-soft: var(--ek-success-soft); }
.action-button--danger { --action-color: var(--ek-danger); --action-soft: var(--ek-danger-soft); }
.action-button:focus-visible, .action-disabled:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 3px; box-shadow: none; }
.action-disabled { display: inline-flex; border-radius: 8px; cursor: not-allowed; }
.action-disabled .action-button { pointer-events: none; }
.action-cell { text-align: right; }
.table-actions > form { display: inline-flex !important; margin: 0 !important; }
.console-action-tooltip { --bs-tooltip-bg: var(--ek-ink); --bs-tooltip-color: var(--ek-surface); --bs-tooltip-opacity: 1; --bs-tooltip-border-radius: 8px; --bs-tooltip-font-size: 12px; }
@media (any-pointer: coarse) { .action-button { width: 44px; height: 44px; min-height: 44px; } }
.section-help { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ek-muted); }
.table th button { border: 0; background: none; color: inherit; font: inherit; padding: 0; display: inline-flex; align-items: center; gap: 6px; }
.table tr[hidden] { display: none; }
.table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 0 16px; font-size: 12px; }
.table-tools .form-control, .table-tools .form-select { width: auto; max-width: 220px; min-height: 32px; font-size: 12px; }
.table-tools label { font-size: 12px; margin: 0; }
.table-tools .table-views { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.table-match-count { color: var(--ek-muted); font-size: 11px; }
.column-picker { position: relative; }
.column-picker summary { list-style: none; cursor: pointer; }
.column-picker summary::-webkit-details-marker { display: none; }
.column-options { position: absolute; right: 0; top: 36px; z-index: 1025; min-width: 200px; max-height: 300px; overflow: auto; background: var(--ek-surface); border: 1px solid var(--ek-line); padding: 12px; border-radius: 6px; box-shadow: var(--ek-shadow-raised); }
.column-options label { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.pagination-wrap, .table-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 12px; }
.pagination { gap: 4px; flex-wrap: wrap; margin: 0; }
.pagination .btn { min-width: 32px; min-height: 32px; padding: 5px 8px; }
.dataTables_wrapper { font-size: 12px; }
.dataTables_wrapper .row { gap: 12px 0; }
.dataTables_wrapper .row:last-child { margin-top: 12px; align-items: center; }
.page-link { background: var(--ek-surface); color: var(--ek-muted); border-color: var(--ek-line); font-size: 12px; }
.active > .page-link { background: var(--ek-blue); border-color: var(--ek-blue); }
/* Bento metrics and operational sections */
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric-card { padding: 20px; display: block; color: var(--ek-ink); border: 1px solid var(--ek-line); border-radius: var(--ek-radius); background: var(--ek-surface); box-shadow: var(--ek-shadow); min-width: 0; }
a.metric-card:hover { border-color: var(--ek-focus); text-decoration: none; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 500; color: var(--ek-muted); }
.metric-value { display: block; font-size: 30px; line-height: 1.2; letter-spacing: -.04em; font-weight: 600; margin: 16px 0 8px; }
.metric-helper { color: var(--ek-muted); font-size: 11px; }
.bento-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.bento-grid > .bento-wide { grid-column: span 7; }
.bento-grid > .bento-narrow { grid-column: span 5; }
.bento-grid > .bento-half { grid-column: span 6; }
.bento-grid > .bento-third { grid-column: span 4; }
.bento-grid > .card { margin-bottom: 0; }
.dashboard-list { list-style: none; padding: 0; margin: 0; }
.dashboard-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--ek-line); font-size: 13px; }
.dashboard-list li:last-child { border: 0; padding-bottom: 0; }
.dashboard-list li:first-child { padding-top: 0; }
.dashboard-meta { color: var(--ek-muted); font-size: 11px; margin-top: 3px; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.section-eyebrow { margin: 24px 0 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ek-muted); }
.timeline { border-left: 1px solid var(--ek-line); margin: 8px; padding-left: 24px; }
.timeline-event { position: relative; padding: 0 0 24px; }
.timeline-event::before { content: ''; position: absolute; left: -29px; top: 6px; width: 9px; height: 9px; border: 2px solid var(--ek-surface); border-radius: 50%; background: var(--ek-blue); }
.timeline-event time { display: block; color: var(--ek-muted); font-size: 11px; margin-bottom: 6px; }
.timeline-event h3 { font-size: 13px; margin: 0 0 8px; }
.timeline-event p { font-size: 13px; margin: 0; }
/* Tabs, dialogs, editors and feedback */
.nav-tabs { border-bottom-color: var(--ek-line); gap: 4px; overflow-x: auto; flex-wrap: nowrap; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--ek-muted); font-size: 13px; padding: 12px; white-space: nowrap; }
.nav-tabs .nav-link.active { background: transparent; color: var(--ek-link); border-bottom-color: var(--ek-link); }
.tab-content { padding-top: 20px; }
.modal-content { background: var(--ek-surface); border: 1px solid var(--ek-line); color: var(--ek-ink); border-radius: var(--ek-radius); }
.modal-header, .modal-footer { border-color: var(--ek-line); padding: 16px 20px; }
.modal-title { font-size: 18px; }
.modal-body { padding: 20px; }
.console-dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--ek-line); padding: 24px; border-radius: var(--ek-radius); color: var(--ek-ink); background: var(--ek-surface); box-shadow: var(--ek-shadow-raised); max-height: 80vh; overflow-y: auto; }
.console-dialog::backdrop { background: rgb(5 14 25 / 55%); }
.console-dialog h2 { font-size: 20px; margin-bottom: 12px; }
.console-dialog p { color: var(--ek-muted); font-size: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.navigation-results { list-style: none; padding: 8px 0; margin: 0; max-height: 360px; overflow-y: auto; }
.navigation-results a { display: flex; justify-content: space-between; padding: 12px; border-radius: 6px; color: var(--ek-ink); font-size: 14px; }
.navigation-results a:hover, .navigation-results a:focus { background: var(--ek-primary-soft); text-decoration: none; }
.navigation-results small { color: var(--ek-muted); }
.console-feedback { position: fixed; bottom: 24px; right: 24px; z-index: 1200; max-width: 360px; padding: 12px 16px; background: var(--ek-surface); border: 1px solid var(--ek-line); border-radius: var(--ek-radius); box-shadow: var(--ek-shadow-raised); font-size: 13px; }
.note-editor.note-frame { border-color: var(--ek-line); }
.note-editor .note-toolbar, .note-editor .note-statusbar { background: var(--ek-surface-subtle); border-color: var(--ek-line); }
.note-editor .note-editing-area .note-editable { background: var(--ek-surface); color: var(--ek-ink); }
.note-editor .btn { background: var(--ek-surface); color: var(--ek-ink); border-color: var(--ek-line); }
.parsley-errors-list { color: var(--ek-danger); font-size: 12px; list-style: none; padding: 6px 0 0; }
/* Account screens */
.account-page { min-height: 100vh; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.account-brand { margin-bottom: 32px; }
.account-brand .brand-logo { width: 320px; }
.account-theme-toggle { position: fixed; top: 20px; right: 20px; }
.account-shell { width: min(1040px, 100%); display: grid; grid-template-columns: 1fr 1fr; background: var(--ek-surface); border: 1px solid var(--ek-line); border-radius: var(--ek-radius); overflow: hidden; box-shadow: var(--ek-shadow-raised); }
.account-introduction { background: #132c47; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.account-introduction h1 { color: #fff; font-size: 36px; line-height: 1.2; margin: 12px 0 20px; letter-spacing: -.04em; }
.account-introduction p { color: #c0d3e4; font-size: 14px; line-height: 1.7; }
.account-introduction .eyebrow { color: #fcb040; }
.account-capabilities { border-top: 1px solid #3b526a; padding-top: 24px; display: grid; gap: 16px; font-size: 13px; color: #d5e2ed; }
.account-capabilities span { display: flex; gap: 12px; align-items: center; }
.account-form-panel { padding: 48px; }
.account-form-panel h2 { font-size: 24px; margin-bottom: 8px; }
.account-form-panel .field { margin-bottom: 24px; }
.account-form-panel .btn-primary { width: 100%; }
.account-form-panel .card { box-shadow: none; border: 0; margin: 0; }
.account-form-panel .card-header, .account-form-panel .card-body { padding: 0; border: 0; }
.account-form-panel .card-header { margin-bottom: 24px; }
.account-footer { font-size: 12px; text-align: center; color: var(--ek-muted); margin-top: 24px; }
.account-compact { width: min(480px, 100%); }
.account-compact .account-form-panel { padding: 32px; }
.field-label-row { display: flex; justify-content: space-between; align-items: center; }
.field-label-row a { font-size: 12px; }
.error-code { font-size: 56px; letter-spacing: -.05em; font-weight: 600; color: var(--ek-link); margin-bottom: 16px; }
.error-panel { text-align: center; }
/* Responsive and accessibility */
@media (max-width: 1199px) {
    .console-main { padding: 24px; }
    .topbar-title { max-width: 200px; }
    .navigation-button kbd, .tenant-label { display: none; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .console-shell { padding-left: 0; }
    .console-topbar { left: 0; padding: 0 16px; }
    .console-sidebar { width: 248px; transform: translateX(-100%); transition: transform var(--ek-motion); }
    .console-shell.is-mobile-open .console-sidebar { transform: translateX(0); }
    .sidebar-close { display: inline-flex; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; background: rgb(5 14 25 / 55%); border: 0; }
    .is-mobile-open .sidebar-backdrop { display: block; }
    .bento-grid > .card { grid-column: span 12; }
    .account-introduction { padding: 32px; }
    .account-form-panel { padding: 32px; }
}
@media (max-width: 767px) {
    .console-main { padding: 20px 16px 32px; }
    .topbar-title { max-width: 150px; font-size: 12px; }
    .topbar-context .context-label, .navigation-button span, .topbar-tenant { display: none; }
    .navigation-button { padding: 9px; }
    .topbar-context, .topbar-actions { gap: 8px; }
    .card-header, .card-body { padding: 16px; }
    .metric-card { padding: 16px; }
    .metric-value { font-size: 24px; }
    .table-tools .table-views { margin-left: 0; width: 100%; }
    .account-shell { display: block; }
    .account-introduction { display: none; }
    .account-brand .brand-logo { width: 280px; }
    .account-page { justify-content: flex-start; padding-top: 80px; }
    .icon-button { width: 44px; height: 44px; }
    .btn { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
    .console-topbar, .console-sidebar, .sidebar-backdrop, .table-tools, .page-toolbar .btn { display: none !important; }
    .console-shell { padding: 0; }
    .console-main { max-width: none; padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
}
.field-label-row { display: flex; align-items: center; justify-content: space-between; }
.field-label-row a { font-size: 12px; }
.kyc-review-panel summary { list-style: none; }
.kyc-review-actions { padding: 12px 0; min-width: 180px; }
.request-progress { position: fixed; right: 24px; bottom: 24px; z-index: 1200; display: flex; gap: 10px; align-items: center; background: var(--ek-surface); color: var(--ek-ink); padding: 12px 16px; border: 1px solid var(--ek-line); border-radius: 8px; font-size: 13px; box-shadow: var(--ek-shadow-raised); }
.request-progress-ring { width: 16px; height: 16px; border: 2px solid var(--ek-line); border-top-color: var(--ek-blue); border-radius: 50%; animation: console-pending 800ms linear infinite; }
@keyframes console-pending { to { transform: rotate(360deg); } }
.bento-grid > div > .card { margin-bottom: 0; }
.bg-light { background: var(--ek-surface-subtle) !important; color: var(--ek-ink); }
.dropdown-menu { --bs-dropdown-bg: var(--ek-surface); --bs-dropdown-color: var(--ek-ink); --bs-dropdown-link-color: var(--ek-ink); --bs-dropdown-link-hover-bg: var(--ek-surface-hover); border-color: var(--ek-line); font-size: 13px; }
.card-body.table-responsive { padding: 0; }
.card-body.table-responsive .table-tools { padding: 16px; border-bottom: 1px solid var(--ek-line); }
.card-body.table-responsive .dataTables_wrapper { padding: 16px; }
.card-body.table-responsive .dataTables_wrapper .table-tools { padding: 0 0 16px; }

.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.form-section { padding: 8px 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--ek-line); }
.form-section:last-of-type { border-bottom: 0; margin-bottom: 0; }
.form-section > h3 { font-size: 16px; margin-bottom: 16px; }

.card > .table-tools { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--ek-line); }
.nav-group-toggle[hidden], .console-menu > li[hidden] { display: none; }

.badge.bg-light, .badge.bg-secondary { background: var(--ek-surface-subtle) !important; color: var(--ek-muted) !important; }
.organisation-placeholder { display: inline-flex; align-items: center; justify-content: center; background: var(--ek-surface-subtle); border: 1px solid var(--ek-line); }
.metric-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.organisation-identity { padding: 24px 20px 0; }
.info-value { overflow-wrap: anywhere; }
@media (max-width: 991px) { .metric-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .metric-grid--four { grid-template-columns: 1fr; } }
/* Keep mode and account controls on one line on narrow operational screens. */
.topbar-context, .topbar-actions { flex-wrap: nowrap; }
.topbar-context { min-width: 0; }
.topbar-context > div { min-width: 0; }
.topbar-context > .icon-button, .topbar-actions { flex-shrink: 0; }
@media (max-width: 767px) {
    .console-topbar { gap: 8px; padding: 0 12px; }
    .topbar-context { gap: 8px; }
    .topbar-title { max-width: 100px; }
    .topbar-actions { gap: 4px; }
    .navigation-button { width: 36px; height: 44px; padding: 8px; }
}
@media (max-width: 359px) { .topbar-title { max-width: 84px; } }
.btn-info { background: #2347a8; border-color: #2347a8; color: #fff; }
.btn-outline-info { --bs-btn-color: var(--ek-info); --bs-btn-border-color: var(--ek-line); --bs-btn-hover-bg: var(--ek-info-soft); --bs-btn-hover-color: var(--ek-info); }
.btn-light { background: var(--ek-surface-subtle); border-color: var(--ek-line); color: var(--ek-ink); }

/* Server list controls: filters act on the dataset; preferences stay in the browser. */
.console-list-search { padding: 16px; }
.list-search-row { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.list-keyword { flex: 0 1 480px; min-width: 220px; }
.list-page-size { flex: 0 0 112px; }
.console-list-search label { display: block; font-size: 12px; color: var(--ek-muted); margin-bottom: 6px; }
.list-advanced { display: flex; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--ek-line); padding-top: 16px; margin-top: 16px; }
.list-advanced[hidden] { display: none; }
.list-filter { flex: 0 1 180px; min-width: 140px; }
.table-density { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; white-space: nowrap; }
.table-density select { width: 140px; }
.table[data-density="comfortable"] > tbody > tr > td { padding-top: 12px; padding-bottom: 12px; height: 56px; }
.list-pagination { display: flex; align-items: center; justify-content: end; gap: 12px; padding: 16px; font-size: 13px; }
@media (max-width: 575px) { .list-keyword { flex-basis: 100%; } .list-filter { flex: 1 1 140px; } .table-tools { align-items: start; } .table-density { margin-left: 0; } }

.table th[aria-sort="ascending"] button::after { content: ' ↑'; }
.table th[aria-sort="descending"] button::after { content: ' ↓'; }
[data-console-download] {
    --bs-btn-color: var(--ek-success);
    --bs-btn-border-color: var(--ek-success);
    --bs-btn-hover-color: var(--ek-success);
    --bs-btn-hover-bg: var(--ek-success-soft);
    --bs-btn-hover-border-color: var(--ek-success);
    --bs-btn-active-color: var(--ek-success);
    --bs-btn-active-bg: var(--ek-success-soft);
    --bs-btn-active-border-color: var(--ek-success);
}
.list-filter .form-check-input { border-color: var(--ek-control-line); }

/* A printable invoice remains legible when the console preference is dark. */
@media print {
    .invoice-document { --ek-bg: #fff; --ek-surface: #fff; --ek-ink: #132943; --ek-muted: #52657a; --ek-line: #d5e2eb; background: #fff; color: #132943; }
}
