:root {
  --bg: #eef3f7;
  --panel: #ffffff;
  --ink: #16212a;
  --muted: #617384;
  --line: #d8e1e9;
  --brand: #0f766e;
  --brand-2: #164e63;
  --danger: #b42318;
  --warning: #b45309;
  --ok: #157347;
  --shadow: 0 12px 32px rgba(23, 32, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
.hidden { display: none !important; }

body.rtl {
  direction: rtl;
  text-align: right;
  font-family: "Public Sans", Tahoma, Arial, sans-serif;
}

body.rtl .dashboard-screen {
  direction: rtl;
}

body.rtl .sidebar,
body.rtl .workspace,
body.rtl .login-panel {
  text-align: right;
}

body.rtl .top-actions,
body.rtl .hero-action-cluster,
body.rtl .row-actions,
body.rtl .action-row,
body.rtl .pagination-controls {
  flex-direction: row-reverse;
}

body.rtl .page-heading,
body.rtl .panel-heading,
body.rtl .metric-card,
body.rtl .detail-row,
body.rtl .list-item,
body.rtl .legacy-group-heading {
  direction: rtl;
}

body.rtl .menu-search span,
body.rtl .inline-search .material-icons {
  left: auto;
  right: 12px;
}

body.rtl .menu-search input,
body.rtl .inline-search input {
  padding-left: 12px;
  padding-right: 40px;
}

body.rtl .global-search-panel,
body.rtl .global-search-results,
body.rtl .global-search-item,
body.rtl .settings-menu-item,
body.rtl .booking-menu-item,
body.rtl .provider-menu-item,
body.rtl .customer-menu-item,
body.rtl .operations-menu-item,
body.rtl .analytics-menu-item,
body.rtl .content-system-menu-item,
body.rtl .promotion-link,
body.rtl .promotion-native-item,
body.rtl .service-governance-item {
  direction: rtl;
  text-align: right;
}

body.rtl .analytics-bar-row strong {
  text-align: left;
}

.language-toggle {
  min-width: 104px;
  justify-content: center;
}

@media (max-width: 720px) {
  body.rtl .top-actions,
  body.rtl .hero-action-cluster {
    flex-direction: row;
  }
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.login-brand-row .login-brand {
  min-width: 0;
}

.language-toggle.compact {
  min-width: 94px;
  min-height: 34px;
  padding: 0 10px;
  flex: 0 0 auto;
}

.language-toggle.compact .material-icons {
  font-size: 18px;
}

@media (max-width: 520px) {
  .login-brand-row {
    align-items: stretch;
    flex-direction: column;
  }

  .language-toggle.compact {
    width: 100%;
  }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(rgba(16, 32, 39, 0.72), rgba(16, 32, 39, 0.72)), url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
}

.login-panel h1 {
  margin: 18px 0 8px;
  font-size: 30px;
  letter-spacing: 0;
}

.login-panel p { margin: 0 0 22px; color: var(--muted); }
.form { display: grid; gap: 15px; }

label span {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--brand);
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 15px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button.secondary { background: #e2e8f0; color: #23313d; }
button:disabled { cursor: wait; opacity: 0.72; }
.form-message { min-height: 20px; color: var(--danger); font-size: 14px; }

.dashboard-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  padding: 20px 16px;
  background: #102027;
  color: #fff;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 24px;
}

.side-brand span { display: block; color: #b7c9d0; font-size: 13px; }
nav { display: grid; gap: 4px; }

nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 7px;
  color: #d7e4ea;
  text-decoration: none;
  font-weight: 700;
}

nav a.active, nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.workspace { min-width: 0; padding: 22px; }

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar p { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.topbar h2 { margin: 0; font-size: 28px; letter-spacing: 0; }
.top-actions { display: flex; gap: 8px; }

.status-strip, .metric-grid, .content-grid, .view-root { display: grid; gap: 14px; }
.status-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }

.status-strip > div, .metric-card, .panel, .notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.status-strip > div, .metric-card, .notice { padding: 16px; }
.notice { color: var(--warning); font-weight: 700; }
.status-strip span, .metric-card span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.status-strip strong, .metric-card strong { display: block; margin-top: 7px; font-size: 26px; overflow-wrap: anywhere; }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.content-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.content-grid.three-two { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
.full-panel { width: 100%; }

.panel { min-height: 260px; overflow: hidden; }

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 { margin: 0; font-size: 17px; }
.panel-heading span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.list { display: grid; }

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child { border-bottom: 0; }
.list-item strong { display: block; overflow-wrap: anywhere; }
.list-item span { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ok { background: var(--ok); }
.badge.warn { background: var(--warning); }
.badge.blocked { background: var(--danger); }
.danger-text { color: var(--danger); }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: #334155; font-size: 12px; text-transform: uppercase; background: #f8fafc; }
td { color: var(--ink); font-size: 14px; }

.empty-state { padding: 12px 0; }
.stacked-groups { display: grid; gap: 12px; padding: 14px; }
.group-block { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.group-block h4 { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid, .content-grid.three-two { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .dashboard-screen { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .status-strip { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .workspace { padding: 16px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .top-actions { width: 100%; }
  .top-actions button { flex: 1; }
  .metric-grid { grid-template-columns: 1fr; }
  .list-item { align-items: flex-start; flex-direction: column; }
}

.menu-search { padding: 0 0 14px; }
.menu-search input {
  height: 38px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.menu-search input::placeholder { color: #9fb3bd; }
.menu-search input:focus { outline-color: rgba(45, 212, 191, 0.25); border-color: rgba(45, 212, 191, 0.55); }

.nav-section { display: grid; gap: 4px; }
.primary-nav {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.legacy-nav { gap: 10px; }
.nav-group { display: grid; gap: 3px; }
.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 4px 5px;
  color: #9fb3bd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.nav-group-title em {
  min-width: 22px;
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #d7e4ea;
  font-style: normal;
  font-size: 11px;
}
nav a.child {
  padding: 8px 10px 8px 18px;
  color: #c8d9df;
  font-size: 13px;
  font-weight: 650;
}
.nav-empty { margin: 4px; color: #b7c9d0; font-size: 13px; }

.legacy-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}
.legacy-group-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.legacy-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.legacy-group-heading span {
  min-width: 28px;
  min-height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 800;
}
.legacy-group-links { display: grid; }
.legacy-group-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}
.legacy-group-links a:last-child { border-bottom: 0; }
.legacy-group-links a:hover { background: #f8fafc; }
.migration-page-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 8%, var(--panel));
}
.migration-page-hint > .material-icons {
  color: var(--brand);
}
.migration-page-hint div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.migration-page-hint strong {
  color: var(--ink);
  font-size: 14px;
}
.migration-page-hint small {
  color: var(--muted);
  font-weight: 800;
}
.migration-page-hint .badge {
  margin-left: auto;
  white-space: nowrap;
}
.detail-list { display: grid; padding: 14px; }
.detail-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.detail-row span { color: var(--muted); font-weight: 800; }
.detail-row strong { overflow-wrap: anywhere; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 14px; }
.action-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 7px;
  padding: 0 14px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}
.action-link .material-icons { font-size: 18px; }
.secondary-link { background: #e2e8f0; color: #23313d; }

@media (max-width: 1100px) {
  .legacy-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .sidebar { max-height: none; }
}

@media (max-width: 640px) {
  .legacy-menu-grid { grid-template-columns: 1fr; }
  .detail-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Legacy admin branding and layout parity */
:root,
[data-bs-theme=light] {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #152033;
  --muted: #667085;
  --line: #e5e8ef;
  --brand: #1268b3;
  --brand-2: #0b4f8c;
  --accent: #10a37f;
  --danger: #d92d20;
  --warning: #f5a524;
  --ok: #04bb7b;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
  --sidebar-width: 270px;
  --sidebar-folded: 64px;
  --header-height: 72px;
}

[data-bs-theme=dark] {
  --bg: #10151f;
  --panel: #171d29;
  --ink: #eef2f7;
  --muted: #aeb8c7;
  --line: #283142;
  --brand: #5aa5ee;
  --brand-2: #83bdf5;
  --accent: #36c49d;
}

body {
  background: linear-gradient(180deg, rgba(18, 104, 179, 0.06), rgba(245, 247, 251, 0) 280px), var(--bg);
  color: var(--ink);
  font-family: "Public Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.login-screen {
  background: linear-gradient(135deg, rgba(14, 26, 43, 0.9), rgba(18, 104, 179, 0.76)), url("/public/assets/admin-module/img/customer-hero-preview.png") center/cover;
}
.login-panel {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(14, 26, 43, 0.22);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.brand-logo {
  max-width: 148px;
  max-height: 48px;
  object-fit: contain;
}
.login-brand span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(18, 104, 179, 0.1);
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
}
.login-panel h1 { font-size: 28px; }

.dashboard-screen {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}
.sidebar.aside {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1000;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 0;
  background: #0e1a2b;
  box-shadow: 12px 0 34px rgba(16, 24, 40, 0.12);
  color: #fff;
  transition: width 0.18s ease, transform 0.18s ease;
}
.side-brand.aside-header {
  min-height: var(--header-height);
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: space-between;
}
.logo { display: inline-flex; min-width: 0; }
.main-logo { max-width: 158px; max-height: 44px; object-fit: contain; }
.aside-body {
  height: calc(100vh - var(--header-height));
  padding: 14px 12px 20px;
  overflow-y: auto;
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.avatar,
.header-user span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 900;
}
.user-profile h5 { margin: 0; color: #eef2f7; font-size: 14px; overflow-wrap: anywhere; }
.user-profile span { display: block; margin-top: 2px; color: rgba(238, 242, 247, 0.72); font-size: 12px; }

.workspace.main-area {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: calc(var(--header-height) + 22px) 24px 24px;
  transition: margin-left 0.18s ease;
}
.topbar.header {
  position: fixed;
  inset: 0 0 auto var(--sidebar-width);
  z-index: 900;
  min-height: var(--header-height);
  margin: 0;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 232, 239, 0.9);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  backdrop-filter: blur(16px);
  transition: left 0.18s ease;
}
[data-bs-theme=dark] .topbar.header {
  background: rgba(23, 29, 41, 0.9);
  border-bottom-color: var(--line);
}
.page-heading { min-width: 0; }
.topbar p { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.topbar h2 { color: var(--ink); font-size: 24px; font-weight: 800; }
.top-actions { align-items: center; }
.header-right { margin-left: auto; }

.icon-button,
.search-command,
.header-user {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: none;
}
.icon-button {
  width: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}
.icon-button .material-icons { font-size: 22px; }
.search-command {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  font-weight: 800;
}
.search-command em {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--muted);
  background: var(--bg);
  font-style: normal;
  font-size: 11px;
}
.header-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 2px 10px 2px 2px;
}
.header-user span { width: 34px; height: 34px; }
.header-user strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.secondary { background: #f2f4f7; color: var(--ink); border: 1px solid var(--line); }
button:not(.secondary), .action-link { background: var(--brand); }
button:not(.secondary):hover, .action-link:hover { background: var(--brand-2); }

.menu-search {
  position: relative;
  padding: 0 0 14px;
}
.menu-search .material-icons {
  position: absolute;
  left: 12px;
  top: 10px;
  color: #9fb3bd;
  font-size: 18px;
  pointer-events: none;
}
.menu-search input {
  height: 40px;
  padding-left: 38px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
nav a {
  min-height: 40px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
nav a.active,
nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateX(2px);
}
nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
.nav-group-title { color: rgba(255, 255, 255, 0.52); }
nav a.child { padding-left: 18px; font-size: 12px; }

.status-strip > div,
.metric-card,
.panel,
.notice,
.legacy-group-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.metric-card strong,
.status-strip strong { color: var(--ink); font-size: 24px; }
.panel-heading,
th,
.group-block h4,
.legacy-group-heading { background: rgba(245, 247, 251, 0.78); }
[data-bs-theme=dark] .panel-heading,
[data-bs-theme=dark] th,
[data-bs-theme=dark] .group-block h4,
[data-bs-theme=dark] .legacy-group-heading { background: rgba(255, 255, 255, 0.03); }
td, th, .legacy-group-links a { color: var(--ink); }
.badge { border-radius: 999px; }
.badge.ok { background: var(--ok); }
.badge.warn { background: var(--warning); }
.badge.blocked { background: var(--danger); }

body.aside-folded .sidebar.aside { width: var(--sidebar-folded); }
body.aside-folded .workspace.main-area { margin-left: var(--sidebar-folded); }
body.aside-folded .topbar.header { left: var(--sidebar-folded); }
body.aside-folded .main-logo,
body.aside-folded .user-profile .media-body,
body.aside-folded .menu-search,
body.aside-folded .nav-group-title span,
body.aside-folded nav a:not(.active) { overflow: hidden; }
body.aside-folded .main-logo { display: none; }
body.aside-folded .side-brand.aside-header { justify-content: center; padding-inline: 8px; }
body.aside-folded .user-profile { justify-content: center; padding-inline: 6px; }
body.aside-folded .user-profile .media-body,
body.aside-folded .nav-group-title,
body.aside-folded nav a.child { display: none; }
body.aside-folded nav a { padding-inline: 10px; font-size: 0; }
body.aside-folded .primary-nav a::first-letter { font-size: 14px; }
.mobile-toggle { display: none; }
.offcanvas-overlay { display: none; }

@media (max-width: 1100px) {
  .top-actions .search-command em,
  .header-user strong { display: none; }
}

@media (max-width: 980px) {
  .dashboard-screen { grid-template-columns: 1fr; }
  .sidebar.aside { transform: translateX(-100%); }
  body.aside-open .sidebar.aside { transform: translateX(0); width: var(--sidebar-width); }
  .workspace.main-area { margin-left: 0; padding: calc(var(--header-height) + 18px) 16px 18px; }
  .topbar.header { left: 0; padding: 0 16px; }
  .mobile-toggle { display: inline-grid; }
  .offcanvas-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 990;
    background: rgba(14, 26, 43, 0.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
  }
  body.aside-open .offcanvas-overlay { opacity: 1; visibility: visible; pointer-events: auto; }
}

@media (max-width: 640px) {
  .topbar.header { align-items: center; flex-direction: row; gap: 10px; }
  .top-actions { gap: 6px; }
  .top-actions .search-command span:not(.material-icons),
  .header-user,
  #oldAdminButton,
  #logoutButton { display: none; }
  .topbar h2 { font-size: 20px; }
}

/* Dashboard page parity */
.business-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.business-summary {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.business-summary::before {
  content: "";
  position: absolute;
  inset: auto -48px -54px auto;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  opacity: 0.12;
  background: currentColor;
}
.business-summary h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
}
.business-summary h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.business-summary .absolute-img {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.72;
}
.business-summary-customers { color: #1268b3; }
.business-summary-earning { color: #10a37f; }
.business-summary-providers { color: #f5a524; }
.business-summary-services { color: #7c3aed; }

.dashboard-grid {
  display: grid;
  gap: 18px;
}
.dashboard-grid-main {
  grid-template-columns: minmax(0, 2.7fr) minmax(320px, 1fr);
}
.dashboard-grid-secondary {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(280px, 0.9fr);
}
.dashboard-panel-heading a,
.dashboard-panel-heading span,
.chart-tools {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.chart-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chart-tools span,
.chart-tools strong {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: var(--bg);
  color: var(--ink);
}
.earning-chart { padding: 18px 18px 14px; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend em {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.earning-dot { background: var(--brand); }
.commission-dot { background: var(--accent); }
.chart-bars {
  height: 300px;
  display: grid;
  grid-template-columns: repeat(12, minmax(26px, 1fr));
  align-items: end;
  gap: 10px;
  padding-top: 10px;
  border-bottom: 1px solid var(--line);
}
.chart-month {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-items: end;
  justify-items: center;
  height: 100%;
}
.chart-pair {
  height: 250px;
  display: flex;
  align-items: end;
  gap: 4px;
}
.bar {
  width: 9px;
  min-height: 4px;
  display: block;
  border-radius: 999px 999px 0 0;
}
.earning-bar { background: linear-gradient(180deg, var(--brand), var(--brand-2)); }
.commission-bar { background: linear-gradient(180deg, var(--accent), #047857); }
.chart-month small { color: var(--muted); font-weight: 800; }
.events {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
}
.event {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.event .knob {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border: 3px solid rgba(18, 104, 179, 0.18);
  border-radius: 50%;
  background: var(--brand);
}
.events .line {
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 23px;
  width: 2px;
  background: var(--line);
}
.event h5,
.media-row h5 { margin: 0; color: var(--ink); font-size: 14px; font-weight: 800; }
.event p,
.media-row p,
.media-row span { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.event time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.common-list {
  list-style: none;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 4px 18px 18px;
}
.common-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.common-list li:last-child { border-bottom: 0; }
.media-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.media-row img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
}
.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rating .material-icons { color: #f5a524; font-size: 16px; }
.split-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.zone-progress-list {
  list-style: none;
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 18px;
}
.zone-progress-list li { display: grid; gap: 8px; }
.zone-progress-list li > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}
.zone-progress-list strong { color: var(--ink); font-size: 12px; white-space: nowrap; }
.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg);
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.service-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 20px 22px;
  border: 1px solid rgba(18, 104, 179, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.service-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.service-hero h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}
.service-hero p { margin: 5px 0 0; color: var(--muted); font-weight: 700; }
.service-primary-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
}
.service-primary-action .material-icons { font-size: 18px; }
.compact-metrics { margin-bottom: 14px; }
.compact-metrics .metric-card { padding: 13px 15px; }
.compact-metrics .metric-card strong { font-size: 21px; }
.service-panel { min-height: 0; border-color: #c9d7e3; }
.service-heading {
  background: #f8fbfd;
}
.service-heading > div { min-width: 0; }
.service-heading h3 { font-size: 18px; }
.service-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.filter-block {
  display: grid;
  gap: 7px;
}
.filter-block > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.segmented-tabs,
.inline-search,
.service-pager,
.service-pager > div,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.segmented-tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f1f5f9;
}
.segmented-tabs button {
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: #475569;
}
.segmented-tabs button.active { background: var(--brand); color: #fff; }
.inline-search { min-width: min(460px, 100%); }
.inline-search input { height: 38px; }
.inline-search button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}
.inline-search .material-icons { font-size: 17px; }
.service-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  flex: 1 1 520px;
}
.service-filter-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.service-filter-grid select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}
.service-table table { min-width: 1360px; }
.service-table tbody tr:nth-child(even) { background: #fbfdff; }
.service-table tbody tr:hover { background: #f1f8fb; }
.service-table th { color: #475569; letter-spacing: 0; }
.service-table td { color: #25313d; }
.service-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.service-name img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg);
}
.service-media-stack {
  width: 74px;
  height: 48px;
  position: relative;
  flex: 0 0 74px;
}
.service-media-stack img.service-cover-image {
  width: 58px;
  height: 36px;
  position: absolute;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  border: 1px solid #d6e1ea;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
}
.service-media-stack img.service-thumb-image {
  width: 42px;
  height: 42px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  border: 2px solid var(--panel);
}
.service-name > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.service-name strong,
.service-name em,
.service-name small {
  max-width: 260px;
  overflow-wrap: anywhere;
}
.service-name em {
  color: #047857;
  font-size: 12px;
  font-style: normal;
}
.service-name small,
.service-data-stack small,
.service-category small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.service-category {
  display: inline-grid;
  gap: 3px;
  max-width: 180px;
  color: #334155;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.service-category.muted,
.muted-text { color: var(--muted); font-weight: 700; }
.zone-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 260px;
}
.zone-chip-list span,
.zone-chip-list em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: #e7f3f1;
  color: #0f766e;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.money-cell { color: #0f5132; }
.service-data-stack {
  display: grid;
  gap: 3px;
  min-width: 120px;
}
.switch-button {
  width: 86px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px;
  border-radius: 999px;
  background: #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}
.switch-button span {
  width: 20px;
  height: 20px;
  display: block;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.switch-button em { font-style: normal; }
.switch-button.active { background: var(--ok); color: #fff; }
.switch-button.active span { transform: translateX(0); }
.row-actions a,
.row-actions button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 7px;
  padding: 0 10px;
  background: #e8f1f7;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.row-actions .material-icons { font-size: 15px; }
.row-actions .danger-action { background: #fee2e2; color: var(--danger); }
.service-pager {
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--muted);
  font-weight: 800;
}
.pagination-controls,
.pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pagination-pages {
  max-width: min(680px, 55vw);
  overflow-x: auto;
  padding-bottom: 2px;
}
.pagination-controls button {
  min-width: 36px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
}
.pagination-controls .material-icons { font-size: 18px; }
.pagination-controls .page-number {
  width: 36px;
  padding: 0;
}
.pagination-controls .page-number.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.pagination-controls button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

@media (max-width: 1200px) {
  .business-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid-main,
  .dashboard-grid-secondary { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .business-summary-grid { grid-template-columns: 1fr; }
  .chart-bars { overflow-x: auto; grid-template-columns: repeat(12, 38px); }
  .split-list-item { align-items: flex-start; flex-direction: column; }
  .event { grid-template-columns: 18px minmax(0, 1fr); }
  .event time { grid-column: 2; }
  .service-hero { align-items: stretch; flex-direction: column; }
  .service-toolbar,
  .service-pager { align-items: stretch; flex-direction: column; }
  .pagination-controls { align-items: stretch; flex-direction: column; }
  .pagination-pages { max-width: 100%; flex-wrap: wrap; overflow-x: visible; }
  .inline-search { min-width: 0; width: 100%; }
  .segmented-tabs { flex-wrap: wrap; }
}

/* UX redesign layer: clearer, calmer admin workspace */
:root,
[data-bs-theme=light] {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #1268b3;
  --brand-2: #0b4f8c;
  --accent: #0f9f8f;
  --danger: #d92d20;
  --warning: #dc8a00;
  --ok: #059669;
  --shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
  --sidebar-width: 286px;
  --sidebar-folded: 76px;
  --header-height: 74px;
}

body {
  background: var(--bg);
  line-height: 1.45;
}

.login-screen {
  background: radial-gradient(circle at 20% 16%, rgba(18, 104, 179, 0.32), transparent 34%), linear-gradient(135deg, #0b1726 0%, #123a5e 58%, #0f766e 100%);
}
.login-panel {
  border: 0;
  background: rgba(255, 255, 255, 0.98);
}

.sidebar.aside {
  background: #0b1726;
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.18);
}
.side-brand.aside-header {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
}
.main-logo {
  max-width: 174px;
  max-height: 46px;
}
.aside-body { padding: 16px 14px 22px; }
.user-profile {
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
}
.menu-search input {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}
.primary-nav {
  gap: 5px;
  padding-bottom: 16px;
  margin-bottom: 16px;
}
nav a,
.primary-nav a,
.legacy-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  border-radius: 8px;
}
.primary-nav a .material-icons {
  width: 22px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
}
.primary-nav a strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}
.nav-migration-badge {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}
.nav-migration-badge.ok {
  background: rgba(16, 185, 129, 0.16);
  color: #bbf7d0;
}
.nav-migration-badge.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}
nav a.active,
nav a:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.12);
}
nav a.active {
  box-shadow: inset 3px 0 0 var(--accent);
}
nav a.active .material-icons { color: #fff; }
.nav-group-title {
  margin: 14px 6px 6px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}
nav a.child {
  min-height: 34px;
  padding: 8px 10px 8px 18px;
  font-size: 12px;
}
nav a.child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace.main-area {
  padding: calc(var(--header-height) + 24px) 28px 30px;
}
.topbar.header {
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}
.page-heading p {
  margin-bottom: 3px;
  color: #7a8699;
  font-size: 11px;
  letter-spacing: 0;
}
.topbar h2 {
  font-size: 25px;
  letter-spacing: 0;
}
.top-actions { gap: 10px; }
.icon-button,
.search-command,
.header-user,
button.secondary {
  border-color: #d9dee8;
  background: #fff;
}
.icon-button:hover,
.search-command:hover,
button.secondary:hover {
  background: #f8fafc;
}
.search-command {
  min-width: 180px;
  justify-content: flex-start;
}
#logoutButton {
  min-height: 40px;
  padding-inline: 14px;
}

.status-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.status-strip > div,
.metric-card,
.panel,
.notice,
.legacy-group-card,
.business-summary,
.service-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.status-strip > div,
.metric-card {
  padding: 15px 16px;
}
.status-strip span,
.metric-card span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.status-strip strong,
.metric-card strong {
  margin-top: 5px;
  font-size: 22px;
  line-height: 1.15;
}
.metric-grid { gap: 16px; }
.view-root { gap: 18px; }
.content-grid { gap: 18px; }
.panel {
  min-height: 0;
  overflow: hidden;
}
.panel-heading {
  min-height: 58px;
  padding: 15px 18px;
  background: #fbfcfe;
}
.panel-heading h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}
.panel-heading span {
  color: #7a8699;
  font-weight: 700;
}
.table-wrap {
  border-top: 1px solid var(--line);
}
table {
  min-width: 720px;
}
th {
  padding: 12px 16px;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}
td {
  padding: 14px 16px;
  color: #263445;
}
tbody tr:hover {
  background: #f8fbff;
}
.badge {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 11px;
}
.list-item {
  padding: 14px 18px;
}

.business-summary-grid {
  gap: 16px;
}
.business-summary {
  min-height: 118px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.business-summary h2 { font-size: 26px; }
.dashboard-grid { gap: 18px; }
.dashboard-grid-main {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
}
.dashboard-grid-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-hero {
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.service-hero h3 { font-size: 23px; }
.service-hero p { color: #667085; }
.service-panel { border-color: var(--line); }
.service-heading { background: #fbfcfe; }
.service-toolbar {
  align-items: end;
  padding: 16px 18px;
  background: #fff;
}
.segmented-tabs {
  background: #f4f6f9;
}
.segmented-tabs button {
  padding-inline: 13px;
}
.inline-search {
  min-width: min(480px, 100%);
}
.service-table table { min-width: 1360px; }
.service-table th,
.service-table td { padding: 13px 16px; }
.service-name > span {
  max-width: 300px;
  white-space: normal;
}
.zone-chip-list span,
.zone-chip-list em {
  background: #eaf6f4;
  color: #087568;
}
.category-child-list span {
  gap: 4px;
  padding-right: 4px;
}
.mini-icon-action {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: #087568;
  cursor: pointer;
}
.mini-icon-action .material-icons {
  font-size: 14px;
}
.mini-icon-action.danger-action {
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
}
.row-actions { flex-wrap: wrap; }
.row-actions a,
.row-actions button {
  border: 1px solid transparent;
}
.row-actions a:hover { border-color: #b9d7f0; }

body.aside-folded .sidebar.aside { width: var(--sidebar-folded); }
body.aside-folded .side-brand.aside-header { justify-content: center; }
body.aside-folded .aside-toggle { width: 42px; }
body.aside-folded .primary-nav a { justify-content: center; padding-inline: 0; }
body.aside-folded .primary-nav a strong,
body.aside-folded .legacy-nav,
body.aside-folded .menu-search,
body.aside-folded .user-profile .media-body { display: none; }
body.aside-folded .primary-nav a .material-icons { width: auto; }
body.aside-folded nav a { font-size: initial; }

@media (max-width: 1240px) {
  .business-summary-grid,
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid-secondary { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .workspace.main-area { padding: calc(var(--header-height) + 18px) 16px 20px; }
  .topbar.header { padding: 0 16px; }
  .status-strip { grid-template-columns: 1fr; }
  .search-command { min-width: 0; }
}

@media (max-width: 700px) {
  .metric-grid,
  .business-summary-grid { grid-template-columns: 1fr; }
  .page-heading p { display: none; }
  .topbar h2 { font-size: 18px; }
  .service-toolbar { align-items: stretch; }
  .inline-search { flex-direction: column; align-items: stretch; }
  .inline-search button { justify-content: center; }
  .pagination-controls .pager-edge { width: 100%; }
}

/* Global action icon and numbered pagination polish */
button .material-icons,
.action-link .material-icons,
.dashboard-panel-heading a .material-icons {
  flex: 0 0 auto;
  font-size: 18px;
}
button:not(.icon-button),
.dashboard-panel-heading a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
#loginButton,
#logoutButton { gap: 7px; }
.dashboard-panel-heading a {
  min-height: 32px;
  border-radius: 7px;
  padding: 0 9px;
  background: #eef6fd;
}

/* Global shell stabilization: fixed sidebar + fixed header layout */
.dashboard-screen.legacy-shell {
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
}

.workspace.main-area {
  width: auto;
  max-width: none;
  margin-left: var(--sidebar-width);
}

.topbar.header {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-heading {
  min-width: 180px;
  flex: 1 1 auto;
}

.header-right,
.top-actions {
  min-width: 0;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-root,
.business-summary-grid,
.dashboard-grid,
.metric-grid,
.content-grid,
.panel,
.service-hero,
.service-panel,
.table-wrap {
  min-width: 0;
}

.business-summary-grid,
.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-grid-main,
.dashboard-grid-secondary,
.content-grid,
.content-grid.three-two {
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
}

.panel-heading,
.service-toolbar,
.service-pager,
.split-list-item,
.event {
  min-width: 0;
}

.panel-heading {
  flex-wrap: wrap;
}

.service-toolbar {
  flex-wrap: wrap;
}

.filter-block,
.inline-search {
  min-width: min(420px, 100%);
  flex: 1 1 320px;
}

.inline-search input {
  min-width: 0;
}

.pagination-controls {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pagination-pages {
  max-width: min(100%, 720px);
}

body.aside-folded .workspace.main-area {
  margin-left: var(--sidebar-folded);
}

@media (max-width: 980px) {
  .dashboard-screen.legacy-shell {
    overflow-x: hidden;
  }

  .workspace.main-area {
    width: 100%;
    margin-left: 0;
  }

  .topbar.header {
    left: 0;
  }
}

@media (max-width: 700px) {
  .topbar.header {
    min-height: auto;
    padding-block: 10px;
  }

  .page-heading {
    min-width: 0;
  }

  .top-actions {
    margin-left: auto;
  }

  .search-command {
    width: 40px;
    min-width: 40px;
    padding: 0;
    justify-content: center;
  }

  .search-command em,
  .search-command span:not(.material-icons) {
    display: none;
  }

  .panel-heading,
  .service-toolbar,
  .service-pager {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    justify-content: flex-start;
  }
}

/* AJAX command search for pages and settings */
.search-open {
  overflow: hidden;
}

.global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: start center;
  padding: 7vh 18px 24px;
  background: rgba(11, 23, 38, 0.54);
  backdrop-filter: blur(8px);
}

.global-search-dialog {
  width: min(820px, 100%);
  overflow: hidden;
  border: 1px solid rgba(228, 231, 236, 0.9);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.global-search-box {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--line);
}

.global-search-box > .material-icons {
  color: var(--brand);
  font-size: 24px;
}

.global-search-box input {
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
}

.global-search-box input:focus {
  outline: 0;
  border-color: transparent;
}

.global-search-meta {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.global-search-results {
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding: 8px;
}

.global-search-result {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.global-search-result:hover,
.global-search-result:focus {
  border-color: #b9d7f0;
  background: #f5faff;
  outline: 0;
}

.global-search-result > .material-icons {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef6fd;
  color: var(--brand);
  font-size: 20px;
}

.global-search-result strong,
.global-search-result em {
  display: block;
  min-width: 0;
}

.global-search-result strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.global-search-result em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result small,
.global-search-result b {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 900;
}

.global-search-result small {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2f7;
  color: #475569;
}

.global-search-result b {
  color: var(--brand);
}

.global-search-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.global-search-empty .material-icons {
  color: var(--brand);
  font-size: 32px;
}

.global-search-empty strong {
  color: var(--ink);
  font-size: 16px;
}

.global-search-empty em {
  max-width: 420px;
  font-style: normal;
  font-weight: 700;
}

@media (max-width: 700px) {
  .global-search-overlay {
    place-items: start stretch;
    padding: 12px;
  }

  .global-search-box {
    grid-template-columns: 22px minmax(0, 1fr) 38px;
    min-height: 58px;
    padding-inline: 12px;
  }

  .global-search-result {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .global-search-result small,
  .global-search-result b {
    display: none;
  }
}


/* Dashboard overview redesign */
.dashboard-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbfa 56%, #eef7f5 100%);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dashboard-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  background: #e7f5f1;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-hero h3 {
  margin: 12px 0 8px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

.dashboard-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-hero-stats {
  flex: 0 0 min(420px, 42%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-hero-stats span {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-hero-stats strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.dashboard-chart-panel,
.recent-transactions-panel,
.dashboard-grid-secondary .panel {
  overflow: hidden;
}

.dashboard-grid-secondary .panel {
  min-height: 330px;
}

@media (max-width: 980px) {
  .dashboard-hero { flex-direction: column; }
  .dashboard-hero-stats { flex-basis: auto; width: 100%; }
}

@media (max-width: 640px) {
  .dashboard-hero-stats { grid-template-columns: 1fr; }
}

/* Production branding visibility */
.logo,
.login-brand .brand-logo {
  background: #fff;
  border-radius: 8px;
}

.logo {
  min-width: 152px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.main-logo,
.brand-logo {
  display: block;
  width: auto;
  object-fit: contain;
}

.main-logo {
  max-width: 150px;
  max-height: 38px;
}

.login-brand .brand-logo {
  padding: 5px 8px;
}

body.aside-folded .logo {
  min-width: 0;
  width: 42px;
  padding: 0;
  background: transparent;
}

/* Modern visibility theme v2 */
:root,
[data-bs-theme=light] {
  --bg: #eef3f8;
  --panel: #ffffff;
  --ink: #101828;
  --muted: #475467;
  --line: #d7dee8;
  --brand: #0b72b9;
  --brand-2: #07548b;
  --accent: #10a37f;
  --danger: #c81e1e;
  --warning: #b76b00;
  --ok: #057a55;
  --shadow: 0 14px 38px rgba(16, 24, 40, 0.1);
  --soft-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  --sidebar-width: 292px;
  --sidebar-folded: 76px;
  --header-height: 76px;
}

[data-bs-theme=dark] {
  --bg: #0f1722;
  --panel: #171f2d;
  --ink: #f8fafc;
  --muted: #c4cedb;
  --line: #334155;
  --brand: #67b7ff;
  --brand-2: #8fc9ff;
  --accent: #34d399;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  --soft-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 100% 0%, rgba(11, 114, 185, 0.1), transparent 28rem),
    linear-gradient(180deg, #f7fafe 0, var(--bg) 18rem);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[data-bs-theme=dark] body {
  background:
    radial-gradient(circle at 100% 0%, rgba(103, 183, 255, 0.13), transparent 28rem),
    linear-gradient(180deg, #111c2c 0, var(--bg) 20rem);
}

button,
.action-link,
nav a,
.global-search-result,
.legacy-group-links a {
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(11, 114, 185, 0.22);
  outline-offset: 2px;
}

.login-screen {
  background:
    linear-gradient(135deg, rgba(6, 22, 38, 0.86), rgba(11, 114, 185, 0.74)),
    url("/public/assets/admin-module/img/customer-hero-preview.png") center/cover;
}

.login-panel {
  width: min(460px, 100%);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 90px rgba(5, 16, 31, 0.3);
}

.login-panel h1 {
  color: #0f172a;
  font-size: 31px;
}

.login-panel p,
.form-message {
  font-weight: 700;
}

label span {
  color: #263445;
}

input {
  height: 46px;
  border-color: #cbd5e1;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
}

input::placeholder {
  color: #98a2b3;
}

button,
.action-link {
  border-radius: 8px;
  box-shadow: none;
}

button:not(.secondary):not(.icon-button),
.action-link {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

button:not(.secondary):not(.icon-button):hover,
.action-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(11, 114, 185, 0.24);
}

.sidebar.aside {
  background: linear-gradient(180deg, #081421 0%, #0c1b2d 52%, #0a1727 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 40px rgba(2, 8, 23, 0.18);
}

.side-brand.aside-header {
  min-height: var(--header-height);
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.045);
}

.logo {
  min-width: 164px;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(2, 8, 23, 0.16);
}

.main-logo {
  max-width: 154px;
  max-height: 40px;
}

.aside-body {
  padding: 16px 14px 24px;
}

.user-profile {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.avatar,
.header-user span {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 8px 20px rgba(11, 114, 185, 0.22);
}

.menu-search input {
  height: 42px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menu-search input::placeholder {
  color: rgba(226, 232, 240, 0.76);
}

.nav-section {
  gap: 6px;
}

nav a,
.primary-nav a,
.legacy-nav a {
  border: 1px solid transparent;
  color: rgba(241, 245, 249, 0.78);
}

.primary-nav a {
  min-height: 44px;
  padding: 10px 12px;
}

nav a:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

nav a.active {
  border-color: rgba(52, 211, 153, 0.26);
  background: linear-gradient(90deg, rgba(16, 163, 127, 0.24), rgba(255, 255, 255, 0.08));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-group-title {
  color: rgba(226, 232, 240, 0.68);
}

.nav-group-title em {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.workspace.main-area {
  padding: calc(var(--header-height) + 26px) 30px 34px;
}

.topbar.header {
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(215, 222, 232, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

[data-bs-theme=dark] .topbar.header {
  background: rgba(23, 31, 45, 0.94);
}

.page-heading p {
  color: var(--brand);
  font-weight: 900;
}

.topbar h2 {
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}

.icon-button,
.search-command,
.header-user,
button.secondary {
  border-color: #cfd8e5;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}

[data-bs-theme=dark] .icon-button,
[data-bs-theme=dark] .search-command,
[data-bs-theme=dark] .header-user,
[data-bs-theme=dark] button.secondary {
  background: rgba(23, 31, 45, 0.95);
  border-color: var(--line);
}

.icon-button:hover,
.search-command:hover,
button.secondary:hover {
  border-color: rgba(11, 114, 185, 0.38);
  background: #f8fbff;
  color: var(--brand);
}

.search-command {
  min-width: 210px;
  height: 42px;
}

.search-command em {
  background: #eef4fb;
  color: #344054;
}

.header-user strong {
  color: var(--ink);
}

.status-strip {
  gap: 18px;
  margin-bottom: 20px;
}

.status-strip > div,
.metric-card,
.panel,
.notice,
.legacy-group-card,
.business-summary,
.service-hero,
.service-panel,
.global-search-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--soft-shadow);
}

[data-bs-theme=dark] .status-strip > div,
[data-bs-theme=dark] .metric-card,
[data-bs-theme=dark] .panel,
[data-bs-theme=dark] .notice,
[data-bs-theme=dark] .legacy-group-card,
[data-bs-theme=dark] .business-summary,
[data-bs-theme=dark] .service-hero,
[data-bs-theme=dark] .service-panel,
[data-bs-theme=dark] .global-search-dialog {
  background: var(--panel);
}

.status-strip > div,
.metric-card {
  padding: 17px 18px;
}

.status-strip span,
.metric-card span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

.status-strip strong,
.metric-card strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.panel-heading,
.service-heading,
th,
.group-block h4,
.legacy-group-heading {
  background: #f8fafc;
  border-color: var(--line);
}

.panel-heading h3,
.service-heading h3,
.group-block h4 {
  color: var(--ink);
  font-weight: 900;
}

.panel-heading span {
  color: var(--muted);
}

.list-item,
.common-list li,
th,
td,
.legacy-group-links a,
.detail-row {
  border-color: var(--line);
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-weight: 650;
}

tbody tr:hover,
.service-table tbody tr:hover,
.legacy-group-links a:hover {
  background: #f3f8fc;
}

[data-bs-theme=dark] tbody tr:hover,
[data-bs-theme=dark] .service-table tbody tr:hover,
[data-bs-theme=dark] .legacy-group-links a:hover {
  background: rgba(103, 183, 255, 0.08);
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 900;
}

.badge.ok { background: #047857; }
.badge.warn { background: #b76b00; }
.badge.blocked { background: #b42318; }

.dashboard-hero,
.service-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 58%, #eef8f5 100%);
  box-shadow: var(--soft-shadow);
}

[data-bs-theme=dark] .dashboard-hero,
[data-bs-theme=dark] .service-hero {
  background: linear-gradient(135deg, #172033 0%, #19283c 62%, #142f34 100%);
}

.dashboard-hero h3,
.service-hero h3 {
  font-size: 28px;
  font-weight: 900;
}

.dashboard-hero p,
.service-hero p {
  color: var(--muted);
  font-weight: 700;
}

.dashboard-hero-stats span,
.business-summary {
  border-color: #dbe4ef;
}

.dashboard-hero-stats strong,
.business-summary h2 {
  color: var(--ink);
  font-weight: 950;
}

.business-summary {
  min-height: 126px;
  background: #fff;
}

.business-summary::before {
  opacity: 0.16;
}

.chart-bars {
  border-bottom-color: var(--line);
}

.events .line {
  background: #d9e2ec;
}

.event .knob {
  box-shadow: 0 0 0 4px rgba(11, 114, 185, 0.1);
}

.media-row img,
.service-name img {
  border: 1px solid var(--line);
  background: #f8fafc;
}

.segmented-tabs {
  border-color: #cfd8e5;
  background: #edf2f7;
}

.segmented-tabs button {
  color: #344054;
  font-weight: 900;
}

.segmented-tabs button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 14px rgba(11, 114, 185, 0.2);
}

.inline-search input {
  border-color: #cbd5e1;
}

.row-actions a,
.row-actions button {
  border-color: #cddbea;
  background: #eef6fd;
  color: #17446b;
}

.row-actions a:hover,
.row-actions button:hover {
  border-color: rgba(11, 114, 185, 0.35);
  background: #dff0fc;
  color: var(--brand-2);
}

.row-actions .danger-action {
  border-color: #fecaca;
  background: #fff1f1;
  color: var(--danger);
}

.pagination-controls button {
  border: 1px solid #cfd8e5;
  background: #fff;
  color: var(--ink);
}

.pagination-controls button:hover:not(:disabled),
.pagination-controls .page-number.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.global-search-overlay {
  background: rgba(5, 16, 31, 0.62);
}

.global-search-dialog {
  box-shadow: 0 30px 90px rgba(2, 8, 23, 0.34);
}

.global-search-result:hover,
.global-search-result:focus {
  border-color: rgba(11, 114, 185, 0.28);
  background: #f1f8fd;
}

body.aside-folded .logo {
  border-color: transparent;
  box-shadow: none;
}

@media (max-width: 1240px) {
  .workspace.main-area {
    padding-inline: 22px;
  }
}

@media (max-width: 980px) {
  .workspace.main-area {
    padding: calc(var(--header-height) + 18px) 16px 22px;
  }

  .topbar.header {
    padding-inline: 14px;
  }

  .status-strip {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .status-strip > div {
    min-width: 160px;
  }
}

@media (max-width: 700px) {
  .login-panel {
    padding: 24px;
  }

  .topbar.header {
    gap: 8px;
  }

  .topbar h2 {
    font-size: 19px;
  }

  .workspace.main-area {
    padding-inline: 12px;
  }

  .dashboard-hero,
  .service-hero,
  .panel-heading,
  .service-toolbar,
  .service-pager {
    padding-inline: 14px;
  }

  .dashboard-hero h3,
  .service-hero h3 {
    font-size: 22px;
  }

  .status-strip {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .status-strip > div {
    min-width: 0;
  }
}

/* Global icon action controls */
.icon-action {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 !important;
  border-radius: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.icon-action .material-icons {
  flex: 0 0 auto;
  margin: 0;
  font-size: 20px;
  line-height: 1;
}

.icon-action .action-label,
.icon-action em.action-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

#loginButton.icon-action {
  width: 100%;
  max-width: none;
}

#loginButton.icon-action .material-icons {
  font-size: 24px;
}

#oldAdminButton.icon-action {
  border: 1px solid #d5dde7;
  background: #f8fafc;
  color: var(--brand-2);
  text-decoration: none;
}

#oldAdminButton.icon-action:hover {
  border-color: rgba(15, 118, 110, 0.3);
  background: #eef7f5;
  color: var(--brand);
}

.legacy-switch-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin: 12px 0 14px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.09), rgba(37, 99, 235, 0.07));
  color: var(--text);
  text-decoration: none;
}

.legacy-switch-action .material-icons {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.legacy-switch-action strong,
.legacy-switch-action small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legacy-switch-action small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.legacy-switch-action:hover {
  border-color: rgba(15, 118, 110, 0.34);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(37, 99, 235, 0.11));
  color: var(--brand);
}

.search-command.icon-action,
#logoutButton.icon-action,
#oldAdminButton.icon-action,
.service-primary-action.icon-action,
.dashboard-panel-heading a.icon-action,
.action-row .icon-action,
.row-actions .icon-action,
.inline-search .icon-action,
.pagination-controls .pager-edge.icon-action {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  min-height: 40px;
}

.dashboard-panel-heading a.icon-action,
.action-row .icon-action,
.row-actions .icon-action {
  border: 1px solid #cddbea;
  background: #eef6fd;
  color: var(--brand-2);
}

.dashboard-panel-heading a.icon-action:hover,
.action-row .icon-action:hover,
.row-actions .icon-action:hover {
  border-color: rgba(11, 114, 185, 0.36);
  background: #dff0fc;
  color: var(--brand-2);
  transform: translateY(-1px);
}

.row-actions .danger-action.icon-action {
  border-color: #fecaca;
  background: #fff1f1;
  color: var(--danger);
}

.row-actions .danger-action.icon-action:hover {
  background: #fee2e2;
}

.action-row {
  align-items: center;
}

.row-actions {
  gap: 7px;
}

.service-primary-action.icon-action {
  color: #fff;
}

.inline-search .icon-action {
  flex: 0 0 auto;
}

.pagination-controls .pager-edge.icon-action {
  padding: 0 !important;
}

.switch-button.icon-switch {
  width: 42px;
  min-width: 42px;
  height: 32px;
  min-height: 32px;
  justify-content: center;
  padding: 0;
  border: 1px solid #cfd8e5;
  background: #eef2f7;
  color: #667085;
}

.switch-button.icon-switch .material-icons {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  font-size: 28px;
  line-height: 1;
  transform: none;
}

.switch-button.icon-switch.active {
  border-color: rgba(5, 122, 85, 0.28);
  background: #e8f7f0;
  color: var(--ok);
}

.switch-button.icon-switch.active .material-icons {
  transform: none;
}

.global-search-result b.material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eef6fd;
  color: var(--brand);
  font-size: 18px;
  font-weight: normal;
}

button:not(.icon-action) .material-icons,
.action-link:not(.icon-action) .material-icons {
  margin-inline-end: 4px;
}

@media (max-width: 700px) {
  .search-command.icon-action,
  #logoutButton.icon-action,
  #oldAdminButton.icon-action,
  .service-primary-action.icon-action,
  .dashboard-panel-heading a.icon-action,
  .action-row .icon-action,
  .row-actions .icon-action,
  .inline-search .icon-action,
  .pagination-controls .pager-edge.icon-action {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
  }
}

/* Top bar anchored AJAX search */
.top-actions.header-right {
  position: relative;
}

.search-command.topbar-search-trigger {
  width: clamp(300px, 34vw, 560px);
  min-width: min(300px, 34vw);
  max-width: 560px;
  height: 44px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 13px !important;
  border: 1px solid #c7d2df;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
}

.search-command.topbar-search-trigger .material-icons {
  color: var(--brand);
  font-size: 21px;
}

.search-command.topbar-search-trigger .action-label {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: nowrap !important;
}

.search-command.topbar-search-trigger span.action-label {
  flex: 1 1 auto;
  color: #667085;
  font-weight: 850;
  text-align: left;
}

.search-command.topbar-search-trigger em.action-label {
  flex: 0 0 auto;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  padding: 2px 7px;
  background: #f3f7fb;
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.search-command.topbar-search-trigger:hover,
.search-command.topbar-search-trigger[aria-expanded="true"] {
  border-color: rgba(11, 114, 185, 0.46);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 4px rgba(11, 114, 185, 0.1);
}

.global-search-overlay.topbar-search-popover {
  position: absolute;
  inset: calc(100% + 10px) 0 auto auto;
  z-index: 1400;
  width: min(720px, calc(100vw - 34px));
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.global-search-overlay.topbar-search-popover.hidden {
  display: none !important;
}

.topbar-search-popover .global-search-dialog {
  width: 100%;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
}

.topbar-search-popover .global-search-box {
  min-height: 58px;
  padding: 8px 12px 8px 16px;
}

.topbar-search-popover .global-search-box input {
  height: 42px;
  font-size: 14px;
}

.topbar-search-popover .global-search-results {
  max-height: min(58vh, 520px);
}

/* Neutral top AJAX search */
.search-command.topbar-search-trigger {
  border-color: #d5dbe3;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.05);
}

.search-command.topbar-search-trigger .material-icons {
  color: #667085;
}

.search-command.topbar-search-trigger:hover,
.search-command.topbar-search-trigger[aria-expanded="true"] {
  border-color: #b8c2cc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(102, 112, 133, 0.1);
}

.topbar-search-popover .global-search-dialog {
  border-color: #d5dbe3;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.topbar-search-popover .global-search-box > .material-icons,
.topbar-search-popover .global-search-result > .material-icons,
.topbar-search-popover .global-search-result b.material-icons {
  background: #f2f4f7;
  color: #475467;
}

.topbar-search-popover .global-search-result:hover,
.topbar-search-popover .global-search-result:focus {
  border-color: #d0d5dd;
  background: #f8fafc;
}

.topbar-search-popover .global-search-result b {
  color: #475467;
}

[data-bs-theme=dark] .search-command.topbar-search-trigger:hover,
[data-bs-theme=dark] .search-command.topbar-search-trigger[aria-expanded="true"] {
  border-color: #475467;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

[data-bs-theme=dark] .search-command.topbar-search-trigger {
  border-color: var(--line);
  background: rgba(23, 31, 45, 0.98);
}

[data-bs-theme=dark] .search-command.topbar-search-trigger em.action-label {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

[data-bs-theme=dark] .topbar-search-popover .global-search-dialog {
  border-color: var(--line);
}

@media (max-width: 1180px) {
  .search-command.topbar-search-trigger {
    width: clamp(240px, 28vw, 420px);
    min-width: 240px;
  }
}

@media (max-width: 860px) {
  .search-command.topbar-search-trigger {
    flex: 1 1 100%;
    order: 10;
    width: 100%;
    min-width: 100%;
    max-width: none;
  }

  .global-search-overlay.topbar-search-popover {
    inset: calc(100% + 8px) 0 auto 0;
    width: 100%;
  }
}

@media (max-width: 700px) {
  .search-command.topbar-search-trigger {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    flex: 0 0 44px;
    order: 0;
    justify-content: center;
    padding: 0 !important;
  }

  .search-command.topbar-search-trigger .action-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
  }

  .global-search-overlay.topbar-search-popover {
    position: fixed;
    inset: var(--header-height) 12px auto 12px;
    width: auto;
  }
}

/* Catalog migration views */
.catalog-hero .material-icons {
  font-size: 20px;
}

.catalog-panel .service-table,
.catalog-panel .table-wrap {
  border-top: 0;
}

.catalog-panel table {
  min-width: 860px;
}

.catalog-panel .service-name span {
  max-width: 320px;
}

.catalog-toolbar-single {
  justify-content: flex-end;
}

.catalog-toolbar-single .inline-search {
  max-width: 520px;
}

.catalog-panel .row-actions {
  min-width: 92px;
}

/* Employee migration views */
.employee-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.employee-panel {
  min-height: 0;
}

.employee-panel .table-wrap {
  border-top: 0;
}

.employee-panel table {
  min-width: 760px;
}

.employee-toolbar {
  align-items: end;
}

.employee-hero .hero-action-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.employee-panel .service-name span {
  max-width: 240px;
}

@media (max-width: 1240px) {
  .employee-grid {
    grid-template-columns: 1fr;
  }
}

/* Promotion migration hub */
.promotion-hero .hero-action-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.promotion-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

.promotion-grid .wide-panel {
  grid-row: span 2;
}

.promotion-panel {
  min-height: 0;
}

.promotion-group-list,
.promotion-coverage-list {
  display: grid;
  gap: 12px;
}

.promotion-group-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 92%, var(--soft));
  overflow: hidden;
}

.promotion-group-title {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.promotion-group-title .material-icons {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 18px;
}

.promotion-group-title em {
  font-style: normal;
  color: var(--muted);
  font-weight: 700;
}

.promotion-links {
  display: grid;
}

.promotion-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.promotion-link:first-child {
  border-top: 0;
}

.promotion-link:hover {
  background: var(--soft);
}

.promotion-link > .material-icons {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #edf6ff;
  color: #0369a1;
  font-size: 18px;
}

.promotion-link strong,
.promotion-link small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promotion-link small {
  color: var(--muted);
  margin-top: 2px;
}

.promotion-config-list .detail-row strong {
  max-width: 52%;
  overflow-wrap: anywhere;
}

@media (max-width: 1240px) {
  .promotion-grid {
    grid-template-columns: 1fr;
  }

  .promotion-grid .wide-panel {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .promotion-link,
  .promotion-group-title {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .promotion-link .badge,
  .promotion-group-title em {
    grid-column: 2;
    justify-self: start;
  }
}

/* Promotion native list panels */
.promotion-live-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-promotion-panel .panel-heading h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-promotion-panel .panel-heading h3 .material-icons {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 18px;
}

.live-promotion-panel .table-wrap {
  border-top: 0;
}

.live-promotion-panel table {
  min-width: 780px;
}

.promotion-name img {
  object-fit: cover;
}

.promotion-name-text {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.live-promotion-panel .row-actions {
  justify-content: center;
}

@media (max-width: 1320px) {
  .promotion-live-grid {
    grid-template-columns: 1fr;
  }
}

/* Settings migration workspace */
.settings-hero .hero-action-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.settings-panel {
  min-height: 0;
}

.settings-panel.focused-panel {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.settings-panel .panel-heading h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-panel .panel-heading h3 .material-icons {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 18px;
}

.settings-detail-list .detail-row strong {
  max-width: 56%;
  overflow-wrap: anywhere;
}

.settings-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.settings-menu-item:hover {
  background: var(--soft);
}

.settings-menu-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eef7f1;
  color: #15803d;
  font-size: 18px;
}

.settings-menu-item strong,
.settings-menu-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-menu-item small {
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 1320px) {
  .settings-grid,
  .settings-menu-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .settings-menu-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .settings-menu-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* Provider management workspace */
.provider-hero .hero-action-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-action-icon {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0 !important;
}

.provider-action-icon .action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.provider-panel .row-actions,
.provider-row-actions {
  justify-content: center;
  gap: 6px;
}

.provider-panel .row-actions a,
.provider-panel .row-actions button {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0 !important;
}

.provider-panel .row-actions .material-icons,
.provider-hero .provider-action-icon .material-icons {
  font-size: 19px;
}

.provider-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.provider-grid .wide-panel {
  grid-row: span 2;
}

.provider-panel {
  min-height: 0;
}

.provider-panel .table-wrap {
  border-top: 0;
}

.provider-panel table {
  min-width: 760px;
}

.provider-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.provider-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.provider-menu-item:hover {
  background: var(--soft);
}

.provider-menu-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 18px;
}

.provider-menu-item strong,
.provider-menu-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-menu-item small {
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 1240px) {
  .provider-grid,
  .provider-menu-list {
    grid-template-columns: 1fr;
  }

  .provider-grid .wide-panel {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .provider-menu-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .provider-menu-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* Customer wallet workspace */
.customer-hero .hero-action-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.customer-grid .wide-panel {
  grid-row: span 2;
}

.customer-panel {
  min-height: 0;
}

.customer-panel .table-wrap {
  border-top: 0;
}

.customer-panel table {
  min-width: 780px;
}

.customer-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.customer-menu-item:hover {
  background: var(--soft);
}

.customer-menu-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 18px;
}

.customer-menu-item strong,
.customer-menu-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-menu-item small {
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 1240px) {
  .customer-grid,
  .customer-menu-list {
    grid-template-columns: 1fr;
  }

  .customer-grid .wide-panel {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .customer-menu-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .customer-menu-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* Booking operations workspace */
.booking-hero .hero-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.booking-metrics {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.booking-board {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.booking-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}

.booking-panel.priority-panel {
  grid-row: span 2;
}

.booking-panel .panel-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.booking-panel .panel-heading h3 {
  font-size: 16px;
  line-height: 1.25;
}

.booking-panel .panel-heading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.booking-panel .table-wrap {
  border-top: 0;
}

.booking-panel table {
  min-width: 960px;
}

.booking-panel td strong,
.booking-panel td small {
  display: block;
  min-width: 0;
}

.booking-panel td small {
  color: var(--muted);
  margin-top: 3px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.booking-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.booking-menu-item:hover {
  background: var(--soft);
}

.booking-menu-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 18px;
}

.booking-menu-item strong,
.booking-menu-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-menu-item small {
  color: var(--muted);
  margin-top: 2px;
}

.booking-status-panel {
  margin-top: 16px;
}

.booking-status-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.booking-status-groups .group-block:first-child {
  grid-column: 1 / -1;
}

@media (max-width: 1240px) {
  .booking-metrics,
  .booking-board,
  .booking-status-groups,
  .booking-menu-list {
    grid-template-columns: 1fr;
  }

  .booking-panel.priority-panel,
  .booking-status-groups .group-block:first-child {
    grid-row: auto;
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .booking-hero .hero-action-cluster {
    justify-content: stretch;
  }

  .booking-hero .icon-action {
    flex: 1 1 120px;
  }

  .booking-menu-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .booking-menu-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* Finance and support operations workspace */
.operations-hero .hero-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.operations-metrics {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.operations-board {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.operations-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}

.operations-panel.wide-panel {
  grid-row: span 2;
}

.operations-panel .panel-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.operations-panel .panel-heading h3 {
  font-size: 16px;
  line-height: 1.25;
}

.operations-panel .panel-heading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.operations-panel .table-wrap {
  border-top: 0;
}

.operations-panel table {
  min-width: 900px;
}

.operations-panel td strong,
.operations-panel td small {
  display: block;
  min-width: 0;
}

.operations-panel td small {
  color: var(--muted);
  margin-top: 3px;
}

.operation-split-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.operation-split-list .group-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.operation-split-list .group-block h4 {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.operations-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.operations-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.operations-menu-item:hover {
  background: var(--soft);
}

.operations-menu-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 18px;
}

.operations-menu-item strong,
.operations-menu-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-menu-item small {
  color: var(--muted);
  margin-top: 2px;
}

.operations-channel-list {
  padding: 14px;
}

@media (max-width: 1240px) {
  .operations-metrics,
  .operations-board,
  .operations-menu-list {
    grid-template-columns: 1fr;
  }

  .operations-panel.wide-panel {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .operations-hero .hero-action-cluster {
    justify-content: stretch;
  }

  .operations-hero .icon-action {
    flex: 1 1 120px;
  }

  .operations-menu-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .operations-menu-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* Reports and analytics workspace */
.analytics-hero .hero-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.analytics-metrics {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.analytics-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.analytics-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}

.analytics-panel.wide-panel {
  grid-row: span 3;
}

.analytics-panel .panel-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.analytics-panel .panel-heading h3 {
  font-size: 16px;
  line-height: 1.25;
}

.analytics-panel .panel-heading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.analytics-menu-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.analytics-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.analytics-menu-item:hover {
  background: var(--soft);
}

.analytics-menu-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 18px;
}

.analytics-menu-item strong,
.analytics-menu-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-menu-item small {
  color: var(--muted);
  margin-top: 2px;
}

.analytics-bar-list,
.analytics-compact-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.analytics-bar-row span,
.analytics-bar-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-bar-row span {
  color: var(--muted);
}

.analytics-bar-row strong {
  text-align: right;
  color: var(--text);
}

.analytics-bar-row div {
  height: 10px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}

.analytics-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #16a34a);
}

@media (max-width: 1240px) {
  .analytics-metrics,
  .analytics-board {
    grid-template-columns: 1fr;
  }

  .analytics-panel.wide-panel {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .analytics-hero .hero-action-cluster {
    justify-content: stretch;
  }

  .analytics-hero .icon-action {
    flex: 1 1 120px;
  }

  .analytics-menu-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .analytics-menu-item .badge {
    grid-column: 2;
    justify-self: start;
  }

  .analytics-bar-row {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .analytics-bar-row strong {
    grid-column: 2;
    text-align: left;
  }
}

/* Content and system workspace */
.content-system-hero .hero-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.content-system-metrics {
  grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.content-system-board {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.content-system-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}

.content-system-panel.wide-panel {
  grid-row: span 2;
}

.content-system-panel .panel-heading {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-strong);
}

.content-system-panel .panel-heading h3 {
  font-size: 16px;
  line-height: 1.25;
}

.content-system-panel .panel-heading span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.content-system-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.content-system-menu-list.single-column {
  grid-template-columns: 1fr;
}

.content-system-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.content-system-menu-item:hover {
  background: var(--soft);
}

.content-system-menu-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 18px;
}

.content-system-menu-item strong,
.content-system-menu-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-system-menu-item small {
  color: var(--muted);
  margin-top: 2px;
}

.content-system-snapshot {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.snapshot-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.snapshot-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
  font-size: 14px;
}

@media (max-width: 1240px) {
  .content-system-metrics,
  .content-system-board,
  .content-system-menu-list {
    grid-template-columns: 1fr;
  }

  .content-system-panel.wide-panel {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .content-system-hero .hero-action-cluster {
    justify-content: stretch;
  }

  .content-system-hero .icon-action {
    flex: 1 1 120px;
  }

  .content-system-menu-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .content-system-menu-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* Service governance workspace */
.service-governance-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.service-governance-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}

.service-governance-panel.wide-panel {
  grid-column: span 2;
}

.service-governance-panel.wide-panel .table-wrap {
  border-top: 0;
}

.service-governance-panel.wide-panel table {
  min-width: 760px;
}

.service-governance-list,
.service-action-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.service-action-list {
  grid-template-columns: 1fr;
}

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

.coupon-selector-grid label {
  display: grid;
  gap: 6px;
}

.coupon-selector-grid select {
  min-height: 132px;
}

.coupon-crud-form select[multiple] option {
  padding: 6px 8px;
}

.service-request-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.service-request-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.service-request-item > img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--soft);
}

.service-request-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.service-request-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.service-request-title strong,
.service-request-body small,
.service-request-body p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.service-request-body p {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.service-request-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.service-request-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.service-request-meta .material-icons {
  font-size: 15px;
}

.service-request-feedback {
  color: var(--text);
}

.service-request-actions {
  justify-content: flex-end;
}

.service-governance-item,
.service-action-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.service-governance-item:hover {
  background: var(--soft);
}

.service-governance-item > .material-icons,
.service-action-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 18px;
}

.service-governance-item strong,
.service-governance-item small,
.service-action-item strong,
.service-action-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-governance-item small,
.service-action-item small {
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 1240px) {
  .service-governance-board,
  .service-governance-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .coupon-selector-grid {
    grid-template-columns: 1fr;
  }

  .service-governance-item,
  .service-action-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .service-governance-item .badge,
  .service-action-item .badge {
    grid-column: 2;
    justify-self: start;
  }

  .service-request-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .service-request-item > img {
    width: 48px;
    height: 48px;
  }

  .service-request-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* Promotion native workspace */
.promotion-native-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.promotion-native-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: var(--panel);
}

.promotion-native-item:hover {
  background: var(--soft);
}

.promotion-native-item > .material-icons {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 18px;
}

.promotion-native-item strong,
.promotion-native-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promotion-native-item small {
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 720px) {
  .promotion-native-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .promotion-native-item .badge {
    grid-column: 2;
    justify-self: start;
  }
}
/* Clean topbar AJAX search: neutral, no blue treatment */
.search-command.topbar-search-trigger,
.search-command.topbar-search-trigger:hover,
.search-command.topbar-search-trigger:focus,
.search-command.topbar-search-trigger[aria-expanded="true"] {
  border-color: #d0d5dd !important;
  background: #ffffff !important;
  color: #344054 !important;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06) !important;
}

.search-command.topbar-search-trigger:focus-visible {
  outline: 2px solid #d0d5dd;
  outline-offset: 2px;
}

.search-command.topbar-search-trigger .material-icons,
.search-command.topbar-search-trigger span.action-label,
.search-command.topbar-search-trigger em.action-label {
  color: #475467 !important;
}

.search-command.topbar-search-trigger em.action-label {
  border-color: #d0d5dd !important;
  background: #f8fafc !important;
}

.topbar-search-popover .global-search-dialog {
  border-color: #d0d5dd !important;
  background: #ffffff !important;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16) !important;
}

.topbar-search-popover .global-search-box,
.topbar-search-popover .global-search-meta {
  border-color: #eaecf0 !important;
  background: #ffffff !important;
}

.topbar-search-popover .global-search-box > .material-icons,
.topbar-search-popover .global-search-result > .material-icons,
.topbar-search-popover .global-search-result b,
.topbar-search-popover .global-search-result b.material-icons,
.topbar-search-popover .global-search-empty .material-icons {
  background: #f2f4f7 !important;
  color: #475467 !important;
}

.topbar-search-popover .global-search-result,
.topbar-search-popover .global-search-result:hover,
.topbar-search-popover .global-search-result:focus {
  border-color: transparent !important;
  background: transparent !important;
  color: #344054 !important;
  box-shadow: none !important;
}

.topbar-search-popover .global-search-result:hover,
.topbar-search-popover .global-search-result:focus {
  border-color: #eaecf0 !important;
  background: #f9fafb !important;
}

.topbar-search-popover .global-search-result small {
  background: #f2f4f7 !important;
  color: #475467 !important;
}

[data-bs-theme=dark] .search-command.topbar-search-trigger,
[data-bs-theme=dark] .search-command.topbar-search-trigger:hover,
[data-bs-theme=dark] .search-command.topbar-search-trigger:focus,
[data-bs-theme=dark] .search-command.topbar-search-trigger[aria-expanded="true"] {
  border-color: #475467 !important;
  background: #111827 !important;
  color: #e5e7eb !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28) !important;
}

[data-bs-theme=dark] .topbar-search-popover .global-search-dialog,
[data-bs-theme=dark] .topbar-search-popover .global-search-box,
[data-bs-theme=dark] .topbar-search-popover .global-search-meta {
  border-color: #344054 !important;
  background: #111827 !important;
}

[data-bs-theme=dark] .topbar-search-popover .global-search-box > .material-icons,
[data-bs-theme=dark] .topbar-search-popover .global-search-result > .material-icons,
[data-bs-theme=dark] .topbar-search-popover .global-search-result b,
[data-bs-theme=dark] .topbar-search-popover .global-search-result b.material-icons,
[data-bs-theme=dark] .topbar-search-popover .global-search-empty .material-icons {
  background: #1f2937 !important;
  color: #d1d5db !important;
}

[data-bs-theme=dark] .topbar-search-popover .global-search-result:hover,
[data-bs-theme=dark] .topbar-search-popover .global-search-result:focus {
  border-color: #344054 !important;
  background: #182230 !important;
}
/* Native admin modal forms */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.44);
}

.admin-modal-overlay.hidden {
  display: none !important;
}

.admin-modal {
  width: min(880px, 100%);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.admin-modal-header,
.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.admin-modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.admin-modal-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-modal-body {
  overflow-y: auto;
  padding: 16px;
}

.service-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.service-crud-form {
  width: min(1120px, calc(100vw - 32px));
}

.service-form-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 90%, var(--bg));
}

.service-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.service-section-heading .material-icons {
  color: var(--brand);
  font-size: 19px;
}

.service-section-heading .compact-action {
  margin-left: auto;
}

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

.service-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.service-form-grid input,
.service-form-grid select,
.service-form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.service-form-grid textarea {
  resize: vertical;
}

.service-image-input {
  align-content: start;
}

.service-current-images {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr);
  gap: 12px;
}

.service-current-images figure {
  display: grid;
  gap: 7px;
  margin: 0;
}

.service-current-images img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.service-current-images figcaption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.service-image-input img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.service-image-input small {
  color: var(--muted);
  font-weight: 800;
}

.variation-editor {
  display: grid;
  gap: 12px;
}

.variation-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.variation-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: end;
}

.variation-zone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.service-form-grid .full-span {
  grid-column: 1 / -1;
}

.link-button.service-name {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

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

@media (max-width: 720px) {
  .admin-modal-overlay {
    padding: 12px;
  }

  .service-form-grid {
    grid-template-columns: 1fr;
  }

  .service-form-columns,
  .service-image-grid,
  .service-current-images,
  .service-filter-grid,
  .variation-row-main,
  .variation-zone-grid {
    grid-template-columns: 1fr;
  }
}
