﻿:root {
  color-scheme: light;
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-2: #f7faff;
  --surface-3: #eaf2ff;
  --ink: #132238;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #dbe7f6;
  --line-strong: #b9cbe2;
  --nav: #ffffff;
  --nav-2: #f8fbff;
  --green: #2563eb;
  --green-dark: #1d4ed8;
  --green-soft: #eaf2ff;
  --blue: #2563eb;
  --blue-soft: #eaf2ff;
  --red: #bf5555;
  --red-soft: #fbebeb;
  --amber: #aa7a24;
  --amber-soft: #fff5df;
  --gold: #c8a24a;
  --teal: #4a9aa0;
  --shadow: 0 12px 28px rgba(30, 64, 120, 0.08);
  --shadow-soft: 0 4px 14px rgba(30, 64, 120, 0.06);
  --shadow-lift: 0 18px 38px rgba(28, 55, 96, 0.14);
  --radius: 8px;
  --space: 16px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-number: "DIN Alternate", "Segoe UI", Arial, sans-serif;
  --font-code: Consolas, "SFMono-Regular", monospace;
  --text-caption: 12px;
  --text-meta: 13px;
  --text-body: 14px;
  --text-emphasis: 15px;
  --text-strong: 16px;
  --title-section: 18px;
  --title-page: 24px;
  --number-kpi: 32px;
  --number-focus: 36px;
  --weight-regular: 500;
  --weight-medium: 600;
  --weight-field: 700;
  --weight-card-title: 750;
  --weight-title: 800;
  --weight-kpi: 850;
  --line-body: 1.5;
  --line-compact: 1.25;
  --line-title: 1.2;
  --line-number: 1;
}

.customer-workspace .filters,
.customer-workspace .list-filters {
  margin-bottom: 12px;
}

.customer-split {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.customer-list-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid #d9e5f6;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: #10213d;
}

.customer-list-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.customer-list-main > span:last-child {
  min-width: 0;
}

.customer-list-main strong,
.customer-list-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: 0 0 auto;
}

.customer-list-meta em {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.customer-list-meta em.warn {
  color: #925c12;
  background: #fff8ed;
  border: 1px solid #ffd59a;
}

.customer-list-meta em.good {
  color: #067647;
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.customer-list-item.active {
  border-color: #1769ff;
  background: #f2f7ff;
}

.customer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #eaf2ff;
  color: #1769ff;
  border: 1px solid #cfe1ff;
  font-size: 16px;
  font-weight: 800;
  object-fit: cover;
}

.customer-avatar.large {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 18px;
}

.customer-list-item strong,
.customer-list-item b {
  display: block;
  font-size: 14px;
}

.customer-list-item small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.customer-detail {
  border: 1px solid #d9e5f6;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}

.customer-detail-head,
.customer-member-card,
.customer-row,
.customer-action-log {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.customer-profile-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.customer-detail-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.notice-inline {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d8e4f5;
  background: #f7fbff;
  color: #536784;
  font-size: 13px;
  line-height: 1.6;
}

.notice-inline.warn {
  border-color: #ffd59a;
  background: #fff8ed;
  color: #925c12;
}

.customer-mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.customer-mini-kpis div {
  border: 1px solid #d9e5f6;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.customer-mini-kpis span,
.customer-member-card small,
.customer-row small,
.customer-action-log small,
.customer-action-log time {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.customer-mini-kpis b {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.customer-block {
  border-top: 1px solid #e6eef8;
  padding-top: 12px;
  margin-top: 12px;
}

.customer-block h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.customer-member-card,
.customer-row,
.customer-action-log {
  border: 1px solid #e1eaf6;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}

.customer-member-card button {
  margin-top: 6px;
}

.customer-inline-form,
.customer-action-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

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

.customer-action-form button {
  grid-column: 1 / -1;
}

.customer-inline-form input,
.customer-action-form input,
.customer-action-form select {
  min-width: 0;
}

.block {
  display: block;
}

@media (max-width: 980px) {
  .customer-split {
    grid-template-columns: 1fr;
  }

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

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.35);
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fbfdff 0%, var(--bg) 48%, #eef4ff 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--line-body);
}

body::before {
  content: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: var(--green-dark);
  color: #fff;
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(31, 39, 34, 0.04);
}

button:hover,
.file-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(28, 55, 96, 0.12);
}

button.secondary:hover,
.file-action:hover {
  border-color: var(--line-strong);
  background: #f8fbff;
}

button.compact {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
  box-shadow: none;
}

.copy-inline {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  word-break: break-all;
}

.copy-inline:hover {
  color: var(--green-dark);
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

.copy-inline.copied {
  color: var(--green-dark);
}

.purchase-action-button {
  width: fit-content;
}

.purchase-action-menu {
  width: fit-content;
  margin-top: 6px;
  position: relative;
}

.purchase-action-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}

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

.purchase-action-menu summary::after {
  content: "\25BE";
  margin-left: 6px;
  color: var(--muted);
  font-size: 10px;
}

.purchase-action-menu[open] summary {
  border-color: var(--line-strong);
  background: #fbfdfb;
}

.purchase-action-popover {
  display: none;
}

.purchase-action-menu[open] .purchase-action-popover {
  position: absolute;
  top: 32px;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 196px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.purchase-action-menu[open] .purchase-action-button {
  width: 100%;
  justify-content: flex-start;
  margin: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.purchase-action-menu[open] .purchase-action-button:hover {
  border-color: transparent;
  background: var(--surface-2);
  transform: none;
}

.purchase-action-status {
  width: fit-content;
  margin: 2px 4px;
}
.file-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: var(--radius);
  padding: 0 12px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(31, 39, 34, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

button.warning {
  background: var(--amber);
}

button.danger {
  background: var(--red);
}

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

input,
select,
textarea {
  min-height: 34px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  box-shadow: inset 0 1px 0 rgba(31, 39, 34, 0.03);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: #93b4f5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

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

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 22px 14px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  color: var(--ink);
  box-shadow: 8px 0 24px rgba(30, 64, 120, 0.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 0 8px 0;
  border-bottom: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

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

.brand strong {
  color: #0f3d8c;
  font-size: 20px;
  line-height: 1.1;
}

.brand span,
.eyebrow,
label span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.sidebar .brand span {
  color: var(--muted);
}

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

.nav-group {
  margin: 14px 8px 4px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-group:first-child {
  margin-top: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: none;
}

.nav-item.active,
.nav-item:hover {
  background: #eaf2ff;
  border-color: #d7e6ff;
  color: var(--green-dark);
  box-shadow: none;
}

.nav-item.active {
  background: linear-gradient(90deg, #eaf2ff, #f5f9ff);
  border-color: #cfe0ff;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: var(--green-dark);
}

.nav-item-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #49627f;
  background: transparent;
  box-shadow: none;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  color: #1761d8;
  background: transparent;
  box-shadow: none;
}

.nav-arrow {
  color: var(--muted-2);
}

.workspace {
  min-width: 0;
  max-width: 1520px;
  width: 100%;
  padding: 0 24px 30px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 0 -24px 22px;
  padding: 16px 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 12px rgba(30, 64, 120, 0.04);
  backdrop-filter: blur(8px);
}

.topbar-menu {
  display: inline-grid;
  place-items: center;
  gap: 4px;
  width: 36px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.topbar-menu span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #334155;
}

.page-heading {
  margin-bottom: 14px;
}

.page-heading h1 {
  margin-bottom: 2px;
  color: #0f1f3a;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 4px;
  letter-spacing: 0;
  color: var(--green);
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
}

h3 {
  font-size: 15px;
}

.filters {
  display: grid;
  grid-template-columns: 170px 150px 150px;
  gap: 8px;
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 150px 180px 42px auto;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  gap: 12px;
}

.global-search {
  position: relative;
  min-width: 0;
}

.global-search input {
  min-height: 42px;
  border-radius: 8px;
  padding-left: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(219, 231, 246, 0.2);
}

.topbar-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.topbar-status span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-status strong {
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}

.topbar-month span {
  color: #1d4ed8;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
}

.topbar-icon-button {
  position: relative;
  min-height: 42px;
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
}

.topbar-icon-button::before {
  content: none;
}

.notification-dot {
  position: absolute;
  right: -2px;
  top: -4px;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.current-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.avatar-dot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.avatar-dot::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 0 4px #fff;
}

.current-user strong {
  min-width: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
}

.current-user button {
  min-height: 30px;
  padding: 0 9px;
}

.login-mode {
  display: block;
}

.app-shell.loading-mode {
  display: block;
  min-height: 100dvh;
  background: #ffffff;
}

.app-shell.loading-mode .sidebar,
.app-shell.loading-mode .topbar,
.app-shell.loading-mode .page-heading,
.app-shell.loading-mode #notice {
  display: none !important;
}

.app-shell.loading-mode .workspace {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}

.app-shell.loading-mode #view {
  width: 100%;
}

.entry-loading-screen {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 0;
}

.entry-loading-content {
  display: grid;
  justify-items: center;
  transform: translateY(-6px);
}

.entry-loading-mark {
  position: relative;
  width: 24px;
  height: 24px;
  margin-bottom: 24px;
  animation: entry-loading-spin 1s linear infinite;
}

.entry-loading-mark span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 13px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-21px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.1);
}

.entry-loading-mark span:nth-child(1) { --angle: 0deg; background: #0975f6; opacity: 1; }
.entry-loading-mark span:nth-child(2) { --angle: 30deg; background: #1477ef; opacity: 0.96; }
.entry-loading-mark span:nth-child(3) { --angle: 60deg; background: #1f7cf1; opacity: 0.86; }
.entry-loading-mark span:nth-child(4) { --angle: 90deg; background: #4b91ef; opacity: 0.72; }
.entry-loading-mark span:nth-child(5) { --angle: 120deg; opacity: 0.58; }
.entry-loading-mark span:nth-child(6) { --angle: 150deg; opacity: 0.44; }
.entry-loading-mark span:nth-child(7) { --angle: 180deg; opacity: 0.34; }
.entry-loading-mark span:nth-child(8) { --angle: 210deg; opacity: 0.28; }
.entry-loading-mark span:nth-child(9) { --angle: 240deg; opacity: 0.24; }
.entry-loading-mark span:nth-child(10) { --angle: 270deg; opacity: 0.3; }
.entry-loading-mark span:nth-child(11) { --angle: 300deg; opacity: 0.42; }
.entry-loading-mark span:nth-child(12) { --angle: 330deg; opacity: 0.62; }

.entry-loading-screen h1 {
  margin: 0;
  color: #10213f;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.entry-loading-screen p {
  margin: 10px 0 0;
  color: #647b9d;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  .entry-loading-mark {
    animation-duration: 2s;
  }
}

.login-mode .sidebar,
.login-mode .topbar {
  display: none;
}

.login-mode .workspace {
  display: grid;
  place-items: center;
  min-height: 100vh;
  max-width: none;
  padding: 0;
}

.login-shell {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 20%, rgba(61, 155, 117, 0.16), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(75, 131, 147, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfdfb, #eef7f2);
}

.login-card {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lift);
}

.login-brand {
  margin-bottom: 18px;
  padding: 0 0 14px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.login-form button {
  width: 100%;
}

.login-error {
  margin: 0;
  color: var(--red);
  font-size: 12px;
}

label {
  display: grid;
  gap: 5px;
}

.notice {
  margin-bottom: 14px;
  border: 1px solid #f1d28e;
  background: var(--amber-soft);
  color: #68410a;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}

.section {
  margin-bottom: 16px;
}

.panel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.panel::before,
.kpi::before {
  content: none;
}

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

.panel-header.compact {
  margin-bottom: 6px;
}

.panel-header h2 {
  margin-bottom: 0;
}

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

.kpi {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 22px 0;
  min-height: 172px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 32px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #eef5ff;
  opacity: 0.9;
}

.kpi:hover,
.panel:hover {
  box-shadow: var(--shadow);
}

.dashboard-grid .panel:hover,
.management-summary:hover {
  transform: none;
}

.kpi:hover {
  transform: translateY(-2px);
}

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

.kpi > span:not(.kpi-icon) {
  position: relative;
  z-index: 1;
  display: block;
  padding-right: 104px;
}

.kpi strong {
  display: block;
  margin: 12px 0 8px;
  padding-right: 86px;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
  color: #1d4ed8;
  position: relative;
  z-index: 1;
}

.kpi p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  min-height: 58px;
  padding: 12px 112px 12px 22px;
  border-top: 1px solid var(--line);
  background: #fbfdff;
  color: #52627a;
  overflow-wrap: anywhere;
}

.kpi.positive strong {
  color: #047857;
}

.kpi.negative strong {
  color: var(--red);
}

.alipay-complaint-kpis .kpi {
  display: flex;
  flex-direction: column;
  min-height: 148px;
  padding: 20px 22px 18px;
}

.alipay-complaint-kpis .kpi::after {
  right: 20px;
  top: 30px;
  width: 74px;
  height: 74px;
  opacity: 0.62;
}

.alipay-complaint-kpis .kpi-icon {
  right: 20px;
  top: 30px;
  z-index: 0;
  width: 74px;
  height: 74px;
  color: #8aa0bd;
  opacity: 0.34;
  pointer-events: none;
}

.alipay-complaint-kpis .kpi > span:not(.kpi-icon),
.alipay-complaint-kpis .kpi strong,
.alipay-complaint-kpis .kpi p {
  position: relative;
  z-index: 1;
}

.alipay-complaint-kpis .kpi > span:not(.kpi-icon) {
  padding-right: 92px;
}

.alipay-complaint-kpis .kpi strong {
  margin: 10px 0 8px;
  padding-right: 92px;
  font-size: 24px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.alipay-complaint-kpis .kpi p {
  position: static;
  min-height: 0;
  margin-top: auto;
  padding: 10px 92px 0 0;
  border-top: 1px solid var(--line);
  background: transparent;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dashboard-kpis .kpi {
  border-color: #d9e6f7;
}

.dashboard-kpis .kpi.income {
  background: #fff;
  border-color: #c8dcff;
}

.dashboard-kpis .kpi.income strong {
  color: #1d4ed8;
}

.dashboard-kpis .kpi.cost {
  background: #fff;
  border-color: #f3d8a4;
}

.dashboard-kpis .kpi.cost strong {
  color: #9a681f;
}

.dashboard-kpis .kpi.positive {
  background: #fff;
  border-color: #b7e4cd;
}

.dashboard-kpis .kpi.negative {
  background: #fff;
  border-color: #efcccc;
}

.dashboard-kpis .kpi.sync {
  background: #fff;
  border-color: #cfdcff;
}

.dashboard-kpis .kpi.sync strong {
  color: #4338ca;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(420px, 1.08fr) minmax(300px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.dashboard-grid > .panel {
  min-width: 0;
}

.management-summary {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-color: #b9d6ff;
  background: linear-gradient(90deg, #f4f9ff, #ffffff);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.management-summary p {
  margin-bottom: 0;
}

.management-summary .status-line {
  justify-content: flex-end;
  margin-top: 0;
}

.chart-bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px minmax(80px, 1fr) 110px;
  align-items: center;
  gap: 10px;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #e9f0eb;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(31, 39, 34, 0.08);
}

.bar-fill {
  height: 100%;
  background: var(--teal);
}

.trend {
  width: 100%;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(#fff, #fbfcf8);
}

.trend-point {
  cursor: help;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: rgba(247, 250, 248, 0.9);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.pill.good {
  background: var(--green-soft);
  color: var(--green);
  border-color: #c8e4d2;
}

.pill.warn {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: #f1d28e;
}

.pill.bad {
  background: #fae6e6;
  color: var(--red);
  border-color: #e9bbbb;
}

.pill.danger {
  background: #fae6e6;
  color: var(--red);
  border-color: #e9bbbb;
}

.text-good {
  color: var(--green-dark);
}

.text-warn {
  color: var(--amber);
}

.task-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: none;
}

.task-panel-compact {
  gap: 8px;
  margin-bottom: 0;
  background: #fbfdfb;
}

.task-panel-compact .task-panel-head {
  align-items: center;
}

.task-panel-compact .task-stats {
  gap: 6px;
}

.task-panel-compact .task-results {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-panel-full {
  margin-top: 0;
}

.task-panel-full .task-results {
  grid-template-columns: 1fr;
  max-height: 230px;
  overflow: auto;
}

.task-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-panel-head p {
  margin: 4px 0 0;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7eee8;
  box-shadow: inset 0 1px 2px rgba(31, 39, 34, 0.08);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 0.25s ease;
}

.task-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-time-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 12px;
}

.task-results {
  display: grid;
  gap: 6px;
}

.task-result-row {
  display: grid;
  grid-template-columns: 148px 116px 138px minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 12px;
}

.task-result-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-task-settings {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.auto-task-settings button {
  justify-self: start;
}

.manual-purchase-form {
  display: grid;
  gap: 10px;
}

.manual-purchase-form textarea {
  min-height: 132px;
  font-family: "Consolas", "Microsoft YaHei", monospace;
}

.manual-purchase-form .actions {
  justify-content: flex-start;
}

.auto-task-notes {
  display: grid;
  gap: 10px;
}

.auto-task-notes div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.auto-task-notes span {
  color: var(--muted);
  font-size: 12px;
}

.redemption-summary-panel {
  min-width: 0;
}

.purchase-risk-panel {
  min-width: 0;
}

.purchase-risk-list {
  display: grid;
  gap: 8px;
}

.purchase-risk-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.purchase-risk-metrics button {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.purchase-risk-metrics button:hover {
  border-color: #c8e4d2;
  transform: none;
}

.purchase-risk-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-risk-metrics strong {
  overflow: hidden;
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-risk-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 2px 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.purchase-risk-row:hover {
  border-color: #c8e4d2;
  transform: none;
}

.purchase-risk-row strong,
.purchase-risk-row span,
.purchase-risk-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-risk-row strong {
  grid-row: span 2;
  color: var(--text);
}

.purchase-risk-row em {
  color: var(--amber);
  font-style: normal;
}

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

.redemption-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.redemption-metrics strong {
  display: block;
  margin: 4px 0;
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1;
}

.redemption-metrics p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.task-results-title {
  margin: 0;
}

.anomaly-summary {
  cursor: default;
}

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

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

.anomaly-card {
  min-height: 92px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
}

.anomaly-card span {
  color: var(--muted);
  font-size: 12px;
}

.anomaly-card strong {
  display: block;
  margin: 5px 0;
  font-size: 24px;
  line-height: 1;
}

.anomaly-card p {
  margin-bottom: 0;
}

.anomaly-card.urgent strong {
  color: var(--red);
}

.anomaly-card.watch strong {
  color: var(--amber);
}

.anomaly-card.remind strong {
  color: var(--green);
}

.anomaly-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.anomaly-metric {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: none;
}

.anomaly-metric span {
  color: var(--muted);
  font-size: 12px;
}

.anomaly-metric strong {
  font-size: 26px;
  line-height: 1;
}

.anomaly-metric.urgent strong {
  color: var(--red);
}

.anomaly-metric.watch strong {
  color: var(--amber);
}

.anomaly-metric.remind strong {
  color: var(--green);
}

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

.anomaly-row {
  display: grid;
  grid-template-columns: 128px minmax(280px, 1fr) minmax(220px, 0.75fr);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.anomaly-row:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.anomaly-row:focus-visible {
  outline: 2px solid #9bc8aa;
  outline-offset: 2px;
}

.anomaly-row-priority,
.anomaly-row-action {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.anomaly-row-priority strong {
  font-size: 24px;
  line-height: 1;
}

.anomaly-row-priority > span:last-child,
.anomaly-row-action span {
  color: var(--muted);
  font-size: 12px;
}

.anomaly-row-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.anomaly-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.anomaly-row-title strong {
  font-size: 15px;
}

.anomaly-row-title span,
.anomaly-row-meta {
  color: var(--muted);
  font-size: 12px;
}

.anomaly-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.anomaly-row-meta span {
  min-width: 0;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anomaly-row-latest,
.anomaly-row-action strong {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.5;
  white-space: normal;
}

.anomaly-row-action {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--surface-2);
}

td.wide-text {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 45, 39, 0.28);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(880px, 100%);
  max-height: min(760px, 90vh);
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-lift);
  padding: 18px;
}

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

.physical-detail-backdrop {
  z-index: 7000;
  padding: 24px;
  background: rgba(245, 248, 252, 0.94);
  backdrop-filter: blur(8px);
}

.physical-detail-card {
  width: min(900px, calc(100vw - 48px));
  max-height: min(780px, calc(100vh - 48px));
  padding: 22px;
  border-radius: 10px;
  border-color: #d9e4f3;
  box-shadow: 0 24px 70px rgba(21, 42, 74, 0.18);
}

.physical-detail-card .modal-header {
  align-items: center;
  margin: -2px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5edf8;
}

.physical-detail-card .modal-header h2 {
  margin: 0;
  color: #0f213d;
  font-size: 20px;
  line-height: 1.25;
}

.physical-detail-card .modal-header .muted {
  margin-top: 6px;
  color: #61718b;
}

.physical-detail-card .detail-grid {
  gap: 0;
  overflow: hidden;
  border: 1px solid #e1e9f5;
  border-radius: 8px;
  background: #fff;
}

.physical-detail-card .detail-item {
  padding: 12px 14px;
  border-right: 1px solid #edf2f8;
  border-bottom: 1px solid #edf2f8;
  background: #fff;
}

.physical-detail-card .detail-item:nth-child(2n) {
  border-right: 0;
}

.physical-detail-card .detail-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.physical-detail-card .detail-item span {
  color: #65758f;
  font-size: 12px;
}

.physical-detail-card .detail-item strong {
  margin-top: 5px;
  color: #0f213d;
  font-size: 14px;
  line-height: 1.45;
}

.physical-detail-card .detail-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5edf8;
}

.physical-detail-card .detail-section h3 {
  margin-bottom: 12px;
  color: #0f213d;
  font-size: 16px;
}

.physical-detail-card .combo-detail-list {
  gap: 10px;
}

.physical-detail-card .combo-detail-row {
  min-height: 74px;
  border-color: #d9e6f7;
  border-radius: 8px;
  background: #f8fbff;
}

.physical-detail-card .combo-detail-row b {
  color: #1262e5;
  font-size: 15px;
}

@media (max-width: 720px) {
  .physical-detail-backdrop {
    place-items: center;
    align-items: center;
    padding: 12px;
  }

  .physical-detail-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 16px;
  }

  .physical-detail-card .modal-header {
    flex-direction: row;
    align-items: flex-start;
  }

  .physical-detail-card .detail-grid {
    grid-template-columns: 1fr;
  }

  .physical-detail-card .detail-item,
  .physical-detail-card .detail-item:nth-child(2n),
  .physical-detail-card .detail-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #edf2f8;
  }

  .physical-detail-card .detail-item:last-child {
    border-bottom: 0;
  }
}

.trace-summary,
.trace-advice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.trace-advice {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.trace-advice p {
  margin: 6px 0 0;
}

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

.trace-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.trace-item time {
  color: var(--muted);
  font-size: 12px;
}

.trace-item p {
  margin: 4px 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 13px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:hover {
  background: #f8fbf8;
}

td:nth-child(n + 4):not(:last-child) {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.cell-stack strong,
.cell-stack span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-stack span {
  color: var(--muted);
  font-size: 12px;
}

.pickup-purchase-cell,
.pickup-logistics-cell {
  max-width: 260px;
}

.pickup-goods-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pickup-goods-title .purchase-combo-badge {
  height: 22px;
  padding-inline: 8px;
}

.pickup-purchase-cell .muted-line,
.pickup-logistics-cell span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-cell {
  gap: 6px;
  min-width: 180px;
}

.purchase-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.purchase-line strong {
  min-width: 0;
}

.purchase-account-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--green-border);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-account-badge.warn {
  border-color: #f5d99a;
  background: #fff8e5;
  color: #9a6200;
}

.purchase-account-badge.good {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: var(--green-dark);
}

.platform-order-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 0;
  color: var(--green-dark);
  text-decoration: none;
}

.platform-order-link:hover {
  text-decoration: underline;
}

.platform-order-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
}

.platform-order-link.is-static {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.mini-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.mini-card span,
.mini-card small {
  color: var(--muted);
  font-size: 12px;
}

.mini-card strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.compact-table th,
.compact-table td {
  padding: 8px 9px;
}

.employee-table {
  min-width: 2380px;
}

.hr-tabs-panel {
  padding: 10px;
}

.hr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hr-tab {
  min-width: 96px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.hr-tab.active {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}

.hr-attendance-table {
  min-width: 1480px;
}

.hr-schedule-table {
  min-width: 1180px;
}

.employee-table input,
.employee-table select {
  width: 100%;
  min-width: 82px;
  height: 32px;
  padding: 5px 7px;
  font-size: 12px;
}

.employee-table td {
  vertical-align: middle;
}

.employee-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.employee-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: default;
}

.employee-card:hover {
  border-color: rgba(38, 117, 92, 0.35);
  box-shadow: var(--shadow-lift);
}

.employee-card-head,
.employee-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.employee-card-head strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

.employee-card-head span:not(.pill),
.employee-card-foot .muted {
  display: block;
  margin-top: 3px;
  font-size: 12px;
}

.employee-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.employee-info-mini {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.employee-info-mini span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.employee-info-mini strong {
  display: block;
  min-height: 18px;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-info-mini.warn strong {
  color: var(--warn);
}

.employee-modal-card {
  width: min(1040px, 100%);
}

.employee-detail-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.employee-detail-layout section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.employee-detail-layout section.wide {
  grid-column: 1 / -1;
}

.employee-detail-layout h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.detail-grid,
.employee-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-item {
  min-width: 0;
}

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

.detail-item strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  word-break: break-all;
}

.detail-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.combo-detail-list {
  display: grid;
  gap: 8px;
}

.combo-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.combo-detail-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.combo-detail-row strong,
.combo-detail-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.combo-detail-row span {
  color: var(--muted);
  font-size: 12px;
}

.combo-detail-row b {
  color: var(--green-dark);
  white-space: nowrap;
}

.employee-edit-form label {
  min-width: 0;
}

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

.roster-group {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.roster-group > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--green-dark);
}

.roster-group div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

.roster-group p {
  margin: 0;
  min-width: 0;
}

.roster-group span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.roster-group em {
  display: block;
  color: var(--ink);
  font-style: normal;
  word-break: break-all;
}

.inline-details {
  min-width: 120px;
  max-width: 240px;
  font-size: 12px;
}

.inline-details summary {
  cursor: pointer;
  color: var(--green-dark);
  font-weight: 700;
}

.mini-field-list {
  display: grid;
  gap: 5px;
  max-height: 220px;
  overflow: auto;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.mini-field-list div {
  display: grid;
  gap: 2px;
  min-width: 180px;
}

.mini-field-list strong {
  color: var(--muted);
  font-size: 11px;
}

.mini-field-list span {
  color: var(--ink);
  word-break: break-all;
}

.redemption-table table {
  min-width: 980px;
}

.cell-primary strong {
  color: var(--green-dark);
}

.cell-primary b {
  color: var(--ink);
  font-weight: 700;
}

.money-value {
  color: #226f54;
  font-variant-numeric: tabular-nums;
}

.payment-amount {
  display: inline-flex;
  justify-content: flex-end;
  min-width: 92px;
  font-weight: 700;
}

.payment-amount.in {
  color: #1f8a5f;
}

.payment-amount.out {
  color: #c24a3a;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 22px;
  padding: 0 8px;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.mini-status.good {
  border-color: #b9dfce;
  background: #e9f6ef;
  color: var(--green-dark);
}

.mini-status.warn {
  border-color: #f1d28e;
  background: var(--amber-soft);
  color: var(--amber);
}

.mini-status.bad {
  border-color: #e9bbbb;
  background: #fae6e6;
  color: var(--red);
}

.mini-status.info {
  border-color: #b8d9ea;
  background: #e7f4f8;
  color: #2f6f86;
}

.mini-status.muted {
  border-color: #d6ded8;
  background: #f4f8f5;
  color: #7b8a82;
}

.purchase-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.purchase-verify-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  gap: 12px;
}

.compact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 10px;
}

.platform-order-form {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.browser-capture-form {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #cfe6d8;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f3fbf6, #fbfdfb);
}

.browser-capture-form button {
  background: #1f7c72;
  border-color: #1f7c72;
}

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

.tag-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.tag-row div {
  display: grid;
  min-width: 0;
}

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

.tag-row span {
  color: var(--muted);
  font-size: 12px;
}

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

.purchase-check-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.purchase-check-main {
  display: grid;
  grid-template-columns: auto minmax(160px, 1.1fr) minmax(180px, 1fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.purchase-check-main > div,
.purchase-check-detail > div {
  min-width: 0;
}

.purchase-order-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.purchase-order-title > strong {
  min-width: 0;
}

.purchase-combo-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid #c8e4d2;
  border-radius: 999px;
  background: #eaf7ef;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-combo-badge.child {
  border-color: #d8c7f0;
  background: #f3eefb;
  color: #6d3ba1;
}

.purchase-combo-entry {
  flex: 0 0 auto;
  height: 26px;
  padding-inline: 10px;
  border-color: #b8d8c4;
  background: #f4fbf6;
  color: var(--green-dark);
  font-weight: 800;
}

.invoice-shop-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.invoice-shop-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-width: 150px;
  cursor: pointer;
}

.invoice-shop-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.invoice-shop-chip span {
  color: var(--muted);
  font-size: 12px;
}

.invoice-fields {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(90px, .8fr);
  gap: 6px;
  min-width: 260px;
}

.invoice-fields input {
  min-width: 0;
}

.purchase-check-main strong,
.purchase-check-main p,
.purchase-check-detail strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-check-main p {
  margin: 2px 0 0;
}

.purchase-check-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.purchase-check-detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.purchase-check-detail strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.purchase-issue-cell {
  position: relative;
}

.purchase-issue-cell > strong {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.purchase-issue-more {
  margin-top: 2px;
}

.purchase-issue-more summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.purchase-issue-more summary::-webkit-details-marker {
  display: none;
}

.purchase-issue-more summary > span {
  display: inline-flex;
}

.purchase-issue-more summary .issue-collapsed {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.purchase-issue-more summary .issue-toggle {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-size: 12px;
}

.purchase-issue-more[open] summary .issue-collapsed {
  display: none;
}

.purchase-issue-more[open] summary .issue-toggle::before {
  content: "收起";
}

.purchase-issue-more[open] summary .issue-toggle {
  font-size: 0;
}

.purchase-issue-more[open] summary .issue-toggle::before {
  font-size: 12px;
}

.purchase-issue-more strong {
  overflow: visible;
  white-space: normal;
  line-height: 1.55;
}

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

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fbff 0%, #f4f8ff 100%);
  box-shadow: none;
}

.list-filter-field {
  flex: 0 1 160px;
  min-width: 140px;
}

.list-filter-search {
  flex: 1 1 320px;
  min-width: 260px;
}

.list-filter-month {
  flex-basis: 170px;
}

.list-filter-date-range {
  flex: 1 1 430px;
  min-width: 360px;
}

.date-range-control {
  display: grid;
  grid-template-columns: 112px 150px auto 150px;
  gap: 8px;
  align-items: center;
}

.date-range-control select,
.date-range-control input {
  width: 100%;
}

.date-range-separator {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.list-filter-page-size {
  flex-basis: 110px;
}

.list-toolbar > button {
  flex: 0 0 auto;
  min-width: 72px;
}

.list-toolbar-count {
  margin-left: auto;
  min-height: 34px;
  align-self: end;
}

.month-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-start;
}

.month-toolbar label {
  width: 180px;
}

.list-toolbar .pill,
.pagination .pill {
  background: rgba(255, 255, 255, 0.78);
}

.batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: #f6f9ff;
}

.batch-toolbar select {
  width: auto;
  min-width: 150px;
}

.invoice-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 12px;
  background: #f7faff;
}

.invoice-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #51637f;
  box-shadow: none;
}

.invoice-tabs button.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.tax-import-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.tax-import-panel label {
  min-width: min(360px, 100%);
  flex: 1;
}

.tax-import-panel input[type="file"] {
  padding: 9px 10px;
  background: #ffffff;
}

.tax-invoice-table td,
.tax-mapping-table td,
.tax-match-table td {
  vertical-align: top;
}

.tax-shop-maintenance {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(130px, 170px) minmax(150px, 210px) minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  background: #f8fbff;
}

.tax-shop-maintenance > div:first-child {
  display: grid;
  gap: 4px;
  align-self: center;
}

.tax-shop-maintenance label {
  display: grid;
  gap: 4px;
  margin: 0;
}

.tax-shop-maintenance label span {
  font-size: 12px;
  color: var(--text-muted);
}

.tax-shop-maintenance input,
.tax-shop-maintenance select {
  min-height: 36px;
}

.tax-shop-library-filters {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  background: #f8fbff;
}

.tax-shop-library-filters label {
  display: grid;
  gap: 4px;
  margin: 0;
}

.tax-shop-library-filters label span {
  font-size: 12px;
  color: var(--text-muted);
}

.tax-shop-library-filters input,
.tax-shop-library-filters select {
  min-height: 36px;
}

.mapping-edit-grid {
  display: grid;
  grid-template-columns: minmax(100px, 130px) minmax(220px, 1fr) minmax(140px, 180px) auto;
  gap: 8px;
  align-items: center;
  min-width: 680px;
}

.mapping-edit-grid input,
.mapping-edit-grid select {
  min-height: 34px;
}

.invoice-summary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: #f8fbff;
}

.invoice-summary-footer > div {
  display: grid;
  gap: 3px;
}

.invoice-summary-modal {
  width: min(720px, 100%);
}

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

.invoice-summary-stats > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.invoice-summary-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.invoice-summary-stats strong {
  font-size: 22px;
}

.invoice-summary-copy {
  display: grid;
  gap: 8px;
}

.invoice-summary-copy textarea {
  min-height: 260px;
  resize: vertical;
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.55;
}

.invoice-summary-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.warn-text {
  margin: 0 0 10px;
  color: #b45309;
  font-size: 13px;
}

.select-col {
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.row-checkbox {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #1f6feb;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

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

.form-actions {
  align-items: end;
}

.form-actions button[type="submit"] {
  justify-self: end;
  min-width: 120px;
}

.auto-task-settings.form-actions button[type="submit"] {
  justify-self: start;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

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

.permission-groups {
  display: grid;
  gap: 14px;
}

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

.permission-group h3 {
  margin-bottom: 0;
  color: var(--green-dark);
}

.role-form,
.account-form {
  margin-top: 12px;
  grid-template-columns: minmax(180px, 1fr) auto;
}

.permission-user-form {
  display: grid;
  gap: 12px;
}

.permission-user-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}

.permission-user-fields .wide {
  grid-column: 1 / -1;
}

.form-footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 2px;
}

.form-footer button {
  min-width: 128px;
}

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

.account-form button {
  justify-self: start;
}

.role-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.role-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.role-chip {
  display: grid;
  gap: 3px;
  height: auto;
  min-height: 58px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.role-chip.active,
.role-chip:hover {
  color: var(--green-dark);
  background: var(--green-soft);
  border-color: #bfe2ce;
}

.role-chip span {
  color: var(--muted);
  font-size: 12px;
}

.role-editor {
  display: grid;
  gap: 10px;
}

.role-permission-groups {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.role-description {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.role-description p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.check-row input {
  width: auto;
  min-height: auto;
}

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

.audit-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.audit-dot {
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--green);
}

.audit-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.audit-title span,
.audit-item time {
  color: var(--muted);
  font-size: 12px;
}

.audit-main p {
  margin: 4px 0 0;
  color: var(--muted);
}

.audit-item time {
  text-align: right;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .brand {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .nav-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-group {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
  }

  .workspace {
    max-width: none;
    padding: 16px;
  }

  .topbar {
    display: grid;
    align-items: start;
    padding: 12px;
  }

  .filters {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .month-toolbar {
    display: grid;
  }

  .month-toolbar label {
    width: 100%;
  }

  .dashboard-grid,
  .management-summary {
    grid-template-columns: 1fr;
  }

  .filters,
  .list-toolbar,
  .purchase-summary-grid,
  .purchase-verify-layout,
  .compact-form,
  .platform-order-form,
  .purchase-check-main,
  .purchase-check-detail,
  .anomaly-cards,
  .anomaly-overview,
  .redemption-metrics,
  .kpi-grid,
  .grid-2,
  .form-grid,
  .permission-grid,
  .auto-task-settings,
  .dashboard-permission-grid,
  .role-form,
  .permission-user-form,
  .permission-user-fields,
  .account-form,
  .role-layout {
    grid-template-columns: 1fr;
  }

  .employee-card-grid,
  .employee-detail-layout,
  .detail-grid,
  .employee-edit-form,
  .roster-group div {
    grid-template-columns: 1fr;
  }

  .management-summary .status-line {
    justify-content: flex-start;
  }

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

  .form-actions button[type="submit"] {
    justify-self: stretch;
  }

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

  .task-result-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .task-panel-compact .task-results {
    grid-template-columns: 1fr;
  }

  .audit-item {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .audit-item time {
    grid-column: 2;
    text-align: left;
  }

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

  .anomaly-row-priority {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .anomaly-row-priority strong {
    font-size: 20px;
  }

  .anomaly-row-action {
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .trace-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 12px;
  }

  h1 {
    font-size: 22px;
  }

  .kpi strong {
    font-size: 22px;
  }

  .panel {
    padding: 12px;
  }

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

  .panel-header .actions {
    width: 100%;
  }

  .panel-header .actions button,
  .panel-header .actions .file-action {
    flex: 1 1 auto;
  }

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

  .modal-backdrop {
    padding: 10px;
  }

  .modal-header {
    flex-direction: column;
  }

  .bar-row {
    grid-template-columns: 88px minmax(80px, 1fr);
  }

  .bar-row strong {
    grid-column: 1 / -1;
  }

  .list-toolbar {
    padding: 8px;
  }

  .topbar {
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }
}

/* 2026-07 design refresh: reference 2 sidebar/topbar + reference 1 dashboard body */
.ui-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-logo-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body {
  background: #f5f8ff;
}

.app-shell:not(.login-mode) {
  grid-template-columns: 228px minmax(0, 1fr);
}

.app-shell:not(.login-mode) .sidebar {
  background: #fff;
  border-right: 1px solid #dbe7f6;
  box-shadow: 8px 0 24px rgba(30, 64, 120, 0.045);
}

.app-shell:not(.login-mode) .brand {
  margin-bottom: 26px;
  padding: 0 10px;
}

.brand-mark {
  color: #fff;
}

.app-shell:not(.login-mode) .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f6feb, #0f4ed5);
}

.app-shell:not(.login-mode) .brand strong {
  color: #1761d8;
  font-size: 20px;
  font-weight: 800;
}

.app-shell:not(.login-mode) .brand span {
  color: #64748b;
  font-size: 12px;
}

.app-shell:not(.login-mode) .nav-list {
  gap: 8px;
}

.app-shell:not(.login-mode) .nav-group {
  margin: 18px 12px 6px;
  color: #94a3b8;
  font-size: 12px;
  letter-spacing: 0;
}

.app-shell:not(.login-mode) .nav-item {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #253858;
  background: transparent;
}

.app-shell:not(.login-mode) .nav-item.active {
  color: #1761d8;
  background: #eaf2ff;
  border-color: #d7e6ff;
}

.app-shell:not(.login-mode) .nav-item.active::before {
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #1761d8;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #49627f;
  font-size: 18px;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  background: transparent;
  color: #1761d8;
}

.nav-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.nav-arrow {
  display: none;
}

.app-shell:not(.login-mode) .workspace {
  max-width: none;
  padding: 0 24px 30px;
}

.app-shell:not(.login-mode) .topbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  min-height: 70px;
  margin: 0 -24px 22px;
  padding: 14px 24px;
  border-bottom: 1px solid #dbe7f6;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 12px rgba(30, 64, 120, 0.04);
}

.topbar-menu {
  width: 38px;
  min-height: 38px;
  border-radius: 8px;
  color: #253858;
}

.topbar-menu .ui-icon {
  width: 22px;
  height: 22px;
}

.topbar-actions {
  grid-template-columns: minmax(280px, 1fr) 150px auto;
  gap: 12px;
}

.global-search input {
  min-height: 42px;
  border-color: #d8e4f4;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
}

.global-search input::placeholder {
  color: #9aa8bc;
}

.topbar-status {
  min-height: 42px;
  border-color: #d8e4f4;
  background: #fff;
  color: #1e293b;
}

.topbar-status span {
  color: #1761d8;
}

.topbar-right {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.topbar-sync {
  width: 178px;
  justify-content: flex-start;
  gap: 8px;
}

.topbar-sync span {
  color: #64748b;
}

.sync-dot {
  background: #18b26b;
}

.topbar-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 42px;
  border: 0;
  color: #334155;
  background: transparent;
  box-shadow: none;
}

.topbar-icon-button:hover,
.topbar-icon-button[aria-expanded="true"] {
  background: #f2f7ff;
  color: #1761d8;
  transform: none;
  box-shadow: none;
}

.topbar-icon-button::before {
  content: none;
}

.topbar-icon-button .ui-icon {
  width: 23px;
  height: 23px;
}

.topbar-icon-button .notification-dot {
  position: absolute;
  right: 8px;
  top: 8px;
  min-width: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: transparent;
  font-size: 0;
}

.topbar-popover-wrap {
  position: relative;
}

.topbar-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  width: 280px;
  border: 1px solid #dbe7f6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(30, 64, 120, 0.14);
  overflow: hidden;
}

.topbar-popover[hidden] {
  display: none;
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #edf3fb;
}

.popover-head strong {
  color: #0f172a;
  font-size: 14px;
}

.popover-head span {
  color: #8a9ab2;
  font-size: 12px;
}

.notification-list {
  display: grid;
  padding: 6px;
}

.notification-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  box-shadow: none;
  text-align: left;
}

.notification-item:hover {
  background: #f6f9ff;
  transform: none;
  box-shadow: none;
}

.notification-item-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: #1761d8;
}

.notification-item.green .notification-item-dot {
  background: #16a36a;
}

.notification-item.amber .notification-item-dot {
  background: #d18a16;
}

.notification-item.red .notification-item-dot {
  background: #d84c4c;
}

.notification-item strong {
  display: block;
  color: #1f2d44;
  font-size: 13px;
  font-weight: 800;
}

.notification-item em {
  display: block;
  margin-top: 3px;
  color: #7a8aa3;
  font-size: 12px;
  font-style: normal;
}

.current-user {
  color: #0f172a;
}

.user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 8px 0 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #0f172a;
  box-shadow: none;
}

.user-menu-button:hover,
.user-menu-button[aria-expanded="true"] {
  border-color: #dbe7f6;
  background: #f6f9ff;
  transform: none;
  box-shadow: none;
}

.avatar-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  font-size: 13px;
  font-weight: 850;
}

.avatar-dot::before,
.current-user::before {
  content: none;
}

.user-menu-button strong {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.user-menu-caret {
  color: #94a3b8;
  font-size: 15px;
  transform: rotate(90deg);
}

.user-menu {
  width: 160px;
  padding: 6px;
}

.user-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #334155;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.user-menu button:hover {
  background: #f2f7ff;
  color: #1761d8;
  transform: none;
  box-shadow: none;
}

.page-heading {
  display: none;
}

.dashboard-overview-head {
  margin: 0 0 10px;
}

.dashboard-overview-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-overview-title strong {
  color: #0b1d3c;
  font-size: 17px;
  font-weight: 900;
}

.dashboard-overview-title span {
  position: relative;
  color: #6d7b91;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-overview-title span::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-right: 10px;
  border: 1px solid #b7c5d8;
  border-radius: 999px;
  color: #8a99ae;
  font-size: 10px;
  font-style: normal;
}

.dashboard-kpis {
  gap: 10px;
  margin-bottom: 14px;
}

.dashboard-kpis .kpi.dashboard-kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 112px;
  padding: 16px 16px 14px;
  border: 1px solid #e5edf8;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(31, 72, 128, 0.035);
  overflow: hidden;
}

.kpi-icon {
  position: absolute;
  right: 24px;
  top: 28px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: #cfe0ff;
  background: #eef5ff;
  font-size: 34px;
}

.dashboard-kpis .kpi-icon {
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  color: #1f76ff;
  background: #ecf4ff;
  box-shadow: 0 8px 18px rgba(29, 112, 255, 0.1);
}

.kpi-icon .ui-icon {
  width: 42px;
  height: 42px;
  stroke-width: 1.8;
}

.dashboard-kpis .kpi-icon .ui-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
}

.dashboard-kpis .kpi::after {
  content: none;
}

.dashboard-kpis .kpi-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: calc(100% - 50px);
  color: #0d1e3f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-kpis .kpi-title i {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid #b7c5d8;
  border-radius: 999px;
  color: #8a99ae;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-kpis .kpi.dashboard-kpi strong {
  margin-top: 11px;
  padding-right: 44px;
  color: #1a73f8;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.dashboard-kpis .kpi.dashboard-kpi.cost strong {
  color: #14213d;
}

.dashboard-kpis .kpi.dashboard-kpi.positive strong {
  color: #14213d;
}

.dashboard-kpis .kpi.dashboard-kpi.coverage strong {
  color: #12a66a;
}

.dashboard-kpis .kpi.dashboard-kpi.negative strong {
  color: #e83737;
}

.dashboard-kpis .kpi.dashboard-kpi.coverage .kpi-icon {
  color: #17a96f;
  background: #dff7ee;
  box-shadow: 0 10px 24px rgba(23, 169, 111, 0.14);
}

.dashboard-kpis .kpi.dashboard-kpi.negative .kpi-icon {
  color: #ef3a3a;
  background: #fff0f0;
  box-shadow: 0 10px 24px rgba(239, 58, 58, 0.12);
}

.dashboard-kpis .kpi.dashboard-kpi p {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: static;
  min-height: 0;
  margin-top: auto;
  padding: 0;
  border-top: 0;
  color: #54637a;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-kpis .kpi.dashboard-kpi p .trend-arrow {
  width: 12px;
  height: 12px;
  color: #1d74f5;
  stroke-width: 2.5;
}

.dashboard-kpis .kpi.dashboard-kpi.coverage p,
.dashboard-kpis .kpi.dashboard-kpi.coverage p .trend-arrow {
  color: #13a66b;
}

.dashboard-kpis .kpi.dashboard-kpi.negative p,
.dashboard-kpis .kpi.dashboard-kpi.negative p .trend-arrow {
  color: #e83737;
}

.dashboard-kpis .kpi-detail {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #dbe7f6;
  color: #243b63;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  margin-bottom: 14px;
  padding: 14px 18px;
  border: 1.5px solid #1e78ff;
  border-radius: 8px;
  background: linear-gradient(100deg, #f7fbff 0%, #ffffff 56%, #f5faff 100%);
  box-shadow: 0 8px 18px rgba(27, 99, 214, 0.055);
}

.dashboard-hero.is-negative {
  border-color: #ff4d4f;
  background: linear-gradient(100deg, #fff8f8 0%, #ffffff 56%, #fff9f5 100%);
}

.dashboard-hero-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(180deg, #3387ff, #1766e8);
  box-shadow: 0 8px 16px rgba(31, 104, 232, 0.18);
}

.dashboard-hero.is-negative .dashboard-hero-badge {
  background: linear-gradient(180deg, #ff5a5f, #e93434);
  box-shadow: 0 14px 26px rgba(233, 52, 52, 0.24);
}

.dashboard-hero-badge .ui-icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.25;
}

.dashboard-hero h2 {
  margin: 0;
  color: #071833;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.28;
}

.dashboard-hero p {
  margin: 3px 0 0;
  color: #56657a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.dashboard-hero button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 124px;
  min-height: 34px;
  padding: 0 13px;
  border: 1.5px solid #1e78ff;
  border-radius: 8px;
  color: #1766e8;
  background: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(31, 104, 232, 0.07);
}

.dashboard-hero button .ui-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.dashboard-hero button:hover {
  background: #f3f8ff;
  transform: translateY(-1px);
}

.management-summary {
  min-height: 86px;
  padding: 18px 22px;
  border: 1px solid #b9d6ff;
  border-radius: 8px;
  background: linear-gradient(90deg, #f4f9ff, #ffffff);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.07);
}

.dashboard-grid {
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr) minmax(320px, 0.95fr);
  gap: 16px;
}

.dashboard-grid .panel,
.panel {
  border-radius: 8px;
  border-color: #d9e6f7;
  box-shadow: 0 8px 22px rgba(30, 64, 120, 0.055);
}

.dashboard-ops {
  display: grid;
  gap: 10px;
}

.ops-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.ops-section-title h2,
.ops-trend-title h2 {
  margin: 0;
  color: #071833;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.ops-section-title span {
  color: #7c8ca5;
  font-size: 12px;
  font-weight: 700;
}

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

.ops-action-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 134px;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px 12px;
  border: 1.5px solid #ffd7d7;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffafa 0%, #ffffff 58%, #fff7f7 100%);
  box-shadow: 0 8px 18px rgba(236, 45, 62, 0.045);
}

.ops-action-card.orange {
  border-color: #ffdcbf;
  background: linear-gradient(135deg, #fffaf5 0%, #ffffff 58%, #fff8ee 100%);
  box-shadow: 0 8px 18px rgba(255, 116, 24, 0.045);
}

.ops-action-card.blue {
  border-color: #d8e7ff;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 58%, #f3f8ff 100%);
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.045);
}

.ops-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.ops-action-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #f52138;
  background: #ffecee;
}

.ops-action-card.orange .ops-action-icon {
  color: #ff6b16;
  background: #fff0e4;
}

.ops-action-card.blue .ops-action-icon {
  color: #0f75ff;
  background: #eaf3ff;
}

.ops-action-icon .ui-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
}

.ops-alert-mark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #ff263c;
}

.ops-alert-mark.is-muted {
  opacity: 0.28;
}

.ops-alert-mark .ui-icon {
  width: 17px;
  height: 17px;
  fill: #ff263c;
  stroke: #ff263c;
  stroke-width: 1.8;
}

.ops-action-main {
  min-width: 0;
}

.ops-action-main h3,
.ops-review-title h3 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: #12213f;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.ops-action-main h3 i,
.ops-review-title h3 i {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border: 1px solid #b7c5d8;
  border-radius: 999px;
  color: #8a99ae;
  font-size: 9px;
  font-style: normal;
}

.ops-action-number {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 7px 0 5px;
}

.ops-action-number strong {
  display: block;
  color: #f52138;
  font-size: 30px;
  font-weight: 900;
  line-height: 0.95;
}

.ops-action-number small {
  color: #31435f;
  font-size: 11px;
  font-weight: 900;
}

.ops-action-card.orange .ops-action-number strong {
  color: #ff6b16;
}

.ops-action-card.blue .ops-action-number strong {
  color: #0f75ff;
}

.ops-action-main p {
  margin: 0;
  color: #43536b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-action-main em {
  margin-left: 5px;
  color: #f52138;
  font-style: normal;
}

.ops-action-card.orange .ops-action-main em {
  color: #ff6b16;
}

.ops-action-card.blue .ops-action-main em {
  color: #0f75ff;
}

.ops-action-card > button {
  margin-top: auto;
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(90deg, #ff2b3c, #ff3f4f);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 15px rgba(255, 43, 60, 0.14);
}

.ops-action-card.orange > button {
  background: linear-gradient(90deg, #ff7618, #ff8b1c);
  box-shadow: 0 12px 22px rgba(255, 118, 24, 0.18);
}

.ops-action-card.blue > button {
  background: linear-gradient(90deg, #1778ff, #0f67e8);
  box-shadow: 0 8px 15px rgba(23, 120, 255, 0.14);
}

.ops-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: 16px;
}

.ops-review-card {
  position: relative;
  display: grid;
  min-height: 190px;
  padding: 24px 28px 22px;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 60%, #f7fbff 100%);
  box-shadow: 0 12px 28px rgba(30, 64, 120, 0.05);
  overflow: hidden;
}

.ops-card-link {
  position: absolute;
  right: 20px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  color: #7890b0;
  background: transparent;
  box-shadow: none;
}

.ops-card-link .ui-icon {
  width: 20px;
  height: 20px;
}

.ops-review-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  min-height: 94px;
}

.ops-review-body span {
  color: #495a73;
  font-size: 15px;
  font-weight: 700;
}

.ops-review-body strong {
  display: block;
  margin-top: 8px;
  color: #0f75ff;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
}

.ops-review-body small,
.ops-review-metrics small {
  color: #1d2d4e;
  font-size: 13px;
  font-weight: 900;
}

.ops-review-ghost {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: 88px;
  height: 88px;
  color: #68a3ff;
  background: linear-gradient(180deg, #e9f2ff, #f8fbff);
  border-radius: 18px;
  opacity: 0.72;
  box-shadow: 0 12px 30px rgba(36, 117, 255, 0.12);
}

.ops-review-card.is-compact .ops-review-ghost {
  border-radius: 28px;
  clip-path: polygon(50% 0%, 88% 17%, 88% 62%, 50% 100%, 12% 62%, 12% 17%);
}

.ops-review-ghost .ui-icon {
  width: 46px;
  height: 46px;
  stroke-width: 1.9;
}

.ops-review-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid #e1e9f4;
}

.ops-review-metrics div {
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid #e1e9f4;
}

.ops-review-metrics div:first-child {
  padding-left: 0;
  border-left: 0;
}

.ops-review-metrics span {
  display: block;
  color: #60708a;
  font-size: 13px;
  font-weight: 700;
}

.ops-review-metrics strong {
  display: block;
  margin-top: 8px;
  color: #1474ff;
  font-size: 23px;
  font-weight: 900;
}

.ops-review-metrics .danger strong {
  color: #f52138;
}

.ops-trend-panel {
  padding: 14px 16px 10px;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 64, 120, 0.05);
}

.ops-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-trend-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ops-tabs,
.ops-range {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2eaf6;
  border-radius: 7px;
  background: #fbfdff;
  overflow: hidden;
}

.ops-tabs button,
.ops-range button {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #e2eaf6;
  border-radius: 0;
  color: #34435b;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.ops-tabs button:last-child,
.ops-range button:last-of-type {
  border-right: 0;
}

.ops-tabs button.active {
  color: #fff;
  background: linear-gradient(180deg, #1778ff, #0f67e8);
  box-shadow: 0 8px 18px rgba(23, 120, 255, 0.2);
}

.ops-range button.active {
  color: #1268e6;
  background: #eaf3ff;
  box-shadow: inset 0 0 0 1px #b9d4ff;
}

.ops-range span {
  display: grid;
  place-items: center;
  width: 32px;
  color: #637791;
}

.ops-range .ui-icon {
  width: 15px;
  height: 15px;
}

.ops-chart-wrap {
  margin-top: 8px;
}

.ops-trend-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 186px;
}

.ops-chart-tooltip rect {
  fill: #fff;
  stroke: #dce8f7;
  filter: drop-shadow(0 10px 18px rgba(35, 74, 130, 0.12));
}

.ops-chart-tooltip.is-hover,
.ops-hover-line {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.ops-hover-zone {
  fill: transparent;
  pointer-events: all;
}

.ops-hover-group:hover .ops-chart-tooltip.is-hover,
.ops-hover-group:hover .ops-hover-line {
  opacity: 1;
}

.ops-chart-legend {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-top: -6px;
  color: #53647b;
  font-size: 12px;
  font-weight: 700;
}

.ops-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ops-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

@media (max-width: 980px) {
  .ops-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ops-trend-head,
  .ops-trend-title {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-tabs,
  .ops-range {
    width: 100%;
    overflow-x: auto;
  }

  .ops-tabs button,
  .ops-range button {
    flex: 1 0 auto;
  }
}

@media (max-width: 560px) {
  .ops-action-card,
  .ops-review-card,
  .ops-trend-panel {
    padding: 16px;
  }

  .ops-action-card {
    min-height: 0;
  }

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

  .ops-action-number strong,
  .ops-review-body strong {
    font-size: 34px;
  }

  .ops-review-body {
    grid-template-columns: 1fr 76px;
  }

  .ops-review-ghost {
    width: 68px;
    height: 68px;
  }

  .ops-review-ghost .ui-icon {
    width: 34px;
    height: 34px;
  }

  .ops-review-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ops-review-metrics div {
    padding-left: 0;
    border-left: 0;
  }

  .ops-chart-legend {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

.modern-login {
  grid-template-columns: minmax(420px, 1fr) 420px;
  gap: 28px;
  min-height: 100vh;
  padding: 40px;
  background:
    radial-gradient(circle at 20% 15%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(135deg, #eff6ff 0%, #f8fbff 48%, #ffffff 100%);
}

.login-showcase,
.login-card {
  border: 1px solid #d9e6f7;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 60px rgba(30, 64, 120, 0.12);
  backdrop-filter: blur(16px);
}

.login-showcase {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
  padding: 34px;
  overflow: hidden;
}

.login-showcase .brand {
  padding: 0;
  margin: 0;
}

.login-showcase-copy {
  max-width: 620px;
}

.login-showcase-copy p {
  margin-bottom: 12px;
  color: #1761d8;
  font-weight: 800;
}

.login-showcase-copy h2 {
  margin-bottom: 14px;
  color: #0f1f3a;
  font-size: 40px;
  line-height: 1.18;
}

.login-showcase-copy span {
  color: #64748b;
  font-size: 15px;
}

.login-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.login-metric-strip div {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  background: #f8fbff;
}

.login-metric-strip .ui-icon {
  width: 24px;
  height: 24px;
  color: #1761d8;
}

.login-metric-strip strong {
  color: #0f1f3a;
}

.login-metric-strip span {
  color: #64748b;
  font-size: 12px;
}

.login-card {
  align-self: center;
  width: 100%;
  padding: 34px;
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.login-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #1761d8;
  background: #eaf2ff;
}

.login-card-icon .ui-icon {
  width: 26px;
  height: 26px;
}

.login-card h2 {
  margin: 0 0 4px;
  font-size: 24px;
  color: #0f1f3a;
}

.login-form {
  gap: 16px;
}

.login-form input {
  min-height: 46px;
  border-radius: 10px;
}

.login-form button[type="submit"] {
  min-height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1f6feb, #0f4ed5);
  font-size: 15px;
}

@media (max-width: 980px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar-sync {
    width: auto;
    min-width: 168px;
  }

  .topbar-popover {
    right: auto;
    left: 0;
    width: min(280px, calc(100vw - 36px));
  }

  .modern-login {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .login-showcase {
    min-height: auto;
    gap: 28px;
  }

  .login-showcase-copy h2 {
    font-size: 30px;
  }

  .login-metric-strip {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 981px) {
  .login-centered .login-brand-center {
    top: clamp(28px, 5vh, 56px) !important;
  }

  .login-centered .login-wordmark {
    font-size: clamp(32px, 3vw, 40px) !important;
  }

  .login-centered .login-brand-center p {
    margin-top: 5px !important;
    font-size: 13px !important;
  }

  .login-centered .login-glass-card {
    top: clamp(158px, 19vh, 190px) !important;
    width: 382px !important;
    padding: 18px 32px 12px !important;
    border-radius: 16px !important;
  }

  .login-centered .login-card-head {
    margin-bottom: 11px !important;
  }

  .login-centered .login-card-head h2 {
    font-size: 24px !important;
  }

  .login-centered .login-card-head p {
    margin-top: 4px !important;
    font-size: 12px !important;
  }

  .login-centered .login-form {
    gap: 7px !important;
  }

  .login-centered .login-form input[type="text"],
  .login-centered .login-form input[type="password"],
  .login-centered .login-form input[name="username"],
  .login-centered .login-form input[name="password"],
  .login-centered .login-form button[type="submit"] {
    height: 36px !important;
    font-size: 13px !important;
  }

  .login-centered .login-options {
    height: 20px !important;
    margin: 0 !important;
  }

  .login-centered .checkbox-line,
  .login-centered .link-button {
    font-size: 12px !important;
  }

  .login-centered .login-form button[type="submit"] {
    font-size: 15px !important;
  }

  .login-centered .login-divider {
    margin: 0 !important;
    font-size: 12px !important;
  }

  .login-centered .login-verify-button,
  .login-centered .login-wecom-button {
    height: 20px !important;
    line-height: 20px !important;
    font-size: 12px !important;
  }

  .login-centered .login-secure-line {
    margin-top: 6px !important;
    padding-top: 7px !important;
    font-size: 12px !important;
  }

  .login-centered .login-module-row {
    display: grid !important;
    bottom: clamp(42px, 5.2vh, 58px) !important;
    width: min(1040px, calc(100vw - 300px)) !important;
    gap: 14px !important;
  }

  .login-centered .login-module-row > div {
    min-height: 76px !important;
    padding: 12px 18px !important;
    grid-template-columns: 46px 1fr !important;
  }

  .login-centered .login-module-row .ui-icon {
    width: 42px !important;
    height: 42px !important;
    padding: 11px !important;
  }

  .login-centered .login-module-row strong {
    font-size: 16px !important;
  }

  .login-centered .login-module-row span {
    font-size: 12px !important;
    line-height: 1.55 !important;
  }

  .login-centered .login-copyright {
    display: block !important;
    bottom: 12px !important;
    font-size: 12px !important;
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  .login-centered .login-brand-center {
    top: 28px !important;
  }

  .login-centered .login-glass-card {
    top: 136px !important;
    padding-top: 16px !important;
    padding-bottom: 10px !important;
  }

  .login-centered .login-module-row {
    bottom: 42px !important;
  }

  .login-centered .login-module-row > div {
    min-height: 66px !important;
    padding: 10px 16px !important;
  }

  .login-centered .login-copyright {
    bottom: 12px !important;
  }
}

@media (min-height: 821px) and (max-height: 980px) and (min-width: 981px) {
  .login-centered .login-glass-card {
    top: 172px !important;
  }

  .login-centered .login-module-row {
    bottom: 44px !important;
  }
}

@media (max-width: 980px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0 8px 18px rgba(46, 78, 62, 0.06);
  }

  .brand {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
  }

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

  .nav-list {
    margin: 0 -12px;
    padding: 0 12px 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

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

  .nav-item {
    scroll-snap-align: start;
    min-height: 34px;
    padding: 0 12px;
  }

  .workspace {
    width: 100%;
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topbar > div:first-child {
    min-width: 0;
  }

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

  .current-user {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .section {
    margin-bottom: 12px;
  }

  .panel {
    box-shadow: var(--shadow-soft);
  }

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

  .dashboard-hero {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 16px;
  }

  .kpi {
    min-height: 118px;
  }

  .table-wrap {
    margin-inline: -2px;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 760px;
  }

  .redemption-table table {
    min-width: 920px;
  }

  .tax-invoice-table,
  .tax-mapping-table,
  .tax-match-table,
  .tax-shop-library-table {
    min-width: 900px;
  }

  .tax-shop-maintenance {
    grid-template-columns: 1fr;
  }

  .tax-shop-library-filters {
    grid-template-columns: 1fr;
  }

  .mapping-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 520px;
  }

  th,
  td {
    padding: 8px;
  }

  .list-toolbar {
    align-items: stretch;
  }

  .list-filter-field,
  .list-filter-search,
  .list-filter-month,
  .list-filter-date-range,
  .list-filter-page-size {
    flex: 1 1 calc(50% - 8px);
    min-width: 180px;
  }

  .date-range-control {
    grid-template-columns: 1fr 1fr;
  }

  .date-range-separator {
    display: none;
  }

  .list-toolbar button,
  .pagination button {
    width: 100%;
  }

  .pagination {
    gap: 8px;
  }

  .purchase-check-card {
    padding: 11px;
  }

  .purchase-check-main {
    gap: 10px;
  }

  .purchase-check-main > .pill {
    justify-self: start;
  }

  .purchase-check-detail {
    gap: 8px;
  }

  .purchase-check-detail > div {
    min-height: auto;
  }

  .task-panel {
    padding: 10px;
  }

  .task-stats,
  .task-time-line,
  .status-line {
    gap: 6px;
  }

  .modal-card {
    width: 100%;
    max-height: 86vh;
  }

  .employee-card-head,
  .employee-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  body {
    background: var(--bg);
  }

  button,
  .file-action {
    min-height: 38px;
  }

  .sidebar {
    padding: 10px 10px 8px;
  }

  .brand {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .nav-list {
    gap: 5px;
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .nav-item {
    font-size: 13px;
  }

  .workspace {
    padding: 10px;
  }

  .topbar {
    padding: 10px;
    border-radius: var(--radius);
  }

  h1 {
    font-size: 21px;
  }

  h2 {
    font-size: 16px;
  }

  .filters {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .current-user {
    grid-template-columns: 1fr;
  }

  .current-user button {
    width: 100%;
  }

  .dashboard-kpis,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    padding: 14px;
  }

  .dashboard-hero h2 {
    font-size: 16px;
  }

  .invoice-tabs,
  .tax-import-panel {
    align-items: stretch;
  }

  .invoice-tabs button {
    flex: 1 1 calc(50% - 8px);
  }

  .tax-import-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .kpi {
    min-height: 96px;
    padding: 13px;
  }

  .kpi strong {
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .panel {
    border-radius: var(--radius);
  }

  .panel-header .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .list-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    padding: 8px;
  }

  .list-filter-field,
  .list-filter-search,
  .list-filter-month,
  .list-filter-date-range,
  .list-filter-page-size,
  .list-toolbar > button,
  .list-toolbar-count {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    margin-left: 0;
  }

  .date-range-control {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .invoice-summary-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .invoice-summary-footer button {
    width: 100%;
  }

  .invoice-summary-stats {
    grid-template-columns: 1fr;
  }

  .batch-toolbar {
    align-items: stretch;
  }

  .batch-toolbar select,
  .batch-toolbar button {
    width: 100%;
  }

  .pagination {
    width: 100%;
  }

  .pagination > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 7px;
  }

  .table-wrap {
    border-radius: var(--radius);
  }

  table {
    min-width: 720px;
    font-size: 12px;
  }

  .redemption-table table {
    min-width: 880px;
  }

  .purchase-check-card {
    gap: 10px;
  }

  .purchase-check-main,
  .purchase-check-detail {
    grid-template-columns: 1fr;
  }

  .purchase-check-main strong,
  .purchase-check-main p,
  .purchase-check-detail strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .task-stats .pill,
  .task-time-line span,
  .status-line .pill {
    max-width: 100%;
  }

  .task-result-row {
    padding: 8px;
  }

  .task-result-row span {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 8px;
  }

  .modal-card {
    max-height: calc(100vh - 16px);
    padding: 12px;
  }
}

@media (max-width: 980px) {
  .app-shell:not(.login-mode) {
    display: block;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .app-shell:not(.login-mode) .sidebar {
    width: 100%;
    min-width: 0;
  }

  .app-shell:not(.login-mode) .workspace {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* Login page: pale-blue centered concept based on selected Product Design option 2 */
.app-shell.login-mode .page-heading,
.app-shell.login-mode #notice {
  display: none;
}

.app-shell.login-mode #view {
  width: 100%;
  min-height: 100dvh;
}

.modern-login.login-centered {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 154px 500px 145px 34px;
  justify-items: center;
  align-items: start;
  min-height: 100dvh;
  padding: 82px 24px 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(239, 246, 255, 0.02), rgba(239, 246, 255, 0.02)),
    url("./assets/login-reference-v2.png") center / cover no-repeat,
    linear-gradient(135deg, #f9fcff 0%, #eef6ff 49%, #eaf4ff 100%);
  color: #10213f;
}

.modern-login.login-centered::before {
  content: none;
}

.modern-login.login-centered::after {
  content: none;
}

.login-centered .login-shell,
.login-centered .login-showcase {
  display: none;
}

.login-ambient {
  display: none;
}

.ambient-panel,
.ambient-icon {
  position: absolute;
  border: 1px solid rgba(191, 219, 254, 0.82);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 28px 70px rgba(59, 130, 246, 0.11);
  backdrop-filter: blur(18px);
}

.ambient-panel {
  display: grid;
  gap: 12px;
  width: 294px;
  padding: 22px;
  border-radius: 22px;
  color: #4d6690;
}

.ambient-panel span,
.ambient-panel small {
  font-size: 13px;
  color: #6f86aa;
}

.ambient-panel strong {
  color: #1f6feb;
  font-size: 32px;
  letter-spacing: 0;
}

.ambient-panel i {
  display: block;
  height: 46px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(31, 111, 235, 0.12), rgba(147, 197, 253, 0.06)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(37, 99, 235, 0.12) 22px 24px);
}

.ambient-left {
  left: 5%;
  top: 118px;
  transform: rotate(-4deg);
}

.ambient-right {
  right: 8%;
  top: 204px;
  width: 160px;
  min-height: 154px;
  transform: rotate(-8deg);
}

.ambient-list {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.ambient-list em {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: #3f72c8;
  font-style: normal;
  font-size: 13px;
}

.ambient-list b {
  display: block;
  color: #7f93b5;
  font-size: 11px;
  font-weight: 600;
}

.ambient-list .ui-icon {
  grid-row: span 2;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 7px;
  background: #e9f2ff;
}

.ambient-donut {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,255,255,0.9) 0 42%, transparent 43%),
    conic-gradient(#2778f6 0 74%, #dbeafe 74% 100%);
}

.ambient-bars {
  display: grid;
  gap: 8px;
}

.ambient-bars i {
  height: 9px;
  border-radius: 999px;
  background: #dbeafe;
}

.ambient-bars i:nth-child(1) {
  width: 100%;
}

.ambient-bars i:nth-child(2) {
  width: 72%;
}

.ambient-bars i:nth-child(3) {
  width: 52%;
}

.ambient-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 24px;
  color: #1f6feb;
}

.ambient-icon .ui-icon {
  width: 36px;
  height: 36px;
}

.ambient-chart {
  left: 24%;
  top: 389px;
}

.ambient-shield {
  right: 28%;
  top: 431px;
}

.ambient-users {
  right: 16%;
  top: 565px;
}

.login-brand-center,
.login-glass-card,
.login-module-row,
.login-copyright {
  position: relative;
  z-index: 1;
}

.login-brand-center {
  position: relative;
  text-align: center;
  grid-row: 1;
  width: 430px;
  min-height: 96px;
  padding-top: 8px;
}

.login-brand-center::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -44px -126px -16px;
  background: radial-gradient(ellipse at center, rgba(237, 246, 255, 1) 0%, rgba(237, 246, 255, 0.96) 52%, rgba(237, 246, 255, 0) 100%);
  backdrop-filter: blur(8px);
}

.login-wordmark {
  color: #0f3d8c;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0;
}

.login-wordmark span {
  color: #10213f;
  font-weight: 850;
}

.login-brand-center p {
  margin: 9px 0 0;
  color: #7185a8;
  font-size: 15px;
  font-weight: 600;
}

.login-glass-card {
  grid-row: 2;
  align-self: auto;
  width: 454px;
  min-height: 496px;
  padding: 41px 36px 26px;
  border: 1px solid rgba(204, 222, 247, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    rgba(239, 246, 255, 0.78);
  box-shadow:
    0 26px 78px rgba(30, 64, 120, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px);
  transform: translateY(-16px);
}

.login-card-head-center {
  display: block;
  margin-bottom: 26px;
  text-align: center;
}

.login-card-head-center h2 {
  margin: 0 0 10px;
  color: #10213f;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-card-head-center .muted {
  margin: 0;
  color: #7185a8;
  font-size: 14px;
}

.login-glass-card .login-form {
  gap: 16px;
}

.login-glass-card label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.login-glass-card .login-form label {
  gap: 0;
}

.login-glass-card input {
  min-height: 48px;
  border-color: rgba(174, 200, 231, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #10213f;
  font-size: 15px;
}

.login-glass-card input:focus {
  border-color: #1f6feb;
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.11);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
  margin-top: -2px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #506887;
  font-size: var(--text-meta);
  font-weight: var(--weight-medium);
}

.checkbox-line span {
  white-space: nowrap;
}

.checkbox-line input {
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  accent-color: #1f6feb;
}

.link-button {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f6feb;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
}

.login-glass-card .login-form button[type="submit"] {
  min-height: 48px;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2c7df7, #075fe4);
  box-shadow: 0 15px 34px rgba(31, 111, 235, 0.24);
  font-size: 16px;
  font-weight: 800;
}

.login-secure-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(191, 219, 254, 0.68);
  color: #6b7f9e;
  font-size: 13px;
}

.login-secure-line .ui-icon {
  width: 17px;
  height: 17px;
  color: #16a34a;
}

.login-module-row {
  display: none;
}

.login-copyright {
  display: none;
}

.login-module-row {
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: min(1114px, calc(100vw - 48px));
  margin-top: 29px;
}

.login-module-row div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 5px;
  align-items: center;
  min-height: 104px;
  padding: 22px 24px;
  border: 1px solid rgba(191, 219, 254, 0.74);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 54px rgba(30, 64, 120, 0.08);
  backdrop-filter: blur(16px);
}

.login-module-row .ui-icon {
  grid-row: span 2;
  width: 54px;
  height: 54px;
  padding: 13px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #60a5fa, #1f6feb);
  box-shadow: 0 14px 28px rgba(31, 111, 235, 0.22);
}

.login-module-row strong {
  color: #10213f;
  font-size: 16px;
  font-weight: 850;
}

.login-module-row span {
  min-width: 0;
  color: #7185a8;
  font-size: 13px;
  line-height: 1.45;
}

.login-copyright {
  grid-row: 4;
  margin: 12px 0 0;
  color: #7890b1;
  font-size: 13px;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  background: #dbeafe;
}

.login-verify-button {
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f6feb;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.login-centered .login-module-row,
.login-centered .login-copyright {
  display: none;
}

@media (max-width: 980px) {
  .modern-login.login-centered {
    min-height: 100dvh;
    display: flex;
    gap: 18px;
    padding: 38px 18px 24px;
  }

  .login-ambient {
    opacity: 0.42;
  }

  .ambient-left,
  .ambient-right {
    display: none;
  }

  .ambient-chart {
    left: 8%;
    top: 18%;
  }

  .ambient-shield {
    right: 8%;
    top: 17%;
  }

  .ambient-users {
    display: none;
  }

  .login-wordmark {
    font-size: 30px;
  }

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

  .login-module-row {
    grid-template-columns: 1fr;
    width: min(452px, calc(100vw - 32px));
    gap: 12px;
    margin-top: 4px;
  }

  .login-module-row div {
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .modern-login.login-centered {
    padding: 28px 14px 18px;
  }

  .ambient-icon {
    width: 66px;
    height: 66px;
    border-radius: 18px;
  }

  .ambient-icon .ui-icon {
    width: 28px;
    height: 28px;
  }

  .login-brand-center p {
    font-size: 13px;
  }

  .login-wordmark {
    font-size: 27px;
  }

  .login-glass-card {
    width: 100%;
    padding: 26px 18px 20px;
    border-radius: 18px;
  }

  .login-card-head-center h2 {
    font-size: 25px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .login-module-row {
    width: 100%;
  }

  .login-module-row div {
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 12px;
  }

  .login-module-row .ui-icon {
    width: 46px;
    height: 46px;
    padding: 11px;
  }
}

/* Strict login visual clone: use selected design image as the visual source. */
.modern-login.login-centered {
  display: block;
  position: relative;
  width: 100%;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  background:
    url("./assets/login-source-exact.png") center center / cover no-repeat,
    #eef6ff;
}

.modern-login.login-centered::before {
  content: none;
}

.modern-login.login-centered::after {
  content: none;
}

.login-centered .login-ambient,
.login-centered .login-brand-center,
.login-centered .login-card-head,
.login-centered .login-secure-line,
.login-centered .login-module-row,
.login-centered .login-copyright,
.login-centered .login-divider,
.login-centered .login-verify-button {
  display: none !important;
}

.login-centered .login-glass-card {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 230px;
  width: 468px;
  height: 512px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  transform: translateX(-50%);
}

.login-centered .login-form {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
}

.login-centered .login-form label {
  position: absolute;
  left: 38px;
  width: 392px;
  height: 48px;
  display: block;
}

.login-centered .login-form label:nth-of-type(1) {
  top: 130px;
}

.login-centered .login-form label:nth-of-type(2) {
  top: 198px;
}

.login-centered .login-form > label > span {
  display: none;
}

.login-centered .login-form input[type="text"],
.login-centered .login-form input[type="password"],
.login-centered .login-form input[name="username"],
.login-centered .login-form input[name="password"] {
  width: 100%;
  height: 48px;
  min-height: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #18335d;
  font-size: 15px;
  outline: none;
}

.login-centered .login-form input::placeholder {
  color: transparent;
}

.login-centered .login-options {
  position: absolute;
  left: 38px;
  top: 267px;
  width: 392px;
  height: 24px;
  display: block;
  margin: 0;
}

.login-centered .checkbox-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 132px;
  height: 24px;
  opacity: 0;
}

.login-centered .checkbox-line input {
  width: 24px;
  height: 24px;
}

.login-centered .link-button {
  position: absolute;
  right: 0;
  top: 0;
  width: 112px;
  height: 24px;
  opacity: 0;
}

.login-centered .login-form button[type="submit"] {
  position: absolute;
  left: 38px;
  top: 306px;
  width: 392px;
  height: 48px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent !important;
  box-shadow: none;
  color: transparent;
}

.login-centered .login-wecom-button {
  position: absolute;
  left: 176px;
  top: 410px;
  width: 116px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: #1f6feb;
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
}

.login-centered .login-error {
  position: absolute;
  left: 38px;
  top: 466px;
  width: 392px;
  margin: 0;
  text-align: center;
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 700px) {
  .modern-login.login-centered {
    min-height: 100dvh;
    background:
      linear-gradient(rgba(239, 246, 255, 0.08), rgba(239, 246, 255, 0.08)),
      url("./assets/login-source-exact.png") 55.5% top / auto 100% no-repeat,
      #eef6ff;
  }

  .modern-login.login-centered::before {
    content: none;
  }

  .login-centered .login-glass-card {
    top: 108px;
    width: min(360px, calc(100vw - 30px));
    height: 486px;
  }

  .login-centered .login-form label,
  .login-centered .login-options,
  .login-centered .login-form button[type="submit"],
  .login-centered .login-error {
    left: 31px;
    width: calc(100% - 62px);
  }

  .login-centered .login-form label:nth-of-type(1) {
    top: 128px;
  }

  .login-centered .login-form label:nth-of-type(2) {
    top: 196px;
  }

  .login-centered .login-options {
    top: 263px;
  }

  .login-centered .login-form button[type="submit"] {
    top: 302px;
  }

  .login-centered .login-wecom-button {
    left: 50%;
    top: 404px;
    transform: translateX(-50%);
  }
}

/* Login rebuild: provided side-panel background + real centered text, no deer logo. */
.modern-login.login-centered {
  position: relative;
  display: block;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  padding: 0;
  background:
    url("./assets/login-background-side-panels.png") center center / cover no-repeat,
    #eef6ff;
}

.login-centered,
.login-centered * {
  box-sizing: border-box;
}

.login-centered .login-ambient {
  display: none !important;
}

.login-centered .login-brand-center::before {
  content: none !important;
  display: none !important;
  background: none !important;
  backdrop-filter: none !important;
}

.login-centered .login-brand-center {
  display: block !important;
  position: absolute;
  z-index: 2;
  left: 50%;
  top: clamp(36px, 8.5vh, 84px);
  width: 520px;
  text-align: center;
  transform: translateX(-50%);
}

.login-centered .login-wordmark {
  display: block;
  color: #1f6feb;
  font-size: clamp(34px, 4.1vh, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.login-centered .login-wordmark span {
  color: #12213d;
  font-weight: 800;
}

.login-centered .login-brand-center p {
  margin: clamp(7px, 1.2vh, 12px) 0 0;
  color: #7a8eaf;
  font-size: clamp(13px, 1.55vh, 17px);
  letter-spacing: 5px;
}

.login-centered .login-glass-card {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: clamp(178px, 25vh, 230px);
  width: min(468px, calc(100vw - 40px));
  height: auto;
  min-height: 0;
  padding: clamp(28px, 4vh, 40px) 38px clamp(22px, 3vh, 28px);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 26px 80px rgba(91, 137, 202, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
  transform: translateX(-50%);
}

.login-centered .login-card-head {
  display: block !important;
  margin: 0 0 clamp(18px, 2.7vh, 26px);
  text-align: center;
}

.login-centered .login-card-head h2 {
  margin: 0;
  color: #15233f;
  font-size: clamp(25px, 3vh, 31px);
  font-weight: 800;
  line-height: 1.2;
}

.login-centered .login-card-head p {
  margin: clamp(6px, 1vh, 10px) 0 0;
  color: #6c7b92;
  font-size: clamp(13px, 1.45vh, 15px);
}

.login-centered .login-form {
  position: static;
  display: grid;
  gap: clamp(12px, 1.8vh, 18px);
}

.login-centered .login-form label {
  position: static !important;
  left: auto !important;
  top: auto !important;
  display: block;
  width: 100%;
  height: auto;
}

.login-centered .login-form label > span {
  display: none;
}

.login-centered .login-form input[type="text"],
.login-centered .login-form input[type="password"],
.login-centered .login-form input[name="username"],
.login-centered .login-form input[name="password"] {
  width: 100%;
  height: clamp(42px, 5.2vh, 48px);
  padding: 0 16px 0 44px;
  border: 1px solid rgba(168, 188, 220, 0.72);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9);
  color: #18335d;
  font-size: 15px;
  outline: none;
}

.login-centered .login-form input::placeholder {
  color: #8b99ad;
}

.login-centered .login-options {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 24px;
  margin: -2px 0 0;
}

.login-centered .checkbox-line,
.login-centered .link-button {
  position: static;
  width: auto;
  height: auto;
  opacity: 1;
}

.login-centered .checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #68788f;
  font-size: 14px;
}

.login-centered .checkbox-line span {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  display: inline !important;
  white-space: nowrap;
}

.login-centered .checkbox-line input {
  width: 14px;
  height: 14px;
  accent-color: #1f6feb;
}

.login-centered .link-button {
  border: 0;
  background: transparent;
  color: #1f6feb;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.login-centered .login-form button[type="submit"] {
  position: static;
  width: 100%;
  height: clamp(42px, 5.2vh, 48px);
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #2c86ff 0%, #1267f2 100%) !important;
  box-shadow: 0 10px 22px rgba(23, 107, 239, 0.28);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.login-centered .login-divider {
  display: flex !important;
  align-items: center;
  gap: 16px;
  margin: 2px 0 -3px;
  color: #a2adbf;
  font-size: 13px;
}

.login-centered .login-divider::before,
.login-centered .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(165, 181, 209, 0.35);
}

.login-centered .login-verify-button,
.login-centered .login-wecom-button {
  position: static;
  width: 100%;
  height: 22px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent !important;
  box-shadow: none;
  color: #1f6feb;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.login-centered .login-verify-button {
  display: block !important;
}

.login-centered .login-secure-line {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(14px, 2.3vh, 24px);
  padding-top: clamp(10px, 1.7vh, 16px);
  border-top: 1px solid rgba(165, 181, 209, 0.24);
  color: #7989a1;
  font-size: 14px;
}

.login-centered .login-secure-line .ui-icon {
  width: 16px;
  height: 16px;
  color: #28b46a;
}

.login-centered .login-module-row {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(54px, 7vh, 76px);
  display: grid !important;
  width: min(1120px, calc(100vw - 220px));
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  transform: translateX(-50%);
}

.login-centered .login-module-row > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  column-gap: 18px;
  align-items: center;
  min-height: 112px;
  padding: 22px 28px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 50px rgba(91, 137, 202, 0.14);
  backdrop-filter: none;
}

.login-centered .login-module-row .ui-icon {
  grid-row: span 2;
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #74acff, #256df3);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 109, 243, 0.28);
}

.login-centered .login-module-row strong {
  color: #142341;
  font-size: 19px;
  line-height: 1.2;
}

.login-centered .login-module-row span {
  color: #6f7f98;
  font-size: 14px;
  line-height: 1.7;
}

.login-centered .login-copyright {
  display: block !important;
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 24px;
  margin: 0;
  text-align: center;
  color: #7687a1;
  font-size: 14px;
}

@media (max-width: 700px) {
  .modern-login.login-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 18px 14px;
    overflow-x: hidden;
    background:
      linear-gradient(180deg, #f5f9ff 0%, #eaf4ff 100%);
  }

  .login-centered .login-brand-center {
    display: none !important;
  }

  .login-centered .login-glass-card {
    position: relative;
    left: auto;
    width: min(360px, calc(100vw - 28px));
    height: auto;
    max-height: calc(100dvh - 36px);
    overflow: auto;
    padding: 28px 22px 22px;
    transform: none;
  }

  .login-centered .login-card-head h2 {
    font-size: 27px;
  }

  .login-centered .login-module-row {
    display: none !important;
  }

  .login-centered .login-copyright {
    display: none !important;
  }
}

@media (max-height: 900px) and (min-width: 701px) {
  .login-centered .login-brand-center {
    top: 48px;
  }

  .login-centered .login-wordmark {
    font-size: 38px;
  }

  .login-centered .login-brand-center p {
    margin-top: 8px;
    font-size: 14px;
    letter-spacing: 4px;
  }

  .login-centered .login-glass-card {
    top: 186px;
    width: 430px;
    height: auto;
    padding: 28px 32px 20px;
  }

  .login-centered .login-card-head {
    margin-bottom: 20px;
  }

  .login-centered .login-card-head h2 {
    font-size: 28px;
  }

  .login-centered .login-form {
    gap: 14px;
  }

  .login-centered .login-form input[type="text"],
  .login-centered .login-form input[type="password"],
  .login-centered .login-form input[name="username"],
  .login-centered .login-form input[name="password"],
  .login-centered .login-form button[type="submit"] {
    height: 44px;
  }

  .login-centered .login-secure-line {
    margin-top: 18px;
    padding-top: 12px;
  }

  .login-centered .login-module-row {
    bottom: 46px;
    width: min(980px, calc(100vw - 260px));
    gap: 18px;
  }

  .login-centered .login-module-row > div {
    min-height: 86px;
    padding: 16px 22px;
    grid-template-columns: 52px 1fr;
  }

  .login-centered .login-module-row .ui-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
  }

  .login-centered .login-module-row strong {
    font-size: 17px;
  }

  .login-centered .login-module-row span {
    font-size: 13px;
  }

  .login-centered .login-copyright {
    bottom: 14px;
  }
}

/* Final mobile login override: phone/tablet login should only show the form card. */
@media (max-width: 980px) {
  html,
  body,
  #app {
    width: 100dvw !important;
    max-width: 100dvw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .login-mode,
  .login-mode .workspace,
  .modern-login.login-centered {
    width: 100dvw !important;
    max-width: 100dvw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .login-mode .workspace {
    display: block !important;
    min-height: 100dvh !important;
    padding: 0 !important;
  }

  .modern-login.login-centered {
    display: block !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    background: linear-gradient(180deg, #f5f9ff 0%, #eaf4ff 100%) !important;
  }

  .login-centered .login-module-row,
  .login-centered .login-copyright {
    display: none !important;
  }

  .login-centered .login-brand-center {
    display: block !important;
    position: absolute !important;
    left: 50dvw !important;
    top: 34px !important;
    width: calc(100dvw - 28px) !important;
    max-width: calc(100dvw - 28px) !important;
    text-align: center !important;
    transform: translateX(-50%) !important;
  }

  .login-centered .login-wordmark {
    font-size: clamp(28px, 8.5dvw, 34px) !important;
    line-height: 1.08 !important;
  }

  .login-centered .login-brand-center p {
    margin-top: 8px !important;
    font-size: 12px !important;
    letter-spacing: 3px !important;
  }

  .login-centered .login-glass-card {
    position: absolute !important;
    inset: auto !important;
    left: 50dvw !important;
    top: 128px !important;
    width: min(300px, calc(100dvw - 28px)) !important;
    max-width: calc(100dvw - 28px) !important;
    height: auto !important;
    max-height: calc(100dvh - 36px) !important;
    overflow: auto !important;
    padding: 28px 22px 22px !important;
    transform: translateX(-50%) !important;
  }

  .login-centered .login-form input[type="text"],
  .login-centered .login-form input[type="password"],
  .login-centered .login-form input[name="username"],
  .login-centered .login-form input[name="password"],
  .login-centered .login-form button[type="submit"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 560px) {
  .modern-login.login-centered {
    display: block !important;
  }

  .login-centered .login-glass-card {
    margin: 0 auto !important;
  }
}

/* Final desktop fit override: keep login compact and prevent feature cards from overlapping. */
@media (min-width: 981px) {
  .modern-login.login-centered {
    min-height: 100dvh !important;
  background:
    url("./assets/login-background-side-panels.png") center center / cover no-repeat,
    #eef6ff !important;
  }

  .login-centered .login-brand-center {
    top: clamp(42px, 7vh, 70px) !important;
  }

  .login-centered .login-wordmark {
    font-size: clamp(34px, 3.6vw, 42px) !important;
  }

  .login-centered .login-brand-center p {
    margin-top: 8px !important;
    font-size: 14px !important;
    letter-spacing: 4px !important;
  }

  .login-centered .login-glass-card {
    top: clamp(190px, 24vh, 228px) !important;
    width: 430px !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 28px 36px 18px !important;
    overflow: visible !important;
  }

  .login-centered .login-card-head {
    margin-bottom: 18px !important;
  }

  .login-centered .login-card-head h2 {
    font-size: 28px !important;
  }

  .login-centered .login-card-head p {
    margin-top: 6px !important;
    font-size: 14px !important;
  }

  .login-centered .login-form {
    gap: 11px !important;
  }

  .login-centered .login-form input[type="text"],
  .login-centered .login-form input[type="password"],
  .login-centered .login-form input[name="username"],
  .login-centered .login-form input[name="password"],
  .login-centered .login-form button[type="submit"] {
    height: 42px !important;
  }

  .login-centered .login-options {
    height: 22px !important;
    margin-top: -1px !important;
  }

  .login-centered .login-form button[type="submit"] {
    font-size: 17px !important;
  }

  .login-centered .login-divider {
    margin: 0 !important;
  }

  .login-centered .login-verify-button,
  .login-centered .login-wecom-button {
    height: 20px !important;
    line-height: 20px !important;
  }

  .login-centered .login-secure-line {
    margin-top: 10px !important;
    padding-top: 9px !important;
    font-size: 13px !important;
  }

  .login-centered .login-module-row {
    bottom: 54px !important;
    width: min(1080px, calc(100vw - 360px)) !important;
  }

  .login-centered .login-module-row > div {
    min-height: 86px !important;
    padding: 16px 22px !important;
  }
}

/* Login input icons, WeCom entry and mobile spacing fixes. */
.login-centered .login-form > label {
  position: relative !important;
}

.login-centered .login-form > label::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  z-index: 3;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-color: #8b99ad;
  pointer-events: none;
}

.login-centered .login-form > label:nth-of-type(1)::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5.33 0-9 2.67-9 6v1h18v-1c0-3.33-3.67-6-9-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5.33 0-9 2.67-9 6v1h18v-1c0-3.33-3.67-6-9-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-centered .login-form > label:nth-of-type(2)::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M17 9V7A5 5 0 0 0 7 7v2H5v13h14V9h-2Zm-8 0V7a3 3 0 0 1 6 0v2H9Zm4 8.73V19h-2v-1.27a2 2 0 1 1 2 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='black' d='M17 9V7A5 5 0 0 0 7 7v2H5v13h14V9h-2Zm-8 0V7a3 3 0 0 1 6 0v2H9Zm4 8.73V19h-2v-1.27a2 2 0 1 1 2 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-centered .login-field-icon {
  display: none !important;
}

.login-centered .login-field-icon .ui-icon {
  width: 18px !important;
  height: 18px !important;
}

.login-centered .login-wecom-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  color: #1662d4 !important;
}

.login-centered .login-wecom-button .ui-icon {
  display: none !important;
}

.login-centered .login-wecom-button::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 28 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='10' r='8' fill='%2307C160'/%3E%3Ccircle cx='18' cy='13' r='7' fill='%231E80FF' fill-opacity='.92'/%3E%3Ccircle cx='6.6' cy='8.4' r='1.1' fill='white'/%3E%3Ccircle cx='11.2' cy='8.4' r='1.1' fill='white'/%3E%3Ccircle cx='16.2' cy='12' r='1' fill='white'/%3E%3Ccircle cx='20.2' cy='12' r='1' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 980px) {
  .login-centered .login-glass-card {
    top: 118px !important;
    width: min(335px, calc(100dvw - 44px)) !important;
    padding: 28px 24px 22px !important;
  }

  .login-centered .login-form {
    gap: 13px !important;
  }

  .login-centered .login-options {
    height: auto !important;
    min-height: 26px !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .login-centered .login-form button[type="submit"] {
    margin-top: 2px !important;
  }

  .login-centered .login-divider {
    margin: 2px 0 0 !important;
  }

  .login-centered .login-verify-button,
  .login-centered .login-wecom-button {
    height: 24px !important;
    line-height: 24px !important;
  }

  .login-centered .login-secure-line {
    align-items: flex-start !important;
    line-height: 1.45 !important;
    text-align: left !important;
  }
}

/* Final one-screen login layout: no overlap, no scroll on low desktop heights. */
@media (min-width: 981px) {
  .modern-login.login-centered {
    --login-top-pad: clamp(18px, 4vh, 42px);
    --login-row-gap: clamp(10px, 1.8vh, 18px);
    --login-brand-size: clamp(34px, 3.1vw, 44px);
    --login-card-width: min(410px, calc(100vw - 96px));
    --login-card-pad-y: 22px;
    --login-card-pad-x: 34px;
    --login-input-h: 40px;
    --login-form-gap: 9px;
    --login-module-h: 78px;

    display: grid !important;
    grid-template-rows: auto auto auto auto !important;
    justify-items: center !important;
    align-content: start !important;
    row-gap: var(--login-row-gap) !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: var(--login-top-pad) 32px 12px !important;
    background:
      url("./assets/login-background-side-panels.png") center center / cover no-repeat,
      #eef6ff !important;
  }

  .login-centered .login-brand-center,
  .login-centered .login-glass-card,
  .login-centered .login-module-row,
  .login-centered .login-copyright {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }

  .login-centered .login-brand-center {
    grid-row: 1 !important;
    width: min(520px, 100%) !important;
    height: auto !important;
    margin: 0 !important;
  }

  .login-centered .login-wordmark {
    font-size: var(--login-brand-size) !important;
    line-height: 1.05 !important;
  }

  .login-centered .login-brand-center p {
    margin-top: 8px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    letter-spacing: 4px !important;
  }

  .login-centered .login-glass-card {
    grid-row: 2 !important;
    width: var(--login-card-width) !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: var(--login-card-pad-y) var(--login-card-pad-x) 14px !important;
    overflow: visible !important;
  }

  .login-centered .login-card-head {
    margin-bottom: 12px !important;
  }

  .login-centered .login-card-head h2 {
    font-size: 27px !important;
    line-height: 1.12 !important;
  }

  .login-centered .login-card-head p {
    margin-top: 5px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .login-centered .login-form {
    gap: var(--login-form-gap) !important;
  }

  .login-centered .login-form input[type="text"],
  .login-centered .login-form input[type="password"],
  .login-centered .login-form input[name="username"],
  .login-centered .login-form input[name="password"],
  .login-centered .login-form button[type="submit"] {
    height: var(--login-input-h) !important;
    min-height: 0 !important;
    font-size: 14px !important;
  }

  .login-centered .login-options {
    height: 20px !important;
    min-height: 0 !important;
    margin: 0 !important;
    align-items: center !important;
  }

  .login-centered .checkbox-line,
  .login-centered .link-button {
    font-size: 12px !important;
    line-height: 18px !important;
  }

  .login-centered .checkbox-line input {
    width: 14px !important;
    height: 14px !important;
  }

  .login-centered .login-form button[type="submit"] {
    margin-top: 0 !important;
    font-size: 16px !important;
    line-height: var(--login-input-h) !important;
  }

  .login-centered .login-divider {
    margin: 0 !important;
    height: 16px !important;
    font-size: 12px !important;
  }

  .login-centered .login-verify-button,
  .login-centered .login-wecom-button {
    height: 20px !important;
    min-height: 0 !important;
    line-height: 20px !important;
    font-size: 12px !important;
  }

  .login-centered .login-form > .login-wecom-button {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0 !important;
    transform: none !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: stretch !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .login-centered .login-form > .login-wecom-button::before {
    flex: 0 0 14px !important;
    width: 14px !important;
    height: 14px !important;
  }

  .login-centered .login-secure-line {
    margin-top: 8px !important;
    padding-top: 8px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .login-centered .login-module-row {
    grid-row: 3 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    width: min(1060px, calc(100vw - 260px)) !important;
    margin: 0 !important;
  }

  .login-centered .login-module-row > div {
    min-height: var(--login-module-h) !important;
    height: var(--login-module-h) !important;
    padding: 12px 20px !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    align-items: center !important;
  }

  .login-centered .login-module-row .ui-icon {
    width: 40px !important;
    height: 40px !important;
    padding: 10px !important;
  }

  .login-centered .login-module-row strong {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }

  .login-centered .login-module-row span {
    margin-top: 5px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .login-centered .login-copyright {
    grid-row: 4 !important;
    display: block !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
}

@media (min-width: 981px) and (max-width: 1500px) {
  .modern-login.login-centered {
    --login-card-width: min(380px, calc(100vw - 80px));
    --login-card-pad-y: 18px;
    --login-card-pad-x: 30px;
    --login-input-h: 36px;
    --login-module-h: 70px;
  }

  .login-centered .login-module-row {
    width: min(900px, calc(100vw - 90px)) !important;
  }
}

@media (min-width: 981px) and (max-height: 800px) {
  .modern-login.login-centered {
    --login-top-pad: 16px;
    --login-row-gap: 9px;
    --login-brand-size: 32px;
    --login-card-width: min(360px, calc(100vw - 80px));
    --login-card-pad-y: 15px;
    --login-card-pad-x: 28px;
    --login-input-h: 34px;
    --login-form-gap: 7px;
    --login-module-h: 64px;
    padding-bottom: 8px !important;
  }

  .login-centered .login-brand-center p {
    margin-top: 5px !important;
    font-size: 12px !important;
  }

  .login-centered .login-card-head {
    margin-bottom: 8px !important;
  }

  .login-centered .login-card-head h2 {
    font-size: 24px !important;
  }

  .login-centered .login-card-head p {
    margin-top: 3px !important;
    font-size: 12px !important;
  }

  .login-centered .login-secure-line {
    margin-top: 5px !important;
    padding-top: 6px !important;
  }

  .login-centered .login-module-row > div {
    padding: 10px 16px !important;
  }
}

@media (min-width: 981px) and (max-height: 700px) {
  .modern-login.login-centered {
    --login-top-pad: 10px;
    --login-row-gap: 6px;
    --login-brand-size: 28px;
    --login-card-width: min(340px, calc(100vw - 72px));
    --login-card-pad-y: 12px;
    --login-card-pad-x: 24px;
    --login-input-h: 31px;
    --login-form-gap: 5px;
    --login-module-h: 56px;
    padding-bottom: 6px !important;
  }

  .login-centered .login-brand-center p,
  .login-centered .login-card-head p,
  .login-centered .checkbox-line,
  .login-centered .link-button,
  .login-centered .login-divider,
  .login-centered .login-verify-button,
  .login-centered .login-wecom-button,
  .login-centered .login-secure-line,
  .login-centered .login-copyright {
    font-size: 11px !important;
  }

  .login-centered .login-card-head h2 {
    font-size: 21px !important;
  }

  .login-centered .login-module-row strong {
    font-size: 14px !important;
  }

  .login-centered .login-module-row span {
    font-size: 11px !important;
  }

  .login-centered .login-module-row .ui-icon {
    width: 34px !important;
    height: 34px !important;
    padding: 8px !important;
  }
}

/* 2026-07 sidebar hierarchy: collapsible rail + collapsible modules */
.app-shell:not(.login-mode) {
  grid-template-columns: 204px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

.app-shell:not(.login-mode).sidebar-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.app-shell:not(.login-mode) .sidebar {
  display: flex;
  flex-direction: column;
  width: 204px;
  padding: 10px 8px 0;
  overflow: hidden;
  background: #fbfdff;
  border-right: 1px solid #dce8f8;
  box-shadow: 3px 0 14px rgba(30, 64, 120, 0.045);
  transition: width 0.2s ease, padding 0.2s ease;
}

.app-shell:not(.login-mode).sidebar-collapsed .sidebar {
  width: 64px;
  padding-inline: 8px;
}

.app-shell:not(.login-mode) .brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  margin: 0 0 10px;
  padding: 0 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: #1761d8;
  box-shadow: none;
  cursor: pointer;
}

.app-shell:not(.login-mode) .brand:hover {
  background: #f4f8ff;
  transform: none;
  box-shadow: none;
}

.app-shell:not(.login-mode) .brand strong {
  color: #1761d8;
  font-size: 19px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.app-shell:not(.login-mode) .brand span,
.app-shell:not(.login-mode) .brand-mark {
  display: none !important;
}

.app-shell:not(.login-mode).sidebar-collapsed .brand {
  justify-content: center;
  padding: 0;
}

.app-shell:not(.login-mode).sidebar-collapsed .brand strong {
  display: none;
}

.app-shell:not(.login-mode) .nav-list {
  flex: 1 1 auto;
  display: block;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 0 12px;
}

.nav-section {
  position: relative;
  margin: 1px 0;
}

.nav-section-button,
.app-shell:not(.login-mode) .nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #586a84;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.nav-section-button:hover,
.app-shell:not(.login-mode) .nav-item:hover {
  background: #f4f8ff;
  color: #1761d8;
  transform: none;
  box-shadow: none;
}

.app-shell:not(.login-mode) .nav-item.active {
  background: #edf5ff;
  color: #1761d8;
  border-color: #dbeafe;
}

.app-shell:not(.login-mode) .nav-item.active::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #1f6feb;
}

.app-shell:not(.login-mode) .nav-item.active::before {
  content: none;
}

.nav-item-main {
  min-width: 0;
  gap: 10px;
}

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

.nav-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: currentColor;
  font-size: 17px;
}

.nav-section-caret {
  margin-left: auto;
  color: #9aacbf;
  font-size: 15px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.nav-section.closed .nav-section-caret {
  transform: rotate(0deg);
}

.nav-sublist {
  display: grid;
  gap: 1px;
  margin: 1px 0 5px;
  padding-left: 16px;
  overflow: hidden;
}

.nav-section.closed .nav-sublist {
  display: none;
}

.app-shell:not(.login-mode) .nav-sublist .nav-item {
  min-height: 34px;
  padding-left: 10px;
  color: #6a7890;
  font-size: 12px;
  font-weight: 650;
}

.app-shell:not(.login-mode) .nav-sublist .nav-item.active {
  background: #f2f7ff;
  border-color: transparent;
}

.app-shell:not(.login-mode) .nav-sublist .nav-icon {
  flex-basis: 17px;
  width: 17px;
  height: 17px;
  font-size: 15px;
}

.sidebar-footer {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: auto -8px 0;
  padding: 10px 8px 12px;
  border-top: 1px solid #dce8f8;
  background: rgba(255, 255, 255, 0.84);
}

.sidebar-collapse-button {
  display: grid;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-collapse-button:hover {
  background: #f2f7ff;
  color: #1761d8;
  transform: none;
  box-shadow: none;
}

.sidebar-collapse-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.sidebar-version {
  color: #8da0bb;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.app-shell:not(.login-mode).sidebar-collapsed .nav-section {
  margin: 5px 0;
}

.app-shell:not(.login-mode).sidebar-collapsed .nav-section-button {
  justify-content: center;
  min-height: 42px;
  padding: 0;
}

.app-shell:not(.login-mode).sidebar-collapsed .nav-sublist,
.app-shell:not(.login-mode).sidebar-collapsed .nav-label,
.app-shell:not(.login-mode).sidebar-collapsed .nav-section-caret {
  display: none;
}

.app-shell:not(.login-mode).sidebar-collapsed .nav-item-main {
  justify-content: center;
}

.app-shell:not(.login-mode).sidebar-collapsed .nav-section.located > .nav-section-button {
  background: #f0f6ff;
  color: #1761d8;
  border-color: #e4efff;
}

.app-shell:not(.login-mode).sidebar-collapsed .nav-section.located > .nav-section-button::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #1f6feb;
}

.app-shell:not(.login-mode).sidebar-collapsed .sidebar-collapse-button {
  justify-content: center;
  padding: 0;
}

@media (max-width: 980px) {
  .app-shell:not(.login-mode),
  .app-shell:not(.login-mode).sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .app-shell:not(.login-mode) .sidebar,
  .app-shell:not(.login-mode).sidebar-collapsed .sidebar {
    width: 100%;
    overflow: visible;
  }

  .app-shell:not(.login-mode).sidebar-collapsed .nav-label,
  .app-shell:not(.login-mode).sidebar-collapsed .nav-section-caret {
    display: inline;
  }

  .app-shell:not(.login-mode).sidebar-collapsed .nav-sublist {
    display: grid;
  }
}

/* Final login secondary-action alignment: applies after every legacy login override. */
.login-centered .login-form > .login-verify-button,
.login-centered .login-form > .login-wecom-button {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 24px !important;
  min-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: stretch !important;
  overflow: visible !important;
  color: #1f6feb !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 24px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.login-centered .login-form > .login-wecom-button {
  gap: 6px !important;
}

.login-centered .login-form > .login-wecom-button .ui-icon {
  display: none !important;
}

.login-centered .login-form > .login-wecom-button::before {
  content: "" !important;
  display: block !important;
  flex: 0 0 14px !important;
  width: 14px !important;
  height: 14px !important;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 28 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='9' cy='10' r='8' fill='%2307C160'/%3E%3Ccircle cx='18' cy='13' r='7' fill='%231E80FF' fill-opacity='.92'/%3E%3Ccircle cx='6.6' cy='8.4' r='1.1' fill='white'/%3E%3Ccircle cx='11.2' cy='8.4' r='1.1' fill='white'/%3E%3Ccircle cx='16.2' cy='12' r='1' fill='white'/%3E%3Ccircle cx='20.2' cy='12' r='1' fill='white'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

.login-centered .login-form > .login-wecom-button span {
  display: inline !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

/* Final floating topbar: title + status on the left, compact controls on the right. */
.app-shell:not(.login-mode) .workspace {
  overflow: visible;
}

.app-shell:not(.login-mode) .topbar {
  position: relative;
  z-index: 2000;
  overflow: visible;
  align-items: center;
  min-height: 68px;
  padding: 12px 24px;
  background: rgba(248, 251, 255, 0.92);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  overflow: visible;
}

.topbar-context {
  min-width: 0;
}

.topbar-context h1 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
}

.topbar-context p {
  margin: 4px 0 0;
  color: #7a8aa3;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.topbar-control-capsule {
  position: relative;
  z-index: 2100;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 44px;
  max-width: 100%;
  padding: 3px 4px 3px 12px;
  border: 1px solid #dbe7f6;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(30, 64, 120, 0.08);
  overflow: visible;
}

.topbar-control-capsule .topbar-sync {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: 122px;
  min-height: 34px;
  padding: 0 12px 0 0;
  border-right: 1px solid #e8eef7;
  gap: 8px;
  color: #62748d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.topbar-control-capsule .topbar-sync span {
  color: #62748d;
}

.topbar-control-capsule .sync-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
}

.topbar-control-capsule .topbar-popover-wrap {
  position: relative;
  z-index: 2200;
  overflow: visible;
}

.topbar-control-capsule .topbar-icon-button,
.topbar-control-capsule .user-menu-button {
  min-height: 38px;
  border-radius: 999px;
}

.topbar-control-capsule .topbar-icon-button {
  position: relative;
  width: 38px;
}

.topbar-control-capsule .user-menu-button {
  padding: 0 9px 0 4px;
}

.topbar-control-capsule .avatar-dot {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.topbar-control-capsule .user-menu-button strong {
  max-width: 86px;
}

.topbar-control-capsule .topbar-popover {
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  z-index: 5000;
  border-radius: 10px;
  box-shadow: 0 22px 46px rgba(30, 64, 120, 0.18);
}

.topbar-control-capsule .notification-panel {
  width: 300px;
}

.topbar-control-capsule .user-menu {
  width: 156px;
}

@media (max-width: 980px) {
  .app-shell:not(.login-mode) .topbar {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    margin: 0 -16px 18px;
    padding: 12px 16px;
  }

  .topbar-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-control-capsule {
    width: min(100%, 520px);
    justify-content: flex-end;
    margin-left: 0;
  }

  .topbar-control-capsule .topbar-sync {
    min-width: 106px;
  }

  .topbar-control-capsule .notification-panel {
    width: min(300px, calc(100vw - 40px));
  }

  .topbar-control-capsule .topbar-popover {
    right: 0;
    left: auto;
  }

  .topbar-control-capsule .current-user {
    grid-column: auto;
    display: flex;
  }
}

@media (max-width: 560px) {
  .topbar-control-capsule {
    justify-content: space-between;
    padding-left: 10px;
  }

  .topbar-control-capsule .user-menu-button strong,
  .topbar-control-capsule .user-menu-caret {
    display: none;
  }

  .topbar-control-capsule .topbar-sync {
    min-width: 0;
    padding-right: 10px;
  }
}

/* Final brand integration and sidebar reveal behavior. */
.app-shell:not(.login-mode) {
  transition: grid-template-columns 0.14s ease;
}

.app-shell:not(.login-mode) .topbar {
  grid-template-columns: minmax(0, 1fr) !important;
}

.app-shell:not(.login-mode) .topbar-menu {
  display: none !important;
}

.app-shell:not(.login-mode) .sidebar {
  transition: width 0.14s ease, padding 0.14s ease;
}

.app-shell:not(.login-mode) .brand {
  gap: 10px;
  min-height: 48px;
  padding: 0 10px;
}

.app-shell:not(.login-mode) .brand-logo {
  display: block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 8px 18px rgba(20, 97, 255, 0.18);
}

.app-shell:not(.login-mode) .brand strong {
  color: #0a1a33;
  font-size: 18px;
  letter-spacing: 0;
}

.app-shell:not(.login-mode) .brand:hover strong {
  color: #1461ff;
}

.app-shell:not(.login-mode).sidebar-collapsed .brand {
  min-height: 46px;
  padding: 0;
}

.app-shell:not(.login-mode).sidebar-collapsed .brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

@media (max-width: 980px) {
  .app-shell:not(.login-mode) .topbar {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Unified typography system for logged-in ERP content pages. */
.app-shell:not(.login-mode) {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--line-body);
}

.app-shell:not(.login-mode) h1,
.app-shell:not(.login-mode) h2,
.app-shell:not(.login-mode) h3,
.app-shell:not(.login-mode) p,
.app-shell:not(.login-mode) button,
.app-shell:not(.login-mode) input,
.app-shell:not(.login-mode) select,
.app-shell:not(.login-mode) textarea,
.app-shell:not(.login-mode) table {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.app-shell:not(.login-mode) .page-heading h1,
.app-shell:not(.login-mode) h1 {
  font-size: var(--title-page);
  font-weight: var(--weight-title);
  line-height: var(--line-title);
}

.app-shell:not(.login-mode) .page-heading p,
.app-shell:not(.login-mode) .muted,
.app-shell:not(.login-mode) .muted-line,
.app-shell:not(.login-mode) .helper-text,
.app-shell:not(.login-mode) .detail-item span {
  font-size: var(--text-meta);
  font-weight: var(--weight-regular);
  line-height: 1.35;
}

.app-shell:not(.login-mode) .panel-header h2,
.app-shell:not(.login-mode) .ops-trend-title h2,
.app-shell:not(.login-mode) .section-title,
.app-shell:not(.login-mode) h2 {
  font-size: var(--title-section);
  font-weight: var(--weight-title);
  line-height: var(--line-compact);
}

.app-shell:not(.login-mode) h3,
.app-shell:not(.login-mode) .card-title,
.app-shell:not(.login-mode) .kpi-title,
.app-shell:not(.login-mode) .cell-primary strong {
  font-size: var(--text-strong);
  font-weight: var(--weight-card-title);
  line-height: 1.3;
}

.app-shell:not(.login-mode) button,
.app-shell:not(.login-mode) input,
.app-shell:not(.login-mode) select,
.app-shell:not(.login-mode) textarea,
.app-shell:not(.login-mode) .file-action {
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
  line-height: var(--line-compact);
}

.app-shell:not(.login-mode) .compact,
.app-shell:not(.login-mode) .pill,
.app-shell:not(.login-mode) .mini-status,
.app-shell:not(.login-mode) .status-line,
.app-shell:not(.login-mode) .task-time-line {
  font-size: var(--text-caption);
  font-weight: var(--weight-field);
  line-height: var(--line-compact);
}

.app-shell:not(.login-mode) table {
  font-size: var(--text-body);
}

.app-shell:not(.login-mode) th {
  font-size: var(--text-meta);
  font-weight: var(--weight-card-title);
  line-height: var(--line-compact);
}

.app-shell:not(.login-mode) td {
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.35;
}

.app-shell:not(.login-mode) td strong,
.app-shell:not(.login-mode) .money-value,
.app-shell:not(.login-mode) .order-no,
.app-shell:not(.login-mode) .platform-order-link,
.app-shell:not(.login-mode) .purchase-account-badge {
  font-size: var(--text-emphasis);
  font-weight: var(--weight-field);
  line-height: 1.3;
}

.app-shell:not(.login-mode) .kpi span,
.app-shell:not(.login-mode) .dashboard-kpis .kpi-title,
.app-shell:not(.login-mode) .summary-label {
  font-size: var(--text-meta);
  font-weight: var(--weight-field);
  line-height: 1.3;
}

.app-shell:not(.login-mode) .kpi strong,
.app-shell:not(.login-mode) .dashboard-kpis .kpi.dashboard-kpi strong,
.app-shell:not(.login-mode) .purchase-risk-metrics strong,
.app-shell:not(.login-mode) .redemption-metrics strong,
.app-shell:not(.login-mode) .stat-value {
  font-family: var(--font-number);
  font-size: var(--number-kpi);
  font-weight: var(--weight-kpi);
  line-height: var(--line-number);
}

.app-shell:not(.login-mode) .ops-hero-amount,
.app-shell:not(.login-mode) .dashboard-hero-number,
.app-shell:not(.login-mode) .management-summary strong {
  font-family: var(--font-number);
  font-size: var(--number-focus);
  font-weight: var(--weight-kpi);
  line-height: var(--line-number);
}

.app-shell:not(.login-mode) .order-no-copy,
.app-shell:not(.login-mode) .platform-order-link,
.app-shell:not(.login-mode) code,
.app-shell:not(.login-mode) pre,
.app-shell:not(.login-mode) .raw-text {
  font-family: var(--font-code);
}

.app-shell:not(.login-mode) .link-button,
.app-shell:not(.login-mode) .text-button {
  font-size: var(--text-body);
  font-weight: var(--weight-field);
}

/* Mobile module launcher: compact top menu with grouped navigation cards. */
.mobile-nav-panel {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
}

.mobile-nav-panel.open {
  display: block;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 31, 58, 0.32);
  backdrop-filter: blur(2px);
}

.mobile-nav-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(78dvh, 680px);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: #f8fbff;
  box-shadow: 0 -18px 42px rgba(31, 67, 122, 0.16);
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #dbe7f6;
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mobile-nav-head strong {
  color: #10213f;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.mobile-nav-head span {
  color: #647b9d;
  font-size: 12px;
  line-height: 1.2;
}

.mobile-nav-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #d5e3f5;
  border-radius: 10px;
  background: #fff;
  color: #253858;
  box-shadow: none;
}

.mobile-nav-close .ui-icon {
  width: 18px;
  height: 18px;
}

.mobile-nav-body {
  display: grid;
  gap: 14px;
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-section {
  display: grid;
  gap: 9px;
}

.mobile-nav-section-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 2px;
  color: #5f7190;
}

.mobile-nav-section-title span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #1761d8;
}

.mobile-nav-section-title .ui-icon {
  width: 16px;
  height: 16px;
}

.mobile-nav-section-title strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 78px;
  padding: 10px 6px;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  background: #fff;
  color: #182a46;
  box-shadow: 0 8px 20px rgba(31, 67, 122, 0.045);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.mobile-nav-card.active {
  border-color: #95bdf8;
  background: #edf5ff;
  color: #1761d8;
}

.mobile-nav-card-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #edf5ff;
  color: #1761d8;
}

.mobile-nav-card-icon .ui-icon {
  width: 17px;
  height: 17px;
}

body.mobile-nav-open {
  overflow: hidden;
}

@media (min-width: 981px) {
  .mobile-nav-panel {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .app-shell:not(.login-mode) .sidebar {
    display: none !important;
  }

  .app-shell:not(.login-mode) .workspace {
    width: 100%;
    max-width: 100%;
    padding: 0 12px 18px !important;
  }

  .app-shell:not(.login-mode) .topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    margin: 0 -12px 12px !important;
    padding: 9px 12px !important;
    border-radius: 0 !important;
  }

  .app-shell:not(.login-mode) .topbar-menu {
    display: inline-grid !important;
    place-items: center;
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid #dbe7f6;
    border-radius: 10px;
    background: #fff;
    color: #253858;
  }

  .app-shell:not(.login-mode) .topbar-main {
    min-width: 0;
  }

  .app-shell:not(.login-mode) .topbar-context h1 {
    overflow: hidden;
    font-size: 18px !important;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell:not(.login-mode) .topbar-context p {
    overflow: hidden;
    max-width: 46vw;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-shell:not(.login-mode) .topbar-control-capsule {
    min-width: 0;
    transform: scale(0.86);
    transform-origin: right center;
  }
}

@media (max-width: 420px) {
  .mobile-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell:not(.login-mode) .topbar-context p {
    max-width: 38vw;
  }
}

.product-management-page {
  display: grid;
  gap: 16px;
}

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

.product-kpi,
.product-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.product-kpi {
  padding: 16px 18px;
}

.product-kpi span,
.product-kpi small {
  color: var(--muted);
}

.product-kpi strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 28px;
  line-height: 1;
  color: var(--primary);
}

.product-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(220px, .8fr) minmax(220px, .8fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  overflow: hidden;
  cursor: default;
}

.product-main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.product-main img {
  display: block;
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f6f8fb;
}

.product-card h3 {
  overflow: hidden;
  margin: 4px 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card-head,
.product-links,
.product-price-box,
.product-order-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.product-links a,
.product-links span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-price-box div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #d8e5f8;
  border-radius: 8px;
  background: #f7fbff;
}

.product-price-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.product-price-box strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--primary);
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-trend {
  min-width: 0;
}

.product-trend svg {
  width: 100%;
  height: 58px;
}

.product-trend .trend-hit,
.product-detail-trend .trend-hit {
  fill: transparent;
  stroke: transparent;
  cursor: help;
  pointer-events: all;
}

.product-trend .trend-hit:hover,
.product-detail-trend .trend-hit:hover {
  fill: rgba(29, 111, 242, .08);
  stroke: #0f4fc4;
  stroke-width: 2;
}

.product-trend-tooltip {
  position: fixed;
  z-index: 99999;
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid rgba(15, 79, 196, .18);
  border-radius: 8px;
  background: rgba(15, 23, 42, .94);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  white-space: normal;
}

.product-trend text {
  font-size: 11px;
  fill: var(--muted);
}

.product-trend-empty {
  color: var(--muted);
  font-size: 13px;
}

.product-order-list {
  display: grid;
  gap: 6px;
}

.product-order-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  font-size: 12px;
}

.product-order-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-modal {
  width: min(1080px, calc(100vw - 40px));
}

.product-detail-title {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.product-detail-title img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.product-detail-title h2 {
  overflow: hidden;
  margin: 6px 0 4px;
  font-size: 20px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.product-detail-kpis div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e5f8;
  border-radius: 8px;
  background: #f7fbff;
}

.product-detail-kpis span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.product-detail-kpis strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--primary);
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.panel-header.compact {
  margin-bottom: 10px;
}

.panel-header.compact h3 {
  margin: 0;
  font-size: 16px;
}

.product-detail-trend {
  overflow: hidden;
  border: 1px solid #d8e5f8;
  border-radius: 8px;
  background: #fbfdff;
}

.product-detail-trend svg {
  display: block;
  width: 100%;
  height: 180px;
}

.product-detail-trend text {
  fill: var(--muted);
  font-size: 13px;
}

.product-detail-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-detail-links a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d8e5f8;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.product-detail-links a:hover {
  border-color: var(--primary);
  background: #f7fbff;
}

.product-detail-links strong,
.product-detail-links span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-links span {
  color: var(--muted);
  font-size: 12px;
}

.product-detail-table {
  max-height: 320px;
}

@media (max-width: 1280px) {
  .product-card {
    grid-template-columns: 1fr;
  }

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

  .product-detail-kpis,
  .product-detail-links {
    grid-template-columns: 1fr;
  }
}
