:root {
  --bg: #0b0b0d;
  --bg-soft: #141418;
  --panel: #17171c;
  --ink: #f5e6c8;
  --muted: #a89878;
  --line: #2a2418;
  --brand: #c9a227;
  --brand-dark: #a8841a;
  --brand-soft: rgba(201, 162, 39, 0.16);
  --danger: #e35d5d;
  --danger-soft: rgba(227, 93, 93, 0.15);
  --ok: #7dcea0;
  --ok-soft: rgba(125, 206, 160, 0.15);
  --warn: #e8b86d;
  --warn-soft: rgba(232, 184, 109, 0.15);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --sider: #0f0f12;
  --gold: #d4af37;
  --input-bg: #101014;
  --card-inner: #121217;
  --btn-ink: #14110a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
html {
  background: var(--bg);
  color: var(--ink);
}
body {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-hero {
  background-color: var(--auth-hero-bg, var(--sider));
  background-image: var(--auth-hero-image, none);
  background-size: cover;
  background-position: center;
  color: var(--auth-hero-ink, var(--sider-ink, #ffffff));
  padding: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}
.auth-hero .company-name {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--auth-hero-ink, #ffffff);
}
.auth-hero h1 { font-size: 42px; margin: 10px 0 8px; letter-spacing: 1px; color: var(--auth-hero-ink, #ffffff); }
.auth-hero p { max-width: 420px; line-height: 1.7; color: var(--auth-hero-muted, var(--sider-muted, #f0f0f0)); }
.badge {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--auth-hero-ink, var(--heading, var(--gold)));
}
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg-soft);
}
.card {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px;
}
.auth-card,
.auth-panel .card {
  background: var(--auth-card, #ffffff);
  border: 1px solid var(--auth-card-border, var(--line));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  color: var(--auth-ink, var(--ink));
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.tab {
  border: 0;
  background: transparent;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}
.tab.active {
  background: var(--panel);
  color: var(--heading, var(--gold));
  border: 1px solid var(--brand);
}

label { display: block; font-size: 13px; margin: 14px 0 6px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
  background: var(--input-bg);
  color: var(--input-ink, var(--ink));
}
textarea {
  min-height: 48px;
  resize: vertical;
}
input.rect-field,
textarea.rect-field {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.5;
  background: var(--input-bg);
  color: var(--input-ink, var(--ink));
}
textarea.rect-field {
  min-height: 132px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
input[type="checkbox"],
input[type="radio"],
input.switch,
input[type="color"] {
  width: auto;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}
.btn-primary {
  width: auto;
  margin-top: 18px;
  background: var(--brand);
  color: var(--btn-ink);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(227,93,93,0.35);
}
.card .btn-primary,
.auth-panel .btn-primary {
  width: 100%;
}
a.btn-view-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  min-width: 52px;
}
.ret-kind-tag {
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  letter-spacing: 0.02em;
}
.btn-small,
.btn-primary.btn-small {
  width: auto;
  height: 30px;
  margin-top: 0;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
}

.alert {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 14px;
}
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.success { background: var(--ok-soft); color: var(--ok); }
.form-hidden { display: none; }

.admin-shell, .emp-shell {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  min-height: 100vh;
}
.sider {
  background: var(--sider);
  color: var(--sider-muted, var(--muted));
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  flex: 0 0 240px;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  height: 100vh;
  max-height: 100vh;
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sider-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.sider h2 {
  margin: 0 0 18px;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--sider-ink, #ffffff);
}
.sider-user {
  flex-shrink: 0;
  margin-bottom: 22px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  color: var(--sider-ink, #f6f6f6);
  line-height: 1.5;
  background: rgba(255,255,255,0.04);
}
.sider-user span { color: var(--sider-muted, #e8e8e8); font-size: 12px; }
.sider a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  color: var(--sider-muted, #f2f2f2);
}
.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c9a227;
  color: #111;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}
.biz-nest {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 14px;
  width: 100%;
}
.biz-box {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--input-bg, transparent);
}
.biz-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}
.biz-box-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.biz-box-head .row-actions { gap: 4px; flex-wrap: nowrap; }
.biz-box-inner {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.proj-box {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100% !important;
  box-sizing: border-box;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg, transparent);
  font-size: 13px;
  line-height: 1.3;
}
.proj-box > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-box.muted { color: var(--muted); }
.proj-add {
  display: flex !important;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: transparent;
}
.proj-add input {
  flex: 1;
  min-width: 0;
  margin: 0;
  height: 30px;
  padding: 0 8px;
}
.proj-add .btn {
  flex-shrink: 0;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.proj-add select {
  flex: 0 0 96px;
  height: 30px;
  margin: 0;
  padding: 0 6px;
}
.proj-required-switch,
.stock-inline {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.proj-required-switch > span,
.stock-inline > span {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}
.stock-toggle-form,
.req-toggle-form {
  margin: 0;
}
.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: -2px;
  user-select: none;
  padding: 0 4px;
  flex-shrink: 0;
}
.biz-box.dragging,
.proj-box.dragging {
  opacity: 0.55;
}
.biz-box.drag-over,
.proj-box.drag-over {
  outline: 1px dashed var(--brand);
}
.biz-inline-edit,
.proj-inline-edit {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.biz-inline-edit input,
.proj-inline-edit input:not(.switch),
.proj-inline-edit select {
  margin: 0;
  height: 30px;
  min-width: 120px;
  flex: 1 1 120px;
}
.proj-inline-edit input.switch,
.proj-add input.switch,
.proj-box input.switch {
  flex: 0 0 46px !important;
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 26px !important;
  margin: 0 0 0 4px !important;
}
.proj-inline-edit .proj-required-switch,
.proj-add .proj-required-switch {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin: 0;
}
.proj-inline-edit .btn,
.proj-add .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.proj-box {
  flex-wrap: wrap;
}
.proj-box.is-editing {
  align-items: flex-start;
}
.proj-box .proj-name {
  flex: 1;
  min-width: 0;
}
.proj-box .opt-panel {
  flex: 1 1 100%;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-sizing: border-box;
}
.opt-panel-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.opt-tree {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}
.opt-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--input-bg, transparent);
}
.opt-l1-row,
.opt-l2-row,
.opt-add-l2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.opt-edit-form {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0;
  min-width: 0;
}
.opt-del-form {
  margin: 0;
  display: flex;
  align-items: center;
}
.opt-level-tag {
  font-size: 11px;
  color: var(--brand);
  white-space: nowrap;
  text-align: center;
}
.opt-level-tag.muted { color: var(--muted); }
.opt-label-input {
  margin: 0 !important;
  height: 30px !important;
  min-width: 0 !important;
  width: 100%;
  box-sizing: border-box;
}
.opt-btn {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  width: auto !important;
  min-width: auto !important;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
}
.opt-l2-block {
  margin-top: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 6px;
}
.opt-l2-summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
  list-style: none;
  padding: 4px 0;
}
.opt-l2-summary::-webkit-details-marker { display: none; }
.opt-l2-summary::before {
  content: "▸ ";
  color: var(--brand);
}
.opt-l2-block[open] > .opt-l2-summary::before {
  content: "▾ ";
}
.opt-l2-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  border-radius: 6px;
  background: var(--panel);
}
.opt-add-l2 {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  padding-top: 2px;
}
.opt-create-pair {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.opt-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 720px) {
  .opt-create-grid { grid-template-columns: 1fr; }
}
.opt-create-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.opt-create-field input,
.opt-create-field textarea {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 30px;
  resize: vertical;
}
.opt-create-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.biz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.biz-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--input-bg, transparent);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.biz-tab:hover {
  border-color: var(--brand);
}
.biz-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
a.biz-tab {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.biz-tab.biz-tab-alert {
  border-color: #f0c35a;
  background: rgba(240, 195, 90, 0.18);
  animation: task-alert-blink 1s ease-in-out infinite;
}
.biz-tab.biz-tab-alert.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  animation: task-alert-blink 1.2s ease-in-out infinite;
}
.task-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0;
}
.task-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.task-field-row:last-child {
  border-bottom: none;
}
.sheet-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
.sheet-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.sheet-tabs {
  margin: 0;
}
.sheet-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sheet-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.order-sheet {
  margin: 0;
  min-width: 960px;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}
.order-sheet th,
.order-sheet td {
  vertical-align: middle;
  white-space: nowrap;
  height: 44px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
  overflow: hidden;
}
.order-sheet thead th {
  height: 40px;
}
.order-sheet .col-idx {
  width: 48px;
  color: var(--muted);
  text-align: center;
}
.order-sheet .row-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.sheet-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 30px;
  margin: 0;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  box-sizing: border-box;
  line-height: 28px;
}
.sheet-input:hover {
  border-color: var(--line);
  background: var(--input-bg, transparent);
}
.sheet-input.is-editing,
.sheet-input:focus {
  border-color: var(--brand);
  background: var(--input-bg, #fff);
  box-shadow: none;
  outline: none;
}
.sheet-input.is-saving { opacity: 0.7; }
.sheet-input.is-saved { border-color: #2f9e6b; }
.sheet-input.is-error { border-color: var(--danger); }
.sheet-num { width: 96px; min-width: 80px; }
.sheet-img-cell {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  height: 30px;
}
.sheet-img-cell .sheet-input {
  flex: 1 1 auto;
  min-width: 80px;
}
.sheet-img-cell .btn-view-img {
  flex: 0 0 auto;
}
.sheet-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.sheet-cell .sheet-input {
  flex: 1;
  min-width: 0;
}
.cell-copy {
  cursor: pointer;
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
}
.cell-copy:hover {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cell-copy-btn {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--input-bg, transparent);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}
.cell-copy-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}
.sheet-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.sheet-toast.is-error {
  background: var(--danger);
}
.danger-panel {
  border-color: rgba(227,93,93,0.35);
}
.wh-slim {
  padding: 10px 12px !important;
  margin-bottom: 10px;
}
.wh-slim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.wh-slim-head strong { font-size: 14px; }
.wh-slim-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 720px) {
  .wh-slim-presets { grid-template-columns: 1fr; }
}
.wh-slim-col { min-width: 0; }
.wh-inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  flex-wrap: nowrap;
}
.wh-inline-form input {
  flex: 1;
  min-width: 0;
  margin: 0;
  height: 30px;
  padding: 0 8px;
}
.wh-inline-form .btn {
  flex-shrink: 0;
  margin-top: 0;
  width: 30px;
  padding: 0;
}
.wh-add-stock { margin: 0; }
.wh-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.wh-add-row > input {
  margin: 0;
  height: 30px;
  padding: 0 8px;
  flex: 1;
  min-width: 90px;
}
.wh-add-row .btn { margin-top: 0; flex-shrink: 0; }
.wh-pick-inline { margin: 0; }
.stock-flat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.stock-flat-item { margin: 0; }
.stock-flat-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg, transparent);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.stock-flat-btn:hover,
.stock-flat-btn.is-selected {
  border-color: var(--brand);
}
.stock-flat-btn.is-selected {
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.stock-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  min-height: 44px;
}
.stock-bar-select {
  flex: 0 0 220px;
  max-width: 46%;
  margin: 0;
  height: auto;
  min-height: 44px;
}
.stock-bar-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg, transparent);
}
.stock-bar-cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stock-bar-cell em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.stock-bar-cell b {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .stock-bar { flex-direction: column; }
  .stock-bar-select { flex: none; max-width: none; width: 100%; }
}
.dash-stock { margin-top: 4px; }
.stock-flat-btn strong { font-size: 14px; }
.stock-flat-btn span { font-size: 12px; color: var(--muted); }
.stock-flat-btn em { font-style: normal; font-size: 13px; color: var(--brand); }
.wh-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
  min-height: 28px;
}
.wh-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  background: var(--input-bg, transparent);
}
.wh-chip-del { margin: 0; display: inline; }
.wh-chip-del button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}
.wh-create-l2 label { margin-top: 10px; }
.wh-create-l2 input { margin-bottom: 0; }
.wh-pick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}
.wh-pick {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--input-bg, transparent);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.wh-pick.is-on,
.wh-pick:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.wh-l2-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wh-l2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-wrap: wrap;
}
.wh-l2-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}
.wh-stock-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.wh-stock-card {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, var(--input-bg, transparent));
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}
.wh-stock-card.is-empty {
  opacity: 0.65;
  border-style: dashed;
}
.wh-stock-card.dragging {
  opacity: 0.55;
}
.wh-stock-card.drag-over {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft, rgba(0, 0, 0, 0.08));
}
.wh-drag-handle {
  flex: 0 0 auto;
  cursor: grab;
  user-select: none;
  color: var(--muted);
  letter-spacing: -2px;
  font-size: 14px;
  line-height: 1;
  padding: 4px 2px;
}
.wh-drag-handle:active { cursor: grabbing; }
.wh-stock-line {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: max-content;
  margin: 0;
  width: auto;
}
.wh-stock-line > input[type="hidden"] {
  display: none;
}
.wh-stock-line input,
.wh-stock-line .wh-cell-model,
.wh-stock-line .wh-cell-memory,
.wh-stock-line .wh-qty-input {
  display: inline-block;
  width: auto !important;
  max-width: none;
  margin: 0 !important;
  height: 32px;
  padding: 0 8px;
  flex: 0 0 auto;
}
.wh-cell-model {
  width: 140px !important;
}
.wh-cell-memory {
  width: 110px !important;
}
.wh-cell-qty {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  width: auto;
}
.wh-cell-qty .wh-qty-input {
  width: 56px !important;
  text-align: center;
  font-weight: 600;
  color: var(--brand);
}
.wh-qty-btn {
  width: 30px !important;
  min-width: 30px;
  padding: 0;
  margin-top: 0 !important;
  flex: 0 0 30px;
}
.wh-cell-actions {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: auto;
  margin-left: 4px;
}
.wh-cell-actions .btn {
  margin-top: 0 !important;
  width: auto !important;
  flex: 0 0 auto;
  white-space: nowrap;
}
.stock-bar-select option:disabled {
  color: var(--muted);
}
.stock-panel { margin-top: 8px; }
.stock-detail {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg, transparent);
}
.stock-detail h4 { margin: 0 0 10px; }
.stock-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.stock-meta > div,
.stock-attrs li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.stock-meta span,
.stock-attrs span { color: var(--muted); }
.stock-attrs {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stock-out-form label { margin-top: 4px; }
.select-cascade {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cascade-select {
  margin: 0;
}
.proj-type {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
}
.proj-box.proj-stock {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.project-fields {
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-field {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--input-bg, transparent);
}
.project-field label { margin-top: 0; }
.project-field input,
.project-field select { margin-bottom: 0; }
.project-field .hint { margin: 4px 0 8px; }
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input-bg, transparent);
}
.todo-main {
  min-width: 0;
  flex: 1;
}
.todo-main h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.todo-item .row-actions {
  flex-shrink: 0;
}
.biz-inline {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}
.biz-inline > div { flex: 1; min-width: 180px; }
.biz-inline label { margin-bottom: 4px; }
.biz-inline input { margin: 0; height: 34px; }
.biz-inline .btn,
.biz-inline a.btn {
  height: 34px;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  padding: 0 14px;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: var(--input-bg, transparent);
}
.editor-toolbar button,
.editor-toolbar select {
  height: 30px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
}
.editor-toolbar button:hover { border-color: var(--brand); }
.editor-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.editor-color input[type="color"] {
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.editor-surface {
  min-height: 320px;
  max-height: 70vh;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--input-bg, transparent);
  line-height: 1.7;
  outline: none;
}
.editor-surface:focus {
  box-shadow: inset 0 0 0 1px var(--brand);
}
.editor-surface h1,
.tutorial-body h1 { font-size: 1.6em; margin: 0.6em 0 0.35em; }
.editor-surface h2,
.tutorial-body h2 { font-size: 1.35em; margin: 0.6em 0 0.35em; }
.editor-surface h3,
.tutorial-body h3 { font-size: 1.15em; margin: 0.6em 0 0.35em; }
.editor-surface p,
.tutorial-body p { margin: 0.45em 0; }
.editor-surface ul,
.editor-surface ol,
.tutorial-body ul,
.tutorial-body ol { margin: 0.45em 0 0.45em 1.2em; }
.tutorial-body { line-height: 1.75; word-break: break-word; }
a.tutorial-link {
  text-decoration: none;
  color: inherit;
}
a.tutorial-link:hover {
  border-color: var(--brand);
}
.sider-foot {
  margin-top: auto;
  padding-top: 14px;
  flex-shrink: 0;
}
.sider-foot .site-icp,
.sider-foot .site-icp a {
  margin: 0;
  text-align: left;
  color: var(--sider-muted, #e8e8e8);
  font-size: 12px;
}
.sider a.active, .sider a:hover {
  background: var(--sider-active-bg, var(--brand-soft));
  color: var(--sider-ink, #ffffff);
  border: 1px solid var(--sider-active-border, rgba(255,255,255,0.35));
}
.main {
  padding: 28px;
  background: var(--bg);
  min-width: 0;
  flex: 1 1 auto;
  min-height: 100vh;
}
.sider a.nav-alert {
  color: #ffe08a !important;
  border: 1px solid #f0c35a !important;
  background: rgba(240, 195, 90, 0.22) !important;
  animation: task-alert-blink 1s ease-in-out infinite;
}
@keyframes task-alert-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.35); }
  50% { opacity: 0.72; box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18); }
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.stat b { font-size: 28px; display: block; margin-top: 6px; color: var(--heading, var(--gold)); }
.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}
.panel h3 { margin: 0 0 14px; color: var(--heading, var(--gold)); }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}
th { color: var(--muted); font-weight: 600; }
.code { font-family: Consolas, "Courier New", monospace; letter-spacing: 0.5px; }
.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
}
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.info { background: var(--brand-soft); color: var(--heading, var(--gold)); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.inline-form { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline-form > div { flex: 1; min-width: 160px; }
.check-grid,
.switch-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--input-bg);
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 12px 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.switch-row:last-child { border-bottom: 0; }
.switch-row > span { text-align: left; flex: 1; }
.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 46px !important;
  height: 26px;
  min-width: 46px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  outline: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}
.switch:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.switch:checked::after {
  transform: translateX(20px);
}
.perm-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--input-bg);
}
.employee-pick {
  max-height: 180px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--brand);
}
.task-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--card-inner);
}
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.status-bar .who b {
  display: block;
  font-size: 18px;
  color: var(--heading, var(--gold));
}
.status-bar .who span { font-size: 13px; }
.presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.presence .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}
.presence.online { color: var(--ok); }
.presence.online .dot {
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
.presence.offline { color: var(--muted); }
.staff-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.staff-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.staff-list h3 { margin: 8px 8px 12px; }
.staff-list a,
.staff-list .staff-pick {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  color: var(--ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.staff-list a:hover,
.staff-list a.active,
.staff-list .staff-pick:hover,
.staff-list .staff-pick.selected {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--heading, var(--ink));
}
.staff-list .staff-pick:disabled {
  opacity: 0.55;
  cursor: default;
}
.staff-list .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.staff-list .presence { font-size: 12px; }
.money-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0;
}
.money-item {
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.money-item span { display: block; color: var(--muted); font-size: 12px; }
.money-item b { color: var(--heading, var(--gold)); }
.muted { color: var(--muted); }
.theme-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: var(--panel);
  color: var(--ink);
}
.theme-preview h3 { color: var(--heading, var(--gold)); margin-top: 0; }
.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg);
}
.color-row span { color: var(--ink); font-size: 13px; }
.color-row input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.color-row input[type="text"] {
  width: 92px;
  padding: 8px 10px;
}
.name-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.name-chip {
  display: inline-flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}
.name-chip.selected {
  border-color: var(--brand);
  color: var(--gold);
  box-shadow: 0 0 0 1px var(--brand);
  background: var(--brand-soft);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.preset-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--input-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preset-swatch {
  display: grid;
  grid-template-columns: 42px 1fr;
  height: 78px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--p-line);
}
.swatch-sider { background: var(--p-sider); }
.swatch-main {
  background: var(--p-bg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.swatch-main i {
  display: block;
  height: 18px;
  border-radius: 6px;
  background: var(--p-panel);
  border: 1px solid var(--p-line);
}
.swatch-main i:last-child {
  width: 48%;
  background: var(--p-brand);
}
.preset-meta strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}
.preset-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.preset-card .btn { width: 100%; margin-top: 0; }
.preset-swatch.glass-swatch {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.75), transparent 45%),
    linear-gradient(135deg, #c9d8ea, #e8eef6 50%, #b7c9de);
}
.preset-swatch.glass-swatch .swatch-sider {
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
}
.preset-swatch.glass-swatch .swatch-main {
  background: rgba(255,255,255,0.35);
}
.preset-swatch.glass-swatch .swatch-main i {
  background: rgba(255,255,255,0.55);
  border-color: rgba(255,255,255,0.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.site-icp {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.site-icp a {
  color: inherit;
  text-decoration: none;
}
.site-icp a:hover { color: var(--gold); }
.hero-icp {
  margin-top: 14px;
  text-align: left;
  color: var(--auth-hero-muted, var(--sider-muted, var(--muted)));
}
.emp-settle-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}
.emp-settle-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 168px;
  padding: 12px 14px 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
a.emp-settle-card:hover,
.emp-settle-card:hover {
  border-color: var(--brand);
}
.emp-settle-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft, rgba(201, 162, 39, 0.25));
}
.emp-settle-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.emp-settle-card strong {
  font-size: 15px;
}
.emp-settle-done {
  position: absolute;
  right: 10px;
  bottom: 10px;
  margin: 0;
}
.emp-settle-done .btn {
  margin: 0;
}
.emp-settle-wage {
  font-size: 13px;
  color: var(--muted);
}
.emp-settle-wage b {
  color: var(--heading, var(--gold));
  font-size: 18px;
  margin-left: 4px;
}
.emp-settle-home {
  margin: 0 0 20px;
  max-width: 360px;
  cursor: default;
}
.biz-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.biz-dash-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--input-bg, transparent);
}
.biz-dash-name {
  display: block;
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--heading, var(--gold));
}
.biz-dash-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.biz-dash-metrics > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.biz-dash-metrics span {
  color: var(--muted);
  font-size: 12px;
  min-width: 72px;
}
.biz-dash-metrics b {
  font-size: 18px;
  color: var(--ink);
}
.biz-dash-metrics em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.wage-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 24px;
}
.wage-card {
  min-width: 160px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel, #fff);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wage-card-label {
  font-size: 13px;
  color: var(--muted);
}
.wage-card-amount {
  font-size: 28px;
  line-height: 1.1;
  color: var(--heading, var(--gold));
  font-weight: 700;
}
.expense-settle-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg, transparent);
  margin-bottom: 8px;
}
.expense-settle-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  align-items: end;
}
.expense-settle-form label {
  grid-column: span 1;
  margin: 0;
}
.expense-settle-form .form-actions {
  margin: 0;
  align-self: end;
}
.settle-mode-box {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input-bg, transparent);
}
.settle-mode-form .biz-tabs {
  margin-bottom: 12px;
}
.settle-slider-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.settle-slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}
.settle-value-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.settle-value-wrap input[type="number"] {
  width: 110px;
  margin: 0;
}
@media (max-width: 720px) {
  .settle-slider-row {
    grid-template-columns: 1fr;
  }
}
.settle-pay {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.settle-pay input {
  margin: 0;
  width: 160px;
  min-width: 140px;
  padding: 8px 10px;
}
.hero-preview {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  background-color: var(--auth-hero-bg, var(--sider));
  background-image: var(--auth-hero-image, none);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  margin: 8px 0 14px;
}

/* Apple-like liquid glass */
html.ui-glass,
html.ui-glass body {
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(255,255,255,0.85), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(120,170,230,0.45), transparent 50%),
    radial-gradient(800px 500px at 50% 110%, rgba(180,140,220,0.28), transparent 55%),
    linear-gradient(160deg, #d5dee9 0%, #e7eef7 45%, #cfd9e6 100%);
  color: var(--ink);
}
html.ui-glass .auth-shell,
html.ui-glass .admin-shell,
html.ui-glass .emp-shell {
  background: transparent;
}
html.ui-glass .auth-hero {
  background-color: var(--auth-hero-bg, #1e2a3a);
  background-image: var(--auth-hero-image, linear-gradient(160deg, rgba(30,42,58,0.92), rgba(40,55,75,0.78)));
  color: var(--auth-hero-ink, #f4f7fb);
}
html.ui-glass .auth-hero h1,
html.ui-glass .auth-hero .company-name { color: var(--auth-hero-ink, #ffffff); }
html.ui-glass .auth-hero p,
html.ui-glass .auth-hero .site-icp { color: var(--auth-hero-muted, rgba(244,247,251,0.78)); }
html.ui-glass .auth-panel .card,
html.ui-glass .auth-card {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.95);
  color: #122033;
  box-shadow: 0 20px 50px rgba(30, 50, 80, 0.22);
}
html.ui-glass .panel,
html.ui-glass .stat,
html.ui-glass .status-bar,
html.ui-glass .staff-list,
html.ui-glass .task-card,
html.ui-glass .theme-preview,
html.ui-glass .preset-card {
  background: linear-gradient(155deg, rgba(255,255,255,0.72), rgba(255,255,255,0.38));
  border: 1px solid rgba(255,255,255,0.65);
  color: #122033;
  box-shadow:
    0 10px 40px rgba(40, 60, 90, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.75),
    inset 0 -1px 0 rgba(255,255,255,0.2);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}
html.ui-glass .sider {
  background: linear-gradient(180deg, rgba(24, 36, 52, 0.92), rgba(30, 42, 58, 0.86));
  border-right: 1px solid rgba(255,255,255,0.22);
  color: rgba(244,247,251,0.78);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
html.ui-glass .sider h2,
html.ui-glass .sider-user { color: #ffffff; }
html.ui-glass .sider a { color: rgba(244,247,251,0.78); }
html.ui-glass .panel h3,
html.ui-glass .stat b { color: var(--heading, #102a56); }
html.ui-glass .sider a.nav-alert {
  color: #ffe08a !important;
  border-color: #f0c35a !important;
  background: rgba(240, 195, 90, 0.18) !important;
}
html.ui-glass .main {
  background: transparent;
}
html.ui-glass .auth-panel {
  background: transparent;
}
html.ui-glass input,
html.ui-glass select,
html.ui-glass textarea,
html.ui-glass .rect-field,
html.ui-glass .switch-list,
html.ui-glass .color-row,
html.ui-glass .perm-list {
  background: rgba(255,255,255,0.78);
  border-color: rgba(18,32,51,0.22);
  color: #122033;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
html.ui-glass .btn-primary {
  background: linear-gradient(180deg, #6ea8ef, #3a7bd5);
  color: #fff;
  box-shadow: 0 8px 20px rgba(58, 123, 213, 0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
html.ui-glass .btn-ghost {
  background: rgba(255,255,255,0.35);
  border-color: rgba(255,255,255,0.6);
}
html.ui-glass .sider a.active,
html.ui-glass .sider a:hover {
  background: rgba(255,255,255,0.14) !important;
  border-color: rgba(255,255,255,0.45) !important;
  color: #ffffff !important;
}
html.ui-glass .staff-list a.active,
html.ui-glass .staff-list a:hover,
html.ui-glass .staff-list .staff-pick.selected,
html.ui-glass .staff-list .staff-pick:hover {
  background: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
html.ui-glass .progress-bar {
  background: rgba(255,255,255,0.35);
}
html.ui-glass table th,
html.ui-glass table td {
  border-bottom-color: rgba(255,255,255,0.35);
}

@media (max-width: 960px) {
  .auth-shell, .grid-2, .home-grid, .stats, .money-grid {
    grid-template-columns: 1fr;
  }
  .admin-shell, .emp-shell {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .sider, .emp-sider {
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
  }
  .staff-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .preset-grid {
    grid-template-columns: 1fr 1fr;
  }
  .auth-hero { display: none; }
}
