:root {
  --ink: #101828;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #d9e2ec;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --blue: #2563eb;
  --blue-deep: #143c9e;
  --cyan: #06b6d4;
  --green: #10a37f;
  --red: #f04438;
  --gold: #f59e0b;
  --violet: #7c3aed;
  --side: #15122c;
  --side-2: #251f56;
  --shadow: 0 24px 70px rgba(16, 24, 40, 0.1);
  --soft-shadow: 0 12px 28px rgba(16, 24, 40, 0.07);
  --radius-control: 14px;
  --radius-panel: 16px;
  --radius-card: 8px;
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 14px;
  --space-lg: 18px;
  --space-xl: 28px;
}

body[data-theme="calm"] {
  --bg: #f3f6f8;
  --panel: #ffffff;
  --ink: #152033;
  --muted: #667085;
  --blue: #1d4ed8;
  --cyan: #0891b2;
  --green: #047857;
  --side: #14213d;
  --side-2: #1f3a5f;
}

body[data-theme="contrast"] {
  --bg: #0f172a;
  --panel: #111827;
  --ink: #e5e7eb;
  --muted: #a5b4cc;
  --line: #334155;
  --blue: #60a5fa;
  --cyan: #22d3ee;
  --green: #34d399;
  --side: #020617;
  --side-2: #1e1b4b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(124, 58, 237, 0.12), transparent 30%),
    radial-gradient(circle at 82% 24%, rgba(6, 182, 212, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 246, 251, 0.86) 300px),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 88px),
    var(--bg);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.ambient-shader {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-shader::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 520px;
  background:
    conic-gradient(from 220deg at 50% 50%, rgba(37, 99, 235, 0.16), rgba(16, 163, 127, 0.1), rgba(245, 158, 11, 0.1), rgba(124, 58, 237, 0.14), rgba(37, 99, 235, 0.16));
  filter: blur(70px) saturate(1.08);
  opacity: 0.72;
  animation: shaderDrift 18s ease-in-out infinite alternate;
}

body[data-density="compact"] {
  --radius-control: 10px;
  --radius-panel: 12px;
  --space-sm: 8px;
  --space-md: 10px;
  --space-lg: 14px;
}

button,
input,
select {
  font: inherit;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(340px, 560px) minmax(360px, 430px);
  gap: 34px;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 42px;
  background:
    linear-gradient(120deg, rgba(8, 18, 44, 0.96), rgba(25, 33, 73, 0.92) 52%, rgba(11, 86, 126, 0.86)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 56px);
}

.login-brand-panel {
  display: grid;
  gap: 24px;
  align-content: center;
  min-height: 520px;
  padding: 34px;
  color: #fff;
}

.login-logo-frame {
  display: grid;
  width: min(280px, 62vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.login-logo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: cover;
}

.login-brand-copy {
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.login-brand-copy p,
.login-brand-copy h1,
.login-brand-copy span {
  margin: 0;
}

.login-brand-copy p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  font-weight: 900;
}

.login-brand-copy h1 {
  color: #fff;
  font-size: 52px;
  line-height: 1.08;
}

.login-brand-copy span {
  color: rgba(219, 234, 254, 0.86);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.75;
}

.login-card {
  width: min(430px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
  animation: brandPulse 4s ease-in-out infinite;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-row strong,
.brand-row span {
  display: block;
}

.brand-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.login-card .brand-row span,
.sidebar .brand-row span {
  color: rgba(255, 255, 255, 0.68);
}

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

.login-form label,
.grid-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-card label {
  color: rgba(255, 255, 255, 0.76);
}

.login-form input,
.login-form select,
.grid-form input,
.grid-form select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.login-card input {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

.login-card input::placeholder {
  color: rgba(255, 255, 255, 0.52);
}

.login-form input:focus,
.grid-form input:focus,
.grid-form select:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.login-card .login-note {
  color: rgba(255, 255, 255, 0.62);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 270px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 22px 16px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(36, 87, 230, 0.22), transparent 36%),
    linear-gradient(135deg, var(--side), var(--side-2));
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.16);
}

.sidebar .brand-row {
  padding: 8px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-list {
  display: grid;
  gap: 6px;
  overflow: auto;
  padding-right: 2px;
}

.nav-list::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.nav-list::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px 9px 13px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-item::after,
.nav-group-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.18), transparent);
  opacity: 0;
  transform: translateX(-30%);
  transition: opacity 0.2s ease, transform 0.32s ease;
  pointer-events: none;
}

.nav-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: rgba(191, 219, 254, 0.84);
  font-size: 20px;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 6px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.nav-item.active,
.nav-item:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 26px rgba(88, 102, 217, 0.18), inset 0 1px rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.nav-item:hover::after,
.nav-item.active::after,
.nav-group-toggle:hover::after,
.nav-group.active .nav-group-toggle::after {
  opacity: 1;
  transform: translateX(30%);
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  color: #7dd3fc;
}

.nav-item.active::before {
  background: linear-gradient(180deg, #7dd3fc, #3b82f6);
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px 9px 13px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-group-toggle > span {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.nav-group-toggle > span > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-toggle:hover,
.nav-group.active .nav-group-toggle {
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 26px rgba(88, 102, 217, 0.16), inset 0 1px rgba(255, 255, 255, 0.1);
}

.nav-caret {
  flex: 0 0 auto;
  color: rgba(226, 232, 240, 0.72);
  font-size: 16px;
  transition: transform 0.16s ease;
}

.nav-group.open .nav-caret {
  transform: rotate(180deg);
}

.nav-sublist {
  display: none;
  gap: 3px;
  margin: 0 2px 4px 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0 0 10px 10px;
  padding: 7px 0 7px 10px;
  background: rgba(4, 10, 28, 0.28);
  transform-origin: top;
}

.nav-group.open .nav-sublist {
  display: grid;
  animation: navSubReveal 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-subitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  color: rgba(226, 232, 240, 0.72);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
  transition: background 0.18s ease, color 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
}

.nav-subitem::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -11px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.nav-subitem:hover,
.nav-subitem.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.nav-subitem.active::before {
  background: linear-gradient(180deg, #8b5cf6, #38bdf8);
}

.nav-sub-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: rgba(191, 219, 254, 0.82);
  font-size: 18px;
}

.nav-subitem span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-empty {
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.role-card {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.role-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.role-card strong {
  line-height: 1.45;
}

.main {
  min-width: 0;
  padding: 26px 28px 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -26px -28px 22px;
  padding: 20px 28px 17px;
  background: rgba(244, 247, 251, 0.9);
  border-bottom: 1px solid rgba(219, 228, 238, 0.86);
  backdrop-filter: blur(16px);
}

.title-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 7px;
  max-width: 100%;
  overflow: hidden;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  letter-spacing: 0;
}

.top-actions,
.section-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.global-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  width: min(330px, 26vw);
  border: 1px solid rgba(142, 161, 184, 0.35);
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.global-search span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.global-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.system-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid rgba(5, 150, 105, 0.24);
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: #04725e;
  background: rgba(15, 150, 119, 0.1);
  font-size: 13px;
  font-weight: 800;
}

.hgi-stroke {
  line-height: 1;
}

.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.tab-btn,
.link-btn,
.icon-btn {
  min-height: 40px;
  border-radius: var(--radius-control);
  padding: 0 15px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease, opacity 0.14s ease;
}

.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.tab-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.primary-btn {
  position: relative;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue) 62%, var(--cyan));
  box-shadow: 0 10px 22px rgba(36, 87, 230, 0.24);
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%);
}

.primary-btn:hover,
.ghost-btn:hover,
.tab-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:hover::after {
  animation: shine 0.82s ease;
}

.primary-btn:active,
.ghost-btn:active,
.tab-btn:active,
.mini-btn:active,
.nav-item:active {
  transform: translateY(1px) scale(0.98);
  opacity: 0.9;
}

.ghost-btn,
.tab-btn {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.icon-btn {
  min-width: 38px;
  border: 1px solid rgba(142, 161, 184, 0.35);
  color: #334155;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.ghost-btn.slim,
.icon-btn {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.ghost-dark-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.link-btn {
  width: 100%;
  border: 0;
  color: #93c5fd;
  background: transparent;
  box-shadow: none;
}

.tab-btn.active {
  color: #fff;
  border-color: var(--green);
  background: linear-gradient(135deg, var(--green), var(--cyan));
}

.tab-btn.static-tab {
  cursor: default;
  user-select: none;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
  animation: viewEnter 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body[data-density="compact"] .view.active {
  gap: 12px;
}

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

.metric {
  position: relative;
  min-height: 124px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 70px rgba(20, 31, 54, 0.14);
}

.metric::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--blue);
}

.metric.tone-1::before {
  background: var(--blue);
}

.metric.tone-2::before {
  background: var(--green);
}

.metric.tone-3::before {
  background: var(--red);
}

.metric.tone-4::before {
  background: var(--gold);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: #0f172a;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.metric small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.hub-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.hub-card {
  display: grid;
  min-height: 124px;
  gap: 9px;
  align-content: start;
  border: 1px solid rgba(215, 225, 236, 0.86);
  border-radius: 10px;
  padding: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.82);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hub-card:hover {
  border-color: rgba(36, 87, 230, 0.25);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1), inset 0 1px rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.hub-card i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: rgba(36, 87, 230, 0.08);
  font-size: 20px;
}

.hub-card strong {
  font-size: 15px;
}

.hub-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ops-layout {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.ops-filter-panel {
  position: relative;
  top: 0;
  align-self: start;
  box-shadow: var(--soft-shadow);
}

.ops-filter-panel .panel-head {
  padding: 12px;
}

.filter-stack {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.filter-group-list {
  display: grid;
  gap: 12px;
}

.filter-button-group {
  display: grid;
  gap: 8px;
}

.filter-button-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filter-button-head strong {
  font-size: 13px;
  font-weight: 1000;
}

.filter-button-head button {
  border: 0;
  padding: 0;
  color: var(--soft);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.filter-button-scroll {
  display: grid;
  max-height: 154px;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

.filter-button-scroll::-webkit-scrollbar {
  width: 5px;
}

.filter-button-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
}

.filter-button-scroll button,
.filter-button-scroll span {
  min-height: 30px;
  border: 1px solid rgba(215, 225, 236, 0.72);
  border-radius: 8px;
  padding: 0 8px;
  overflow: hidden;
  color: #516176;
  background: rgba(255, 255, 255, 0.76);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.filter-button-scroll button {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.filter-button-scroll button:hover {
  border-color: rgba(36, 87, 230, 0.28);
  color: var(--blue);
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  transform: translateX(2px);
}

.filter-button-scroll button.active {
  border-color: rgba(16, 185, 129, 0.28);
  color: #04885f;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.72);
}

.filter-stack label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.filter-stack input,
.filter-stack select {
  min-height: 36px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.filter-actions {
  display: grid;
  gap: 8px;
}

.inline-import-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(180px, 260px) minmax(160px, max-content);
  justify-content: stretch;
  gap: 12px;
  align-items: end;
  margin: 16px 18px 18px;
  border: 1px solid rgba(217, 226, 236, 0.82);
  border-radius: var(--radius-panel);
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.88));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.86);
}

.inline-import-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.inline-import-row select,
.inline-import-row input[type="file"] {
  min-height: 40px;
  max-width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 6px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.inline-import-row select:hover,
.inline-import-row input[type="file"]:hover {
  border-color: rgba(37, 99, 235, 0.26);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.inline-import-row select:focus,
.inline-import-row input[type="file"]:focus {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.inventory-workbench-filters {
  grid-template-columns: minmax(180px, 240px) minmax(280px, 1fr) max-content;
  margin-top: 12px;
}

.inventory-import-row {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) max-content;
}

.inline-action-group {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-action-group .ghost-btn {
  min-height: 40px;
}

.table-input {
  width: 100%;
  min-width: 88px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(239, 246, 255, .72);
}

.table-input:focus {
  border-color: #2563eb;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.ops-main {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.collapsible-panel {
  padding-bottom: 0;
}

.collapsible-panel details {
  display: grid;
}

.collapsible-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.collapsible-panel summary::-webkit-details-marker {
  display: none;
}

.collapsible-panel summary span,
.collapsible-panel summary strong,
.collapsible-panel summary small {
  display: block;
}

.collapsible-panel summary strong {
  color: var(--ink);
}

.collapsible-panel summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.collapsible-panel summary b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.1);
  font-size: 12px;
}

.collapsible-panel details[open] summary {
  border-bottom: 1px solid var(--line);
}

.content-grid > .panel:only-child {
  grid-column: 1 / -1;
}

.desk-hero {
  display: grid;
  gap: 16px;
}

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

.desk-metrics > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.desk-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.desk-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.desk-grid {
  margin-top: 18px;
}

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

.desk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.desk-item strong,
.desk-item span {
  display: block;
  min-width: 0;
}

.desk-item strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.desk-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desk-item-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.desk-item-side b {
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}

.mobile-assistant-hero {
  display: grid;
  gap: 18px;
}

.assistant-role-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 8px;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #f8fafc;
}

.assistant-role-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.assistant-role-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.assistant-role-tabs button:disabled {
  opacity: 0.38;
}

.assistant-phone-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.assistant-phone {
  display: grid;
  gap: 14px;
  min-height: 660px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 28px;
  padding: 18px;
  background:
    linear-gradient(180deg, #f8fafc, #eef4fb),
    #fff;
  box-shadow: var(--soft-shadow);
}

.assistant-phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}

.assistant-phone-top strong,
.assistant-phone-top span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-phone-top strong {
  color: var(--ink);
  font-size: 20px;
}

.assistant-phone-top span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.assistant-phone-metrics > div {
  min-height: 94px;
  border: 1px solid rgba(219, 228, 238, 0.9);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.assistant-phone-metrics span,
.assistant-phone-metrics small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.assistant-phone-metrics strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.assistant-phone-list,
.assistant-note-list {
  display: grid;
  gap: 10px;
}

.assistant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(219, 228, 238, 0.9);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.assistant-row strong,
.assistant-row span {
  display: block;
  min-width: 0;
}

.assistant-row strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.assistant-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.assistant-row b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  color: #92400e;
  background: rgba(183, 121, 31, 0.12);
  font-size: 12px;
  white-space: nowrap;
}

.assistant-row b.green {
  color: #047857;
  background: rgba(5, 150, 105, 0.12);
}

.assistant-row b.red {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.1);
}

.assistant-workbench {
  display: grid;
  align-content: start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 18px;
  background: #fff;
}

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

.assistant-module {
  display: grid;
  min-height: 124px;
  border: 1px solid rgba(219, 228, 238, 0.92);
  border-radius: 8px;
  padding: 14px;
  color: inherit;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
}

.assistant-module strong,
.assistant-module span,
.assistant-module em {
  display: block;
}

.assistant-module strong {
  color: var(--ink);
  font-size: 15px;
}

.assistant-module span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.assistant-module em {
  align-self: end;
  justify-self: start;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.1);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.assistant-note-list > div {
  border: 1px dashed rgba(37, 99, 235, 0.26);
  border-radius: 8px;
  padding: 12px;
  color: #334155;
  background: #f8fbff;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: center;
  min-height: 190px;
  padding: 28px 32px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(115deg, rgba(5, 150, 105, 0.1), rgba(37, 99, 235, 0.06) 54%, rgba(183, 121, 31, 0.1)),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.05) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(37, 99, 235, 0.04) 0 1px, transparent 1px 46px),
    #fff;
  box-shadow: var(--shadow);
}

.guide-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 0 14px;
  color: #047857;
  background: rgba(5, 150, 105, 0.12);
  font-weight: 900;
}

.guide-hero h2 {
  font-size: 34px;
  line-height: 1.15;
}

.guide-hero p {
  margin-top: 14px;
  max-width: 760px;
  color: #475569;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 700;
}

.guide-callout {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-panel);
  padding: 22px;
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 900;
}

.guide-panel {
  padding: 18px;
}

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

.guide-flow div,
.guide-cards article,
.lesson-grid article,
.benchmark-grid article {
  border: 1px solid rgba(219, 228, 238, 0.86);
  border-radius: var(--radius-card);
  background: #f8fafc;
}

.guide-flow div {
  min-height: 122px;
  padding: 16px;
}

.guide-flow span,
.lesson-grid span {
  display: block;
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.guide-flow strong,
.guide-cards strong,
.lesson-grid strong,
.benchmark-grid strong {
  display: block;
  margin-bottom: 9px;
  color: #1e293b;
  font-size: 18px;
}

.guide-flow p,
.guide-cards p,
.lesson-grid p,
.benchmark-grid p {
  color: var(--muted);
  line-height: 1.65;
  font-weight: 700;
}

.guide-rule {
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-panel);
  padding: 18px 22px;
  color: #334155;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--soft-shadow);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 900;
}

.guide-cards,
.lesson-grid,
.benchmark-grid {
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.guide-cards article,
.lesson-grid article,
.benchmark-grid article {
  padding: 18px;
}

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

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

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.panel:hover {
  border-color: rgba(36, 87, 230, 0.18);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1), inset 0 1px rgba(255, 255, 255, 0.88);
  transform: translateY(-2px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f7f9fc);
}

.panel-head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: min(48vw, 520px);
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-panel {
  padding-bottom: 18px;
}

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

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

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

.grid-form button {
  align-self: end;
}

.alert-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid rgba(183, 121, 31, 0.24);
  border-radius: var(--radius-panel);
  color: #7c4a03;
  background: #fff8e8;
  box-shadow: var(--soft-shadow);
}

.alert-strip span {
  color: #7c4a03;
  font-size: 14px;
}

.sync-panel {
  border-color: rgba(37, 99, 235, 0.16);
  background:
    linear-gradient(135deg, rgba(18, 169, 199, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
}

.sync-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 4px;
}

.sync-status-grid div {
  min-height: 78px;
  border: 1px solid rgba(219, 228, 238, 0.8);
  border-radius: var(--radius-card);
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.sync-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sync-status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.2;
}

.finance-overview-panel,
.design-panel,
.template-panel {
  border-color: rgba(37, 99, 235, 0.16);
}

.template-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 18px;
}

.template-toolbar label {
  display: grid;
  flex: 1;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.template-toolbar input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.template-toolbar input:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.template-toolbar-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.template-toolbar-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid rgba(219, 228, 238, 0.82);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.template-toolbar-metrics strong {
  color: var(--ink);
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.55fr);
  gap: 18px;
}

.template-module-grid {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding: 16px 18px 18px;
}

.template-module-card {
  display: grid;
  gap: 7px;
  width: 100%;
  border: 1px solid rgba(219, 228, 238, 0.84);
  border-radius: var(--radius-panel);
  padding: 13px;
  color: inherit;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.template-module-card:hover,
.template-module-card.active {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.template-module-card.active {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.07), #fff 74%);
}

.template-module-card > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.template-module-card strong,
.template-module-card span,
.template-module-card small {
  display: block;
}

.template-module-card strong {
  color: var(--ink);
  font-size: 15px;
}

.template-module-card span,
.template-module-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.template-status {
  flex: 0 0 auto;
}

.template-detail-panel h3 {
  margin: 0;
  padding: 16px 18px 0;
  color: var(--ink);
  font-size: 15px;
}

.template-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.template-detail-grid > section {
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.template-detail-grid > section:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.template-empty-preview {
  display: grid;
  gap: 10px;
  margin: 16px 18px 18px;
  border: 1px dashed rgba(37, 99, 235, 0.32);
  border-radius: var(--radius-panel);
  padding: 18px;
  background: #f8fbff;
}

.template-empty-preview strong {
  color: var(--ink);
  font-size: 17px;
}

.template-empty-preview span {
  color: var(--muted);
  line-height: 1.6;
  font-weight: 700;
}

.template-empty-preview button {
  justify-self: start;
}

.template-form {
  padding-bottom: 18px;
}

.finance-ledger-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.finance-ledger-card {
  min-height: 104px;
  border: 1px solid rgba(219, 228, 238, 0.8);
  border-radius: var(--radius-panel);
  padding: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.finance-ledger-card span,
.finance-ledger-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.finance-ledger-card strong {
  display: block;
  margin: 8px 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.1;
}

.finance-ledger-card.tone-1 {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.07), #fff 72%);
}

.finance-ledger-card.tone-2 {
  border-color: rgba(5, 150, 105, 0.2);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.07), #fff 72%);
}

.finance-ledger-card.tone-3 {
  border-color: rgba(6, 182, 212, 0.2);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.07), #fff 72%);
}

.finance-ledger-card.tone-4 {
  border-color: rgba(183, 121, 31, 0.22);
  background: linear-gradient(180deg, rgba(183, 121, 31, 0.08), #fff 72%);
}

.finance-section {
  display: grid;
  gap: 18px;
}

.finance-section + .finance-section {
  margin-top: 18px;
}

.finance-tabs {
  justify-content: flex-start;
}

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

.token-card {
  min-height: 168px;
  border: 1px solid rgba(219, 228, 238, 0.82);
  border-radius: var(--radius-panel);
  padding: 14px;
  background: #fff;
}

.token-card > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 15px;
}

.token-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  border-top: 1px solid rgba(219, 228, 238, 0.65);
  color: var(--muted);
  font-size: 12px;
}

.token-card b {
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-card em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

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

.ui-component-grid article {
  min-height: 145px;
  border: 1px solid rgba(219, 228, 238, 0.8);
  border-radius: var(--radius-panel);
  padding: 14px;
  background: #fff;
}

.ui-component-grid strong,
.ui-component-grid p,
.ui-component-grid small {
  display: block;
}

.ui-component-grid p,
.ui-component-grid small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.design-rule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}

.sync-status-text.success {
  color: var(--green);
}

.sync-status-text.running,
.sync-status-text.waiting_config {
  color: var(--gold);
}

.sync-status-text.failed {
  color: var(--red);
}

.sync-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px 18px;
}

.sync-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.pdd-panel {
  border-color: rgba(5, 150, 105, 0.18);
}

.pdd-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 12px;
  align-items: end;
  padding: 14px 18px 18px;
}

.pdd-actions label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pdd-actions input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.pdd-grid {
  align-items: start;
}

.pdd-preview {
  display: grid;
  min-height: 280px;
  padding: 16px;
  place-items: center;
  background: #f8fafc;
}

.pdd-preview a,
.pdd-preview img {
  display: block;
  width: 100%;
}

.pdd-preview img {
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.pdd-output-list {
  display: grid;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
  padding: 16px 18px;
}

.pdd-output-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(219, 228, 238, 0.72);
  border-radius: 14px;
  padding: 12px 13px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

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

.pdd-output-item strong {
  overflow: hidden;
  max-width: 420px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.pdd-output-item div > span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.automation-panel {
  border-color: rgba(37, 99, 235, 0.18);
}

.automation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px 18px;
}

.automation-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.automation-actions div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.automation-actions .pilot-strip {
  justify-content: flex-start;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
  color: #334155;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(239, 246, 255, 0.92));
}

.pilot-strip strong {
  color: #0f172a;
}

.pilot-strip span:not(.badge) {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.automation-config-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  padding: 0 18px 16px;
  align-items: end;
}

.automation-config-form.compact-form {
  padding-top: 0;
  grid-template-columns: minmax(220px, 1.4fr) minmax(112px, 0.6fr) minmax(112px, 0.6fr) auto;
}

.automation-config-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.automation-config-form select,
.automation-config-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
}

.automation-config-form button {
  min-height: 42px;
  white-space: nowrap;
}

.automation-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.automation-channel-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.78);
}

.automation-channel-card.strict {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(254, 242, 242, 0.68);
}

.automation-channel-card strong {
  color: var(--ink);
  font-size: 16px;
}

.automation-channel-card > span {
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.automation-channel-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.automation-channel-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.automation-channel-card dt,
.automation-channel-card dd {
  margin: 0;
  font-size: 13px;
}

.automation-channel-card dt {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.automation-channel-card dd {
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.automation-grid {
  align-items: start;
}

.freshness-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.freshness-status-card {
  min-height: 116px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.freshness-status-card.fresh {
  border-color: rgba(5, 150, 105, 0.24);
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.07), #fff 72%);
}

.freshness-status-card.stale,
.freshness-status-card.missing {
  border-color: rgba(220, 38, 38, 0.2);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.06), #fff 72%);
}

.freshness-status-card span,
.freshness-status-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.freshness-status-card strong {
  display: block;
  overflow: hidden;
  margin: 9px 0 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding: 16px 18px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border: 1px solid rgba(219, 228, 238, 0.72);
  border-radius: 14px;
  padding: 12px 13px;
  background: #fff;
}

.queue-item > div:not(.queue-thumb) {
  min-width: 0;
  flex: 1;
}

.queue-thumb {
  display: grid;
  flex: 0 0 64px;
  width: 64px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(219, 228, 238, 0.8);
  border-radius: 10px;
  color: #94a3b8;
  background: #f8fafc;
  font-weight: 1000;
  text-decoration: none;
}

.queue-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

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

.queue-item strong {
  font-size: 14px;
}

.queue-item div > span,
.queue-item small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.framework-panel {
  border-color: rgba(14, 165, 233, 0.18);
}

.framework-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px 18px;
}

.framework-flow article {
  min-height: 170px;
  border: 1px solid rgba(219, 228, 238, 0.8);
  border-radius: var(--radius-card);
  padding: 14px;
  background: #fff;
}

.framework-flow span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0f766e;
  font-weight: 1000;
}

.framework-flow strong,
.module-card strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 16px;
}

.framework-flow p,
.framework-flow small,
.module-card p,
.module-card small {
  display: block;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.module-card {
  min-height: 150px;
  border: 1px solid rgba(219, 228, 238, 0.8);
  border-radius: var(--radius-card);
  padding: 14px;
  background: #fff;
}

.module-card > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.module-card > div strong {
  margin-top: 0;
}

.framework-grid {
  align-items: start;
}

.list-stack,
.permission-grid,
.guide-list,
.account-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

.list-item,
.permission-card,
.guide-item,
.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(219, 228, 238, 0.72);
  border-radius: var(--radius-card);
  background: #f8fafc;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.list-item:hover,
.permission-card:hover,
.guide-item:hover,
.account-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.24);
  background: #f8fbff;
}

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

.list-item strong,
.permission-card strong,
.guide-item strong {
  display: block;
  margin-bottom: 4px;
}

.list-item span,
.permission-card p,
.guide-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.leaderboard {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  border: 1px solid rgba(215, 225, 236, 0.92);
  border-radius: var(--radius-card);
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.leaderboard-row:hover {
  transform: translateY(-1px);
  border-color: rgba(36, 87, 230, 0.24);
  box-shadow: var(--soft-shadow);
}

.leaderboard-row.is-leader {
  min-height: 104px;
  border-color: rgba(180, 123, 24, 0.28);
  background:
    linear-gradient(135deg, rgba(180, 123, 24, 0.12), transparent 40%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.leaderboard-rank {
  display: grid;
  grid-template-rows: 1fr auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(142, 161, 184, 0.28);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 1000;
}

.leaderboard-rank.gold {
  color: #7c4a03;
  border-color: rgba(180, 123, 24, 0.3);
  background: #fff8e8;
}

.leaderboard-rank.blue {
  color: var(--blue-deep);
  border-color: rgba(36, 87, 230, 0.22);
  background: rgba(36, 87, 230, 0.08);
}

.leaderboard-rank.green {
  color: #04725e;
  border-color: rgba(15, 150, 119, 0.22);
  background: rgba(15, 150, 119, 0.08);
}

.leaderboard-rank i {
  margin-top: -4px;
  font-size: 13px;
}

.leaderboard-main {
  min-width: 0;
}

.leaderboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.leaderboard-title strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.leaderboard-title em {
  flex: 0 0 auto;
  border: 1px solid rgba(36, 87, 230, 0.16);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--blue-deep);
  background: rgba(36, 87, 230, 0.07);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.leaderboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.leaderboard-meta span {
  line-height: 1.35;
}

.leaderboard-bar {
  overflow: hidden;
  height: 7px;
  margin-top: 10px;
  border-radius: 999px;
  background: #e8eef6;
}

.leaderboard-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-deep), var(--cyan));
}

.leaderboard-row.is-leader .leaderboard-bar span {
  background: linear-gradient(90deg, var(--gold), var(--blue));
}

.leaderboard-score {
  min-width: 74px;
  text-align: right;
}

.leaderboard-score strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.leaderboard-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 16px 18px;
}

.account-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.account-card {
  align-items: stretch;
  flex-direction: column;
}

.role-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}

.warehouse-checks {
  width: 100%;
  max-height: 260px;
  overflow: auto;
  padding-top: 2px;
}

.permission-picker {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.permission-picker + .permission-picker,
.permission-picker + .row-actions,
.permission-picker + .ghost-btn {
  margin-top: 10px;
}

.permission-picker summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
}

.permission-picker summary::-webkit-details-marker {
  display: none;
}

.permission-picker summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.permission-picker summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-picker[open] summary {
  border-bottom: 1px solid var(--line);
}

.permission-picker .role-checks {
  padding: 10px;
}

.permission-search {
  width: calc(100% - 20px);
  margin: 10px 10px 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--text);
  font: inherit;
}

.role-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.role-check.hidden {
  display: none;
}

.role-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.inventory-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px 0;
}

.inventory-tabs .tab-btn {
  min-width: 116px;
  box-shadow: none;
}

.inventory-tabs .tab-btn.active {
  border-color: rgba(37, 99, 235, 0.85);
  background: linear-gradient(135deg, var(--blue), var(--violet), var(--cyan));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.inventory-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 0)),
    #fff;
}

.inventory-board span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(219, 228, 238, 0.92);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}

.inventory-board strong {
  color: #0f172a;
  font-size: 17px;
}

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

.empty-state {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-card);
  color: var(--muted);
  background: #f8fafc;
  font-size: 14px;
}

.empty-state.inline {
  display: inline-block;
  width: 100%;
}

.table-wrap {
  overflow: auto;
}

.table-toolbar {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 780px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 249, 252, 0.98));
  box-shadow: inset 0 -1px rgba(226, 232, 240, 0.8);
}

.table-toolbar-status {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.table-toolbar-status strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.table-toolbar-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.table-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.table-toolbar-actions .ghost-btn,
.column-menu summary {
  gap: 6px;
}

.table-toolbar-actions .export-btn {
  border-color: rgba(99, 102, 241, 0.36);
  color: #4f46e5;
  background: rgba(255, 255, 255, 0.96);
}

.table-toolbar-actions .export-btn:hover {
  border-color: rgba(79, 70, 229, 0.56);
  color: #4338ca;
  background: #fff;
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.12);
}

.table-pagination {
  position: sticky;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 780px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.table-pagination span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.column-menu {
  position: relative;
}

.column-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
  box-shadow: var(--soft-shadow);
}

.column-menu summary::-webkit-details-marker {
  display: none;
}

.column-menu > div {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  display: grid;
  gap: 6px;
  min-width: 210px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.column-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.column-menu label:hover {
  color: var(--blue-deep);
}

.column-menu input,
.select-cell input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.select-cell {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.column-hidden {
  display: none !important;
}

.table-wrap.compact {
  max-height: 340px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

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

body[data-density="compact"] th,
body[data-density="compact"] td {
  padding: 9px 10px;
  font-size: 13px;
}

body[data-density="compact"] .panel-head {
  padding: 12px 14px;
}

body[data-density="compact"] .grid-form {
  gap: 10px;
  padding: 12px 14px 0;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475569;
  background: #f8fafc;
  font-weight: 900;
}

tbody tr {
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

tbody tr:hover {
  background: #f8fbff;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.red {
  background: var(--red);
}

.badge.green {
  background: var(--green);
}

.badge.gold {
  color: #5f3b07;
  background: #fde68a;
}

.mini-btn {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.18);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.mini-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(5, 150, 105, 0.24);
}

.mini-btn.light {
  color: #2563eb;
  background: #dbeafe;
  box-shadow: none;
}

.mini-btn.purple {
  background: var(--violet);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.18);
}

.table-actions {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.report-box {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.report-dashboard-panel {
  overflow: visible;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.report-kpi {
  position: relative;
  display: grid;
  min-height: 112px;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(215, 225, 236, 0.86);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.86);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.report-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--blue);
}

.report-kpi.cyan::before {
  background: var(--cyan);
}

.report-kpi.violet::before {
  background: var(--violet);
}

.report-kpi.rose::before {
  background: #f43f5e;
}

.report-kpi:hover {
  z-index: 2;
  border-color: rgba(36, 87, 230, 0.28);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12), inset 0 1px rgba(255, 255, 255, 0.92);
  transform: translateY(-3px);
}

.report-kpi i {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: rgba(36, 87, 230, 0.08);
}

.report-kpi span,
.report-kpi em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.report-kpi strong {
  margin-top: 14px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

.report-kpi small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
}

.report-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.9fr);
  gap: 16px;
  padding: 0 16px 16px;
}

.report-chart,
.report-rank {
  border: 1px solid rgba(215, 225, 236, 0.86);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.report-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-section-title strong {
  font-size: 16px;
}

.report-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.trend-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  align-items: end;
  min-height: 256px;
  gap: 12px;
  border-radius: 8px;
  padding: 28px 18px 14px;
  background:
    repeating-linear-gradient(180deg, rgba(148, 163, 184, 0.2) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, rgba(36, 87, 230, 0.08), rgba(18, 169, 199, 0.04));
}

.trend-point {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  height: 210px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.trend-point span {
  display: block;
  width: 100%;
  max-width: 34px;
  height: var(--h);
  min-height: 10px;
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, #54b6ff, #2457e6);
  box-shadow: 0 12px 22px rgba(36, 87, 230, 0.18);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.trend-point b {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.trend-point em {
  position: absolute;
  bottom: calc(var(--h) + 34px);
  left: 50%;
  z-index: 4;
  display: grid;
  min-width: 112px;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.15);
  font-size: 12px;
  font-style: normal;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.trend-point em strong {
  color: var(--ink);
  font-size: 17px;
}

.trend-point:hover span,
.trend-point:focus-visible span {
  filter: saturate(1.25);
  transform: scaleY(1.04);
}

.trend-point:hover em,
.trend-point:focus-visible em {
  opacity: 1;
  transform: translate(-50%, 0);
}

.report-rank-list {
  display: grid;
  gap: 9px;
}

.report-rank-list article {
  display: grid;
  grid-template-columns: 28px minmax(90px, 1.1fr) minmax(90px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 30px;
}

.report-rank-list i {
  display: grid;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #ff944d, #ff6a3d);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
}

.report-rank-list span {
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 850;
}

.report-rank-list div {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.report-rank-list b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6577f3, #ff7a3d);
  transition: width 0.18s ease, filter 0.18s ease;
}

.report-rank-list strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.report-rank-list article:hover b {
  filter: saturate(1.25);
}

.report-rank-list article:hover span {
  color: var(--blue);
}

.report-box pre {
  min-height: 170px;
  max-height: 330px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: #1f2937;
  background: #f8fafc;
  white-space: pre-wrap;
  line-height: 1.65;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.report-box button {
  justify-self: start;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: none;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px;
  border-radius: var(--radius-panel);
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

@keyframes shine {
  to {
    transform: translateX(120%);
  }
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes navSubReveal {
  from {
    opacity: 0;
    transform: scaleY(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
}

@keyframes shaderDrift {
  from {
    transform: translate3d(-2%, -1%, 0) rotate(-2deg) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) rotate(3deg) scale(1.05);
  }
}

@keyframes brandPulse {
  0%,
  100% {
    filter: saturate(1);
    transform: translateY(0);
  }
  50% {
    filter: saturate(1.25);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.toast.show {
  display: block;
}

/* Premium visual pass: calmer Apple-like surfaces, clearer hierarchy, lighter chrome. */
body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 251, 0.78) 280px),
    linear-gradient(135deg, rgba(36, 87, 230, 0.07), transparent 34%),
    linear-gradient(225deg, rgba(18, 169, 199, 0.08), transparent 36%),
    repeating-linear-gradient(90deg, rgba(142, 161, 184, 0.07) 0 1px, transparent 1px 96px),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.app-shell {
  grid-template-columns: 286px 1fr;
}

.sidebar {
  gap: 16px;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 26%),
    linear-gradient(145deg, #0d172b, #12233d 58%, #0c1a2d);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.08), 14px 0 34px rgba(15, 23, 42, 0.12);
}

.sidebar .brand-row {
  margin-bottom: 2px;
  padding: 8px 6px 18px;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.brand-mark {
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(36, 87, 230, 0.18);
}

.nav-list {
  gap: 4px;
  padding-right: 4px;
}

.nav-item {
  min-height: 40px;
  border-radius: 9px;
  color: rgba(237, 244, 255, 0.76);
  font-size: 15px;
  letter-spacing: 0;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.14);
}

.nav-item.active {
  color: #fff;
}

.role-card {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.main {
  padding: 26px 28px 38px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(170px, 238px) minmax(0, 1fr);
  margin: -26px -28px 24px;
  padding: 14px 28px 12px;
  background: rgba(246, 249, 253, 0.78);
  border-bottom-color: rgba(215, 225, 236, 0.72);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(22px) saturate(1.35);
}

.top-actions {
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}

.top-actions .primary-btn,
.top-actions .ghost-btn,
.top-actions .icon-btn,
.top-actions .system-pill {
  min-height: 36px;
  padding-right: 12px;
  padding-left: 12px;
  white-space: nowrap;
}

.top-actions .icon-btn {
  width: 36px;
  min-width: 36px;
  padding-right: 0;
  padding-left: 0;
}

.top-actions .icon-btn span {
  display: none;
}

.top-actions .global-search {
  width: 230px;
  min-height: 36px;
}

.eyebrow {
  color: #9a650d;
  font-size: 12px;
}

h1 {
  font-size: 28px;
  font-weight: 1000;
}

h2 {
  font-size: 17px;
  font-weight: 1000;
}

.global-search,
.system-pill,
.primary-btn,
.ghost-btn,
.icon-btn,
.tab-btn,
.column-menu summary {
  border-radius: 12px;
}

.global-search,
.ghost-btn,
.icon-btn,
.column-menu summary {
  border-color: rgba(142, 161, 184, 0.28);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06), inset 0 1px rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
}

.primary-btn {
  background: linear-gradient(180deg, #1f6fff, #1558d4);
  box-shadow: 0 12px 24px rgba(36, 87, 230, 0.22), inset 0 1px rgba(255, 255, 255, 0.24);
}

.ghost-btn:hover,
.icon-btn:hover,
.column-menu summary:hover {
  border-color: rgba(36, 87, 230, 0.22);
  background: #fff;
}

.view.active {
  gap: 20px;
}

.metric-grid {
  gap: 16px;
}

.metric,
.panel {
  border-color: rgba(215, 225, 236, 0.78);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08), inset 0 1px rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(1.15);
}

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

.metric::before {
  height: 3px;
}

.metric span {
  color: #66758c;
}

.metric strong {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 1000;
}

.metric small {
  font-size: 13px;
  font-weight: 750;
}

.panel-head {
  min-height: 56px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px);
}

.panel-head span {
  color: #64748b;
  font-weight: 850;
}

.panel-head span:empty {
  display: none;
}

.leaderboard {
  gap: 11px;
  padding: 18px;
}

.leaderboard-row {
  min-height: 90px;
  border-color: rgba(215, 225, 236, 0.88);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.78);
}

.leaderboard-row.is-leader {
  min-height: 108px;
  border-color: rgba(180, 123, 24, 0.28);
  background:
    linear-gradient(135deg, rgba(180, 123, 24, 0.11), transparent 46%),
    rgba(255, 255, 255, 0.78);
}

.leaderboard-rank {
  border-radius: 10px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.7);
}

.leaderboard-title strong {
  font-size: 15.5px;
}

.leaderboard-score strong {
  font-size: 26px;
}

.table-toolbar {
  background: rgba(250, 252, 255, 0.86);
  backdrop-filter: blur(14px);
}

th {
  color: #475569;
  background: rgba(246, 249, 253, 0.92);
  font-size: 12px;
  text-transform: none;
}

td {
  background: rgba(255, 255, 255, 0.62);
}

tr:hover td {
  background: rgba(240, 247, 255, 0.72);
  transition: background 0.18s ease;
}

.grid-form input,
.grid-form select,
.login-form input,
.login-form select,
.filter-stack input,
.filter-stack select,
.template-toolbar input,
.automation-config-form input,
.automation-config-form select {
  border-color: rgba(142, 161, 184, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.grid-form input:focus,
.grid-form select:focus,
.filter-stack input:focus,
.filter-stack select:focus,
.template-toolbar input:focus {
  border-color: rgba(36, 87, 230, 0.48);
  box-shadow: 0 0 0 4px rgba(36, 87, 230, 0.1);
}

.badge {
  border-radius: 999px;
  font-weight: 900;
}

.mobile-nav {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 -18px 36px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(22px) saturate(1.3);
}

.mobile-nav {
  display: none;
}

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

  .global-search {
    width: min(280px, 34vw);
  }

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

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

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

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

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

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

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

  .assistant-phone-grid {
    grid-template-columns: 320px minmax(0, 1fr);
  }

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

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

  .template-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .guide-hero,
  .lesson-grid,
  .benchmark-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pdd-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .login-screen {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px;
  }

  .hub-map {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
    justify-items: center;
    padding: 18px 8px 2px;
    text-align: center;
  }

  .login-logo-frame {
    width: 118px;
    border-radius: 24px;
  }

  .login-logo-frame img {
    border-radius: 24px;
  }

  .login-brand-copy {
    gap: 6px;
  }

  .login-brand-copy p {
    font-size: 14px;
  }

  .login-brand-copy h1 {
    font-size: 30px;
  }

  .login-brand-copy span {
    font-size: 13px;
  }

  .app-shell {
    display: block;
  }

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

  .automation-config-form.compact-form {
    grid-template-columns: 1fr;
  }

  .automation-channel-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 14px 84px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    margin: -18px -14px 18px;
    padding: 18px 14px 14px;
  }

  .top-actions {
    display: none;
  }

  .ops-layout {
    grid-template-columns: 1fr;
  }

  .ops-filter-panel {
    position: static;
  }

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

  .filter-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
    min-width: 720px;
  }

  .table-toolbar-actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 24px;
  }

  .metric-grid,
  .content-grid,
  .desk-metrics,
  .assistant-phone-grid,
  .assistant-module-grid,
  .freshness-status-grid,
  .account-grid,
  .inventory-board,
  .sync-status-grid,
  .pdd-actions,
  .grid-form,
  .grid-form.two-col,
  .guide-hero,
  .guide-flow,
  .framework-flow,
  .finance-ledger-grid,
  .token-grid,
  .module-grid,
  .guide-cards,
  .lesson-grid,
  .benchmark-grid {
    grid-template-columns: 1fr;
  }

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

  .template-toolbar-metrics {
    justify-content: flex-start;
  }

  .template-module-grid,
  .template-detail-grid {
    grid-template-columns: 1fr;
  }

  .template-detail-grid > section:nth-child(odd) {
    border-right: 0;
  }

  .module-grid.ui-component-grid {
    grid-template-columns: 1fr;
  }

  .guide-hero {
    padding: 22px;
  }

  .guide-hero h2 {
    font-size: 27px;
  }

  .metric {
    min-height: 112px;
  }

  .metric strong {
    font-size: 28px;
  }

  .desk-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .assistant-role-tabs {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .assistant-phone {
    min-height: auto;
    border-radius: var(--radius-panel);
  }

  .assistant-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .desk-item-side {
    width: 100%;
    justify-content: space-between;
  }

  .account-card {
    align-items: stretch;
    flex-direction: column;
  }

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

  .grid-form .wide {
    grid-column: auto;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .alert-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  table {
    min-width: 720px;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
  }

  .mobile-nav button {
    display: grid;
    gap: 4px;
    place-items: center;
    min-height: 58px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 13px;
    font-weight: 800;
  }

  .mobile-nav .nav-icon {
    width: 19px;
    height: 19px;
    color: currentColor;
    font-size: 19px;
  }

  .mobile-nav span {
    line-height: 1;
  }

  .mobile-nav button.active {
    color: var(--blue);
  }
}

@media (max-width: 560px) {
  .filter-stack,
  .filter-actions {
    grid-template-columns: 1fr;
  }

  .collapsible-panel summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }
}

/* SaaS redesign pass: Mobbin-style workbench structure, bento sections, shader-like depth, softer motion. */
.app-shell {
  grid-template-columns: 254px minmax(0, 1fr);
}

.sidebar {
  padding: 20px 16px;
  min-width: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(160deg, #241b57 0%, #171430 42%, #0d1729 100%);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.08), 16px 0 40px rgba(16, 24, 40, 0.12);
}

.sidebar .brand-row {
  padding: 8px 8px 18px;
}

.nav-list {
  gap: 6px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-list::-webkit-scrollbar:horizontal {
  display: none;
}

.nav-item,
.nav-group-toggle {
  min-height: 44px;
  border-radius: 12px;
  font-size: 15px;
}

.nav-sublist {
  margin: 0 0 6px 8px;
  padding: 8px 0 8px 10px;
  background: rgba(8, 10, 29, 0.38);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.role-card {
  min-width: 0;
  overflow: hidden;
  gap: 8px;
  padding: 12px;
}

.role-card strong {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.role-card .role-name,
.role-card .role-scope {
  display: block;
  max-width: 100%;
}

.role-card .role-name {
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-card .role-scope {
  display: -webkit-box;
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.main {
  padding: 24px 28px 42px;
}

.topbar {
  margin: -24px -28px 24px;
  padding: 14px 28px;
  background: rgba(248, 251, 255, 0.78);
  border-bottom: 1px solid rgba(217, 226, 236, 0.72);
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.05);
}

.title-block h1 {
  font-size: 30px;
  letter-spacing: 0;
}

.eyebrow {
  color: #b7791f;
  font-weight: 950;
}

.global-search,
.system-pill,
.primary-btn,
.ghost-btn,
.icon-btn,
.column-menu summary,
.filter-button-scroll button {
  border-radius: 14px;
}

.command-center {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  min-height: 184px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  padding: 26px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(21, 18, 44, 0.98), rgba(37, 31, 86, 0.94) 48%, rgba(12, 93, 111, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  box-shadow: 0 28px 80px rgba(17, 24, 39, 0.18);
}

.command-center::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 72px);
  opacity: 0.55;
  pointer-events: none;
}

.command-center::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -80%;
  width: 42%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: rotate(18deg);
  animation: commandSweep 5.6s ease-in-out infinite;
  pointer-events: none;
}

.command-copy,
.command-pulse,
.command-actions {
  position: relative;
  z-index: 1;
}

.command-copy {
  display: grid;
  gap: 10px;
}

.command-kicker {
  color: rgba(190, 242, 255, 0.86);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.command-copy h2 {
  color: #fff;
  font-size: 36px;
  line-height: 1.1;
}

.command-copy p {
  max-width: 680px;
  color: rgba(234, 244, 255, 0.82);
  font-size: 15px;
  font-weight: 800;
}

.command-pulse {
  display: grid;
  min-width: 180px;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.command-pulse span,
.command-pulse small {
  color: rgba(234, 244, 255, 0.7);
  font-size: 12px;
  font-weight: 900;
}

.command-pulse strong {
  color: #fff;
  font-size: 24px;
}

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

.command-actions .primary-btn,
.command-actions .ghost-btn {
  min-height: 42px;
  white-space: nowrap;
}

.command-actions .ghost-btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

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

.center-metrics {
  margin-bottom: 18px;
}

.metric,
.panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 226, 236, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 52px rgba(16, 24, 40, 0.08), inset 0 1px rgba(255, 255, 255, 0.88);
}

.metric::after,
.hub-card::before,
.report-kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(37, 99, 235, 0.14), transparent 34%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.metric:hover::after,
.hub-card:hover::before,
.report-kpi:hover::after {
  opacity: 1;
}

.metric {
  min-height: 132px;
}

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

.hub-panel {
  padding-bottom: 4px;
}

.hub-map {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.hub-card {
  position: relative;
  min-height: 148px;
  border-radius: 18px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 255, 0.78)),
    rgba(255, 255, 255, 0.78);
}

.dashboard-bento {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.bento-rank,
.bento-table {
  min-height: 390px;
}

.bento-table .table-wrap {
  height: calc(100% - 58px);
}

.table-toolbar {
  border-bottom: 1px solid rgba(217, 226, 236, 0.72);
}

tbody tr {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

tbody tr:hover {
  transform: translateX(2px);
}

.leaderboard-row,
.list-item,
.guide-item,
.permission-card,
.account-card {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.leaderboard-row:hover,
.list-item:hover,
.guide-item:hover,
.permission-card:hover,
.account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16, 24, 40, 0.1);
}

@keyframes commandSweep {
  0%,
  62% {
    transform: translateX(-8%) rotate(18deg);
    opacity: 0;
  }
  72% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(-210%) rotate(18deg);
    opacity: 0;
  }
}

@media (max-width: 1180px) {
  .command-center {
    grid-template-columns: 1fr;
  }

  .command-actions {
    justify-content: flex-start;
  }

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

  .dashboard-bento {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .command-copy h2 {
    font-size: 28px;
  }

  .hub-map {
    grid-template-columns: 1fr;
  }
}

/* Login final pass: larger identity, calmer copy, aerial-city motion backdrop. */
.login-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: minmax(420px, 640px) minmax(380px, 430px);
  gap: clamp(54px, 8vw, 118px);
  padding: clamp(32px, 5vw, 72px);
  background:
    linear-gradient(112deg, rgba(7, 14, 34, 0.94), rgba(26, 33, 73, 0.88) 48%, rgba(20, 93, 124, 0.82)),
    #0b1227;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 9, 24, 0.12), rgba(4, 9, 24, 0.46)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.08));
  pointer-events: none;
}

.login-aerial-scene {
  position: absolute;
  inset: -18% -10%;
  z-index: -2;
  opacity: 0.72;
  transform: rotateX(58deg) rotateZ(-22deg) scale(1.2);
  transform-origin: center;
  filter: saturate(1.18) contrast(1.08);
  pointer-events: none;
}

.city-grid-layer,
.traffic-light-layer {
  position: absolute;
  inset: -30%;
}

.city-grid-layer {
  background:
    repeating-linear-gradient(90deg, rgba(188, 214, 255, 0.18) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(188, 214, 255, 0.13) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(42deg, transparent 0 76px, rgba(96, 165, 250, 0.15) 76px 78px, transparent 78px 156px),
    linear-gradient(135deg, rgba(10, 20, 46, 0.22), rgba(7, 69, 92, 0.32));
  animation: cityDrift 28s linear infinite;
}

.traffic-light-layer {
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(125, 211, 252, 0.58) 126px 130px, transparent 130px 260px),
    repeating-linear-gradient(0deg, transparent 0 94px, rgba(255, 255, 255, 0.32) 98px 101px, transparent 101px 212px);
  mix-blend-mode: screen;
  opacity: 0.48;
  animation: trafficGlide 9s linear infinite;
}

.login-brand-panel {
  position: relative;
  z-index: 1;
  justify-items: center;
  gap: 30px;
  min-height: 560px;
  padding: 18px 20px;
  text-align: center;
}

.login-logo-frame {
  width: min(360px, 38vw);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 34px 100px rgba(2, 6, 23, 0.32), inset 0 1px rgba(255, 255, 255, 0.9);
}

.login-logo-frame img {
  border-radius: 38px;
  object-fit: contain;
  transform: scale(1.04);
}

.login-brand-copy {
  justify-items: center;
  gap: 12px;
  max-width: 520px;
}

.login-brand-copy p {
  display: none;
}

.login-brand-copy h1 {
  font-size: clamp(46px, 4.2vw, 72px);
  line-height: 1;
  font-weight: 1000;
  text-shadow: 0 12px 34px rgba(2, 6, 23, 0.34);
}

.login-brand-copy span {
  color: rgba(226, 238, 255, 0.86);
  font-size: clamp(16px, 1.25vw, 20px);
  font-weight: 900;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 30px;
  border-color: rgba(255, 255, 255, 0.26);
  border-radius: 26px;
  background: rgba(35, 53, 86, 0.54);
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.36), inset 0 1px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px) saturate(1.28);
}

.login-card .brand-row {
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.login-card .brand-mark {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  border-radius: 20px;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.26);
}

.login-card .brand-mark img {
  object-fit: contain;
  transform: scale(1.06);
}

.login-card .brand-row strong {
  font-size: 18px;
  line-height: 1.25;
}

.login-card .brand-row span {
  margin-top: 5px;
  color: rgba(226, 238, 255, 0.74);
  font-size: 13px;
  font-weight: 750;
}

.login-card .login-form {
  margin-top: 0;
  gap: 16px;
}

.login-card label {
  gap: 8px;
  color: rgba(235, 244, 255, 0.82);
}

.login-card input {
  min-height: 46px;
  border-color: rgba(255, 255, 255, 0.26);
  border-radius: 13px;
  color: #091426;
  background: rgba(241, 247, 255, 0.94);
}

.login-card input:focus {
  border-color: rgba(125, 211, 252, 0.78);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.16);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 62px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  padding: 5px 8px;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.password-toggle:hover {
  background: rgba(37, 99, 235, 0.14);
}

.login-card .primary-btn {
  min-height: 48px;
  margin-top: 2px;
  border-radius: 14px;
}

.login-card > .login-note:last-child {
  margin-top: 18px;
}

@keyframes cityDrift {
  from {
    transform: translate3d(-40px, -20px, 0);
  }
  to {
    transform: translate3d(120px, 72px, 0);
  }
}

@keyframes trafficGlide {
  from {
    transform: translate3d(-120px, -60px, 0);
  }
  to {
    transform: translate3d(120px, 80px, 0);
  }
}

@media (max-width: 860px) {
  .login-screen {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 26px 18px 32px;
  }

  .login-aerial-scene {
    inset: -10% -40%;
    transform: rotateX(58deg) rotateZ(-24deg) scale(1.35);
  }

  .login-brand-panel {
    min-height: auto;
    gap: 18px;
    padding: 8px 0 0;
  }

  .login-logo-frame {
    width: min(210px, 52vw);
    border-radius: 30px;
  }

  .login-logo-frame img {
    border-radius: 30px;
  }

  .login-brand-copy h1 {
    font-size: 38px;
  }

  .login-brand-copy span {
    font-size: 14px;
  }

  .login-card {
    padding: 24px;
  }
}

/* Sidebar brand spacing polish. */
.sidebar {
  padding-top: 14px;
  gap: 12px;
}

.sidebar .brand-row {
  min-height: 62px;
  margin-bottom: 8px;
  padding: 4px 6px 16px;
  gap: 12px;
  align-items: center;
}

.sidebar .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 12px;
}

.sidebar .brand-row strong {
  line-height: 1.15;
}

.sidebar .brand-row span {
  margin-top: 5px;
  line-height: 1.2;
}

.sidebar .nav-list {
  padding-top: 6px;
}

.sidebar .nav-group[data-group-id="system"] {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dashboard welcome card: softer daily workspace instead of a heavy banner. */
.dashboard-view .command-center {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  min-height: 112px;
  padding: 20px 22px;
  color: #152033;
  border-color: rgba(220, 229, 242, 0.82);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.88)),
    radial-gradient(circle at 18% 0%, rgba(95, 111, 255, 0.12), transparent 34%),
    radial-gradient(circle at 86% 20%, rgba(18, 169, 199, 0.12), transparent 30%);
  box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08), inset 0 1px rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.12);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.dashboard-view .command-center:hover {
  transform: translateY(-1px);
  border-color: rgba(180, 199, 224, 0.92);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.11), inset 0 1px rgba(255, 255, 255, 0.96);
}

.dashboard-view .command-center::before {
  background:
    linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.05), transparent),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.08) 0 1px, transparent 1px 88px);
  opacity: 0.58;
}

.dashboard-view .command-center::after {
  display: none;
}

.command-avatar {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(209, 220, 235, 0.9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(36, 87, 230, 0.16);
}

.command-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.08);
}

.dashboard-view .command-copy {
  gap: 7px;
}

.dashboard-view .command-kicker {
  color: #7a8496;
  font-size: 13px;
  font-weight: 850;
  text-transform: none;
}

.dashboard-view .command-copy h2 {
  color: #172033;
  font-size: clamp(24px, 1.9vw, 30px);
  line-height: 1.12;
  letter-spacing: 0;
}

.dashboard-view .command-copy p {
  max-width: 760px;
  color: #6a778d;
  font-size: 13px;
  font-weight: 760;
}

.dashboard-view .command-pulse {
  min-width: 132px;
  gap: 3px;
  border-color: rgba(208, 220, 236, 0.92);
  border-radius: 16px;
  padding: 10px 12px;
  color: #172033;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.86);
}

.dashboard-view .command-pulse span,
.dashboard-view .command-pulse small {
  color: #728097;
}

.dashboard-view .command-pulse strong {
  color: #172033;
  font-size: 21px;
}

.dashboard-view .command-actions {
  gap: 10px;
}

.dashboard-view .command-actions .primary-btn,
.dashboard-view .command-actions .ghost-btn {
  min-height: 42px;
  border-radius: 14px;
}

.dashboard-view .command-actions .ghost-btn {
  color: #334155;
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(255, 255, 255, 0.84);
}

.dashboard-view .command-actions .ghost-btn:hover {
  background: #fff;
}

@media (max-width: 1320px) {
  .top-actions {
    flex-wrap: wrap;
    row-gap: 8px;
  }
}

/* Quiet navigation feedback. */
.nav-item,
.nav-group-toggle,
.nav-subitem {
  overflow: hidden;
  isolation: isolate;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.nav-item:hover,
.nav-item.active,
.nav-group-toggle:hover,
.nav-group.active .nav-group-toggle {
  border-color: rgba(125, 211, 252, 0.22);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.14), rgba(139, 92, 246, 0.12));
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.1), inset 0 1px rgba(255, 255, 255, 0.11);
}

/* SaaS completion pass: micro-interactions, table polish, and explicit feedback. */
.view.active.is-entering {
  animation: viewEnter 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-btn,
.ghost-btn,
.icon-btn,
.tab-btn,
.mini-btn,
.column-menu summary,
.filter-button-scroll button {
  transition:
    transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.primary-btn.is-loading,
.ghost-btn.is-loading,
.mini-btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.82;
}

.primary-btn.is-loading::before,
.ghost-btn.is-loading::before,
.mini-btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 0.72s linear infinite;
}

.empty-state {
  display: grid;
  gap: 6px;
  border-color: rgba(148, 163, 184, 0.42);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(6, 182, 212, 0.04)),
    rgba(248, 250, 252, 0.92);
  line-height: 1.7;
}

.empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.empty-state span {
  color: var(--muted);
}

.grid-form.is-permission-locked::before {
  content: "当前身份没有录入权限";
  grid-column: 1 / -1;
  display: block;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  color: #92400e;
  background: #fffbeb;
  font-size: 13px;
  font-weight: 900;
}

.table-wrap {
  border-radius: var(--radius-panel);
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

.table-wrap::-webkit-scrollbar-thumb:hover,
.filter-button-scroll::-webkit-scrollbar-thumb:hover,
.column-menu > div::-webkit-scrollbar-thumb:hover {
  background: rgba(37, 99, 235, 0.48);
}

table {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

table:not(.table-rendered) {
  opacity: 0.72;
  transform: translateY(4px);
}

th {
  z-index: 3;
  box-shadow: inset 0 -1px rgba(217, 226, 236, 0.96);
}

tbody tr {
  animation: tableRowEnter 0.3s ease both;
  animation-delay: min(calc(var(--row-index, 0) * 18ms), 180ms);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

tbody tr:hover {
  transform: none;
}

tbody tr:hover td {
  color: #0f172a;
  background: rgba(240, 247, 255, 0.88);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.78), inset 0 -1px rgba(191, 219, 254, 0.56);
}

tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 rgba(37, 99, 235, 0.56), inset 0 1px rgba(255, 255, 255, 0.78), inset 0 -1px rgba(191, 219, 254, 0.56);
}

.empty-row td,
.empty-row:hover td {
  background: transparent;
  box-shadow: none;
}

.table-empty {
  margin: 14px;
  text-align: center;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  text-align: left;
}

.table-sort-btn i {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  font-style: normal;
  font-size: 11px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.table-sort-btn:hover i,
th[data-sort-state="asc"] .table-sort-btn i,
th[data-sort-state="desc"] .table-sort-btn i {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.badge {
  border: 1px solid rgba(37, 99, 235, 0.14);
  color: #1d4ed8;
  background: #eff6ff;
}

.badge.red {
  border-color: rgba(240, 68, 56, 0.18);
  color: #b42318;
  background: #fef3f2;
}

.badge.green {
  border-color: rgba(16, 163, 127, 0.2);
  color: #047857;
  background: #ecfdf3;
}

.badge.gold {
  border-color: rgba(245, 158, 11, 0.22);
  color: #92400e;
  background: #fffbeb;
}

.table-actions {
  opacity: 0.72;
  transform: translateY(1px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

tbody tr:hover .table-actions {
  opacity: 1;
  transform: translateY(0);
}

.column-menu > div,
.permission-picker .role-checks,
.filter-button-scroll {
  overscroll-behavior: contain;
}

.column-menu[open] > div {
  animation: menuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.filter-button-scroll button:hover {
  transform: translateX(2px);
}

.filter-button-scroll button.active {
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.12), inset 3px 0 rgba(16, 185, 129, 0.7);
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 0;
}

.account-summary article {
  display: grid;
  gap: 4px;
  min-height: 86px;
  border: 1px solid rgba(215, 225, 236, 0.86);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.84));
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.account-summary span,
.account-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.account-summary strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.account-grid {
  grid-template-columns: minmax(280px, 0.82fr) minmax(520px, 1.35fr);
  align-items: start;
}

.account-section {
  min-width: 0;
}

.account-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  color: #334155;
  font-size: 14px;
}

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

.account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  padding: 12px 14px;
}

.account-card-pending {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.account-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-main strong {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  font-size: 15px;
}

.account-main strong small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.account-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-edit {
  position: relative;
}

.account-edit summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(142, 161, 184, 0.28);
  border-radius: 12px;
  padding: 0 11px;
  color: #334155;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.account-edit summary::-webkit-details-marker {
  display: none;
}

.account-edit[open] summary {
  border-color: rgba(37, 99, 235, 0.24);
  color: var(--blue);
  background: #fff;
}

.account-edit[open] {
  z-index: 8;
}

.account-edit[open]::after {
  content: "";
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(520px, 72vw);
  height: 1px;
}

.account-edit[open] .permission-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9;
  width: min(520px, 72vw);
  margin-top: 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.account-edit .permission-picker + .permission-picker {
  margin-top: 8px;
}

.account-card .ghost-btn,
.account-card .primary-btn {
  min-height: 34px;
  padding-right: 14px;
  padding-left: 14px;
  white-space: nowrap;
}

.permission-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 16px 18px;
}

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

@media (max-width: 1180px) {
  .account-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-grid,
  .account-card,
  .account-card-pending {
    grid-template-columns: 1fr;
  }

  .account-main span {
    white-space: normal;
  }
}

.grid-form input,
.grid-form select,
.filter-stack input,
.filter-stack select,
.template-toolbar input,
.automation-config-form input,
.automation-config-form select {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.grid-form input:hover,
.grid-form select:hover,
.filter-stack input:hover,
.filter-stack select:hover,
.template-toolbar input:hover,
.automation-config-form input:hover,
.automation-config-form select:hover {
  border-color: rgba(36, 87, 230, 0.32);
  background: #fff;
}

.toast {
  display: block;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast[data-tone="success"] {
  background: #047857;
}

.toast[data-tone="error"] {
  background: #b42318;
}

.toast[data-tone="pending"] {
  background: #1d4ed8;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
}

.profile-card {
  display: grid;
  gap: 14px;
  width: min(430px, 100%);
  border: 1px solid rgba(217, 226, 236, 0.86);
  border-radius: 22px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.22);
}

.profile-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 1000;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card h2 {
  font-size: 24px;
  line-height: 1.25;
}

.profile-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.profile-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.profile-card input {
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
}

.profile-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-chip {
  min-height: 32px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--blue);
  background: #eff6ff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.profile-chip:hover {
  border-color: rgba(37, 99, 235, 0.36);
  background: #dbeafe;
}

.skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 232, 240, 0.8), rgba(248, 250, 252, 0.96), rgba(226, 232, 240, 0.8));
  background-size: 220% 100%;
  animation: skeletonWave 1.2s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tableRowEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menuPop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes skeletonWave {
  to {
    background-position: -220% 0;
  }
}

@media (max-width: 1180px) {
  .dashboard-view .command-center {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-view .command-pulse,
  .dashboard-view .command-actions {
    grid-column: 1 / -1;
  }

  .dashboard-view .command-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .dashboard-view .command-center {
    grid-template-columns: 1fr;
    justify-items: flex-start;
    padding: 22px;
  }

  .command-avatar {
    width: 58px;
    height: 58px;
    border-radius: 17px;
  }
}

/* System management rebuilt as a DingTalk-style admin console. */
#accountGrid.account-grid {
  display: block;
  padding: 0;
}

.admin-console {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
}

.admin-side,
.member-board {
  border: 1px solid rgba(215, 225, 236, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.admin-side {
  padding: 14px;
}

.org-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.08));
}

.org-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.org-card strong {
  color: var(--ink);
  font-size: 15px;
}

.org-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-side-nav {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.admin-side-nav button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  color: #475569;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.admin-side-nav button:hover,
.admin-side-nav button.active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.member-board {
  overflow: hidden;
}

.member-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(215, 225, 236, 0.86);
  background: rgba(250, 252, 255, 0.78);
}

.member-board-head div {
  display: grid;
  gap: 4px;
}

.member-board-head strong {
  color: var(--ink);
  font-size: 18px;
}

.member-board-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.member-table-head,
.member-item > summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(110px, 0.8fr) minmax(150px, 1fr) 74px 74px 58px;
  align-items: center;
  gap: 12px;
}

.member-table-head {
  padding: 11px 18px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.92);
  font-size: 12px;
  font-weight: 950;
}

.member-list {
  display: grid;
}

.member-item {
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
}

.member-item > summary {
  min-height: 64px;
  padding: 10px 18px;
  cursor: pointer;
  list-style: none;
  transition: background 0.16s ease;
}

.member-item > summary::-webkit-details-marker {
  display: none;
}

.member-item > summary:hover,
.member-item[open] > summary {
  background: rgba(240, 247, 255, 0.86);
}

.member-avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-size: 13px;
  font-weight: 1000;
}

.member-avatar.org {
  width: 42px;
  height: 42px;
}

.member-name {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.member-name .member-avatar {
  grid-row: span 2;
}

.member-name strong,
.member-name small,
.member-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name strong {
  color: var(--ink);
  font-size: 14px;
}

.member-name small,
.member-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.member-open {
  justify-self: end;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.member-detail {
  display: grid;
  gap: 16px;
  padding: 16px 18px 18px 64px;
  border-top: 1px solid rgba(191, 219, 254, 0.72);
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0.94));
}

.member-detail-head {
  display: grid;
  gap: 4px;
}

.member-detail-head strong,
.member-detail h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.member-detail-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.admin-check-grid.warehouse-grid {
  display: block;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 999px;
  padding: 0 11px;
  color: #334155;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.admin-check:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.32);
  color: var(--blue);
  background: #eff6ff;
}

.admin-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
}

.warehouse-picker {
  position: relative;
  width: min(760px, 100%);
}

.warehouse-picker > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 12px;
  padding: 0 12px 0 14px;
  color: #334155;
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.warehouse-picker > summary::-webkit-details-marker {
  display: none;
}

.warehouse-picker > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.warehouse-picker[open] > summary {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.warehouse-picker[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.warehouse-picker > summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-picker > summary strong {
  margin-left: auto;
  color: var(--blue);
  font-size: 12px;
}

.warehouse-picker-panel {
  margin-top: 8px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.warehouse-picker-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.warehouse-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 10px;
  padding: 0 10px;
  color: #64748b;
  background: #f8fafc;
}

.warehouse-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.warehouse-picker-tools button {
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 10px;
  padding: 0 12px;
  color: #334155;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.warehouse-picker-tools button:hover {
  border-color: rgba(37, 99, 235, 0.34);
  color: var(--blue);
  background: #eff6ff;
}

.warehouse-picker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 168px;
  overflow: auto;
  padding-right: 4px;
}

.member-actions {
  display: flex;
  gap: 10px;
}

.member-section-title {
  padding: 18px 18px 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 1000;
}

.admin-empty {
  display: grid;
  gap: 5px;
  margin: 0 18px 18px;
  border: 1px dashed rgba(148, 163, 184, 0.48);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  background: rgba(248, 250, 252, 0.86);
}

.admin-empty strong {
  color: var(--ink);
}

.site-record {
  position: fixed;
  right: 18px;
  bottom: 14px;
  z-index: 20;
  font-size: 12px;
  line-height: 1;
  opacity: 0.72;
}

.site-record a {
  color: rgba(71, 85, 105, 0.9);
  text-decoration: none;
}

.site-record a:hover {
  color: var(--blue);
}

.login-screen:not(.hidden) ~ .site-record a {
  color: rgba(226, 232, 240, 0.76);
}

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

  .member-table-head {
    display: none;
  }

  .member-item > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .member-item > summary > .member-meta,
  .member-item > summary > .badge,
  .member-item > summary > button {
    grid-column: 1 / -1;
  }

  .member-detail {
    padding-left: 18px;
  }
}
