/* DanceRoom 运营后台 · 按用户提供的墨刀原型调整 */
:root {
  --red: #d8323c;
  --red-hover: #c42a34;
  --red-press: #a9222b;
  --red-50: #fdf0f1;
  --red-100: #f9d7da;

  --ink: #1d2129;
  --ink-2: #4e5969;
  --ink-3: #86909c;
  --ink-4: #c9cdd4;
  --line: #e5e6eb;
  --line-2: #f0f1f4;
  --bg: #f4f5f7;
  --white: #ffffff;

  --green: #0e9f6e;
  --green-bg: #e7f7f0;
  --blue: #2f6be8;
  --blue-bg: #eaf1fe;
  --orange: #dd6b10;
  --orange-bg: #fff2e6;
  --rose: #c8232f;
  --rose-bg: #ffedee;
  --gray: #5f6773;
  --gray-bg: #f0f1f3;
  --violet: #6a4fd8;
  --violet-bg: #f1eefd;

  --font:
    'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --num: 'DIN Alternate', 'Bahnschrift', 'DIN Pro', 'Roboto Condensed', var(--font);
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-pop: 0 6px 24px rgba(29, 33, 41, 0.12), 0 1px 3px rgba(29, 33, 41, 0.08);
  --sidebar-w: 200px;
  --topbar-h: 56px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5715;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-width: 1180px;
}
a {
  color: var(--blue);
  text-decoration: none;
  cursor: pointer;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.num {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--ink-3);
}
.sub {
  color: var(--ink-3);
  font-size: 12px;
}
.nowrap {
  white-space: nowrap;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hidden {
  display: none !important;
}
:focus-visible {
  outline: 2px solid rgba(216, 50, 60, 0.45);
  outline-offset: 1px;
}
svg.i {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}
svg.i.sm {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}
svg.i.lg {
  width: 20px;
  height: 20px;
}

/* ---------- Layout ---------- */
.app {
  display: flex;
  height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-2);
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--num);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  flex: none;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}
.brand-name small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.nav {
  padding: 12px 10px;
  flex: 1;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  margin-bottom: 2px;
  color: var(--ink-2);
  border-radius: var(--radius);
  font-size: 14px;
  position: relative;
}
.nav a:hover {
  background: var(--line-2);
  color: var(--ink);
  text-decoration: none;
}
.nav a.active {
  background: var(--red-50);
  color: var(--red);
  font-weight: 600;
}
.nav a.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
}
.nav .badge {
  margin-left: auto;
}
.sidebar-foot {
  padding: 12px 18px 16px;
  font-size: 12px;
  color: var(--ink-3);
  border-top: 1px solid var(--line-2);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  flex: none;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.topbar h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
}
.crumbs a {
  color: var(--ink-3);
  font-weight: 400;
}
.crumbs .sep {
  color: var(--ink-4);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius);
  color: var(--ink-2);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2b2f36;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}
.top-user .role {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.1;
}
.top-user .name {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.2;
}
.top-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 6px;
}
.top-bell {
  position: relative;
}
.top-bell .dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid #fff;
}

.content {
  flex: 1;
  overflow: auto;
  padding: 20px 20px 40px;
}
.content-inner {
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
  min-height: 52px;
}
.card-hd h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.card-hd .hint {
  font-size: 12px;
  color: var(--ink-3);
}
.card-hd .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-bd {
  padding: 16px 18px;
}
.card-bd.flush {
  padding: 0;
}
.section-gap {
  height: 16px;
}
.grid {
  display: grid;
  gap: 16px;
}
.g-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.g-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g-3-2 {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}
.page-head .title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}
.page-head .desc {
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 2px;
  display: block;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.page-head .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn:hover {
  border-color: #c9cdd4;
  background: #fafafb;
  text-decoration: none;
}
.btn:active {
  background: var(--line-2);
}
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}
.btn-primary:active {
  background: var(--red-press);
}
.btn-outline-red {
  border-color: var(--red-100);
  color: var(--red);
  background: var(--white);
}
.btn-outline-red:hover {
  background: var(--red-50);
  border-color: var(--red);
}
.btn-danger {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}
.btn-danger:hover {
  background: #ae1c27;
  border-color: #ae1c27;
}
.btn-text {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
  padding: 0 8px;
}
.btn-text:hover {
  background: var(--line-2);
  border-color: transparent;
}
.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}
.btn-lg {
  height: 40px;
  padding: 0 20px;
  font-size: 15px;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.loading {
  pointer-events: none;
  opacity: 0.85;
}
.btn .spin,
.spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.link {
  color: var(--blue);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}
.link:hover {
  text-decoration: underline;
}
.link.red {
  color: var(--red);
}
.link.gray {
  color: var(--ink-2);
}
.link[disabled] {
  color: var(--ink-4);
  cursor: not-allowed;
  text-decoration: none;
}
.op-links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 0;
  background: transparent;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
}
.icon-btn:hover {
  background: var(--line-2);
  color: var(--ink);
}
.icon-btn.sm {
  width: 26px;
  height: 26px;
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  font-weight: 500;
}
.tag .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.tag.green {
  color: var(--green);
  background: var(--green-bg);
}
.tag.blue {
  color: var(--blue);
  background: var(--blue-bg);
}
.tag.orange {
  color: var(--orange);
  background: var(--orange-bg);
}
.tag.rose {
  color: var(--rose);
  background: var(--rose-bg);
}
.tag.gray {
  color: var(--gray);
  background: var(--gray-bg);
}
.tag.violet {
  color: var(--violet);
  background: var(--violet-bg);
}
.tag.outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.tag .spin {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}
.badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  font-family: var(--num);
}
.badge.soft {
  background: var(--red-50);
  color: var(--red);
}
.badge.gray {
  background: var(--line-2);
  color: var(--ink-2);
}

.due-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 12px;
  color: #fff;
  background: var(--orange);
  font-weight: 500;
  white-space: nowrap;
}
.due-pill.urgent {
  background: var(--red);
}
.due-pill svg {
  width: 12px;
  height: 12px;
}

/* Service period meter — signature element */
.meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.meter-top {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.meter-bar {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
  overflow: hidden;
  width: 104px;
}
.meter-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--green);
}
.meter-bar.warn i {
  background: var(--orange);
}
.meter-bar.over i {
  background: var(--rose);
}
.meter-bar.off i {
  background: var(--ink-4);
}
.meter-bar.trial i {
  background: var(--blue);
}

/* ---------- Forms ---------- */
.input,
.select,
.textarea {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  outline: none;
  width: 100%;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  font-size: 14px;
}
.textarea {
  height: auto;
  min-height: 72px;
  padding: 6px 10px;
  resize: vertical;
  line-height: 1.6;
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: #c9cdd4;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(216, 50, 60, 0.1);
}
.input[disabled],
.select[disabled],
.textarea[disabled] {
  background: var(--line-2);
  color: var(--ink-3);
  cursor: not-allowed;
}
.input[readonly] {
  background: #fafafb;
}
.select {
  appearance: none;
  padding-right: 28px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386909C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .addon {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #fafafb;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
}
.input-group .addon:first-child {
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}
.input-group .addon:last-child {
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.input-group .input {
  border-radius: 0;
}
.input-group .input:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}
.input-group .input:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}
.input-affix {
  position: relative;
}
.input-affix .input {
  padding-left: 32px;
}
.input-affix > svg {
  position: absolute;
  left: 10px;
  top: 8px;
  color: var(--ink-3);
}
.input-affix .suffix {
  position: absolute;
  right: 4px;
  top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}
.form-row.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.field {
  margin-bottom: 18px;
  min-width: 0;
}
.field.span-2 {
  grid-column: span 2;
}
.field.span-all {
  grid-column: 1 / -1;
}
.field > label,
.field .label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.field .req::before {
  content: '*';
  color: var(--red);
  margin-right: 3px;
}
.field .help {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 5px;
}
.field .err {
  font-size: 12px;
  color: var(--rose);
  margin-top: 5px;
  display: none;
}
.field.invalid .err {
  display: block;
}
.field.invalid .input,
.field.invalid .select,
.field.invalid .textarea {
  border-color: var(--rose);
}
.field.invalid .input:focus {
  box-shadow: 0 0 0 3px rgba(200, 35, 47, 0.12);
}
.counter {
  float: right;
  font-size: 12px;
  color: var(--ink-3);
}

.radio-group,
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--white);
  font-size: 13px;
  user-select: none;
}
.radio-card:hover {
  border-color: #c9cdd4;
}
.radio-card input {
  display: none;
}
.radio-card.on {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-50);
}
.radio-card.big {
  height: auto;
  padding: 10px 14px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 160px;
}
.radio-card.big b {
  font-weight: 600;
  font-size: 14px;
}
.radio-card.big span {
  color: var(--ink-3);
  font-size: 12px;
}
.radio-card.big.on span {
  color: #c26068;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  user-select: none;
}
.chip:hover {
  border-color: #c9cdd4;
  color: var(--ink);
}
.chip.on {
  background: var(--red-50);
  border-color: var(--red-100);
  color: var(--red);
}
.chip .x {
  margin-left: 2px;
  opacity: 0.7;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--ink-2);
}
.checkbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--red);
  margin: 0;
}
.switch {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--ink-4);
  cursor: pointer;
  border: 0;
  flex: none;
  transition: background 0.2s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.switch.on {
  background: var(--red);
}
.switch.on::after {
  transform: translateX(16px);
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
}
.filter-bar .input-affix {
  width: 280px;
}
.filter-bar .select {
  width: 136px;
}
.filter-bar .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px dashed #d5d8de;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
}
.toggle-chip:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.toggle-chip.on {
  border-style: solid;
  border-color: var(--orange);
  background: var(--orange-bg);
  color: var(--orange);
}
.date-range {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  height: 32px;
  padding: 0 4px;
}
.date-range input {
  border: 0;
  outline: none;
  height: 30px;
  width: 124px;
  padding: 0 6px;
  font-size: 13px;
  background: transparent;
}
.date-range .to {
  color: var(--ink-3);
  font-size: 12px;
}
.date-range:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(216, 50, 60, 0.1);
}
.seg {
  display: inline-flex;
  background: var(--line-2);
  border-radius: var(--radius);
  padding: 2px;
}
.seg button {
  height: 26px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
}
.seg button.on {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
}
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-2);
  background: #fafafb;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-size: 13px;
}
.tbl td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tbl tbody tr {
  transition: background 0.12s;
}
.tbl tbody tr:hover {
  background: #fbfbfc;
}
.tbl tbody tr.row-warn {
  background: #fffbf6;
}
.tbl tbody tr.row-warn:hover {
  background: #fff7ee;
}
.tbl tbody tr.row-muted td {
  color: var(--ink-3);
}
.tbl .r {
  text-align: right;
}
.tbl .c {
  text-align: center;
}
.tbl th:first-child,
.tbl td:first-child {
  padding-left: 18px;
}
.tbl th:last-child,
.tbl td:last-child {
  padding-right: 18px;
}
.tbl.compact td {
  padding: 9px 14px;
}
.tbl tfoot td {
  background: #fafafb;
  font-weight: 600;
  border-bottom: 0;
}
.org-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
}
.status-cell {
  min-width: 112px;
  max-width: 150px;
}
.tbl.compact .org-cell {
  min-width: 150px;
}
.grid > * {
  min-width: 0;
}
.org-cell .nm {
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.org-cell .nm:hover {
  color: var(--red);
}
.org-cell .code {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--num);
}
.logo-av {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  flex: none;
  overflow: hidden;
}
.logo-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-av.lg {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  font-size: 22px;
}
.logo-av.sm {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font-size: 11px;
}
.money {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.money.strike {
  text-decoration: line-through;
  color: var(--ink-3);
}

.pager {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  font-size: 13px;
  color: var(--ink-2);
}
.pager .total {
  margin-right: auto;
  color: var(--ink-3);
}
.pager button {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--num);
}
.pager button:hover {
  border-color: var(--red);
  color: var(--red);
}
.pager button.on {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.pager button[disabled] {
  opacity: 0.4;
  pointer-events: none;
}
.pager .select {
  width: 96px;
  height: 30px;
}

/* ---------- Dropdown ---------- */
.dropdown {
  position: fixed;
  z-index: 1200;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 4px;
  min-width: 168px;
  animation: pop 0.12s ease-out;
}
.dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.dropdown button:hover {
  background: var(--line-2);
}
.dropdown button.danger {
  color: var(--rose);
}
.dropdown button[disabled] {
  color: var(--ink-4);
  cursor: not-allowed;
  background: transparent;
  flex-wrap: wrap;
}
.dropdown button .why {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--ink-3);
  padding-left: 22px;
  margin-top: -2px;
}
.dropdown hr {
  border: 0;
  border-top: 1px solid var(--line-2);
  margin: 4px 0;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Modal ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.45);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 20px 40px;
  overflow: auto;
  animation: fade 0.15s;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  background: #fff;
  border-radius: 10px;
  width: 520px;
  max-width: 100%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  animation: rise 0.18s ease-out;
}
.modal.w-sm {
  width: 420px;
}
.modal.w-lg {
  width: 680px;
}
.modal.w-xl {
  width: 820px;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-hd {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.modal-hd h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.modal-hd .icon-btn {
  margin-left: auto;
  margin-right: -6px;
}
.modal-bd {
  padding: 18px 20px 4px;
  max-height: 68vh;
  overflow: auto;
}
.modal-ft {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-2);
}
.modal-ft .left {
  margin-right: auto;
  font-size: 12px;
  color: var(--ink-3);
}
.confirm-body {
  display: flex;
  gap: 12px;
  padding: 22px 22px 8px;
}
.confirm-body .ic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
.confirm-body .ic.warn {
  background: var(--orange-bg);
  color: var(--orange);
}
.confirm-body .ic.danger {
  background: var(--rose-bg);
  color: var(--rose);
}
.confirm-body .ic.info {
  background: var(--blue-bg);
  color: var(--blue);
}
.confirm-body h4 {
  margin: 6px 0 6px;
  font-size: 16px;
}
.confirm-body p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 14px;
}

/* Drawer */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.35);
  z-index: 1000;
  animation: fade 0.15s;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  background: #fff;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  animation: slide 0.2s ease-out;
}
@keyframes slide {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.drawer .modal-bd {
  max-height: none;
  flex: 1;
}

/* ---------- Alerts / toast ---------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid;
}
.alert svg {
  margin-top: 2px;
}
.alert.error {
  background: var(--rose-bg);
  border-color: #f8cdd1;
  color: #8e1b24;
}
.alert.error svg {
  color: var(--rose);
}
.alert.warn {
  background: var(--orange-bg);
  border-color: #fbd9b9;
  color: #8a4609;
}
.alert.warn svg {
  color: var(--orange);
}
.alert.info {
  background: var(--blue-bg);
  border-color: #cadbfc;
  color: #1d4aae;
}
.alert.info svg {
  color: var(--blue);
}
.alert.success {
  background: var(--green-bg);
  border-color: #bde8d6;
  color: #0b6a4a;
}
.alert.success svg {
  color: var(--green);
}
.alert .alert-act {
  margin-left: auto;
  white-space: nowrap;
}
.alert b {
  font-weight: 600;
}

.toasts {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  animation: rise 0.2s ease-out;
  pointer-events: auto;
}
.toast.success svg {
  color: var(--green);
}
.toast.error svg {
  color: var(--rose);
}
.toast.warn svg {
  color: var(--orange);
}
.toast.info svg {
  color: var(--blue);
}
.toast.out {
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.2s;
}

/* ---------- Empty & skeleton ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--ink-3);
  text-align: center;
}
.empty .art {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--line-2);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: var(--ink-4);
}
.empty .art svg {
  width: 28px;
  height: 28px;
}
.empty .t {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}
.empty .d {
  font-size: 12px;
  margin-top: 4px;
  max-width: 320px;
}
.empty .acts {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}
.empty.sm {
  padding: 24px 16px;
}
.empty.sm .art {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
}
.empty.sm .art svg {
  width: 20px;
  height: 20px;
}
.sk {
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  border-radius: 4px;
}
@keyframes sk {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.sk-line {
  height: 12px;
  margin: 10px 0;
}
.loading-row td {
  padding: 14px;
}
.page-loading {
  padding: 4px 0;
}
.inline-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-3);
  padding: 40px 0;
  font-size: 13px;
}

/* ---------- Dashboard ---------- */
.stat {
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
}
.stat .lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 13px;
}
.stat .val {
  font-family: var(--num);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  margin: 10px 0 6px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat .val small {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 4px;
  font-family: var(--font);
}
.stat .val .cur {
  font-size: 18px;
  margin-right: 2px;
}
.stat .foot {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-3);
  border-top: 1px dashed var(--line);
  padding-top: 9px;
  margin-top: 8px;
}
.stat .foot .scope {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat.hl {
  border-color: #f6c9a3;
  background: linear-gradient(180deg, #fff8f1 0, #fff 70%);
}
.stat.hl .val {
  color: var(--orange);
}
.stat .go {
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 12px;
}
.up {
  color: var(--green);
}
.down {
  color: var(--rose);
}
.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mini-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.mini-list li:last-child {
  border-bottom: 0;
}
.mini-list .main-t {
  flex: 1;
  min-width: 0;
}
.mini-list .main-t .nm {
  font-weight: 500;
}
.chart-wrap {
  position: relative;
  padding: 8px 18px 14px;
}
.chart-wrap svg {
  display: block;
  width: 100%;
  height: 240px;
}
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: #1d2129;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  display: none;
  z-index: 2;
}
.chart-sum {
  display: flex;
  gap: 28px;
  padding: 14px 18px 0;
}
.chart-sum .k {
  font-size: 12px;
  color: var(--ink-3);
}
.chart-sum .v {
  font-family: var(--num);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Org detail ---------- */
.detail-head {
  padding: 20px 22px 0;
}
.dh-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.dh-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.dh-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.dh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 13px;
}
.dh-meta .k {
  color: var(--ink-3);
  margin-right: 6px;
}
.dh-acts {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex: none;
}
.dh-period {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 12px 16px;
  background: #fafafb;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
}
.dh-period .blk .k {
  font-size: 12px;
  color: var(--ink-3);
}
.dh-period .blk .v {
  font-family: var(--num);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.period-track {
  flex: 1;
  min-width: 200px;
}
.period-track .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  position: relative;
  overflow: visible;
}
.period-track .bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: var(--green);
}
.period-track .bar.warn i {
  background: var(--orange);
}
.period-track .bar.over i {
  background: var(--rose);
}
.period-track .bar.off i {
  background: var(--ink-4);
}
.period-track .bar.trial i {
  background: var(--blue);
}
.period-track .bar b {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  background: var(--ink);
  border-radius: 1px;
}
.period-track .lbls {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  margin-top: 18px;
}
.tabs button {
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-2);
  position: relative;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs button:hover {
  color: var(--ink);
}
.tabs button.on {
  color: var(--red);
  font-weight: 600;
}
.tabs button.on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}
.tab-body {
  padding: 20px 22px 24px;
}
.desc-group {
  margin-bottom: 24px;
}
.desc-group:last-child {
  margin-bottom: 0;
}
.desc-group h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.desc-group h4::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--red);
  border-radius: 2px;
}
.desc-group h4 .right {
  margin-left: auto;
  font-weight: 400;
}
.desc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.desc > div {
  display: flex;
  border-bottom: 1px solid var(--line-2);
  min-height: 42px;
}
.desc .k {
  width: 104px;
  flex: none;
  background: #fafafb;
  color: var(--ink-3);
  padding: 10px 12px;
  font-size: 13px;
  border-right: 1px solid var(--line-2);
}
.desc .v {
  padding: 10px 12px;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  word-break: break-all;
}
.desc > div.span-2 {
  grid-column: span 2;
}
.desc > div.span-3 {
  grid-column: 1 / -1;
}
.desc > div:not(:nth-child(3n)) {
}

.progress-panel {
  margin: 18px 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: #fff;
}
.progress-panel.fail {
  border-color: #f5c2c7;
  background: #fffafa;
}
.progress-panel.run {
  border-color: #cfddfb;
  background: #fafcff;
}
.pp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.pp-head h4 {
  margin: 0;
  font-size: 15px;
}
.pp-head .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.steps {
  display: flex;
  align-items: flex-start;
}
.step {
  flex: 1;
  position: relative;
  padding-right: 12px;
}
.step .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1.5px solid var(--ink-4);
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--num);
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.step .dot svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}
.step::after {
  content: '';
  position: absolute;
  left: 28px;
  right: 6px;
  top: 11px;
  height: 2px;
  background: var(--line);
}
.step:last-child::after {
  display: none;
}
.step .t {
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
}
.step .d {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  padding-right: 8px;
}
.step.done .dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.step.done::after {
  background: var(--green);
}
.step.cur .dot {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-bg);
}
.step.cur .t {
  color: var(--blue);
}
.step.fail .dot {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
}
.step.fail .t {
  color: var(--rose);
}
.step.cur .dot .spin {
  width: 12px;
  height: 12px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 20px 26px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 16px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}
.timeline li:last-child::before {
  display: none;
}
.timeline .tdot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: #fff;
}
.timeline .tdot.green {
  border-color: var(--green);
}
.timeline .tdot.blue {
  border-color: var(--blue);
}
.timeline .tdot.orange {
  border-color: var(--orange);
}
.timeline .tdot.rose {
  border-color: var(--rose);
}
.timeline .tdot.gray {
  border-color: var(--ink-4);
}
.timeline .tdot.red {
  border-color: var(--red);
}
.timeline .tl-h {
  display: flex;
  gap: 10px;
  align-items: center;
}
.timeline .tl-h b {
  font-weight: 600;
  font-size: 14px;
}
.timeline .tl-h .time {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--num);
}
.timeline .tl-b {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 4px;
}

.kv-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.copy-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fafafb;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}
.copy-box code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--ink-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Org form ---------- */
.form-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.form-anchor {
  position: sticky;
  top: 0;
  padding-top: 4px;
}
.form-anchor a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--ink-2);
  font-size: 13px;
  border-left: 2px solid var(--line);
}
.form-anchor a:hover {
  color: var(--ink);
  text-decoration: none;
}
.form-anchor a.on {
  color: var(--red);
  border-left-color: var(--red);
  font-weight: 500;
}
.form-anchor a .ok {
  margin-left: auto;
  color: var(--green);
}
.form-anchor .tip {
  margin-top: 16px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink-3);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.7;
}
.form-card {
  margin-bottom: 16px;
  scroll-margin-top: 12px;
}
.form-card .card-hd .step-no {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-family: var(--num);
  font-weight: 600;
}
.form-card .card-bd {
  padding: 20px 22px 4px;
}
.form-footer {
  position: sticky;
  bottom: -40px;
  margin: 0 -20px -40px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(6px);
  z-index: 5;
}
.form-footer .info {
  font-size: 12px;
  color: var(--ink-3);
}
.form-footer .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.upload {
  display: flex;
  gap: 14px;
  align-items: center;
}
.upload-box {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px dashed #c9cdd4;
  display: grid;
  place-items: center;
  background: #fafafb;
  color: var(--ink-3);
  cursor: pointer;
  overflow: hidden;
  flex: none;
}
.upload-box:hover {
  border-color: var(--red);
  color: var(--red);
}
.upload-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.region-sel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.calc-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--blue-bg);
  color: #1d4aae;
  font-size: 13px;
  margin-bottom: 18px;
}

/* ---------- Renew modal ---------- */
.renew-org {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: #fafafb;
  border: 1px solid var(--line-2);
  margin-bottom: 18px;
}
.renew-org .meta {
  font-size: 12px;
  color: var(--ink-3);
}
.renew-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--red-100);
  background: var(--red-50);
  margin: 2px 0 18px;
}
.renew-result .from,
.renew-result .to {
  display: flex;
  flex-direction: column;
}
.renew-result .k {
  font-size: 12px;
  color: var(--ink-3);
}
.renew-result .v {
  font-family: var(--num);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.renew-result .to .v {
  color: var(--red);
  font-size: 22px;
}
.renew-result .arrow {
  color: var(--red);
}
.renew-result .note {
  margin-left: auto;
  text-align: right;
  font-size: 12px;
  color: var(--ink-2);
  max-width: 200px;
}

/* ---------- Settings ---------- */
.settings-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.side-menu {
  padding: 8px;
}
.side-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-2);
  text-align: left;
}
.side-menu button:hover {
  background: var(--line-2);
}
.side-menu button.on {
  background: var(--red-50);
  color: var(--red);
  font-weight: 600;
}
.set-section {
  max-width: 640px;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-2);
}
.set-row:last-child {
  border-bottom: 0;
}
.set-row .k {
  width: 140px;
  flex: none;
  color: var(--ink-2);
  font-size: 14px;
}
.set-row .v {
  flex: 1;
}
.rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rule-list li {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line-2);
}
.rule-list li:last-child {
  border-bottom: 0;
}
.rule-list li svg {
  color: var(--green);
  margin-top: 3px;
}
.pw-rules {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
}
.pw-rules span.ok {
  color: var(--green);
}

/* ---------- Tasks ---------- */
.status-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 18px 0;
  border-bottom: 1px solid var(--line-2);
}
.status-tabs button {
  height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.status-tabs button.on {
  color: var(--red);
  font-weight: 600;
}
.status-tabs button.on::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--red);
}
.status-tabs .badge {
  background: var(--line-2);
  color: var(--ink-2);
}
.status-tabs button.on .badge {
  background: var(--red-50);
  color: var(--red);
}
.backup-card {
  padding: 16px 18px;
  display: flex;
  gap: 14px;
}
.backup-card .ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--line-2);
  color: var(--ink-2);
}
.backup-card h4 {
  margin: 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.backup-card .rows {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  font-size: 13px;
}
.backup-card .rows .k {
  color: var(--ink-3);
}
.backup-card .acts {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.bk-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line-2);
}
.step-list li:last-child {
  border-bottom: 0;
}
.step-list .s-ic {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}
.step-list .s-ic svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}
.step-list .s-ic.ok {
  background: var(--green);
  color: #fff;
}
.step-list .s-ic.fail {
  background: var(--rose);
  color: #fff;
}
.step-list .s-ic.wait {
  border: 1.5px solid var(--ink-4);
}
.step-list .s-ic.run {
  color: var(--blue);
}
.step-list .time {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--num);
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 44%) 1fr;
  background: #fff;
}
.login-side {
  position: relative;
  background: #1e2026;
  color: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.login-side .floor {
  position: absolute;
  inset: 0;
  opacity: 0.9;
}
.login-side .brand-l {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.login-side .brand-l .brand-mark {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: 9px;
}
.login-side .brand-l b {
  font-size: 18px;
  font-weight: 600;
}
.login-side .claim {
  margin-top: auto;
  position: relative;
}
.login-side .claim h2 {
  font-size: 30px;
  line-height: 1.35;
  margin: 0 0 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.login-side .claim h2 em {
  font-style: normal;
  color: #ff6b73;
}
.login-side .claim p {
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
  font-size: 14px;
  max-width: 360px;
  line-height: 1.8;
}
.login-side .claim ul {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: flex;
  gap: 22px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
}
.login-side .claim ul li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.login-side .claim ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #ff6b73;
  transform: rotate(45deg);
}
.login-side .copy {
  position: relative;
  margin-top: 40px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--white);
}
.login-box {
  width: 360px;
}
.login-box h1 {
  font-size: 24px;
  margin: 0 0 6px;
  font-weight: 600;
}
.login-box .lead {
  color: var(--ink-3);
  margin: 0 0 28px;
  font-size: 14px;
}
.login-box .field {
  margin-bottom: 18px;
}
.login-box .input {
  height: 42px;
  font-size: 15px;
  padding-left: 38px;
}
.login-box .input-affix > svg {
  top: 13px;
  left: 12px;
}
.login-box .input-affix .suffix {
  top: 5px;
  right: 5px;
}
.login-box .alert {
  margin-bottom: 18px;
}
.login-opts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -4px 0 22px;
  font-size: 13px;
}
.login-demo {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.8;
}
.login-demo code {
  background: var(--line-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-2);
  font-family: ui-monospace, Menlo, monospace;
}

/* utilities */
.flex {
  display: flex;
}
.items-center {
  align-items: center;
}
.gap-6 {
  gap: 6px;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.mb-12 {
  margin-bottom: 12px;
}
.mb-16 {
  margin-bottom: 16px;
}
.ml-auto {
  margin-left: auto;
}
.w-full {
  width: 100%;
}
.text-right {
  text-align: right;
}
.fw-6 {
  font-weight: 600;
}
.c-red {
  color: var(--red);
}
.c-green {
  color: var(--green);
}
.c-orange {
  color: var(--orange);
}
.c-rose {
  color: var(--rose);
}
.c-blue {
  color: var(--blue);
}
.divider-v {
  width: 1px;
  height: 14px;
  background: var(--line);
  display: inline-block;
  vertical-align: middle;
}

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

/* sticky operation column for wide tables */
.tbl.sticky-ops th:last-child,
.tbl.sticky-ops td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  box-shadow: inset 1px 0 0 var(--line-2);
}
.tbl.sticky-ops th:last-child {
  background: #fafafb;
}
.tbl.sticky-ops td:last-child {
  background: #fff;
}
.tbl.sticky-ops tr:hover td:last-child {
  background: #fbfbfc;
}
.tbl.sticky-ops tr.row-warn td:last-child {
  background: #fffbf6;
}
/* Production integration: real API states, responsive layout and native dialog. */
[hidden] {
  display: none !important;
}
.starting {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}
.floor-marks {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: radial-gradient(ellipse at center, #fff 0 1px, transparent 1.2px);
  background-size: 56px 56px;
}
.floor-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.field-symbol {
  position: absolute;
  top: 11px;
  left: 13px;
  color: var(--ink-3);
}
.login-box #login-password {
  padding-right: 44px;
}
.real-dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: min(600px, calc(100% - 32px));
  max-height: 90vh;
  box-shadow: var(--shadow-pop);
  color: var(--ink);
}
.real-dialog::backdrop {
  background: #1d212966;
}
.real-dialog .modal-hd {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.real-dialog h3 {
  margin: 0;
  font-size: 16px;
}
.real-dialog .modal-bd {
  padding: 20px;
}
.real-dialog .modal-ft {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.ops-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.ops-title h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
.ops-title p {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}
.ops-kpi {
  padding: 18px;
}
.ops-kpi .num {
  font-size: 28px;
  font-weight: 600;
  margin: 10px 0 4px;
}
.ops-kpi .sub {
  display: block;
}
.ops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
}
.ops-toolbar .input {
  max-width: 280px;
}
.ops-toolbar .select {
  width: 150px;
}
.ops-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.ops-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-3);
}
.ops-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--line-2);
  color: var(--ink-3);
  font-size: 12px;
}
.ops-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.ops-tabs button {
  padding: 12px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  color: var(--ink-3);
}
.ops-tabs .active {
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
}
.ops-detail {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px 24px;
  font-size: 13px;
}
.ops-detail dt {
  color: var(--ink-3);
}
.ops-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.ops-form {
  max-width: 980px;
}
.ops-form .card {
  margin-bottom: 16px;
}
.ops-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.ops-form-grid .wide {
  grid-column: 1/-1;
}
.ops-form .field {
  margin-bottom: 18px;
}
.ops-savebar {
  position: sticky;
  bottom: -40px;
  background: white;
  border: 1px solid var(--line);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-radius: 8px;
}
.ops-note {
  line-height: 1.8;
  font-size: 12px;
  color: var(--ink-3);
}
.ops-name {
  font-weight: 600;
  color: var(--ink);
}
.ops-name:hover {
  color: var(--red);
}
.table-scroll {
  overflow: auto;
}
.ops-settings {
  max-width: 840px;
}
.ops-task-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.ops-task-step:last-child {
  border-bottom: 0;
}
.ops-step-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}
.ops-step-dot.done {
  background: var(--green);
}
.ops-step-dot.current {
  background: var(--orange);
}
.ops-label {
  font-size: 12px;
  color: var(--ink-3);
}
.ops-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.ops-hero .brand-mark {
  width: 48px;
  height: 48px;
  font-size: 21px;
  border-radius: 10px;
}
.ops-hero h2 {
  margin: 0 0 4px;
  font-size: 22px;
}
.ops-status-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.ops-status-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.ops-status-list li:last-child {
  border-bottom: 0;
}
.ops-deadline {
  font-size: 12px;
  color: var(--orange);
}
.ops-inline-error {
  color: var(--rose);
  font-size: 13px;
}
.ops-top-spacing {
  margin-top: 16px;
}
.ops-money {
  font-family: var(--num);
  font-variant-numeric: tabular-nums;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.ops-security-notice {
  padding: 12px 16px;
  background: var(--blue-bg);
  border-radius: 6px;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.8;
}
.ops-payment-history {
  margin-top: 12px;
}
.ops-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1000px) {
  body {
    min-width: 0;
  }
  .login-page {
    grid-template-columns: 40% 1fr;
  }
  .login-side {
    padding: 32px;
  }
  .login-side .claim h2 {
    font-size: 24px;
  }
  .g-4,
  .ops-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g-3-2 {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 16px;
  }
  .sidebar {
    width: 176px;
  }
  .ops-form-grid {
    gap: 0 16px;
  }
}
@media (max-width: 640px) {
  .login-page {
    display: block;
  }
  .login-side {
    display: none;
  }
  .login-main {
    min-height: 100vh;
    padding: 30px 24px;
  }
  .login-box {
    width: 100%;
  }
  .app {
    height: auto;
    min-height: 100vh;
  }
  .sidebar {
    width: 64px;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .brand {
    padding: 0;
    justify-content: center;
  }
  .brand-name,
  .nav .nav-label,
  .sidebar-foot {
    display: none;
  }
  .nav {
    padding: 12px 6px;
  }
  .nav a {
    padding: 0;
    justify-content: center;
  }
  .topbar {
    padding: 0 14px;
  }
  .topbar-right {
    gap: 0;
  }
  .top-user .role,
  .top-user .name,
  .top-divider {
    display: none;
  }
  .content {
    overflow: visible;
  }
  .main {
    min-height: 100vh;
  }
  .ops-title {
    align-items: flex-start;
  }
  .ops-title h2 {
    font-size: 18px;
  }
  .ops-title p {
    font-size: 12px;
  }
  .g-4,
  .ops-grid-5 {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ops-kpi {
    padding: 14px;
  }
  .ops-kpi .num {
    font-size: 24px;
  }
  .ops-form-grid {
    grid-template-columns: 1fr;
  }
  .ops-detail {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
  }
  .ops-hero h2 {
    font-size: 18px;
  }
  .ops-savebar {
    bottom: 0;
  }
  .ops-toolbar .input {
    max-width: 100%;
  }
}
