/*
 * 智名中枢视觉系统
 * 只负责界面外观与响应式表现，不改变角色权限、业务数据或接口行为。
 */

body[data-theme="tech"] {
  color-scheme: dark;
  --bg: #050b15;
  --panel: #091524;
  --ink: #e7eef5;
  --text: #e7eef5;
  --muted: #7890a7;
  --line: #1b2a3c;
  --border: #1b2a3c;
  --accent: #42cfe7;
  --primary: #42cfe7;
  --green: #24d06a;
  --accent-2: #8b7cff;
  --danger: #ff4d5f;
  --soft: #0d1a2b;
  --tech-bg-deep: #030812;
  --tech-sidebar: #050d18;
  --tech-surface: #091524;
  --tech-surface-2: #0d1a2b;
  --tech-surface-3: #111f31;
  --tech-active: #103040;
  --tech-cyan: #4bd8ed;
  --tech-blue: #5ba7ff;
  --tech-violet: #8b7cff;
  --tech-success: #24d06a;
  --tech-warning: #ffa60a;
  --tech-danger: #ff4d5f;
  --tech-line: rgba(122, 157, 188, 0.2);
  --tech-line-strong: rgba(75, 216, 237, 0.34);
  --tech-glow: 0 0 28px rgba(75, 216, 237, 0.1);
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
}

html[data-theme="tech"] {
  background: #030812;
}

body[data-theme="tech"] {
  background:
    radial-gradient(circle at 76% -10%, rgba(61, 125, 196, 0.12), transparent 34rem),
    linear-gradient(135deg, #030812 0%, #050b15 48%, #06101d 100%);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.01em;
}

body[data-theme="tech"] ::selection {
  background: rgba(75, 216, 237, 0.28);
  color: #fff;
}

body[data-theme="tech"] * {
  scrollbar-color: #29445d #07111e;
  scrollbar-width: thin;
}

body[data-theme="tech"] *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body[data-theme="tech"] *::-webkit-scrollbar-track {
  background: #07111e;
}

body[data-theme="tech"] *::-webkit-scrollbar-thumb {
  border: 2px solid #07111e;
  border-radius: 999px;
  background: #29445d;
}

body[data-theme="tech"] :focus-visible {
  outline: 2px solid var(--tech-cyan);
  outline-offset: 2px;
}

body[data-theme="tech"] h1,
body[data-theme="tech"] h2,
body[data-theme="tech"] h3,
body[data-theme="tech"] strong,
body[data-theme="tech"] b {
  color: #eaf2f9;
}

body[data-theme="tech"] a {
  color: var(--tech-cyan);
}

body[data-theme="tech"] .muted,
body[data-theme="tech"] small,
body[data-theme="tech"] .eyebrow {
  color: var(--muted);
}

body[data-theme="tech"] .tech-kicker {
  color: #6b9fbd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.2;
}

/* Common controls */
body[data-theme="tech"] button {
  min-height: 38px;
  border: 1px solid #3abfd5;
  border-radius: 10px;
  background: linear-gradient(135deg, #47d8ed, #3ebed9);
  color: #03131c;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(34, 181, 207, 0.12);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

body[data-theme="tech"] button:hover:not(:disabled) {
  filter: none;
  border-color: #77e6f4;
  background: linear-gradient(135deg, #61e4f3, #48cde5);
  box-shadow: 0 10px 28px rgba(75, 216, 237, 0.18);
  transform: translateY(-1px);
}

body[data-theme="tech"] button:active:not(:disabled),
body[data-theme="tech"] button.button-clicked:not(:disabled) {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 0 0 3px rgba(75, 216, 237, 0.14);
}

body[data-theme="tech"] button.secondary,
body[data-theme="tech"] button.ghost {
  border-color: var(--tech-line);
  background: #101c2d;
  color: #cbd8e4;
  box-shadow: none;
}

body[data-theme="tech"] button.secondary:hover:not(:disabled),
body[data-theme="tech"] button.ghost:hover:not(:disabled) {
  border-color: rgba(75, 216, 237, 0.4);
  background: #142438;
  color: #f0f7fb;
}

body[data-theme="tech"] button.warning,
body[data-theme="tech"] button.danger,
body[data-theme="tech"] .danger {
  border-color: rgba(255, 77, 95, 0.48);
  background: rgba(255, 77, 95, 0.14);
  color: #ff8290;
}

body[data-theme="tech"] input,
body[data-theme="tech"] select,
body[data-theme="tech"] textarea {
  border: 1px solid #203249;
  border-radius: 10px;
  background: #07111e;
  color: #e7eef5;
  caret-color: var(--tech-cyan);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

body[data-theme="tech"] input::placeholder,
body[data-theme="tech"] textarea::placeholder {
  color: #4d6073;
}

body[data-theme="tech"] input:focus,
body[data-theme="tech"] select:focus,
body[data-theme="tech"] textarea:focus {
  border-color: rgba(75, 216, 237, 0.58);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(75, 216, 237, 0.08), inset 0 1px 0 rgba(255,255,255,.02);
}

body[data-theme="tech"] input[type="checkbox"],
body[data-theme="tech"] input[type="radio"] {
  accent-color: var(--tech-cyan);
}

/* Login */
body[data-theme="tech"] .tech-login {
  position: relative;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 0.65fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(90deg, transparent 0 64%, rgba(5, 11, 21, 0.72) 78%, #050b15 100%),
    #050b15;
}

body[data-theme="tech"] .tech-login::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(84, 126, 160, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 126, 160, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000, transparent 86%);
}

body[data-theme="tech"] .tech-login-visual {
  position: relative;
  align-self: stretch;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px clamp(36px, 5vw, 84px) 70px;
  background:
    linear-gradient(90deg, rgba(5, 11, 21, 0.1), rgba(5, 11, 21, 0) 45%, rgba(5, 11, 21, 0.2)),
    url("/static/assets/brand/digital-intelligence-brain-v1.jpg") center right / cover no-repeat;
}

body[data-theme="tech"] .tech-login-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(3, 8, 18, 0.72));
}

body[data-theme="tech"] .tech-brand,
body[data-theme="tech"] .tech-login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
}

body[data-theme="tech"] .tech-brand-mark {
  width: 46px;
  height: 46px;
  flex: none;
  border: 1px solid rgba(119, 231, 247, 0.6);
  border-radius: 14px;
  background:
    radial-gradient(circle, #07121f 0 2.5px, transparent 3px) 10px 10px / 12px 12px,
    linear-gradient(135deg, #4bd8ed, #8b7cff);
  box-shadow: 0 10px 34px rgba(75, 216, 237, 0.2);
}

body[data-theme="tech"] .tech-brand > span:last-child,
body[data-theme="tech"] .tech-login-brand > span:last-child {
  display: grid;
  gap: 3px;
}

body[data-theme="tech"] .tech-brand strong,
body[data-theme="tech"] .tech-login-brand strong {
  color: #eef6fb;
  font-size: 18px;
  letter-spacing: 0.04em;
}

body[data-theme="tech"] .tech-brand small,
body[data-theme="tech"] .tech-login-brand small {
  color: #6f8ba2;
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0.08em;
}

body[data-theme="tech"] .tech-login-copy {
  position: relative;
  z-index: 2;
  width: min(640px, 88%);
}

body[data-theme="tech"] .tech-login-copy h1 {
  margin: 18px 0;
  color: #eff7fc;
  font-size: clamp(34px, 3.5vw, 52px);
  font-weight: 720;
  line-height: 1.22;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 42px rgba(0, 0, 0, 0.45);
}

body[data-theme="tech"] .tech-login-copy p {
  max-width: 540px;
  margin: 0;
  color: #86a0b6;
  font-size: 16px;
  line-height: 1.8;
}

body[data-theme="tech"] .tech-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

body[data-theme="tech"] .tech-signal-row span,
body[data-theme="tech"] .tech-login-security span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(104, 150, 184, 0.22);
  border-radius: 999px;
  background: rgba(6, 18, 31, 0.68);
  padding: 8px 12px;
  color: #93a9bc;
  font-size: 11px;
  backdrop-filter: blur(10px);
}

body[data-theme="tech"] .tech-signal-row i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tech-cyan);
  box-shadow: 0 0 10px var(--tech-cyan);
}

body[data-theme="tech"] .tech-login .login-panel {
  position: relative;
  z-index: 3;
  width: min(460px, calc(100% - 54px));
  justify-self: center;
  border: 1px solid rgba(117, 153, 184, 0.22);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(13, 26, 43, 0.96), rgba(7, 17, 30, 0.98));
  padding: 34px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(24px);
}

body[data-theme="tech"] .tech-login-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

body[data-theme="tech"] .tech-login-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body[data-theme="tech"] .ui-theme-switcher {
  border-color: var(--ui-line);
  background: var(--ui-surface-2);
}

body[data-theme="tech"] .ui-theme-switcher button {
  min-height: 30px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ui-text-muted);
  box-shadow: none;
}

body[data-theme="tech"] .ui-theme-switcher button:hover:not(:disabled) {
  border-color: var(--ui-line);
  background: var(--ui-surface-hover);
  color: var(--ui-text-strong);
  transform: none;
}

body[data-theme="tech"] .ui-theme-switcher button.active {
  border-color: var(--ui-line-strong);
  background: var(--ui-surface-selected);
  color: var(--ui-accent);
  box-shadow: inset 0 -2px var(--ui-accent);
}

body[data-theme="tech"] .ui-theme-switcher--sidebar {
  margin: 14px 0 0;
}

body[data-theme="tech"] .tech-login-panel-head h1 {
  margin: 7px 0 0;
  font-size: 25px;
}

body[data-theme="tech"] .tech-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8ca4b7;
  font-size: 11px;
  white-space: nowrap;
}

body[data-theme="tech"] .tech-live-status i,
body[data-theme="tech"] .tech-sidebar-meta i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tech-success);
  box-shadow: 0 0 12px rgba(36, 208, 106, 0.9);
  animation: tech-status-pulse 2.4s ease-in-out infinite;
}

body[data-theme="tech"] .tech-login .grid {
  gap: 17px;
  margin-top: 26px;
}

body[data-theme="tech"] .tech-login .field label {
  color: #9aafc1;
  font-size: 12px;
}

body[data-theme="tech"] .tech-login input {
  min-height: 48px;
  padding: 12px 14px;
}

body[data-theme="tech"] .tech-login-submit {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 18px;
}

body[data-theme="tech"] .tech-login-submit span {
  font-size: 19px;
}

body[data-theme="tech"] .tech-login-security {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

body[data-theme="tech"] .tech-login-security span {
  background: #0a1625;
  padding: 6px 9px;
}

body[data-theme="tech"] .login-version {
  border-color: var(--tech-line);
}

/* Shared three-role application shell */
body[data-theme="tech"] .app-shell {
  grid-template-columns: 270px minmax(0, 1fr);
  background: var(--bg);
}

body[data-theme="tech"] .sidebar {
  position: relative;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 26px 20px 18px;
  border-right: 1px solid rgba(105, 139, 169, 0.16);
  background:
    radial-gradient(circle at 8% 0%, rgba(75, 216, 237, 0.08), transparent 16rem),
    #050d18;
  color: #dbe7f0;
  box-shadow: 16px 0 42px rgba(0, 0, 0, 0.12);
}

body[data-theme="tech"] .sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(88, 133, 170, 0.035) 1px, transparent 1px);
  background-size: 100% 42px;
  mask-image: linear-gradient(#000, transparent 78%);
}

body[data-theme="tech"] .sidebar > * {
  position: relative;
  z-index: 1;
}

body[data-theme="tech"] .sidebar .brand {
  margin-bottom: 20px;
}

body[data-theme="tech"] .user-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  border: 1px solid rgba(109, 145, 177, 0.16);
  border-radius: 12px;
  background: rgba(12, 27, 44, 0.72);
  padding: 10px 11px;
  color: #93a8b9;
  font-size: 11px;
}

body[data-theme="tech"] .user-line b {
  border-radius: 999px;
  background: rgba(139, 124, 255, 0.13);
  padding: 4px 8px;
  color: #b8afff;
  font-size: 10px;
}

body[data-theme="tech"] .nav {
  min-height: 0;
  flex: 1;
  align-content: start;
  gap: 5px;
  overflow-y: auto;
  padding-right: 3px;
}

body[data-theme="tech"] .tech-nav-label {
  display: block;
  padding: 9px 10px 6px;
  color: #526b80;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

body[data-theme="tech"] .nav button {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  padding: 8px 11px;
  color: #7791a7;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

body[data-theme="tech"] .nav button::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border: 1px solid #58748b;
  border-radius: 2px;
  transform: rotate(45deg);
}

body[data-theme="tech"] .nav button:hover:not(:disabled) {
  border-color: rgba(77, 155, 184, 0.16);
  background: rgba(16, 40, 58, 0.52);
  color: #c9d9e5;
  box-shadow: none;
  transform: none;
}

body[data-theme="tech"] .nav button.active {
  border-color: rgba(75, 216, 237, 0.28);
  background: linear-gradient(90deg, rgba(31, 91, 107, 0.42), rgba(18, 51, 67, 0.58));
  color: #ecf8fb;
  box-shadow: inset 3px 0 #4bd8ed, 0 8px 24px rgba(0, 0, 0, 0.08);
}

body[data-theme="tech"] .nav button.active::before {
  border-color: var(--tech-cyan);
  background: var(--tech-cyan);
  box-shadow: 0 0 10px rgba(75, 216, 237, 0.74);
}

body[data-theme="tech"] .client-nav-locked {
  opacity: 0.45;
}

body[data-theme="tech"] .client-nav-lock {
  margin-left: auto;
  color: #668096;
}

body[data-theme="tech"] .tech-sidebar-meta {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  border-top: 1px solid var(--tech-line);
  padding: 14px 10px 2px;
}

body[data-theme="tech"] .tech-sidebar-meta > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7791a5;
  font-size: 10px;
}

body[data-theme="tech"] .tech-sidebar-meta small {
  color: #455b6e;
  font-size: 9px;
}

body[data-theme="tech"] .main,
body[data-theme="tech"] .main.screen-main {
  position: relative;
  z-index: 1;
  height: 100vh;
  padding: 102px 28px 24px;
  background:
    radial-gradient(circle at 84% 7%, rgba(50, 102, 159, 0.08), transparent 26rem),
    #050b15;
}

body[data-theme="tech"] .main.screen-main {
  padding: 94px 24px 16px;
}

body[data-theme="tech"] .main::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 80px 0 0 270px;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 116, 150, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 116, 150, 0.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 70% 28%, #000, transparent 68%);
}

body[data-theme="tech"] .role-client .main::after,
body[data-theme="tech"] .role-professional .main::after {
  content: "";
  position: fixed;
  z-index: -1;
  right: 0;
  bottom: 0;
  width: min(58vw, 980px);
  height: min(72vh, 760px);
  pointer-events: none;
  background: url("/static/assets/brand/digital-intelligence-brain-v1.jpg") right bottom / cover no-repeat;
  opacity: 0.075;
  filter: saturate(0.9);
  mask-image: linear-gradient(90deg, transparent 0, #000 45%, #000 100%);
}

body[data-theme="tech"] .role-client .main::after {
  opacity: 0.12;
}

body[data-theme="tech"] .tech-topbar {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  left: 270px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid rgba(104, 139, 169, 0.16);
  background: rgba(5, 11, 21, 0.88);
  padding: 0 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18px);
}

body[data-theme="tech"] .tech-topbar > div:first-child {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 16px;
}

body[data-theme="tech"] .tech-topbar strong {
  grid-row: 2;
  color: #eaf2f8;
  font-size: 22px;
  line-height: 1.2;
}

body[data-theme="tech"] .tech-topbar small {
  grid-row: 2;
  overflow: hidden;
  color: #637d93;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-theme="tech"] .tech-topbar-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

body[data-theme="tech"] .tech-role-badge {
  border: 1px solid rgba(139, 124, 255, 0.28);
  border-radius: 999px;
  background: rgba(139, 124, 255, 0.1);
  padding: 7px 11px;
  color: #afa7ff;
  font-size: 10px;
  font-weight: 800;
}

/* Shared surfaces */
body[data-theme="tech"] :where(
  .panel,
  .modal,
  [class$="-modal"],
  [class*="-modal "],
  [class$="-drawer"],
  [class*="-drawer "],
  [class$="-panel"],
  [class*="-panel "],
  [class$="-card"],
  [class*="-card "]
) {
  border-color: var(--tech-line);
  background-color: rgba(9, 21, 36, 0.94);
  color: var(--ink);
  box-shadow: none;
}

body[data-theme="tech"] .panel {
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(11, 25, 42, 0.97), rgba(8, 19, 33, 0.97));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}

body[data-theme="tech"] :where(
  .screen-page,
  .page,
  .admin-workbench,
  .customer-workbench,
  .project-info-screen,
  .maintenance-screen-workbench
) {
  color: var(--ink);
}

body[data-theme="tech"] .page-head,
body[data-theme="tech"] [class$="-head"],
body[data-theme="tech"] [class*="-head "] {
  border-color: var(--tech-line);
}

body[data-theme="tech"] .page-head h1,
body[data-theme="tech"] .admin-workbench-head h1,
body[data-theme="tech"] .customer-workbench-head h1 {
  font-size: 24px;
  letter-spacing: -0.02em;
}

body[data-theme="tech"] .table,
body[data-theme="tech"] table {
  color: #cad7e2;
}

body[data-theme="tech"] .table th,
body[data-theme="tech"] .table td,
body[data-theme="tech"] table th,
body[data-theme="tech"] table td {
  border-color: rgba(104, 139, 169, 0.14);
}

body[data-theme="tech"] .table th,
body[data-theme="tech"] table th {
  background: rgba(6, 16, 28, 0.62);
  color: #6f8aa0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

body[data-theme="tech"] .table tbody tr,
body[data-theme="tech"] table tbody tr {
  transition: background 0.16s ease;
}

body[data-theme="tech"] .table tbody tr:hover,
body[data-theme="tech"] table tbody tr:hover {
  background: rgba(31, 75, 96, 0.2);
}

body[data-theme="tech"] :where(
  .tabs,
  [class$="-tabs"],
  [class*="-tabs "],
  [class$="-switch"],
  [class*="-switch "],
  [class$="-toolbar"],
  [class*="-toolbar "]
) {
  border-color: var(--tech-line);
  color: var(--ink);
}

body[data-theme="tech"] :where([class$="-tabs"], [class*="-tabs "]) button.active,
body[data-theme="tech"] :where([class$="-tabs"], [class*="-tabs "]) button.is-active,
body[data-theme="tech"] :where([class$="-switch"], [class*="-switch "]) button.active,
body[data-theme="tech"] :where([class$="-switch"], [class*="-switch "]) button.is-active {
  border-color: rgba(75, 216, 237, 0.35);
  background: rgba(42, 105, 125, 0.34);
  color: #dff8fc;
}

body[data-theme="tech"] .notice {
  border-color: rgba(75, 216, 237, 0.22);
  background: rgba(34, 111, 130, 0.14);
  color: #a8c5d6;
}

body[data-theme="tech"] .notice.warning,
body[data-theme="tech"] [class*="warning"] {
  border-color: rgba(255, 166, 10, 0.28);
  background-color: rgba(255, 166, 10, 0.1);
  color: #ffc45c;
}

body[data-theme="tech"] .form-error,
body[data-theme="tech"] [class*="error"],
body[data-theme="tech"] [class*="failed"] {
  border-color: rgba(255, 77, 95, 0.3);
  background-color: rgba(255, 77, 95, 0.1);
  color: #ff8794;
}

body[data-theme="tech"] progress {
  accent-color: var(--tech-cyan);
}

body[data-theme="tech"] code {
  border-color: var(--tech-line);
  background: #06111e;
  color: #83e5f2;
}

/* Admin dashboard: match the reference dashboard density and hierarchy. */
body[data-theme="tech"] .admin-workbench {
  gap: 14px;
}

body[data-theme="tech"] .admin-workbench-head,
body[data-theme="tech"] .customer-workbench-head {
  border-bottom: 1px solid var(--tech-line);
  padding-bottom: 13px;
}

body[data-theme="tech"] .admin-live-status {
  border: 1px solid rgba(36, 208, 106, 0.2);
  border-radius: 999px;
  background: rgba(36, 208, 106, 0.08);
  color: #6ce99a;
}

body[data-theme="tech"] .admin-overview-band,
body[data-theme="tech"] .customer-stat-strip {
  border-color: var(--tech-line);
  border-radius: 18px;
  background: linear-gradient(145deg, #0b192a, #081523);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}

body[data-theme="tech"] .admin-overview-metrics > *,
body[data-theme="tech"] .customer-stat-strip > * {
  border-color: rgba(106, 143, 175, 0.16);
  background: #0c192a;
}

body[data-theme="tech"] .admin-completion-visual,
body[data-theme="tech"] .admin-overview-health,
body[data-theme="tech"] .admin-active-record,
body[data-theme="tech"] .admin-recent-row,
body[data-theme="tech"] .admin-task-row,
body[data-theme="tech"] .admin-quick-card {
  border-color: var(--tech-line);
  background: #0c192a;
  color: #dce7ef;
}

body[data-theme="tech"] .admin-overview-health-list button {
  min-height: 0;
  border: 0;
  background: transparent;
  color: #8ba0b2;
  padding: 1px 0;
  box-shadow: none;
}

body[data-theme="tech"] .admin-overview-health-list button:hover:not(:disabled) {
  border: 0;
  background: transparent;
  color: #c8d7e2;
  box-shadow: none;
  transform: none;
}

body[data-theme="tech"] .admin-overview-health-list button i {
  background: #1c2c3f;
}

body[data-theme="tech"] .admin-overview-health-list button b {
  background: linear-gradient(90deg, #35bfd7, #786bea);
}

body[data-theme="tech"] .admin-overview-health-list button strong {
  color: #a7bbca;
}

body[data-theme="tech"] .admin-kpi-card {
  min-height: 0;
  border-color: var(--tech-line);
  background: #0c192a;
  color: #dce7ef;
  box-shadow: none;
}

body[data-theme="tech"] .admin-kpi-card:hover:not(:disabled) {
  border-color: rgba(75,216,237,.32);
  background: #102638;
  box-shadow: none;
}

body[data-theme="tech"] .admin-quick-card:hover,
body[data-theme="tech"] .admin-recent-row:hover,
body[data-theme="tech"] .admin-recent-row.active {
  border-color: rgba(75, 216, 237, 0.34);
  background: #102638;
}

body[data-theme="tech"] .admin-quick-mark,
body[data-theme="tech"] .customer-stat-strip i,
body[data-theme="tech"] .admin-kpi-card > span {
  background: rgba(75, 216, 237, 0.11);
  color: var(--tech-cyan);
}

body[data-theme="tech"] .customer-table-wrap {
  border-color: var(--tech-line);
  background: #081523;
}

body[data-theme="tech"] .customer-table th {
  background: #07121f;
  color: #6f899e;
}

body[data-theme="tech"] .stage-pill,
body[data-theme="tech"] .delivery-status-button,
body[data-theme="tech"] .after-sales-status-button,
body[data-theme="tech"] .delivery-countdown {
  border: 1px solid rgba(104, 139, 169, 0.22);
  background: #111f31;
  color: #9fb2c1;
  box-shadow: none;
}

body[data-theme="tech"] .delivery-status-button:hover:not(:disabled),
body[data-theme="tech"] .after-sales-status-button:hover:not(:disabled) {
  border-color: rgba(75,216,237,.32);
  background: #15283b;
  color: #d9eaf2;
  box-shadow: none;
}

body[data-theme="tech"] .delivery-status-button.is-delivered,
body[data-theme="tech"] .after-sales-status-button.is-resolved,
body[data-theme="tech"] .delivery-countdown.is-safe,
body[data-theme="tech"] .delivery-countdown.is-complete {
  border-color: rgba(36, 208, 106, 0.26);
  background: rgba(36, 208, 106, 0.1);
  color: #68e897;
}

body[data-theme="tech"] .after-sales-status-button.is-active,
body[data-theme="tech"] .delivery-countdown.is-overdue,
body[data-theme="tech"] .delivery-countdown.is-urgent {
  border-color: rgba(255, 77, 95, 0.27);
  background: rgba(255, 77, 95, 0.1);
  color: #ff8794;
}

body[data-theme="tech"] .delivery-countdown.is-warning {
  border-color: rgba(255, 166, 10, 0.28);
  background: rgba(255, 166, 10, 0.1);
  color: #ffc05a;
}

body[data-theme="tech"] .admin-completion-ring {
  background:
    radial-gradient(circle closest-side, #0f2434 72%, transparent 73%),
    conic-gradient(#55d9e9 calc(var(--value) * 1%), rgba(93, 129, 157, 0.18) 0);
  filter: drop-shadow(0 0 16px rgba(75, 216, 237, 0.12));
}

body[data-theme="tech"] .admin-task-summary span {
  background: #101d2e;
  color: #728ba0;
}

body[data-theme="tech"] .admin-task-list button,
body[data-theme="tech"] .admin-library-strip button,
body[data-theme="tech"] .admin-library-strip button.warning {
  min-height: 0;
  border-color: var(--tech-line);
  background: #0d1a2b;
  color: #c7d5df;
  box-shadow: none;
}

body[data-theme="tech"] .admin-task-list button:hover:not(:disabled),
body[data-theme="tech"] .admin-library-strip button:hover:not(:disabled) {
  border-color: rgba(75,216,237,.32);
  background: #102638;
  box-shadow: none;
  transform: none;
}

body[data-theme="tech"] .admin-task-list em {
  background: rgba(75,216,237,.1);
  color: var(--tech-cyan);
}

body[data-theme="tech"] .admin-task-list em.failed {
  background: rgba(255,77,95,.1);
  color: #ff7d8a;
}

body[data-theme="tech"] .admin-backup-latest,
body[data-theme="tech"] .full-backup-row {
  border-color: var(--tech-line);
  background: #0d1a2b;
  color: #c7d5df;
}

body[data-theme="tech"] .admin-backup-actions button {
  background: #101d2e;
  color: #c7d5df;
  box-shadow: none;
}

/* Project and professional workspaces */
body[data-theme="tech"] .project-context-dock,
body[data-theme="tech"] .name-pool-identity,
body[data-theme="tech"] .delivery-return-banner {
  border-color: var(--tech-line);
  background: rgba(10, 23, 39, 0.96);
  color: #cad8e3;
}

body[data-theme="tech"] .project-profile-tabs {
  border-color: var(--tech-line);
  background: #081523;
}

body[data-theme="tech"] .project-profile-tabs button {
  color: #708ba1;
}

body[data-theme="tech"] .project-profile-tabs button:hover,
body[data-theme="tech"] .project-profile-tabs button.is-active {
  border-color: rgba(75, 216, 237, 0.28);
  background: #102638;
  color: #e0f2f7;
}

body[data-theme="tech"] .project-profile-tabs em {
  color: #5e778c;
}

body[data-theme="tech"] .profile-kv-grid > div,
body[data-theme="tech"] .client-account-summary > div,
body[data-theme="tech"] .delivery-summary-grid > div,
body[data-theme="tech"] .name-pool-metrics > * {
  border-color: var(--tech-line);
  background: #0d1a2b;
}

body[data-theme="tech"] .profile-kv-grid span,
body[data-theme="tech"] .client-account-summary span {
  color: #6d879c;
}

body[data-theme="tech"] .name-pool-surname-basis,
body[data-theme="tech"] .name-pool-formula-basis,
body[data-theme="tech"] .name-pool-explanation-groups,
body[data-theme="tech"] .name-pool-group-card,
body[data-theme="tech"] .name-pool-grid-proof article,
body[data-theme="tech"] .name-pool-sancai-proof,
body[data-theme="tech"] .name-pool-group-count-proof {
  border-color: var(--tech-line);
  background: #0b1929;
  color: #cad7e2;
}

body[data-theme="tech"] .name-pool-group-card[open] > summary {
  border-color: var(--tech-line);
  background: #102638;
}

/* Legacy project forms contain several light, page-specific surfaces. */
body[data-theme="tech"] .project-create-upload,
body[data-theme="tech"] .intake-upload-card,
body[data-theme="tech"] .drawer-form > section,
body[data-theme="tech"] .drawer-form > footer,
body[data-theme="tech"] .project-create-text-fallback,
body[data-theme="tech"] .project-create-admin,
body[data-theme="tech"] .project-create-next,
body[data-theme="tech"] .project-create-footer,
body[data-theme="tech"] .project-profile-form,
body[data-theme="tech"] .project-profile-form footer,
body[data-theme="tech"] .profile-history,
body[data-theme="tech"] .profile-summary-card,
body[data-theme="tech"] .profile-manual-correction,
body[data-theme="tech"] .profile-naming-methods,
body[data-theme="tech"] .profile-method-setting,
body[data-theme="tech"] .forbidden-homophone-setting,
body[data-theme="tech"] .bazi-manual-correction,
body[data-theme="tech"] .profile-authority-readonly,
body[data-theme="tech"] .bazi-authority-preview,
body[data-theme="tech"] .bazi-edit-empty,
body[data-theme="tech"] .birth-calendar-preview {
  border-color: var(--tech-line) !important;
  background: #0b1929 !important;
  color: #c8d6e1;
  box-shadow: none;
}

body[data-theme="tech"] .project-create-upload {
  background:
    radial-gradient(circle at 92% 0, rgba(75, 216, 237, 0.12), transparent 13rem),
    linear-gradient(145deg, #0d1d30, #091625) !important;
}

body[data-theme="tech"] .project-create-upload:hover {
  border-color: rgba(75, 216, 237, 0.42) !important;
  background:
    radial-gradient(circle at 92% 0, rgba(75, 216, 237, 0.18), transparent 13rem),
    linear-gradient(145deg, #10253a, #0b1a2b) !important;
}

body[data-theme="tech"] .project-create-help,
body[data-theme="tech"] .project-create-next p,
body[data-theme="tech"] .project-profile-form label,
body[data-theme="tech"] .profile-summary-card span,
body[data-theme="tech"] .profile-history p,
body[data-theme="tech"] .bazi-edit-layout small,
body[data-theme="tech"] .profile-authority-title span,
body[data-theme="tech"] .profile-authority-readonly p,
body[data-theme="tech"] .birth-calendar-preview span,
body[data-theme="tech"] .birth-calendar-preview p {
  color: #7890a7;
}

body[data-theme="tech"] .project-create-text-fallback > summary,
body[data-theme="tech"] .project-create-admin > summary,
body[data-theme="tech"] .profile-manual-correction > summary,
body[data-theme="tech"] .bazi-manual-correction > summary,
body[data-theme="tech"] .project-profile-form h3,
body[data-theme="tech"] .profile-authority-title strong,
body[data-theme="tech"] .birth-calendar-preview strong {
  color: #a9eaf3;
}

body[data-theme="tech"] .profile-kv-grid div,
body[data-theme="tech"] .requirement-list div,
body[data-theme="tech"] .profile-summary-card.notes > div,
body[data-theme="tech"] .profile-authority-values div,
body[data-theme="tech"] .bazi-authority-grid div,
body[data-theme="tech"] .create-bazi-core span,
body[data-theme="tech"] .bazi-detail-kv span,
body[data-theme="tech"] .bazi-detail-body section,
body[data-theme="tech"] .bazi-hexagram-lines span,
body[data-theme="tech"] .bazi-strengths span,
body[data-theme="tech"] .bazi-stat-tags span,
body[data-theme="tech"] .five-grid-item,
body[data-theme="tech"] .sancai-result,
body[data-theme="tech"] .nameology-batch-result,
body[data-theme="tech"] .nameology-batch-item,
body[data-theme="tech"] .nameology-batch-rule {
  border-color: var(--tech-line);
  background: #0d1a2b;
  color: #b7c8d5;
}

body[data-theme="tech"] .bazi-core-grid > div,
body[data-theme="tech"] .bazi-core-grid .bazi-four-pillars,
body[data-theme="tech"] .bazi-core-grid .favorable,
body[data-theme="tech"] .bazi-core-grid .unfavorable,
body[data-theme="tech"] .bazi-five-overview,
body[data-theme="tech"] .bazi-five-donut > div {
  border-color: var(--tech-line);
  background: #0d1a2b;
}

body[data-theme="tech"] .bazi-core-grid .favorable {
  border-color: rgba(36, 208, 106, 0.24);
  background: rgba(36, 208, 106, 0.08);
}

body[data-theme="tech"] .bazi-core-grid .unfavorable {
  border-color: rgba(255, 77, 95, 0.24);
  background: rgba(255, 77, 95, 0.08);
}

body[data-theme="tech"] .bazi-season-note,
body[data-theme="tech"] .bazi-preview-banner,
body[data-theme="tech"] .profile-review-warning {
  border-color: rgba(255, 166, 10, 0.26);
  background: rgba(255, 166, 10, 0.09);
  color: #ffc461;
}

body[data-theme="tech"] .bazi-warning-list div {
  border-color: rgba(255, 166, 10, 0.26);
  background: rgba(255, 166, 10, 0.09);
}

body[data-theme="tech"] .profile-review-ok,
body[data-theme="tech"] .bazi-status-ok {
  border-color: rgba(36, 208, 106, 0.24);
  background: rgba(36, 208, 106, 0.09);
  color: #6be99a;
}

body[data-theme="tech"] .lunar-leap-check {
  border-color: #203249;
  background: #07111e;
}

/* Client safety, empty and locked states */
body[data-theme="tech"] .client-locked-page {
  border-color: var(--tech-line);
  background: #071320;
}

body[data-theme="tech"] .client-safe-grid article,
body[data-theme="tech"] .client-safe-table,
body[data-theme="tech"] .client-safe-table i {
  background: #193047;
}

body[data-theme="tech"] .client-lock-overlay {
  background:
    linear-gradient(90deg, rgba(5, 13, 24, 0.92), rgba(5, 13, 24, 0.68)),
    url("/static/assets/brand/digital-intelligence-brain-v1.jpg") right center / cover no-repeat;
  backdrop-filter: blur(3px);
}

body[data-theme="tech"] .client-lock-overlay h1 {
  color: #e7f2f7;
}

body[data-theme="tech"] .client-lock-overlay p,
body[data-theme="tech"] .client-lock-overlay small {
  color: #8299aa;
}

body[data-theme="tech"] .client-lock-icon {
  border: 1px solid rgba(75, 216, 237, 0.28);
  background: #102638;
  box-shadow: 0 0 30px rgba(75, 216, 237, 0.12);
}

body[data-theme="tech"] .client-account-status.active,
body[data-theme="tech"] [class*="status"][class*="active"],
body[data-theme="tech"] [class*="status"][class*="completed"],
body[data-theme="tech"] [class*="status"][class*="normal"] {
  background-color: rgba(36, 208, 106, 0.12);
  color: #67e895;
}

body[data-theme="tech"] .client-account-status.disabled,
body[data-theme="tech"] [class*="status"][class*="disabled"] {
  background-color: rgba(255, 77, 95, 0.1);
  color: #ff8794;
}

body[data-theme="tech"] .client-account-empty {
  border-color: rgba(75, 216, 237, 0.24);
  background: rgba(9, 25, 41, 0.8);
}

/* Drawers, overlays and dialogs */
body[data-theme="tech"] .modal-backdrop,
body[data-theme="tech"] [class$="-backdrop"],
body[data-theme="tech"] [class*="-backdrop "] {
  background-color: rgba(1, 5, 11, 0.76);
  backdrop-filter: blur(5px);
}

body[data-theme="tech"] .workbench-drawer,
body[data-theme="tech"] .saved-candidate-drawer,
body[data-theme="tech"] .classical-detail-drawer {
  border-left: 1px solid var(--tech-line);
  background: #081523;
  box-shadow: -24px 0 64px rgba(0,0,0,.34);
}

/* Release history */
body[data-theme="tech"] .release-history-hero {
  border: 1px solid rgba(75, 216, 237, 0.24);
  background:
    radial-gradient(circle at 90% 10%, rgba(139,124,255,.24), transparent 18rem),
    linear-gradient(135deg, #0b2637, #10203a);
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
}

body[data-theme="tech"] .release-summary-grid article,
body[data-theme="tech"] .release-entry-content,
body[data-theme="tech"] .release-entry-version,
body[data-theme="tech"] .release-change-group {
  border-color: var(--tech-line);
  background: #0b1929;
}

body[data-theme="tech"] .release-summary-grid strong,
body[data-theme="tech"] .release-entry-version strong {
  color: var(--tech-cyan);
}

/* Keep frozen delivery/PDF content visually authoritative. */
body[data-theme="tech"] iframe,
body[data-theme="tech"] img,
body[data-theme="tech"] canvas,
body[data-theme="tech"] .delivery-book-page,
body[data-theme="tech"] .delivery-pdf-preview {
  color-scheme: normal;
}

@keyframes tech-status-pulse {
  0%, 100% { opacity: 0.7; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 1180px) {
  body[data-theme="tech"] .app-shell { grid-template-columns: 230px minmax(0, 1fr); }
  body[data-theme="tech"] .tech-topbar { left: 230px; }
  body[data-theme="tech"] .main::before { left: 230px; }
  body[data-theme="tech"] .sidebar { padding-inline: 14px; }
  body[data-theme="tech"] .tech-brand strong { font-size: 15px; }
  body[data-theme="tech"] .tech-brand small { font-size: 8px; }
}

@media (max-width: 900px) {
  body[data-theme="tech"] .tech-login {
    display: block;
    overflow-y: auto;
    padding: 104px 18px 30px;
    background:
      linear-gradient(rgba(4, 10, 19, 0.42), #050b15 66%),
      url("/static/assets/brand/digital-intelligence-brain-v1.jpg") 66% top / auto 58vh no-repeat,
      #050b15;
  }

  body[data-theme="tech"] .tech-login-visual {
    min-height: 180px;
    display: block;
    padding: 0;
    background: none;
  }

  body[data-theme="tech"] .tech-login-brand {
    position: absolute;
    top: -72px;
    left: 4px;
  }

  body[data-theme="tech"] .tech-login-copy {
    width: 100%;
    padding: 30px 4px 20px;
  }

  body[data-theme="tech"] .tech-login-copy h1 { font-size: clamp(28px, 8vw, 38px); }
  body[data-theme="tech"] .tech-login-copy p { max-width: 90%; font-size: 13px; }
  body[data-theme="tech"] .tech-signal-row { display: none; }
  body[data-theme="tech"] .tech-login .login-panel { width: 100%; padding: 26px 20px; }
  body[data-theme="tech"] .tech-login-panel-head { display: grid; }

  body[data-theme="tech"] .app-shell { display: block; }
  body[data-theme="tech"] .sidebar {
    position: fixed;
    z-index: 1003;
    inset: 0 auto 0 0;
    width: min(310px, 86vw);
    height: 100dvh;
    overflow-y: auto;
    transform: translateX(-102%);
  }
  body[data-theme="tech"] .mobile-nav-open .sidebar { transform: translateX(0); }
  body[data-theme="tech"] .tech-topbar {
    left: 0;
    height: 70px;
    padding: 0 14px 0 128px;
  }
  body[data-theme="tech"] .tech-topbar strong { font-size: 17px; }
  body[data-theme="tech"] .tech-topbar small,
  body[data-theme="tech"] .tech-topbar .tech-kicker,
  body[data-theme="tech"] .tech-topbar-status .tech-live-status { display: none; }
  body[data-theme="tech"] .mobile-nav-toggle {
    top: 16px;
    left: 14px;
    min-height: 38px;
    border-color: rgba(75, 216, 237, 0.32);
    background: #0e2537;
    color: #dff7fb;
    box-shadow: none;
  }
  body[data-theme="tech"] .main,
  body[data-theme="tech"] .main.screen-main {
    padding: 88px 12px 18px;
    background: #050b15;
  }
  body[data-theme="tech"] .main > .grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-theme="tech"] .main > .grid.two > .panel {
    min-width: 0;
    overflow-x: auto;
  }
  body[data-theme="tech"] .main::before { inset: 70px 0 0; }
  body[data-theme="tech"] .role-client .main::after,
  body[data-theme="tech"] .role-professional .main::after {
    width: 100vw;
    height: 48vh;
    opacity: 0.06;
  }
  body[data-theme="tech"] .mobile-nav-open .mobile-nav-backdrop {
    background: rgba(1, 5, 11, 0.7);
    backdrop-filter: blur(4px);
  }
  body[data-theme="tech"] .page-head h1,
  body[data-theme="tech"] .admin-workbench-head h1,
  body[data-theme="tech"] .customer-workbench-head h1 { font-size: 20px; }
}

@media (max-width: 560px) {
  body[data-theme="tech"] .tech-login { padding-top: 92px; }
  body[data-theme="tech"] .tech-login-visual { min-height: 148px; }
  body[data-theme="tech"] .tech-login-copy { padding-top: 12px; }
  body[data-theme="tech"] .tech-login-copy p { display: none; }
  body[data-theme="tech"] .tech-login .login-panel { border-radius: 18px; }
  body[data-theme="tech"] .tech-login-security { display: none; }
  body[data-theme="tech"] .tech-topbar { padding-left: 122px; }
  body[data-theme="tech"] .tech-role-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-theme="tech"] *,
  body[data-theme="tech"] *::before,
  body[data-theme="tech"] *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
