:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --text: #15211d;
  --muted: #66746e;
  --line: #dbe3df;
  --brand: #0f766e;
  --brand-2: #155e75;
  --ink: #102a2a;
  --gold: #a16207;
  --danger: #b42318;
  --warning: #b54708;
  --shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  --soft-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.admin-page {
  background: #f3f5f4;
}

.admin-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: linear-gradient(180deg, #102a2a 0, #123330 58%, #0f2424 100%);
  color: #fff;
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.12);
}

.admin-brand {
  display: grid;
  gap: 5px;
  padding: 10px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-brand strong {
  font-size: 20px;
  line-height: 1.1;
}

.admin-brand span,
.admin-sidebar-note {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.6;
}

.admin-menu {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.admin-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  border-radius: 6px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.admin-menu a.active,
.admin-menu a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 #5eead4;
}

.admin-brand-logo {
  grid-template-columns: 34px 1fr;
  align-items: center;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff6b9d, #8b5cf6);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.admin-menu-grouped {
  align-content: start;
}

.admin-menu-label {
  margin: 10px 10px 2px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.admin-sidebar-note {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-workspace {
  min-width: 0;
  padding: 0 24px 36px;
}

.admin-topbar,
.admin-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-topbar {
  min-height: 82px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 244, 0.94);
  backdrop-filter: blur(10px);
}

.admin-userbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-page-title {
  margin: 16px 0 12px;
  padding: 12px 0;
}

.admin-content {
  display: grid;
  gap: 12px;
}

.admin-page .panel {
  border-color: #d8dfdc;
  box-shadow: var(--soft-shadow);
}

.admin-page .panel-header {
  min-height: 42px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1ef;
}

.admin-page .sync-panel {
  margin-top: 0;
}

.admin-page table {
  min-width: 760px;
}

.admin-page th {
  background: #f7faf9;
  color: #53635d;
}

.admin-page th,
.admin-page td {
  padding: 11px 10px;
}

.admin-page tbody tr:hover {
  background: #f8fbfa;
}

.admin-filterbar {
  grid-template-columns: minmax(0, 180px) minmax(0, 220px) minmax(0, 160px) 1fr;
  margin-top: 0;
  box-shadow: var(--soft-shadow);
}

.wide-table {
  min-width: 940px;
}

.admin-console-page {
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --admin-bg: #f5f7fb;
  --admin-sidebar: #0b1b2d;
  --admin-sidebar-2: #10253d;
  background: var(--admin-bg);
}

.admin-console-page .admin-shell {
  grid-template-columns: 218px minmax(0, 1fr);
}

.admin-console-page .admin-sidebar {
  padding: 18px 10px 14px;
  background:
    linear-gradient(180deg, rgba(45, 93, 155, 0.18), transparent 260px),
    linear-gradient(180deg, var(--admin-sidebar) 0, var(--admin-sidebar-2) 58%, #071421 100%);
  box-shadow: 10px 0 28px rgba(15, 23, 42, 0.16);
}

.admin-console-page .admin-brand {
  grid-template-columns: 36px 1fr;
  gap: 10px;
  min-height: 54px;
  padding: 0 8px 15px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.admin-console-page .admin-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0;
}

.admin-console-page .admin-brand span:not(.brand-mark) {
  font-size: 12px;
}

.admin-console-page .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff5d8f, #3b82f6);
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.26);
}

.admin-console-page .admin-menu {
  gap: 4px;
  margin-top: 12px;
}

.admin-console-page .admin-menu a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 39px;
  border-radius: 6px;
  padding: 0 9px;
  color: rgba(230, 237, 246, 0.78);
  font-weight: 600;
}

.admin-console-page .admin-menu a.active,
.admin-console-page .admin-menu a:hover {
  background: linear-gradient(135deg, #3165f4, #4f7dff);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
}

.admin-console-page .admin-menu-label {
  margin: 14px 8px 4px;
  color: rgba(226, 232, 240, 0.44);
  font-size: 12px;
}

.menu-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.menu-arrow {
  color: rgba(255, 255, 255, 0.55);
  font-size: 18px;
  line-height: 1;
}

.admin-console-page .admin-sidebar-note {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-top: auto;
  padding: 10px 8px 0;
  color: rgba(226, 232, 240, 0.7);
  font-size: 13px;
}

.admin-console-page .admin-workspace {
  padding: 0 22px 32px;
}

.admin-dashboard-topbar {
  min-height: 64px;
  align-items: stretch;
  gap: 14px;
  margin: 0 -22px;
  padding: 0 22px;
  border-bottom: 1px solid #e4e9f2;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.admin-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.menu-toggle {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 22px;
}

.admin-module-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

.admin-module-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.admin-module-tabs a.active {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.dashboard-userbar {
  align-items: center;
  flex-wrap: nowrap;
}

.topbar-icon,
.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-badge {
  position: relative;
  color: #334155;
}

.dashboard-filterbar {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 170px) minmax(0, 170px) auto;
  gap: 12px;
  align-items: end;
  margin: 14px 0 16px;
  padding: 0;
  justify-content: end;
}

.dashboard-filterbar label {
  gap: 5px;
}

.dashboard-filterbar input,
.dashboard-filterbar select {
  min-height: 38px;
  border-color: #dbe3ef;
  border-radius: 8px;
}

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

.dashboard-kpi-card,
.dashboard-panel {
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.dashboard-kpi-card {
  min-height: 116px;
  padding: 18px 18px 14px 92px;
  position: relative;
  overflow: hidden;
}

.dashboard-kpi-card::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 24px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  opacity: 0.14;
  background: currentColor;
}

.kpi-icon {
  position: absolute;
  left: 20px;
  top: 24px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: color-mix(in srgb, currentColor 12%, #fff);
  color: currentColor;
  font-style: normal;
  font-size: 19px;
  font-weight: 900;
}

.dashboard-kpi-card span,
.dashboard-kpi-card small {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.dashboard-kpi-card strong {
  display: block;
  margin: 9px 0 8px;
  color: #0f172a;
  font-size: 29px;
  line-height: 1.08;
}

.dashboard-kpi-card.blue { color: #2563eb; }
.dashboard-kpi-card.green { color: #10b981; }
.dashboard-kpi-card.orange { color: #f97316; }
.dashboard-kpi-card.purple { color: #8b5cf6; }
.dashboard-kpi-card.cyan { color: #0ea5e9; }
.dashboard-kpi-card.red { color: #dc2626; }
.dashboard-kpi-card.amber { color: #d97706; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 1.3fr 1.1fr;
  gap: 14px;
  margin-top: 14px;
}

.dashboard-panel {
  min-height: 218px;
  padding: 16px 16px 14px;
}

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

.dashboard-panel-header h2 {
  font-size: 17px;
  color: #0f172a;
}

.dashboard-panel-header small {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.dashboard-panel-header a {
  color: #64748b;
  font-size: 12px;
  text-decoration: none;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  color: #334155;
  font-size: 14px;
}

.employee-row {
  grid-template-columns: 28px 30px minmax(0, 1fr) auto;
}

.ranking-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row b {
  color: #0f172a;
  font-size: 13px;
}

.rank,
.avatar-dot {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.rank-1 { background: #f59e0b; color: #fff; }
.rank-2 { background: #94a3b8; color: #fff; }
.rank-3 { background: #fb923c; color: #fff; }

.avatar-dot {
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
}

.chart-panel {
  grid-column: span 1;
}

.line-chart-mock {
  display: flex;
  align-items: end;
  gap: 18px;
  height: 164px;
  padding: 18px 20px 4px;
  border-radius: 8px;
  background:
    repeating-linear-gradient(to top, #e9eef7 0 1px, transparent 1px 38px),
    linear-gradient(180deg, #fff, #f8fbff);
}

.line-chart-mock span {
  flex: 1;
  min-width: 12px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #2563eb, #10b981);
}

.forecast-ring,
.finance-donut {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 8px auto 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 55%, transparent 56%),
    conic-gradient(#2563eb 0 72%, #e6edf7 72% 100%);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.04);
}

.forecast-ring strong,
.finance-donut strong {
  color: #0f172a;
  font-size: 28px;
}

.forecast-ring span,
.finance-donut span {
  color: #64748b;
  font-size: 12px;
}

.forecast-meta,
.finance-list,
.todo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

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

.finance-list b,
.todo-grid b,
.forecast-meta b {
  color: #0f172a;
}

.dashboard-mini-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.dashboard-mini-table th,
.dashboard-mini-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
}

.admin-console-page .admin-page-title {
  min-height: 74px;
  margin: 16px 0 14px;
  padding: 16px 18px;
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.admin-console-page .admin-page-title h2 {
  color: #0f172a;
  font-size: 19px;
}

.admin-console-page .admin-content {
  gap: 14px;
}

.admin-console-page .panel,
.admin-console-page .toolbar {
  border-color: #e4eaf3;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.admin-console-page .panel-header {
  min-height: 42px;
  border-bottom: 1px solid #edf2f7;
}

.admin-console-page th {
  background: #f8fafc;
  color: #64748b;
}

.admin-console-page td {
  color: #263445;
}

.admin-console-page .admin-filterbar {
  grid-template-columns: minmax(0, 180px) minmax(0, 220px) minmax(0, 160px) 1fr;
  margin: 0 0 14px;
  padding: 14px;
}

.admin-console-page .settings-row,
.admin-console-page .sync-item {
  border-color: #e4eaf3;
  background: #fff;
}

.admin-console-page .scope-switch {
  border-color: #e4eaf3;
  background: #f8fafc;
}

.admin-console-page .scope-option.active {
  color: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.account-admin-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.85fr);
}

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

.role-checks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.role-checks legend {
  padding: 0 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.role-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.role-checks input {
  width: auto;
  min-height: auto;
}

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

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

.todo-grid span {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.warning-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #475569;
  font-size: 13px;
}

.warning-list li {
  padding-bottom: 9px;
  border-bottom: 1px solid #edf2f7;
}

.empty-list {
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

@media (max-width: 1280px) {
  .admin-dashboard-page .admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-module-tabs a {
    padding: 0 12px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 1180px) {
  .admin-dashboard-topbar {
    display: grid;
    align-items: stretch;
    padding: 12px 0;
  }

  .admin-module-tabs {
    order: 3;
  }

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

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

.topbar,
.toolbar,
.panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.boss-page {
  background:
    linear-gradient(180deg, #e8f0ed 0, rgba(232, 240, 237, 0) 260px),
    var(--bg);
}

.boss-shell {
  width: min(1240px, calc(100% - 28px));
}

.boss-topbar {
  align-items: stretch;
  border-color: #b9d2ca;
  background: linear-gradient(135deg, var(--ink), #134e4a);
  color: #fff;
  box-shadow: 0 18px 40px rgba(16, 42, 42, 0.18);
}

.boss-topbar .eyebrow,
.boss-topbar .header-subtitle {
  color: rgba(255, 255, 255, 0.72);
}

.header-subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.header-status {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.boss-topbar .status-pill {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

.role-pill {
  font-weight: 700;
}

.page-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.page-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.page-tabs a.active {
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.dot-muted {
  background: #94a3b8;
}

.dot-danger {
  background: var(--danger);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 190px)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
}

.boss-toolbar {
  grid-template-columns: minmax(0, 210px) minmax(0, 210px) 1fr;
  border-color: #cfe0da;
  box-shadow: var(--soft-shadow);
}

.employee-toolbar {
  grid-template-columns: minmax(0, 190px) repeat(2, minmax(0, 170px)) auto;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--text);
  background: #fff;
}

.admin-page input,
.admin-page select {
  min-height: 38px;
  border-color: #d7dfdb;
  background: #fcfdfd;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

button {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 0 14px;
  cursor: pointer;
}

.primary-button {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  background: #0b625c;
}

.ghost-button {
  background: #fff;
  color: var(--text);
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ghost-button:hover {
  border-color: #bdcbc6;
  background: #f8fbfa;
}

.danger-action {
  color: var(--danger);
}

.compact {
  min-height: 34px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metric-card {
  min-height: 132px;
  padding: 15px;
}

.boss-metric-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.boss-metric-grid .metric-card {
  grid-column: span 2;
  border-color: #d8e4df;
  box-shadow: var(--soft-shadow);
}

.boss-metric-grid .primary-metric {
  grid-column: span 4;
  background: linear-gradient(180deg, #fff 0, #edf7f4 100%);
  border-color: #a7d4c9;
}

.boss-metric-grid .primary-metric strong {
  font-size: 34px;
}

.profit-metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.profit-metric-grid .metric-card {
  border-color: #d8e4df;
  box-shadow: var(--soft-shadow);
}

.profit-metric-grid .primary-metric {
  background: linear-gradient(180deg, #fff 0, #f4f7ed 100%);
  border-color: #d8c991;
}

.profit-metric-grid .primary-metric strong {
  color: var(--gold);
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin: 16px 0 10px;
  color: var(--brand-2);
  font-size: 26px;
  line-height: 1.05;
  word-break: break-word;
}

.metric-card.danger strong {
  color: var(--danger);
}

.metric-card.accent strong {
  color: var(--brand);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.boss-content-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
}

.boss-content-grid .panel,
.sync-panel {
  box-shadow: var(--soft-shadow);
}

.content-grid > * {
  min-width: 0;
}

.panel {
  padding: 16px;
  min-width: 0;
}

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

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

td {
  font-size: 14px;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
}

.sync-panel {
  margin-top: 14px;
}

.employee-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.employee-content {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
}

.progress-wrap {
  display: grid;
  gap: 12px;
}

.progress-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.progress-line strong {
  color: var(--text);
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 180ms ease;
}

.muted-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.single-number strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-2);
  font-size: 34px;
}

.single-number span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.settings-grid {
  display: grid;
  gap: 10px;
}

.list-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 10px;
}

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

.reimbursement-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wide-field {
  grid-column: span 2;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.checkbox-line input {
  width: auto;
  min-height: auto;
}

.settings-intro {
  display: grid;
  gap: 14px;
}

.settings-header {
  margin-bottom: 0;
}

.settings-scope {
  display: grid;
  grid-template-columns: minmax(0, 340px) auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.scope-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.scope-option {
  min-height: 42px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.scope-option.active {
  border-color: #fff;
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

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

.admin-console-page .notification-filterbar {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.admin-console-page .notification-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 12px;
}

.notification-table {
  min-width: 1240px;
}

.notification-severity-high {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.notification-severity-medium {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.notification-severity-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.panel-note {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.settings-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.admin-page .settings-row {
  background: #fff;
  border-color: #e0e7e3;
}

.settings-row-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-row-title strong {
  font-size: 14px;
}

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

.sync-item {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
}

.sync-item strong,
.sync-item span {
  display: block;
}

.sync-item strong {
  margin-bottom: 8px;
  font-size: 14px;
}

.sync-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 28px));
  border-radius: 8px;
  padding: 12px 14px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.toast.show {
  opacity: 1;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(37, 99, 235, 0.08)),
    #f5f7fb;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid #e4eaf3;
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

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

.login-brand .brand-mark {
  flex: 0 0 auto;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form button {
  margin-top: 4px;
}

@media (max-width: 980px) {
  .metric-grid,
  .sync-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boss-metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .profit-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .boss-metric-grid .metric-card {
    grid-column: span 2;
  }

  .boss-metric-grid .primary-metric {
    grid-column: span 3;
  }

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

  .boss-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

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

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

  .admin-workspace {
    padding: 12px 10px 28px;
  }

  .admin-topbar,
  .admin-page-title {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-userbar {
    justify-content: stretch;
  }

  .app-shell {
    width: min(100% - 20px, 520px);
    padding-top: 10px;
  }

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

  .topbar {
    display: grid;
  }

  h1 {
    font-size: 23px;
  }

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

  .employee-toolbar {
    grid-template-columns: 1fr;
  }

  .page-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-tabs a {
    justify-content: center;
    min-height: 36px;
    padding: 0 8px;
    text-align: center;
    white-space: normal;
  }

  .employee-profile {
    display: grid;
  }

  .section-heading {
    display: grid;
  }

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

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

  .reimbursement-form,
  .admin-filterbar {
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: span 1;
  }

  .settings-scope {
    grid-template-columns: 1fr;
  }

  .scope-switch {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .settings-row-title,
  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-actions button,
  .settings-row-title button {
    width: 100%;
  }

  .toolbar-actions {
    justify-content: stretch;
  }

  .toolbar-actions button {
    flex: 1;
  }

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

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

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

  .boss-metric-grid .metric-card,
  .boss-metric-grid .primary-metric {
    grid-column: span 1;
  }

  .metric-card {
    min-height: 118px;
  }

  .metric-card strong {
    font-size: 22px;
  }
}

@media (max-width: 420px) {
  .metric-grid,
  .sync-grid,
  .boss-metric-grid,
  .profit-metric-grid {
    grid-template-columns: 1fr;
  }

  .boss-metric-grid .metric-card,
  .boss-metric-grid .primary-metric {
    grid-column: span 1;
  }
}

/* H5 V6 mobile cockpit */
.boss-page,
.employee-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% -8%, rgba(49, 103, 255, 0.16), transparent 260px),
    linear-gradient(180deg, #f7f9ff 0, #f3f6fb 42%, #eef3fa 100%);
}

.boss-page .app-shell,
.employee-page .app-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  padding: 18px 12px 92px;
}

.boss-page .topbar,
.employee-page .topbar {
  border: 0;
  border-radius: 0;
  padding: 8px 4px 12px;
  background: transparent;
  box-shadow: none;
}

.boss-page .boss-topbar {
  color: #0f172a;
}

.boss-page .boss-topbar .eyebrow,
.boss-page .boss-topbar .header-subtitle,
.employee-page .topbar .eyebrow,
.employee-page .header-subtitle {
  color: #64748b;
}

.boss-page h1,
.employee-page h1 {
  font-size: 24px;
  font-weight: 900;
}

.boss-page .header-status,
.employee-page .header-status {
  justify-content: flex-start;
}

.boss-page .status-pill,
.employee-page .status-pill {
  min-height: 30px;
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
}

.h5-hero-card {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 92% 4%, rgba(255, 255, 255, 0.32), transparent 150px),
    linear-gradient(135deg, #315cf6 0%, #2679ff 56%, #18a8ed 100%);
  color: #fff;
  box-shadow: 0 18px 34px rgba(38, 121, 255, 0.26);
}

.h5-hero-card span,
.h5-hero-card small {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.h5-hero-card strong {
  display: block;
  margin: 8px 0 2px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.h5-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 14px;
}

.h5-hero-grid span {
  text-align: center;
  font-size: 12px;
}

.h5-hero-grid b {
  display: block;
  margin-bottom: 5px;
  color: #fff;
  font-size: 20px;
}

.h5-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 10px;
  margin-top: 12px;
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: 8px;
  padding: 16px 10px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.h5-shortcut-grid a {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.shortcut-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.shortcut-icon.blue { background: linear-gradient(135deg, #4f7dff, #2f6bff); }
.shortcut-icon.green { background: linear-gradient(135deg, #34d399, #10b981); }
.shortcut-icon.purple { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.shortcut-icon.orange { background: linear-gradient(135deg, #fb923c, #f97316); }
.shortcut-icon.cyan { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.shortcut-icon.mint { background: linear-gradient(135deg, #2dd4bf, #14b8a6); }
.shortcut-icon.amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.shortcut-icon.red { background: linear-gradient(135deg, #fb7185, #ef4444); }

.boss-page .toolbar,
.employee-page .toolbar {
  margin-top: 12px;
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.055);
}

.boss-page .metric-grid,
.employee-page .metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.boss-page .metric-card,
.employee-page .metric-card,
.boss-page .panel,
.employee-page .panel {
  border-color: rgba(226, 232, 240, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.055);
}

.boss-page .metric-card,
.employee-page .metric-card {
  min-height: 106px;
  padding: 14px;
}

.boss-page .metric-card strong,
.employee-page .metric-card strong {
  margin: 12px 0 8px;
  color: #102a56;
  font-size: 24px;
}

.boss-page .primary-metric,
.employee-page .primary-metric,
.employee-page .metric-card.accent {
  background: linear-gradient(180deg, #ffffff 0, #eef5ff 100%);
  border-color: #d9e6ff;
}

.boss-page .section-heading,
.employee-page .section-heading {
  align-items: center;
  margin: 18px 4px 8px;
}

.boss-page .content-grid,
.employee-page .content-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.boss-page table,
.employee-page table {
  min-width: 0;
}

.boss-page th,
.boss-page td,
.employee-page th,
.employee-page td {
  padding: 12px 4px;
  font-size: 13px;
}

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

.boss-page .sync-item,
.employee-page .sync-item {
  border-color: #edf2f7;
  border-radius: 8px;
  background: #f8fbff;
}

.employee-page .employee-profile {
  align-items: flex-start;
  border: 0;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.34), transparent 150px),
    linear-gradient(135deg, #315cf6, #4f7dff);
  color: #fff;
  box-shadow: 0 18px 34px rgba(49, 92, 246, 0.24);
}

.employee-page .employee-profile .eyebrow,
.employee-page .employee-profile .profile-meta {
  color: rgba(255, 255, 255, 0.78);
}

.employee-page .employee-profile h2 {
  color: #fff;
}

.employee-page .progress-track {
  height: 10px;
  background: #e8effa;
}

.employee-page .progress-fill {
  background: linear-gradient(90deg, #315cf6, #14b8a6);
}

.reimbursement-page .settings-intro {
  margin-top: 12px;
}

.employee-devices-page .device-stack {
  display: grid;
  gap: 10px;
}

.employee-devices-page .device-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.employee-devices-page .device-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.employee-devices-page .device-card p {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.employee-devices-page .device-card small,
.employee-devices-page .device-empty {
  color: #64748b;
  font-size: 12px;
}

.employee-devices-page .device-empty {
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  padding: 14px 12px;
  background: rgba(248, 250, 252, 0.92);
}

.h5-bottom-nav {
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(430px, 100%);
  min-height: 66px;
  transform: translateX(50%);
  border-top: 1px solid rgba(226, 232, 240, 0.88);
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
}

.h5-bottom-nav a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.h5-bottom-nav span {
  color: #64748b;
  font-size: 18px;
  line-height: 1;
}

.h5-bottom-nav a.active,
.h5-bottom-nav a.active span {
  color: #2f6bff;
}

.h5-bottom-nav .nav-plus span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #315cf6, #2f6bff);
  color: #fff;
  font-size: 25px;
  box-shadow: 0 12px 22px rgba(47, 107, 255, 0.3);
}

.h5-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.h5-page-head h1 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.2;
}

.signed-orders-page .app-shell {
  padding-bottom: 90px;
}

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

.signed-order-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.compact-heading {
  margin: 14px 0 10px;
}

.signed-order-cards {
  display: grid;
  gap: 10px;
}

.signed-order-card {
  display: grid;
  gap: 10px;
  border: 1px solid #e6ecf5;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.signed-order-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.signed-order-top h3 {
  margin: 6px 0 0;
  color: #0f172a;
  font-size: 17px;
}

.signed-order-top strong {
  color: #0f766e;
  font-size: 18px;
  white-space: nowrap;
}

.signed-order-money,
.signed-order-person,
.signed-order-source {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.signed-order-money span,
.signed-order-person span,
.signed-order-source span {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #edf2f7;
  border-radius: 7px;
  padding: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.signed-order-money b,
.signed-order-person b,
.signed-order-source b {
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 13px;
}

.signed-order-person .signed-order-customer-name {
  align-content: center;
  border-color: #bde8df;
  background: #f0fdfa;
}

.signed-order-person .signed-order-customer-name b {
  color: #0f766e;
  font-size: 16px;
}

.signed-order-profile {
  margin: 0;
  border-top: 1px solid #edf2f7;
  padding-top: 8px;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

.admin-console-page .signed-order-admin-filterbar {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.admin-console-page .signed-order-admin-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 12px;
}

.signed-order-table-wrap {
  overflow-x: auto;
}

.signed-order-admin-table {
  min-width: 1480px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.pagination-bar .status-pill {
  min-width: 112px;
  justify-content: center;
}

.pagination-bar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.table-main-cell {
  display: grid;
  gap: 4px;
  min-width: 130px;
}

.table-main-cell span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.customer-basic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 260px;
}

.reconciliation-filterbar {
  grid-template-columns: minmax(0, 180px) minmax(0, 180px) minmax(0, 1fr);
}

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

.reconciliation-summary-card {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.reconciliation-summary-card span,
.reconciliation-summary-card small {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.reconciliation-summary-card strong {
  display: block;
  margin: 8px 0 6px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.2;
}

.reconciliation-summary-card.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.reconciliation-summary-card.success strong {
  color: #166534;
}

.reconciliation-summary-card.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.reconciliation-summary-card.warning strong {
  color: #c2410c;
}

.reconciliation-summary-card.muted {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.reconciliation-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.reconciliation-table input {
  min-width: 150px;
}

.reconciliation-input {
  max-width: 180px;
}

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

.reconciliation-acceptance-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.reconciliation-acceptance-grid label span {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.reconciliation-acceptance-grid input,
.reconciliation-acceptance-grid select,
.reconciliation-acceptance-grid textarea {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  padding: 10px 12px;
  outline: none;
}

.reconciliation-acceptance-grid textarea {
  min-height: 82px;
  resize: vertical;
}

.reconciliation-acceptance-grid .wide-field {
  grid-column: span 2;
}

.release-guide-panel {
  margin-top: 16px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

.release-guide-grid {
  margin-top: 12px;
  margin-bottom: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.release-entry-card {
  display: grid;
  gap: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 16px;
}

.release-entry-head {
  display: grid;
  gap: 8px;
}

.release-entry-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e0ecff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.release-entry-head strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.4;
}

.release-entry-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.release-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.release-route-step {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.release-route-index {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.release-route-step strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.45;
}

.release-route-step p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.customer-basic-grid span {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  line-height: 1.3;
}

/* H5 V7: mini-program cockpit polish */
.boss-page .app-shell {
  padding-top: 10px;
}

.h5-app-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 4px 4px 8px;
}

.h5-app-header .header-status {
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.h5-header-action {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.055);
}

.boss-page .boss-topbar #syncHealth {
  display: none;
}

.boss-page .boss-toolbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
  padding: 10px;
}

.boss-page .boss-toolbar label {
  gap: 4px;
}

.boss-page .boss-toolbar label span {
  font-size: 12px;
}

.boss-page .boss-toolbar input {
  min-height: 34px;
  border-radius: 8px;
  font-size: 13px;
}

.boss-page .boss-toolbar .toolbar-actions {
  grid-column: 1 / -1;
  gap: 8px;
}

.boss-page .boss-toolbar button {
  min-height: 34px;
  border-radius: 8px;
  font-size: 13px;
}

.h5-hero-card {
  min-height: 156px;
  border-radius: 8px;
  padding: 18px 16px 16px;
  margin-top: 8px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 255, 255, 0.34), transparent 126px),
    linear-gradient(135deg, #2f61ff 0%, #287cff 58%, #16a8ef 100%);
}

.h5-hero-main strong {
  font-size: 35px;
  letter-spacing: 0;
}

.h5-hero-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.h5-hero-grid span {
  min-width: 0;
  padding: 0 2px;
  line-height: 1.25;
}

.h5-hero-grid b {
  font-size: 19px;
  white-space: nowrap;
}

.h5-shortcut-grid {
  margin-top: 12px;
  border: 0;
  padding: 16px 8px 14px;
}

.h5-shortcut-grid b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-data-overview {
  display: none;
}

.h5-ranking-grid {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  align-items: start;
  margin-top: 12px;
}

.h5-rank-panel {
  padding: 15px 13px;
}

.h5-rank-panel .panel-header {
  margin-bottom: 8px;
}

.h5-rank-panel .panel-header h2 {
  font-size: 16px;
}

.h5-ranking-list {
  display: grid;
  gap: 8px;
}

.h5-rank-row {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
}

.h5-rank-row:last-child {
  border-bottom: 0;
}

.h5-rank-no {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #e8eef7;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.rank-gold .h5-rank-no {
  background: #fbbf24;
  color: #fff;
}

.rank-silver .h5-rank-no {
  background: #94a3b8;
  color: #fff;
}

.rank-bronze .h5-rank-no {
  background: #fb923c;
  color: #fff;
}

.h5-rank-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.h5-rank-main strong,
.h5-rank-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.h5-rank-main strong {
  color: #172033;
  font-size: 14px;
  line-height: 1.2;
}

.h5-rank-main span {
  color: #8a95a6;
  font-size: 11px;
}

.h5-rank-main i {
  display: block;
  height: 5px;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #15b8a6);
}

.h5-rank-row > b {
  color: #111827;
  font-size: 12px;
  white-space: nowrap;
}

.compact-ranking .h5-rank-row {
  grid-template-columns: 22px minmax(0, 1fr);
}

.compact-ranking .h5-rank-row > b {
  grid-column: 2;
  justify-self: start;
  color: #334155;
}

.h5-sales-rank-panel {
  min-height: 100%;
}

.h5-sales-row {
  grid-template-columns: 25px 30px minmax(0, 1fr) auto;
  min-height: 58px;
}

.h5-avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
}

.h5-sales-row > b {
  color: #2563eb;
  font-size: 13px;
}

.h5-empty-card {
  min-height: 56px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 13px;
}

@media (min-width: 681px) {
  .boss-page .app-shell,
  .employee-page .app-shell {
    width: min(430px, 100% - 28px);
  }
}

@media (max-width: 420px) {
  .boss-page .app-shell,
  .employee-page .app-shell {
    padding-inline: 10px;
  }

  .h5-shortcut-grid {
    gap: 10px 6px;
    padding-inline: 8px;
  }

  .shortcut-icon {
    width: 38px;
    height: 38px;
  }

  .h5-hero-card {
    padding-inline: 14px;
  }

  .h5-hero-grid b {
    font-size: 17px;
  }

  .h5-ranking-grid {
    grid-template-columns: 1fr;
  }

  .compact-ranking .h5-rank-row {
    grid-template-columns: 25px minmax(0, 1fr) auto;
  }

  .compact-ranking .h5-rank-row > b {
    grid-column: auto;
    justify-self: end;
  }
}

/* Admin V8: PC operations console visual polish */
.admin-console-page {
  --brand: #2f6bff;
  --brand-2: #1552d6;
  --admin-bg: #f3f6fb;
  --admin-card: #ffffff;
  --admin-line: #e4e9f2;
  --admin-line-2: #edf2f7;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-sidebar: #071629;
  --admin-sidebar-2: #0e233a;
  --admin-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
  background:
    radial-gradient(circle at 58% -90px, rgba(47, 107, 255, 0.12), transparent 330px),
    var(--admin-bg);
  color: var(--admin-text);
}

.admin-console-page .admin-shell {
  grid-template-columns: 212px minmax(0, 1fr);
}

.admin-console-page .admin-sidebar {
  width: 212px;
  padding: 14px 10px 12px;
  background:
    linear-gradient(180deg, rgba(47, 107, 255, 0.16), transparent 260px),
    linear-gradient(180deg, var(--admin-sidebar) 0, var(--admin-sidebar-2) 62%, #061322 100%);
  box-shadow: 12px 0 30px rgba(15, 23, 42, 0.18);
}

.admin-console-page .admin-brand {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  min-height: 50px;
  padding: 0 6px 14px;
}

.admin-console-page .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff5d8f, #2f6bff);
  font-size: 14px;
}

.admin-console-page .admin-brand strong {
  color: #fff;
  font-size: 17px;
  line-height: 1.12;
}

.admin-console-page .admin-brand span:not(.brand-mark) {
  display: block;
  margin-top: 2px;
  color: rgba(226, 232, 240, 0.62);
  font-size: 11px;
}

.admin-console-page .admin-menu {
  gap: 2px;
  margin-top: 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.admin-console-page .admin-menu-label {
  margin: 13px 7px 5px;
  color: rgba(226, 232, 240, 0.45);
  font-size: 11px;
  font-weight: 700;
}

.admin-console-page .admin-menu a {
  grid-template-columns: 24px minmax(0, 1fr) 12px;
  gap: 8px;
  min-height: 35px;
  border-radius: 6px;
  padding: 0 8px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
  font-weight: 650;
}

.admin-console-page .admin-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.admin-console-page .admin-menu a.active {
  background: linear-gradient(135deg, #2f6bff, #557cff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.28);
}

.admin-console-page .menu-icon {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
}

.admin-console-page .admin-menu a.active .menu-icon {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.18);
}

.admin-console-page .menu-arrow {
  color: rgba(255, 255, 255, 0.42);
  font-size: 16px;
}

.admin-console-page .admin-sidebar-note {
  min-height: 34px;
  margin-top: auto;
  padding: 10px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.64);
  font-size: 12px;
}

.admin-console-page .admin-workspace {
  padding: 0 20px 28px;
}

.admin-console-page .admin-dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(320px, 1fr) auto;
  align-items: center;
  min-height: 58px;
  gap: 14px;
  margin: 0 -20px;
  padding: 0 20px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.admin-console-page .admin-titlebar {
  gap: 11px;
  min-width: 0;
}

.admin-console-page .menu-toggle {
  width: 32px;
  min-height: 32px;
  border-radius: 6px;
  color: #334155;
  font-size: 21px;
}

.admin-console-page .menu-toggle:hover {
  background: #f1f5f9;
}

.admin-console-page .eyebrow {
  margin-bottom: 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.admin-console-page h1 {
  color: var(--admin-text);
  font-size: 19px;
  font-weight: 800;
}

.admin-console-page .admin-module-tabs {
  height: 100%;
  justify-content: flex-start;
  gap: 2px;
  padding: 0;
}

.admin-console-page .admin-module-tabs a {
  position: relative;
  min-height: 58px;
  border-radius: 0;
  padding: 0 15px;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

.admin-console-page .admin-module-tabs a:hover {
  color: var(--brand-2);
}

.admin-console-page .admin-module-tabs a.active {
  background: transparent;
  color: var(--brand-2);
  box-shadow: none;
}

.admin-console-page .admin-module-tabs a.active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--brand);
}

.admin-console-page .admin-userbar {
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.admin-console-page .topbar-icon,
.admin-console-page .topbar-badge,
.admin-console-page .status-pill {
  min-height: 30px;
  border-color: var(--admin-line);
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.admin-console-page .role-pill {
  min-height: 36px;
  border: 0;
  padding-left: 38px;
  background:
    radial-gradient(circle at 18px 50%, #f8fafc 0 12px, transparent 13px),
    linear-gradient(180deg, #fff, #f8fafc);
  color: #0f172a;
  box-shadow: inset 0 0 0 1px var(--admin-line);
}

.employee-sync-status-panel {
  margin-bottom: 16px;
}

.employee-sync-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.employee-sync-status-grid article {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.employee-sync-status-grid span,
.employee-sync-status-grid small {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.employee-sync-status-grid strong {
  display: block;
  margin: 5px 0 4px;
  color: #0f172a;
  font-size: 16px;
}

.admin-console-page .dashboard-filterbar {
  grid-template-columns: minmax(0, 170px) minmax(0, 170px) minmax(0, 170px) auto;
  gap: 12px;
  justify-content: end;
  margin: 12px 0 14px;
  padding: 0;
}

.admin-console-page label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.admin-console-page input,
.admin-console-page select {
  min-height: 36px;
  border-color: #dbe3ef;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

.admin-console-page input:focus,
.admin-console-page select:focus {
  border-color: rgba(47, 107, 255, 0.55);
}

.admin-console-page button {
  border-radius: 6px;
}

.admin-console-page .primary-button {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), #4f7dff);
  box-shadow: 0 8px 16px rgba(47, 107, 255, 0.18);
}

.admin-console-page .primary-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #376bff);
}

.admin-console-page .ghost-button {
  border-color: #dbe3ef;
  background: #fff;
  color: #334155;
  font-weight: 700;
}

.admin-console-page .ghost-button:hover {
  border-color: #c7d2e4;
  background: #f8fafc;
}

.admin-console-page .dashboard-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.admin-console-page .dashboard-kpi-card,
.admin-console-page .dashboard-panel,
.admin-console-page .panel,
.admin-console-page .toolbar,
.admin-console-page .admin-page-title {
  border: 1px solid var(--admin-line);
  border-radius: 7px;
  background: var(--admin-card);
  box-shadow: var(--admin-shadow);
}

.admin-console-page .dashboard-kpi-card {
  min-height: 108px;
  padding: 16px 14px 14px 82px;
}

.admin-console-page .dashboard-kpi-card::before,
.admin-console-page .kpi-icon {
  left: 18px;
  top: 22px;
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.admin-console-page .dashboard-kpi-card span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.admin-console-page .dashboard-kpi-card strong {
  margin: 8px 0 8px;
  color: var(--admin-text);
  font-size: clamp(22px, 1.8vw, 28px);
  letter-spacing: 0;
}

.admin-console-page .dashboard-kpi-card small {
  color: #64748b;
  font-size: 12px;
}

.admin-console-page .dashboard-grid {
  grid-template-columns: minmax(260px, 1.15fr) minmax(260px, 1.15fr) minmax(240px, 0.82fr) minmax(300px, 1.18fr);
  gap: 12px;
  margin-top: 12px;
}

.admin-console-page .dashboard-panel {
  min-height: 210px;
  padding: 14px;
}

.admin-console-page .dashboard-panel#storeRanking {
  grid-column: span 2;
}

.admin-console-page .dashboard-panel#salesRanking {
  min-width: 240px;
}

.admin-console-page .dashboard-panel#operationOverview {
  grid-column: span 2;
}

.admin-console-page .dashboard-panel-header,
.admin-console-page .panel-header {
  min-height: 36px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--admin-line-2);
}

.admin-console-page .dashboard-panel-header h2,
.admin-console-page .panel-header h2 {
  color: var(--admin-text);
  font-size: 16px;
  font-weight: 800;
}

.admin-console-page .dashboard-panel-header small,
.admin-console-page .dashboard-panel-header a,
.admin-console-page .panel-note,
.admin-console-page .muted-text {
  color: var(--admin-muted);
}

.admin-console-page .ranking-list {
  gap: 6px;
}

.admin-console-page .ranking-row {
  min-height: 34px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 13px;
}

.admin-console-page .ranking-row:last-child {
  border-bottom: 0;
}

.admin-console-page .ranking-row b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.admin-console-page .rank,
.admin-console-page .avatar-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
}

.admin-console-page .chart-panel {
  min-height: 168px;
  padding: 12px;
}

.admin-console-page .line-chart-mock {
  position: relative;
  height: 92px;
  gap: 0;
  padding: 14px 12px 12px;
  border: 1px solid #edf2f7;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(47, 107, 255, 0.04), transparent 78%),
    repeating-linear-gradient(to top, #edf2f7 0 1px, transparent 1px 36px),
    #fff;
}

.admin-console-page .line-chart-mock::before,
.admin-console-page .line-chart-mock::after {
  content: "";
  position: absolute;
  right: 18px;
  left: 18px;
  height: 3px;
  border-radius: 999px;
  transform-origin: left center;
}

.admin-console-page .line-chart-mock::before {
  top: 54%;
  background: linear-gradient(90deg, #2f6bff 0 18%, #2f6bff 18% 38%, #2f6bff 38% 60%, #2f6bff 60% 78%, #2f6bff 78% 100%);
  transform: skewY(-11deg);
  box-shadow: 0 10px 22px rgba(47, 107, 255, 0.16);
}

.admin-console-page .line-chart-mock::after {
  top: 48%;
  background: #10b981;
  transform: skewY(9deg);
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.14);
}

.admin-console-page .line-chart-mock span {
  position: relative;
  flex: 1;
  align-self: end;
  width: 8px;
  min-width: 8px;
  max-width: 8px;
  height: 8px !important;
  margin-inline: auto;
  border-radius: 999px;
  background: #2f6bff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.1);
}

.admin-console-page .forecast-ring,
.admin-console-page .finance-donut {
  width: 145px;
  height: 145px;
  margin-top: 6px;
  background:
    radial-gradient(circle at center, #fff 0 55%, transparent 56%),
    conic-gradient(#2f6bff 0 72%, #e7edf7 72% 100%);
}

.admin-console-page .forecast-meta,
.admin-console-page .finance-list,
.admin-console-page .todo-grid {
  gap: 8px;
  font-size: 12px;
}

.admin-console-page .dashboard-mini-table th,
.admin-console-page .dashboard-mini-table td,
.admin-console-page th,
.admin-console-page td {
  border-bottom: 1px solid var(--admin-line-2);
  padding: 10px 9px;
  color: #334155;
  font-size: 13px;
}

.admin-console-page th {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.admin-console-page tbody tr:hover {
  background: #f8fbff;
}

.admin-console-page .wide-panel {
  grid-column: span 2;
}

.admin-console-page .todo-grid span {
  min-height: 40px;
  border: 1px solid #eef2f7;
  border-radius: 7px;
  background: #f8fafc;
}

.admin-console-page .warning-list {
  gap: 7px;
  color: #475569;
  font-size: 12px;
}

.admin-console-page .warning-list li {
  padding: 0 0 7px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.admin-console-page .warning-list li::marker {
  color: #ef4444;
}

.admin-console-page .admin-page-title {
  min-height: 70px;
  margin: 14px 0 12px;
  padding: 14px 16px;
}

.admin-console-page .admin-page-title h2 {
  font-size: 18px;
  font-weight: 800;
}

.admin-console-page .admin-content {
  gap: 12px;
}

.admin-console-page .panel {
  padding: 14px;
}

.admin-console-page .admin-filterbar {
  grid-template-columns: minmax(0, 170px) minmax(0, 190px) minmax(0, 150px) minmax(160px, 1fr);
  align-items: end;
  margin: 0 0 12px;
  padding: 12px;
}

.admin-console-page .settings-grid {
  gap: 10px;
}

.admin-console-page .settings-row,
.admin-console-page .sync-item,
.admin-console-page .role-checks {
  border-color: var(--admin-line);
  border-radius: 7px;
  background: #fbfdff;
}

.admin-console-page .settings-row-title strong,
.admin-console-page .sync-item strong {
  color: #0f172a;
}

.admin-console-page .scope-switch {
  border-color: var(--admin-line);
  border-radius: 7px;
  background: #f8fafc;
}

.admin-console-page .scope-option {
  min-height: 38px;
  border-radius: 6px;
  color: #64748b;
}

.admin-console-page .scope-option.active {
  color: var(--brand-2);
  box-shadow: 0 6px 14px rgba(47, 107, 255, 0.12);
}

.admin-console-page .storage-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-console-page .account-admin-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
}

.admin-console-page .user-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-console-page .toast {
  border-radius: 6px;
  background: #0f172a;
}

.admin-console-page .growth-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-console-page .growth-dashboard-grid {
  grid-template-columns: 1.4fr 0.85fr 1.15fr 1.15fr;
}

.growth-funnel {
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.growth-funnel span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border: 1px solid #edf2f7;
  border-radius: 7px;
  padding: 0 12px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.growth-funnel b {
  color: #0f172a;
  font-size: 20px;
}

.admin-console-page .ai-dashboard-grid {
  grid-template-columns: 1.35fr 0.9fr 1.2fr;
}

.ai-brief {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  line-height: 1.75;
}

.ai-brief p {
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.ai-source-line {
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.ai-alert-list li {
  display: grid;
  gap: 4px;
  padding-left: 0;
}

.ai-alert-list strong {
  color: #0f172a;
}

.ai-alert-list span,
.ai-alert-list small {
  color: #64748b;
  line-height: 1.5;
}

.ai-ask-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.ai-answer {
  min-height: 64px;
  margin-top: 12px;
  border: 1px solid #edf2f7;
  border-radius: 7px;
  padding: 12px;
  background: #f8fbff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.7;
}

[v-cloak] {
  display: none;
}

.admin-console-page .device-title-actions,
.admin-console-page .device-tab-actions,
.admin-console-page .device-pagination,
.admin-console-page .offboarding-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-console-page .device-title-actions {
  justify-content: flex-end;
}

.admin-console-page .device-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.admin-console-page .device-filterbar {
  margin-top: 14px;
}

.admin-console-page .device-workbench {
  margin-top: 14px;
}

.admin-console-page .device-tab-actions {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.admin-console-page .device-pagination {
  justify-content: flex-end;
  padding-top: 14px;
}

.admin-console-page .device-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-console-page .offboarding-box {
  padding: 4px 0 16px;
}

.admin-console-page .offboarding-box label {
  display: grid;
  gap: 6px;
  min-width: 240px;
}

.admin-console-page .handover-result {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
  color: #334155;
}

.admin-console-page .handover-result strong {
  color: #0f172a;
}

@media (max-width: 1380px) {
  .admin-console-page .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-console-page .dashboard-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1fr);
  }

  .admin-console-page .dashboard-panel#storeRanking,
  .admin-console-page .dashboard-panel#operationOverview {
    grid-column: span 2;
  }
}

@media (max-width: 1180px) {
  .admin-console-page .admin-dashboard-topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 20px;
  }

  .admin-console-page .admin-module-tabs a {
    min-height: 36px;
    border-radius: 6px;
  }

  .admin-console-page .admin-module-tabs a.active {
    background: #eef4ff;
  }

  .admin-console-page .admin-module-tabs a.active::after {
    display: none;
  }

  .admin-console-page .admin-userbar {
    justify-content: flex-start;
  }

  .admin-console-page .dashboard-kpi-grid,
  .admin-console-page .device-kpi-grid,
  .admin-console-page .growth-kpi-grid,
  .admin-console-page .dashboard-grid,
  .admin-console-page .growth-dashboard-grid,
  .admin-console-page .ai-dashboard-grid,
  .admin-console-page .account-admin-layout,
  .admin-console-page .release-entry-grid,
  .admin-console-page .release-route-grid,
  .reconciliation-summary-grid,
  .admin-console-page .reconciliation-acceptance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-console-page .wide-panel {
    grid-column: span 2;
  }

  .admin-console-page .dashboard-panel#storeRanking,
  .admin-console-page .dashboard-panel#operationOverview {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .admin-console-page .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-console-page .admin-sidebar {
    position: static;
    width: auto;
    height: auto;
  }

  .admin-console-page .admin-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-console-page .admin-workspace {
    padding: 0 12px 24px;
  }

  .admin-console-page .admin-dashboard-topbar {
    margin: 0 -12px;
    padding: 10px 12px;
  }

  .admin-console-page .dashboard-filterbar,
  .admin-console-page .admin-filterbar,
  .admin-console-page .dashboard-kpi-grid,
  .admin-console-page .device-kpi-grid,
  .admin-console-page .growth-kpi-grid,
  .admin-console-page .dashboard-grid,
  .admin-console-page .growth-dashboard-grid,
  .admin-console-page .ai-dashboard-grid,
  .admin-console-page .account-admin-layout,
  .admin-console-page .release-entry-grid,
  .admin-console-page .release-route-grid,
  .reconciliation-summary-grid,
  .admin-console-page .reconciliation-acceptance-grid,
  .admin-console-page .storage-form,
  .admin-console-page .user-form,
  .admin-console-page .device-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-console-page .reconciliation-acceptance-grid .wide-field {
    grid-column: span 1;
  }

  .ai-ask-box {
    grid-template-columns: 1fr;
  }

  .admin-console-page .wide-panel {
    grid-column: span 1;
  }

  .admin-console-page .dashboard-panel#storeRanking,
  .admin-console-page .dashboard-panel#operationOverview {
    grid-column: span 1;
  }
}

@media (max-width: 520px) {
  .signed-order-summary,
  .signed-order-money,
  .signed-order-person,
  .signed-order-source {
    grid-template-columns: 1fr;
  }

  .signed-order-filterbar {
    grid-template-columns: 1fr;
  }
}
