/* ==========================================================
   分单系统 · 工具精度 UI
   Raycast / Linear 方向：暖黑 + 红色点缀
   ========================================================== */

:root {
  --bg: #0F0F11;
  --bg-elev: #17171A;
  --surface: rgba(255, 255, 255, .07);
  --surface-2: rgba(255, 255, 255, .05);
  --surface-3: rgba(255, 255, 255, .035);
  --ink: #FFFFFF;
  --ink-2: #D6D8DC;
  --muted: #B0B3B8;
  --faint: #777B82;
  --line: rgba(255, 255, 255, .11);
  --line-soft: rgba(255, 255, 255, .07);
  --primary: #FF6363;
  --primary-strong: #E84B4B;
  --primary-soft: rgba(255, 99, 99, .14);
  --primary-line: rgba(255, 99, 99, .42);
  --danger: #FF6B6B;
  --danger-soft: rgba(255, 99, 99, .13);
  --success: #8BE06D;
  --success-soft: rgba(139, 224, 109, .13);
  --warning: #FACD5B;
  --warning-soft: rgba(250, 205, 91, .12);
  --blue: #7DE9E1;
  --blue-soft: rgba(125, 233, 225, .13);
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, .28);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, .4);
  --shadow-primary: 0 10px 26px rgba(255, 99, 99, .22);
}

html {
  color-scheme: dark;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% -5%, rgba(182, 106, 73, .2), transparent 38%),
    radial-gradient(circle at 88% 4%, rgba(174, 72, 116, .13), transparent 34%),
    #0F0F11 !important;
  color: var(--ink);
  font-family: "Inter Tight", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease;
}

body.app-body {
  background: #0F0F11;
}

.bg-light {
  background-color: transparent !important;
}

.bg-white {
  background-color: rgba(255, 255, 255, .035) !important;
}

.container {
  max-width: 1240px;
}

.app-main {
  min-height: calc(100dvh - 66px);
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

a {
  color: #FF9A9A;
  text-decoration: none;
}

a:hover {
  color: #FFB2B2;
}

hr {
  border-color: var(--line-soft);
  opacity: 1;
}

/* ================= 顶部导航 ================= */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: 64px;
  background: rgba(15, 15, 17, .82) !important;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.app-navbar .container {
  min-height: 64px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink) !important;
  font-weight: 700;
  letter-spacing: -.01em;
}

.navbar-brand::before {
  content: "A";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(255, 99, 99, .24);
}

.app-navbar .navbar-nav {
  gap: 4px;
}

.app-navbar .nav-link {
  padding: 8px 12px !important;
  border-radius: 10px;
  color: var(--muted) !important;
  font-size: 14px;
  font-weight: 600;
  transition: color .15s ease, background-color .15s ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
  color: var(--ink) !important;
  background: rgba(255, 255, 255, .055);
}

.app-navbar .nav-link.active {
  color: var(--ink) !important;
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.navbar-text {
  color: var(--muted) !important;
  font-size: 12px;
}

.navbar-text strong {
  color: var(--ink);
}

.navbar-toggler {
  border-color: var(--line) !important;
  color: var(--muted);
  border-radius: 10px;
}

.navbar-toggler-icon {
  filter: none;
}

.app-navbar .navbar-toggler-icon {
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.92%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.92%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
  background: rgba(15, 15, 17, .98);
}

@media (max-width: 991.98px) {
  .app-navbar .navbar-collapse {
    margin: 8px -16px -8px;
    padding: 12px 16px;
    border-top: 1px solid var(--line-soft);
  }
}

/* ================= 页面标题 ================= */
.page-title,
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--ink);
}

.page-title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -.03em;
}

h5 {
  font-weight: 700;
}

.page-sub {
  color: var(--muted);
  font-size: 12px;
}

.text-muted,
.text-secondary {
  color: var(--muted) !important;
}

.text-body,
.text-body-secondary {
  color: var(--ink-2) !important;
}

.text-primary {
  color: #FF9A9A !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-dark {
  color: var(--ink-2) !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, .62) !important;
}

/* ================= 卡片 ================= */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.card.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.card-header {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .035) !important;
  color: var(--ink);
  padding: .9rem 1.1rem;
  font-weight: 700;
}

.card-body {
  color: var(--ink-2);
}

.card-footer {
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .03) !important;
  color: var(--muted);
}

.card-header.bg-white,
.card-footer.bg-white {
  background-color: rgba(255, 255, 255, .035) !important;
}

.card .text-muted {
  color: var(--muted) !important;
}

/* ================= 按钮 ================= */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

.btn:active {
  transform: scale(.98);
}

.btn:focus-visible,
.btn:focus {
  box-shadow: 0 0 0 3px rgba(255, 99, 99, .22);
}

.btn-primary {
  border-color: var(--primary);
  background-color: var(--primary);
  color: #fff !important;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--primary-strong);
  background-color: var(--primary-strong);
  color: #fff !important;
}

.btn-success {
  border-color: var(--success);
  background-color: var(--success);
  color: #0F0F11 !important;
}

.btn-success:hover {
  border-color: #9DE57F;
  background-color: #9DE57F;
  color: #0F0F11 !important;
}

.btn-danger {
  border-color: var(--danger);
  background-color: var(--danger);
  color: #fff !important;
}

.btn-outline-primary {
  border-color: rgba(255, 99, 99, .38);
  color: #FFA8A8;
}

.btn-outline-primary:hover {
  border-color: var(--primary);
  background-color: var(--primary);
  color: #fff !important;
}

.btn-outline-primary.active,
.btn-outline-primary:active,
.btn-outline-primary.show {
  border-color: var(--primary);
  background-color: var(--primary);
  color: #fff !important;
}

.btn-outline-secondary,
.btn-outline-light {
  border-color: var(--line);
  color: var(--ink-2);
  background: rgba(255, 255, 255, .035);
}

.btn-outline-secondary:hover,
.btn-outline-light:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.btn-outline-secondary.active,
.btn-outline-secondary:active,
.btn-outline-secondary.show,
.btn-outline-light.active,
.btn-outline-light:active {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .13);
  color: #fff !important;
}

.btn-outline-success {
  border-color: rgba(139, 224, 109, .36);
  color: var(--success);
}

.btn-outline-success:hover {
  background: var(--success);
  border-color: var(--success);
  color: #0F0F11 !important;
}

.btn-outline-success.active,
.btn-outline-success:active {
  background: var(--success);
  border-color: var(--success);
  color: #0F0F11 !important;
}

.btn-outline-danger {
  border-color: rgba(255, 99, 99, .38);
  color: var(--danger);
}

.btn-outline-danger:hover {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff !important;
}

.btn-outline-danger.active,
.btn-outline-danger:active {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff !important;
}

.btn-secondary {
  border-color: rgba(255, 255, 255, .12);
  background-color: rgba(255, 255, 255, .1);
  color: var(--ink);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}

.btn-warning {
  border-color: var(--warning);
  background-color: var(--warning);
  color: #191300;
}

.btn-info {
  border-color: var(--blue);
  background-color: var(--blue);
  color: #031310;
}

.btn-light {
  border-color: rgba(255, 255, 255, .14);
  background-color: rgba(255, 255, 255, .13);
  color: var(--ink);
}

.btn-dark {
  border-color: rgba(0, 0, 0, .3);
  background-color: #111113;
  color: var(--ink);
}

.border {
  border-color: var(--line-soft) !important;
}

.border-top {
  border-top-color: var(--line-soft) !important;
}

.border-bottom {
  border-bottom-color: var(--line-soft) !important;
}

.border-start {
  border-left-color: var(--line-soft) !important;
}

.border-end {
  border-right-color: var(--line-soft) !important;
}

.btn-link {
  color: #FF9A9A;
}

.btn-sm {
  border-radius: 8px;
}

.btn-lg {
  border-radius: var(--radius-lg);
}

.btn-outline-danger.pool-item:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ================= 表单 ================= */
.form-label {
  color: var(--ink-2);
  font-size: .82rem;
  font-weight: 600;
}

.form-label.small {
  font-size: .72rem;
}

.form-control,
.form-select {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, .045);
  color: var(--ink);
  font-size: .9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(255, 99, 99, .55);
  background-color: rgba(255, 255, 255, .065);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 99, 99, .15);
}

.form-control::placeholder {
  color: var(--faint);
}

/* 生成页数字框去掉上下调节箭头，避免误触 */
#genForm input[type="number"]::-webkit-outer-spin-button,
#genForm input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#genForm input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.form-control:disabled,
.form-select:disabled {
  background-color: rgba(255, 255, 255, .025);
  color: var(--faint);
}

.form-text {
  color: var(--muted);
}

.form-range::-webkit-slider-thumb {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 99, 99, .12);
}

.form-range::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, .12);
}

.form-check-input {
  background-color: rgba(255, 255, 255, .12);
  border-color: var(--line);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.style-pool-block + .style-pool-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}

.style-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.style-choice {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.style-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .045);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
}

.style-choice:hover span {
  border-color: rgba(255, 99, 99, .45);
  color: var(--ink);
}

.style-choice input:checked + span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 14px rgba(255, 99, 99, .18);
}

.style-choice:active span {
  transform: scale(.98);
}

.style-add-input {
  margin-top: 10px;
}

select option {
  background: #17171A;
  color: #fff;
}

.input-group-text {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

/* ================= 表格 ================= */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--ink-2);
  --bs-table-border-color: var(--line-soft);
  --bs-table-striped-bg: rgba(255, 255, 255, .03);
  --bs-table-striped-color: var(--ink-2);
  --bs-table-active-bg: rgba(255, 255, 255, .05);
  --bs-table-active-color: var(--ink);
  --bs-table-hover-bg: rgba(255, 255, 255, .045);
  --bs-table-hover-color: var(--ink);
  color: var(--ink-2);
}

.table thead th,
.table-light,
.table > :not(caption) > * > * {
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  border-color: var(--line-soft);
}

.table-light {
  --bs-table-bg: rgba(255, 255, 255, .035);
  --bs-table-color: var(--muted);
  --bs-table-border-color: var(--line-soft);
}

.table thead th {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.table tbody {
  border-color: var(--line-soft);
}

.table > :not(caption) > * > * {
  background-color: transparent;
  box-shadow: none;
}

.table tbody tr:hover > * {
  background-color: rgba(255, 255, 255, .045);
  color: var(--ink);
}

.table td a {
  color: #FFB0B0;
}

.table .fw-bold {
  color: var(--ink);
}

.table-responsive {
  border-radius: var(--radius-md);
}

.table-bordered,
.table-bordered > :not(caption) > * {
  border-color: var(--line-soft);
}

/* ================= 列表 ================= */
.list-group {
  background: transparent;
}

.list-group-item {
  border-color: var(--line-soft);
  background: transparent;
  color: var(--ink-2);
}

.list-group-item.active {
  background: rgba(255, 99, 99, .16);
  border-color: var(--primary-line);
  color: #fff;
}

.list-group-item a {
  color: #FFB0B0;
}

.list-group-item a.text-white {
  color: #fff !important;
}

/* ================= 徽章 / 提示 ================= */
.badge {
  border-radius: 999px;
  font-weight: 600;
}

.badge.text-bg-secondary {
  background: rgba(255, 255, 255, .12) !important;
  color: var(--ink-2) !important;
}

.badge.text-bg-success {
  background: rgba(139, 224, 109, .18) !important;
  color: var(--success) !important;
}

.badge.text-bg-danger {
  background: var(--danger-soft) !important;
  color: var(--danger) !important;
}

.badge.bg-danger,
.badge.text-bg-danger {
  background: rgba(255, 99, 99, .16) !important;
  color: #FF9A9A;
}

.alert {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
}

.alert-warning {
  background: var(--warning-soft);
  border-color: rgba(250, 205, 91, .28);
  color: #FFE0A3;
}

.alert-danger {
  background: var(--danger-soft);
  border-color: var(--primary-line);
  color: #FFC2C2;
}

.alert-success {
  background: var(--success-soft);
  border-color: rgba(139, 224, 109, .3);
  color: #C7F5B4;
}

.alert-light,
.alert-light.border {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, .055) !important;
  color: var(--muted) !important;
}

.btn-close {
  filter: invert(1);
}

/* ================= 模态框 ================= */
.modal-content {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #17171A;
  color: var(--ink);
}

.modal-header,
.modal-footer {
  border-color: var(--line-soft);
}

.modal-title {
  color: var(--ink);
}

/* ================= Toast ================= */
#appToast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(23, 23, 26, .96);
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .42);
  padding: 9px 18px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 2000;
}

#appToast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ================= 登录页 ================= */
.login-wrap {
  min-height: calc(100dvh - 42px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.login-brand {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(255, 99, 99, .26);
}

.login-title {
  margin-top: 18px;
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
}

.login-sub {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 28px;
}

.login-card {
  width: min(100%, 360px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.login-card .form-control {
  min-height: 46px;
}

.login-hint {
  width: min(100%, 360px);
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
  padding: 13px 15px;
}

/* ================= 金额英雄区 ================= */
.amount-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(150deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .05));
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.amount-hero .amount-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.amount-hero .amount-label .pill {
  color: #FFB2B2;
  background: rgba(255, 99, 99, .14);
  border: 1px solid rgba(255, 99, 99, .26);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 9px;
  font-weight: 700;
}

.amount-hero .amount-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.amount-hero input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: clamp(40px, 8vw, 58px);
  font-weight: 700;
  letter-spacing: -.05em;
  padding: 0;
}

.amount-hero .unit {
  color: var(--muted);
  font-size: 13px;
}

.amount-hero .amount-tip {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 10px;
}

/* ================= 号码网格 ================= */
.number-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.num-cell {
  position: relative;
  cursor: pointer;
}

.num-cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.num-cell span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .045);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .12s ease;
  user-select: none;
}

.num-cell:hover span {
  border-color: rgba(255, 99, 99, .5);
  color: #fff;
}

.num-cell input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 5px 14px rgba(255, 99, 99, .18);
}

.num-cell:active span {
  transform: scale(.97);
}

.num-cell .zx-tag {
  display: block;
  font-style: normal;
  font-size: 8px;
  line-height: 1.1;
  color: var(--faint);
  margin-top: 3px;
  font-weight: 400;
}

.num-cell input:checked + span .zx-tag {
  color: rgba(255, 255, 255, .72);
}

.zodiac-bar .btn {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}

.btn-group .btn-outline-secondary {
  border-radius: 8px !important;
}

/* ================= 快捷按钮 / 选择器 ================= */
.btn-group-sm {
  gap: 4px;
}

.btn-group .btn {
  white-space: nowrap;
}

.zodiac-bar {
  scrollbar-width: none;
}

.badge.text-bg-secondary,
.badge.secondary {
  background: rgba(255, 255, 255, .1);
  color: var(--ink-2);
}

/* ================= 庄家行 / 生成结果 ================= */
.dealer-row {
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 10px;
}

.dealer-row .form-control-sm,
.dealer-row .form-select-sm {
  min-width: 0;
}

.actual-bar {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}

.drawer-head {
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, .03);
  border-radius: 10px 10px 0 0;
}

.line-row {
  border-top: 1px solid var(--line-soft);
}

.line-badge {
  flex-shrink: 0;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 5px;
  border-radius: 7px;
  background: rgba(255, 99, 99, .2);
  color: #FF9A9A;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy-line {
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: rgba(139, 224, 109, .2);
  color: var(--success);
  font-size: 11px;
  padding: 4px 11px;
}

.btn-copy-line.copied {
  background: rgba(255, 99, 99, .18);
  color: var(--danger);
}

.result-text,
.order-text,
.dealer-full-text {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  background: rgba(0, 0, 0, .2) !important;
  color: var(--ink-2) !important;
  font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.75;
  resize: vertical;
}

.result-text:focus,
.order-text:focus,
.dealer-full-text:focus {
  box-shadow: 0 0 0 3px rgba(255, 99, 99, .12) !important;
}

/* ================= 号码分布统计 ================= */
.dist-tab {
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
}

.dist-tab.active {
  background: var(--primary-soft);
  border-color: var(--primary-line);
  color: #FFB2B2;
}

.dist-scroll {
  overflow-x: auto;
}

.dist-shot {
  width: 1024px;
  padding: 10px;
  box-sizing: border-box;
  background: #FFFFFF;
  font-size: 22px;
  color: #111827;
}

.dist-shot.shot-min {
  min-height: auto;
}

.dist-table {
  width: 100%;
  border-collapse: collapse;
}

.dist-table thead th {
  background: #F3F4F6;
  color: #111827;
  border-bottom: 1px solid #D1D5DB;
  text-align: center;
  padding: 8px 6px;
  font-weight: 700;
  font-size: 1em;
}

.dist-table tbody td {
  vertical-align: top;
  padding: 2px 8px;
  border-bottom: 1px solid #D1D5DB;
}

.dist-table tbody td:not(:last-child) {
  border-right: 1px solid #D1D5DB;
}

.dist-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 2px 0;
}

.dist-num {
  font-family: Consolas, monospace;
  font-weight: 900;
  font-size: 1.3em;
  color: #111827;
}

.dist-zx {
  font-weight: 900;
  font-size: 1em;
  color: #111827;
}

.dist-empty {
  color: #6B7280;
}

.bose-red {
  color: #FF3B30 !important;
}

.bose-blue {
  color: #0A84FF !important;
}

.bose-green {
  color: #00C853 !important;
}

.amount-box {
  display: inline-block;
  min-width: 2.5em;
  text-align: center;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid #C4B5FD;
  background: #F5F3FF;
  color: #8B5CF6;
  font-family: Consolas, monospace;
  font-weight: 900;
  font-size: 1.05em;
  margin-left: 4px;
}

.dist-shot .dist-total .text-danger {
  color: #111827 !important;
}

.amount-box.kill {
  border-color: #FFD0A1;
  background: #FFF7ED;
  color: #FF8A00;
  font-weight: 800;
}

.dist-total {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #9CA3AF;
  color: #111827;
  font-weight: 800;
  font-size: 1.2em;
}

.dist-total .text-danger {
  color: #111827 !important;
}

.kill-row td {
  background: rgba(255, 99, 99, .14) !important;
}

.kill-row td.text-danger {
  color: #FFC9C9 !important;
  font-weight: 700;
}

.kill-row .badge.bg-danger {
  background: #E83939 !important;
  color: #fff !important;
}

/* ================= 设置页样式池 ================= */
.pool-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pool-item .pool-del {
  color: var(--danger);
  font-weight: 700;
}

/* ================= 移动端 ================= */
@media (max-width: 575.98px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .app-main {
    padding-top: 14px;
  }

  .row.g-4 {
    --bs-gutter-y: 1rem;
    --bs-gutter-x: 1rem;
  }

  .card-header,
  .card-body {
    padding-left: .9rem;
    padding-right: .9rem;
  }

  .btn-group .btn {
    font-size: 11px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .table > :not(caption) > * > * {
    font-size: .78rem;
  }

  .table td,
  .table th {
    white-space: nowrap;
  }

  /* 订单列表在小屏转卡片化 */
  .orders-mobile-list {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .navbar-text {
    display: none;
  }

  .num-cell span {
    min-height: 42px;
  }

  .order-list-table thead {
    display: none;
  }

  .order-list-table,
  .order-list-table tbody,
  .order-list-table tr,
  .order-list-table td {
    display: block;
    width: 100%;
  }

  .order-list-table tbody tr {
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
  }

  .order-list-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    padding: 8px 0;
    white-space: normal;
    text-align: right;
  }

  .order-list-table tbody td:last-child {
    border-bottom: 0;
  }

  .order-list-table tbody td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
  }

  .order-list-table tbody td.order-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (min-width: 992px) {
  .app-navbar .navbar-text {
    margin-right: 8px !important;
  }
}

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

/* 桌面订单列表仍保留为便于批量操作的紧凑结构 */
@media (min-width: 768px) {
  .order-list-table thead th {
    font-size: .74rem;
  }
}
