:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0c1d3d;
  background: #f6f9fd;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 85% 10%, #fff0e8, transparent 34%), #f7f9fc; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #88b8ff; outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .5; }

/* Login and MFA */
.shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 24px; }
.brand { width: min(100%, 450px); display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 23px; font-weight: 750; }
.brand small, .console-logo small, .mobile-brand small { display: block; margin-top: 2px; color: #75869d; font-size: 12px; font-weight: 500; }
.mark { width: 46px; height: 46px; display: grid; place-items: center; flex: none; border-radius: 12px; background: linear-gradient(145deg, #ff6c25, #f24818); color: #fff; box-shadow: 0 10px 24px #ed521b28; font-size: 27px; }
.mark svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card { width: min(100%, 450px); padding: clamp(25px, 5vw, 42px); border: 1px solid #e0e8f2; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px #10274514; }
.eyebrow { margin: 0 0 12px; color: #d34d1b; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: 32px; line-height: 1.2; }
.intro { margin: 12px 0 27px; color: #53647a; line-height: 1.6; }
form { display: flex; flex-direction: column; }
label { margin: 15px 0 7px; font-size: 14px; font-weight: 650; }
input, select { width: 100%; min-height: 46px; border: 1px solid #ccd6e2; border-radius: 9px; padding: 11px 13px; background: #fff; color: #0c1d3d; }
button { min-height: 47px; margin-top: 25px; border: 0; border-radius: 9px; background: #f4511e; color: #fff; font-weight: 700; }
button:not(:disabled):hover { background: #dc4111; }
.countdown { min-height: 18px; margin: 11px 0 0; color: #64748b; font-size: 13px; }
.verify-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; }
.text-button { min-height: 38px; margin: 0; padding: 5px 0; border: 0; background: none; color: #176bff; font-size: 13px; font-weight: 650; }
.text-button:not(:disabled):hover { background: none; text-decoration: underline; }
.footer { margin-top: 25px; color: #738096; font-size: 12px; }
#loading-view { color: #64748b; }
#message { min-height: 18px; margin: 17px 0 0; color: #b42318; font-size: 13px; line-height: 1.5; }

/* Console shell */
.shell.console-active { display: block; padding: 0; }
.shell.console-active > .brand, .shell.console-active > .footer { display: none; }
.shell.console-active > .card { width: 100%; min-height: 100vh; padding: 0; border: 0; border-radius: 0; background: #f6f9fd; box-shadow: none; }
.shell.console-active #message { display: none; }
.console-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.console-sidebar { position: sticky; z-index: 10; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(180deg, #09233d 0%, #071e36 100%); color: #fff; }
.console-logo { display: flex; align-items: center; gap: 11px; min-height: 70px; padding: 12px 16px; border-bottom: 1px solid #ffffff12; font-size: 19px; font-weight: 760; }
.console-logo .mark { width: 43px; height: 43px; }
.console-logo small { color: #aebdd0; font-size: 11px; }
.console-nav { display: grid; gap: 5px; padding: 16px 10px; }
.console-nav .nav-button { position: relative; width: 100%; min-height: 45px; display: flex; align-items: center; gap: 12px; margin: 0; padding: 0 14px; border-radius: 9px; background: transparent; color: #d8e2ed; text-align: left; font-size: 13px; font-weight: 580; }
.console-nav .nav-button:not(:disabled):hover, .console-nav .nav-button.is-active { background: #193a5c; color: #fff; }
.console-nav .nav-button.is-active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 4px 4px 0; background: #ff5b20; }
.console-nav .nav-disabled { opacity: .5; }
.nav-icon { width: 20px; flex: none; text-align: center; color: #e8f1fb; font-size: 20px; font-weight: 400; }
.nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.console-sidebar-bottom { display: grid; gap: 14px; margin-top: auto; padding: 15px 16px 20px; border-top: 1px solid #ffffff17; }
.sidebar-settings { min-height: 38px; display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; background: transparent; color: #d8e2ed; font-size: 12px; text-align: left; }
.sidebar-settings:hover { background: transparent; color: #fff; }
.system-health { padding: 12px; border: 1px solid #ffffff26; border-radius: 9px; color: #cbd7e5; font-size: 11px; }
.attention-panel:focus-visible { outline: 3px solid #88b8ff; outline-offset: 3px; }
.health-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px #10b98117; }
.console-content { min-width: 0; }

/* Header */
.console-header { position: sticky; z-index: 8; top: 0; height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; border-bottom: 1px solid #dfe7f1; background: #fff; }
.global-search { width: min(445px, 40vw); min-height: 38px; display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 12px; border: 1px solid #d9e2ed; border-radius: 8px; background: #f8fafc; color: #60758f; }
.global-search input { min-height: 36px; padding: 0; border: 0; background: transparent; font-size: 12px; outline: 0; }
.header-tools { display: flex; align-items: center; gap: 13px; margin-left: auto; }
.live-system { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid #dce5ef; border-radius: 8px; color: #1e334f; font-size: 11px; font-weight: 650; white-space: nowrap; }
.notification-button { position: relative; width: 34px; min-height: 34px; margin: 0; padding: 0; background: transparent; color: #203956; font-size: 20px; }
.notification-button span { position: absolute; right: -2px; top: -3px; min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #d92d20; color: #fff; font-size: 9px; }
.account-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #eaf0f7; color: #182d4b; font-size: 12px; font-weight: 800; }
.account-meta { max-width: 180px; }
.account-meta strong { display: block; overflow: hidden; color: #132744; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-meta small { display: block; margin-top: 2px; color: #74849a; font-size: 9px; }
.console-header .logout-button { min-height: 34px; margin: 0; padding: 0 11px; border: 1px solid #d7e0ea; background: #fff; color: #203b61; font-size: 10px; }
.console-header .logout-button:hover { background: #f3f7fb; }
.mobile-brand, .mobile-search-row, .mobile-pagebar { display: none; }

/* Dashboard */
.console-inner { width: min(100%, 1500px); margin: auto; padding: 22px 24px 30px; }
.page-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-heading { margin-bottom: 17px; }
.page-heading h1 { color: #0c1d3d; font-size: 30px; font-weight: 780; letter-spacing: -.02em; }
.page-heading p { margin: 5px 0 0; color: #66758a; font-size: 13px; }
.page-actions { display: flex; gap: 10px; }
.page-actions button { min-height: 40px; margin: 0; padding: 0 16px; font-size: 11px; }
.outline-button, .link-button, .icon-button { min-height: 34px; margin: 0; padding: 0 12px; border: 1px solid #d7e0ea; border-radius: 8px; background: #fff; color: #203b61; font-size: 11px; }
.outline-button:not(:disabled):hover, .icon-button:not(:disabled):hover { background: #f1f6fc; }
.link-button { border: 0; background: transparent; color: #0767d9; }
.link-button:not(:disabled):hover { background: #f4f8ff; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; }
.metric { min-width: 0; min-height: 116px; display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid #dfe7f0; border-radius: 11px; background: #fff; box-shadow: 0 5px 18px #142d4a06; }
.metric-icon { width: 54px; height: 54px; display: grid; place-items: center; flex: none; border-radius: 11px; font-size: 27px; }
.metric-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.metric > div { min-width: 0; }
.metric span:not(.metric-icon) { display: block; color: #53647a; font-size: 12px; font-weight: 650; white-space: nowrap; }
.metric strong { display: block; margin: 3px 0; overflow: hidden; color: #0c1d3d; font-size: clamp(20px, 2vw, 26px); line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.metric small { color: #72829a; font-size: 9px; white-space: nowrap; }
.metric-blue .metric-icon { background: #eaf2ff; color: #0969e8; }
.metric-green .metric-icon { background: #e8f8f1; color: #0aa06e; }
.metric-purple .metric-icon { background: #f0ecff; color: #6632d8; }
.metric-orange .metric-icon { background: #fff0e9; color: #ef5120; }
.metric-revenue .metric-icon { background: #e6f8ef; color: #0a9c67; }
.alert-strip { min-height: 52px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 13px 0; border: 1px solid #dfe7f0; border-radius: 10px; background: #fff; box-shadow: 0 4px 16px #142d4a05; }
.alert-strip > div { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-right: 1px solid #e2e8f0; color: #41556e; }
.alert-strip > div:last-child { border-right: 0; }
.alert-strip strong { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.alert-strip > div > span:last-child { margin-left: auto; color: #75869c; font-size: 18px; }
.alert-icon { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: 8px; font-size: 14px; }
.alert-icon.warning { background: #fff3e4; color: #f06a20; }
.alert-icon.danger { background: #ffe9e7; color: #d92d20; }
.alert-icon.info { background: #e9f3ff; color: #0c6edc; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr); gap: 13px; }
.dashboard-side { min-width: 0; display: grid; align-content: start; gap: 13px; }
.panel { min-width: 0; margin-bottom: 13px; padding: 16px; border: 1px solid #dfe7f0; border-radius: 11px; background: #fff; box-shadow: 0 5px 20px #142d4a06; }
.dashboard-side .panel { margin: 0; }
.panel h2 { margin: 0; color: #102340; font-size: 16px; font-weight: 750; }
.panel-heading { margin-bottom: 12px; }
.panel-heading h2 { margin: 0; }
.muted { color: #72829a; font-size: 10px; }
.overview-toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.overview-tabs { min-width: 0; display: flex; gap: 5px; }
.overview-tabs span { min-height: 34px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border-radius: 18px; background: #f5f7fa; color: #52657c; font-size: 10px; white-space: nowrap; }
.overview-tabs span.active { background: #0b2d50; color: #fff; }
.overview-tabs b { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 12px; background: #e7edf5; color: #304862; }
.overview-tabs span.active b { background: #244868; color: #fff; }
.overview-search { display: flex; gap: 8px; }
.overview-search label { min-width: 185px; min-height: 34px; display: flex; align-items: center; gap: 7px; margin: 0; padding: 0 10px; border: 1px solid #dbe4ee; border-radius: 8px; color: #71849a; }
.overview-search input { min-height: 32px; padding: 0; border: 0; outline: none; font-size: 10px; }
.overview-search button { min-height: 34px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; color: #1f334e; text-align: left; font-size: 10px; }
th { padding: 9px 9px; background: #f4f7fb; color: #53647a; font-weight: 650; white-space: nowrap; }
td { padding: 10px 9px; border-bottom: 1px solid #e9edf3; vertical-align: middle; }
td strong { display: block; color: #112642; }
td small { display: block; margin-top: 3px; color: #738096; }
tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; background: #e9f3ff; color: #0b67c9; font-size: 10px; font-weight: 650; white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.active { background: #e8f8f0; color: #07845a; }
.status-pill.risk { background: #fff1e9; color: #b45309; }
.detail-button { min-height: 28px; margin: 0; padding: 0 9px; border: 1px solid #d7e0ea; background: #fff; color: #176bff; font-size: 10px; }
.detail-button:not(:disabled):hover { background: #f5f8ff; }
.overview-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: #72829a; font-size: 10px; }
.mobile-only-link, .overview-mobile-list, .mobile-activity { display: none; }
.attention-list p { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 0; border-bottom: 1px solid #e8eef5; color: #40546d; font-size: 10px; }
.attention-list p:last-child { border-bottom: 0; }
.attention-list p > span { display: flex; align-items: center; gap: 8px; }
.attention-list strong { color: #ef4b20; font-size: 11px; }
.dot { width: 10px; height: 10px; display: inline-block; border-radius: 50%; background: #64748b; }
.dot.warning { background: #f97316; }.dot.danger { background: #dc2626; }.dot.info { background: #2563eb; }.dot.blue { background: #0ea5e9; }.dot.neutral { background: #475569; }
.renewal-calendar { display: grid; gap: 12px; padding: 4px 0; }
.renewal-row { display: grid; grid-template-columns: 74px minmax(70px, 1fr) 25px; align-items: center; gap: 9px; color: #324861; font-size: 10px; }
.renewal-row strong { text-align: right; }
.renewal-track { height: 12px; overflow: hidden; border-radius: 8px; background: #e8eef5; }
.renewal-bar { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, #ff6730, #f45a20); }
.renewal-row:nth-child(2) .renewal-bar { background: linear-gradient(90deg, #ff7340, #fb6b2d); }
.renewal-row:nth-child(3) .renewal-bar { background: linear-gradient(90deg, #ff8e60, #ff7750); }
.activity-panel { margin-bottom: 0; }
.panel-note, .empty { color: #76869a; font-size: 11px; }
.empty { padding: 14px 0; }
.filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.filters label { display: grid; gap: 5px; min-width: 180px; margin: 0; color: #52647a; font-size: 11px; }
.filters label:first-child { flex: 1; }
.filters input, .filters select { min-height: 42px; background: #fff; }
.filters button { min-height: 42px; margin: 0; padding: 0 24px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; color: #66758a; font-size: 11px; }
.pager button { min-width: 76px; }
#console-message { color: #b42318; font-size: 12px; }

/* Drawer and dialogs */
dialog { padding: 0; border: 1px solid #dfe7f0; background: #fff; color: #172740; box-shadow: 0 25px 80px #10263d4a; }
dialog::backdrop { background: #0b244465; backdrop-filter: blur(1px); }
#organization-dialog { width: min(590px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 0; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 20px 15px; border-bottom: 1px solid #e5eaf2; }
.dialog-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dialog-store-icon { width: 54px; height: 54px; display: grid; place-items: center; flex: none; border-radius: 12px; background: #fff0e9; color: #f05220; font-size: 28px; }
.dialog-title-line { display: flex; align-items: center; gap: 10px; }
.dialog-header h2 { margin: 0; overflow: hidden; color: #112541; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.dialog-header p { margin: 5px 0 0; color: #6b7d92; font-size: 10px; }
.dialog-header .icon-button { width: 34px; min-height: 34px; padding: 0; border: 0; font-size: 24px; }
.dialog-tabs { display: flex; overflow-x: auto; padding: 0 14px; border-bottom: 1px solid #e4eaf2; }
.dialog-tabs button { min-height: 49px; flex: 1 0 auto; margin: 0; padding: 0 10px; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; color: #314761; font-size: 10px; }
.dialog-tabs button:hover { background: #f8fafc; }
.dialog-tabs button[aria-selected="true"] { border-color: #f4511e; color: #e24a18; }
#dialog-content { height: calc(100dvh - 177px); overflow-y: auto; padding: 14px 20px 80px; background: #fff; }
.detail-section { margin-bottom: 12px; padding: 15px; border: 1px solid #e1e8f0; border-radius: 10px; background: #fff; }
.detail-section[hidden] { display: none; }
.detail-section h3 { margin: 0 0 12px; color: #112541; font-size: 15px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.detail-item { min-width: 0; color: #142944; font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.detail-item small { display: block; margin-bottom: 4px; color: #76869a; font-size: 9px; font-weight: 500; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-list li { padding: 9px 0; border-bottom: 1px solid #edf0f4; color: #314761; font-size: 10px; line-height: 1.45; }
.detail-list li:last-child { border: 0; }
.license-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.license-actions button { min-height: 35px; margin: 0; padding: 0 10px; border: 1px solid #d9e2ec; background: #fff; color: #314761; font-size: 9px; }
.license-actions button:first-child { border-color: #f4511e; background: #f4511e; color: #fff; }
.support-note-form { padding: 15px; border: 1px solid #e1e8f0; border-radius: 10px; }
.support-note-form label { display: block; margin: 0; color: #314761; }
.support-note-form textarea { display: block; width: 100%; margin-top: 8px; padding: 11px 13px; border: 1px solid #ccd6e2; border-radius: 9px; resize: vertical; }
.support-note-form button { align-self: flex-start; min-height: 36px; margin-top: 10px; padding: 0 14px; font-size: 10px; }
.support-note-form p { margin: 8px 0 0; color: #b42318; font-size: 10px; }
.dialog-footer { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid #dfe6ef; background: #fff; }
.dialog-footer button { min-height: 40px; margin: 0; padding: 0 15px; font-size: 10px; }
#revoke-sessions-dialog { width: min(560px, calc(100vw - 28px)); max-height: min(90vh, 700px); border-radius: 14px; }
#license-action-dialog { width: min(590px, calc(100vw - 28px)); max-height: min(94vh, 760px); border-radius: 14px; }
.license-action-form { display: block; padding: 4px 20px 20px; }
.license-action-form textarea { width: 100%; resize: vertical; border: 1px solid #ccd6e2; border-radius: 9px; padding: 11px 13px; color: #0c1d3d; }
.confirmation-notice { margin: 12px 0 4px; padding: 13px; border: 1px solid #fed7aa; border-radius: 9px; background: #fff7ed; color: #9a3412; font-size: 12px; line-height: 1.55; }
.license-acknowledge { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0 0; color: #40546d; line-height: 1.45; }
.license-acknowledge input { width: 18px; min-height: 18px; flex: none; margin: 1px 0 0; }
#license-action-feedback { min-height: 18px; color: #b42318; font-size: 12px; }
.danger-button { min-height: 38px; margin: 0; padding: 0 15px; border: 1px solid #f4c7c1; background: #fff4f2; color: #b42318; font-size: 10px; }
.danger-button:not(:disabled):hover { background: #fee4e2; }
.confirmation-content { padding: 22px; }
.confirmation-content p { margin: 0; color: #53647a; line-height: 1.65; }
.confirmation-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.confirmation-actions button { margin: 0; }
#session-feedback { min-height: 18px; margin: 12px 0 0; color: #176b55; font-size: 11px; }

@media (max-width: 1220px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metric-revenue { grid-column: span 2; }
  .alert-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alert-strip > div:nth-child(2) { border-right: 0; }
  .alert-strip > div:nth-child(-n+2) { border-bottom: 1px solid #e2e8f0; }
  .dashboard-grid { grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); }
  .account-meta { display: none; }
}

@media (max-width: 980px) {
  .console-layout { grid-template-columns: 188px minmax(0, 1fr); }
  .console-inner { padding-inline: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-toolbar { display: block; }
  .overview-search { margin-top: 10px; }
  .overview-search label { flex: 1; }
  .live-system { display: none; }
}

@media (max-width: 900px) {
  body { background: #f7faff; }
  .console-layout { display: block; }
  .console-sidebar { display: none; }
  .console-header { position: static; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 14px 16px 11px; }
  .mobile-brand { min-width: 0; display: flex; align-items: center; gap: 10px; color: #0b1d3b; font-size: 20px; font-weight: 780; }
  .mobile-brand .mark { width: 47px; height: 47px; border-radius: 12px; }
  .mobile-brand small { color: #6e7f96; font-size: 11px; }
  .desktop-search, .live-system, .account-meta, .console-header .logout-button { display: none; }
  .header-tools { gap: 8px; }
  .notification-button { display: block; opacity: 1; }
  .account-avatar { width: 38px; height: 38px; }
  .mobile-search-row { grid-column: 1 / -1; display: block; }
  .mobile-search-row .global-search { width: 100%; min-height: 48px; border-radius: 8px; background: #f8fafc; }
  .mobile-search-row .global-search input { min-height: 46px; font-size: 14px; }
  .mobile-pagebar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #e1e8f1; background: #fff; }
  .mobile-pagebar select { width: auto; min-height: 42px; padding: 0 25px 0 0; border: 0; background: transparent; color: #0d203f; font-size: 16px; font-weight: 760; }
  .mobile-filter { color: #3f5d80; font-size: 25px; }
  .console-inner { padding: 15px 12px 28px; }
  .page-heading { align-items: start; margin-bottom: 12px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { max-width: 250px; font-size: 12px; }
  .page-actions { flex: none; }
  .page-actions .outline-button { display: none; }
  .page-actions button { min-height: 43px; padding: 0 15px; font-size: 11px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric { min-height: 119px; align-items: flex-start; gap: 10px; padding: 15px 12px; }
  .metric-icon { width: 46px; height: 46px; font-size: 23px; }
  .metric span:not(.metric-icon) { font-size: 11px; white-space: normal; }
  .metric strong { margin: 3px 0 5px; font-size: 25px; }
  .metric small { font-size: 9px; white-space: normal; }
  .metric-revenue { grid-column: 1 / -1; min-height: 108px; }
  .alert-strip { display: none; }
  .dashboard-grid { display: flex; flex-direction: column; margin-top: 10px; }
  .dashboard-side { display: contents; }
  .attention-panel { order: 1; }
  .organizations-panel { order: 2; }
  .renewal-panel { display: none; }
  .panel { padding: 14px; border-radius: 10px; }
  .panel h2 { font-size: 16px; }
  .attention-panel .panel-heading { margin-bottom: 2px; }
  .attention-list p { padding: 10px 2px; font-size: 11px; }
  .attention-list p:nth-child(n+4) { display: none; }
  .overview-toolbar { margin: 0; }
  .overview-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .overview-tabs span { justify-content: center; padding: 0 7px; font-size: 10px; }
  .overview-tabs span:nth-child(3) { display: none; }
  .overview-search, .overview-table, .overview-footer { display: none; }
  .overview-mobile-list { display: block; margin-top: 8px; }
  .mobile-org-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto 20px; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #e8edf3; }
  .mobile-org-row:last-child { border-bottom: 0; }
  .mobile-org-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #fff0e8; color: #ef5622; font-size: 19px; }
  .mobile-org-row strong { display: block; overflow: hidden; color: #122744; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-org-row small { display: block; margin-top: 2px; overflow: hidden; color: #6f8096; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-org-plan, .mobile-org-date { color: #203753; font-size: 10px; white-space: nowrap; }
  .mobile-org-date { color: #0b9c69; font-weight: 750; }
  .mobile-org-row .status-pill { padding: 5px 7px; font-size: 9px; }
  .mobile-org-menu { min-height: 28px; margin: 0; padding: 0; background: transparent; color: #244261; font-size: 18px; }
  .mobile-org-menu:hover { background: #f3f7fb; }
  .activity-panel { margin-top: 0; }
  .activity-table { display: none; }
  .mobile-activity { display: block; }
  .mobile-activity-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid #e8edf3; }
  .mobile-activity-row:last-child { border-bottom: 0; }
  .mobile-activity-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e5effb; color: #4381bf; }
  .mobile-activity-row strong { display: block; color: #1c334f; font-size: 10px; }
  .mobile-activity-row small { display: block; margin-top: 2px; color: #718199; font-size: 9px; }
  .mobile-only-link { display: inline-flex; }
  .filters label:first-child { flex-basis: 100%; }
  .filters label { flex: 1; min-width: 132px; }
  .filters button { flex: 1; }
  td, th { white-space: nowrap; }
  #organization-dialog { width: 100vw; }
  .dialog-header { padding: 14px; }
  .dialog-store-icon { width: 44px; height: 44px; }
  .dialog-header h2 { font-size: 18px; }
  .dialog-tabs { padding-inline: 5px; }
  .dialog-tabs button { min-height: 45px; padding: 0 8px; font-size: 9px; }
  #dialog-content { height: calc(100dvh - 160px); padding: 12px 12px 78px; }
  .detail-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dialog-footer { padding: 10px 12px; }
}

@media (max-width: 390px) {
  .console-header { padding-inline: 12px; }
  .mobile-brand { font-size: 18px; }
  .mobile-brand .mark { width: 43px; height: 43px; }
  .console-inner { padding-inline: 9px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading p { max-width: 205px; font-size: 10px; }
  .page-actions button { padding: 0 10px; }
  .metric { min-height: 112px; gap: 8px; padding: 12px 9px; }
  .metric-icon { width: 40px; height: 40px; font-size: 20px; }
  .metric strong { font-size: 22px; }
  .mobile-org-row { grid-template-columns: 31px minmax(0, 1fr) auto 18px; }
  .mobile-org-plan { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}
