/* Iceyuan taste layer: restrained game-ops UI without changing templates. */
:root {
  --by-bg: #f6f8fc;
  --by-surface: rgba(255, 255, 255, 0.94);
  --by-surface-strong: #ffffff;
  --by-surface-soft: #f8fbff;
  --by-ink: #172033;
  --by-muted: #647084;
  --by-faint: #8b98aa;
  --by-line: rgba(23, 32, 51, 0.11);
  --by-line-strong: rgba(23, 32, 51, 0.18);
  --by-accent: #2864d8;
  --by-accent-2: #0f9aa7;
  --by-danger: #d9435f;
  --by-warning: #b87916;
  --by-success: #23805d;
  --by-radius: 8px;
  --by-shadow: 0 12px 32px rgba(32, 48, 80, 0.08);
  --by-shadow-soft: 0 8px 20px rgba(32, 48, 80, 0.06);
  --by-font: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --by-mono: "SFMono-Regular", "Cascadia Mono", "Consolas", monospace;
}

html {
  background: var(--by-bg);
}

body {
  color: var(--by-ink);
  background:
    linear-gradient(180deg, rgba(246, 248, 252, 0.96), rgba(241, 245, 251, 0.98)),
    var(--by-bg) !important;
  font-family: var(--by-font) !important;
  font-variant-numeric: tabular-nums;
}

body::before {
  animation: none !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 248, 252, 0.86)) !important;
}

.decor {
  opacity: 0.055 !important;
  filter: saturate(0.8);
  animation-duration: 18s !important;
}

.stars-wrap {
  display: none !important;
}

#main-content.container {
  width: min(100% - 24px, 1440px);
  max-width: 1440px;
  padding-top: 1rem;
  padding-bottom: 3rem;
}

@media (max-width: 576px) {
  #main-content.container {
    width: min(100% - 16px, 1440px);
    padding-top: 0.75rem;
  }
}

.navbar {
  position: sticky !important;
  top: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-width: 0 0 1px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.76)) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 30px rgba(32, 48, 80, 0.08);
}

.navbar .container {
  width: min(100% - 24px, 1440px);
  max-width: 1440px;
}

.navbar .navbar-brand {
  color: var(--by-ink) !important;
  font-weight: 800;
  letter-spacing: 0;
}

.navbar .navbar-brand i {
  color: var(--by-accent);
}

.btn-logout,
.navbar .dropdown .dropdown-toggle.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 34px;
  padding: 0.42rem 0.72rem !important;
  border: 1px solid transparent !important;
  border-radius: var(--by-radius);
  background: transparent !important;
  color: #31405b !important;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn-logout:hover,
.btn-logout:focus,
.navbar .dropdown .dropdown-toggle.btn-logout:hover,
.navbar .dropdown .dropdown-toggle.btn-logout:focus {
  color: var(--by-accent) !important;
  background: rgba(40, 100, 216, 0.08) !important;
  border-color: rgba(40, 100, 216, 0.16) !important;
  text-decoration: none;
}

.btn-logout:active,
.btn:active,
.ops-card:active,
.game-category-card:active {
  transform: translateY(1px) scale(0.995);
}

.navbar .navbar-toggler {
  color: var(--by-ink) !important;
  border-color: var(--by-line-strong) !important;
  background: rgba(255, 255, 255, 0.8) !important;
  border-radius: var(--by-radius) !important;
}

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

.dropdown-menu {
  border: 1px solid var(--by-line);
  border-radius: var(--by-radius) !important;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: var(--by-shadow);
}

.dropdown-header {
  color: var(--by-faint) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dropdown-item {
  border-radius: 6px;
  color: #243047 !important;
  font-weight: 550;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--by-accent) !important;
  background: rgba(40, 100, 216, 0.08) !important;
}

.card {
  border: 1px solid var(--by-line) !important;
  border-radius: var(--by-radius) !important;
  background: var(--by-surface) !important;
  box-shadow: var(--by-shadow-soft);
}

.card-header {
  border-bottom: 1px solid var(--by-line) !important;
  border-radius: var(--by-radius) var(--by-radius) 0 0 !important;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(241, 246, 252, 0.96)) !important;
  color: var(--by-ink) !important;
  font-weight: 800;
}

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

.shadow,
.shadow-sm {
  box-shadow: var(--by-shadow-soft) !important;
}

.btn {
  border-radius: var(--by-radius);
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn-primary {
  border-color: var(--by-accent) !important;
  background: var(--by-accent) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(40, 100, 216, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: #1f55bd !important;
  background: #1f55bd !important;
  color: #fff !important;
}

.btn-outline-primary {
  border-color: rgba(40, 100, 216, 0.35) !important;
  color: var(--by-accent) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  border-color: var(--by-accent) !important;
  background: rgba(40, 100, 216, 0.09) !important;
  color: #1f55bd !important;
}

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

.btn-warning {
  background: #f2b94b !important;
  border-color: #f2b94b !important;
  color: #332100 !important;
}

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

.form-control,
.form-select {
  border-radius: var(--by-radius);
  border-color: rgba(23, 32, 51, 0.16);
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--by-ink);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(40, 100, 216, 0.72);
  box-shadow: 0 0 0 0.2rem rgba(40, 100, 216, 0.14);
}

.form-label {
  color: #34415a;
  font-weight: 700;
}

.alert {
  border-radius: var(--by-radius);
  border-width: 1px;
  box-shadow: none;
}

.alert-info {
  color: #145064;
  border-color: rgba(15, 154, 167, 0.22) !important;
  background: rgba(15, 154, 167, 0.08) !important;
}

.alert-warning {
  color: #6f4c04;
  border-color: rgba(184, 121, 22, 0.25) !important;
  background: rgba(242, 185, 75, 0.14) !important;
}

.alert-danger {
  color: #7b1f35;
  border-color: rgba(217, 67, 95, 0.25) !important;
  background: rgba(217, 67, 95, 0.10) !important;
}

.alert-success {
  color: #135b41;
  border-color: rgba(35, 128, 93, 0.24) !important;
  background: rgba(35, 128, 93, 0.10) !important;
}

.table {
  color: var(--by-ink);
  --bs-table-hover-bg: rgba(40, 100, 216, 0.045);
}

.table thead th {
  border-bottom: 1px solid var(--by-line-strong) !important;
  color: #526075;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(246, 248, 252, 0.92);
}

.table tbody td {
  border-color: rgba(23, 32, 51, 0.075) !important;
  vertical-align: middle;
}

.badge {
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0;
}

code {
  font-family: var(--by-mono);
  color: #244575;
  background: rgba(40, 100, 216, 0.08);
  border-radius: 5px;
  padding: 0.08rem 0.28rem;
}

.page-hint {
  border-left: 3px solid var(--by-accent) !important;
}

.ops-board {
  gap: 0.85rem !important;
}

.ops-card {
  border-radius: var(--by-radius) !important;
  border: 1px solid var(--by-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96)) !important;
  box-shadow: var(--by-shadow-soft) !important;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ops-card:hover {
  transform: translateY(-2px);
  border-color: rgba(40, 100, 216, 0.28) !important;
  box-shadow: var(--by-shadow) !important;
}

.ops-icon {
  border-radius: var(--by-radius) !important;
}

.ops-count {
  color: var(--by-ink);
  letter-spacing: -0.01em;
}

.ops-title,
.ops-hint,
.text-muted {
  color: var(--by-muted) !important;
}

.game-category-card {
  border: 1px solid var(--by-line) !important;
  border-radius: var(--by-radius) !important;
  overflow: hidden;
  background: var(--by-surface-strong) !important;
  box-shadow: var(--by-shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.game-category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(40, 100, 216, 0.28) !important;
  box-shadow: var(--by-shadow);
  text-decoration: none;
}

.game-category-card .card-body {
  min-height: 150px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.94)) !important;
}

.game-icon-wrap {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-radius: var(--by-radius);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(23, 32, 51, 0.08);
}

.game-icon-img {
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}

.view-price-btn {
  margin-top: 0.75rem;
  border-radius: var(--by-radius) !important;
  font-size: 0.82rem;
  min-height: 34px;
}

.theme-switcher-fixed .btn {
  background: rgba(255, 255, 255, 0.88) !important;
  border: 1px solid var(--by-line) !important;
  color: #31405b !important;
  box-shadow: var(--by-shadow-soft) !important;
}

.mobile-bottom-nav {
  border-top: 1px solid var(--by-line) !important;
  background: rgba(255, 255, 255, 0.94) !important;
}

.mobile-nav-item {
  color: #526075 !important;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
  color: var(--by-accent) !important;
}

.mobile-nav-order {
  background: var(--by-accent) !important;
  box-shadow: 0 8px 20px rgba(40, 100, 216, 0.28) !important;
}

.flash-toast {
  border-radius: var(--by-radius) !important;
  box-shadow: var(--by-shadow) !important;
}

.announcement-bar {
  background: rgba(15, 154, 167, 0.10) !important;
  color: #145064 !important;
}

.floating-order-modal {
  border-radius: var(--by-radius) !important;
  border: 1px solid var(--by-line);
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.22) !important;
}

.floating-order-header,
.floating-order-footer {
  background: #f8fbff !important;
}

.customer-price-workbench .customer-price-shell {
  overflow: hidden;
}

.customer-price-workbench .customer-price-shell > .card-header {
  padding: 1.1rem 1.25rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.96) 52%, rgba(255, 241, 247, 0.92)) !important;
}

.customer-price-workbench .breadcrumb {
  font-size: 0.82rem;
}

.customer-price-workbench #searchTask,
.customer-price-workbench input[name="phone"] {
  min-width: 180px !important;
}

.customer-price-workbench .page-hint {
  background:
    linear-gradient(135deg, rgba(40, 100, 216, 0.08), rgba(15, 154, 167, 0.07)) !important;
}

.customer-price-workbench h3,
.customer-price-workbench h6 {
  color: var(--by-ink) !important;
  font-weight: 850;
}

.customer-price-workbench h3 i,
.customer-price-workbench h6 i {
  color: var(--by-accent) !important;
}

.customer-price-workbench .game-category-card .card-body {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.customer-price-workbench .game-category-card .card-body::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px 12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(40, 100, 216, 0.42), transparent);
}

.customer-price-workbench .game-section {
  overflow: hidden;
}

.customer-price-workbench .game-section > .card-header {
  background:
    linear-gradient(135deg, rgba(237, 246, 255, 0.98), rgba(255, 245, 250, 0.94)) !important;
  border-bottom: 1px solid var(--by-line) !important;
}

.customer-price-workbench .category-block h6 {
  background: #f8fbff !important;
  color: #46556e;
}

.customer-price-workbench .price-table-compact strong {
  color: #17335f;
}

.customer-price-workbench .btn-floating-order {
  white-space: nowrap;
}

.customer-price-workbench .game-jump-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid var(--by-line);
  border-radius: var(--by-radius);
  background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(245,249,255,0.94));
}

.customer-price-workbench .game-jump-label {
  margin-right: 0.35rem;
  color: #394963;
  font-size: 0.82rem;
  font-weight: 850;
}

.customer-price-workbench .game-jump-strip .btn {
  min-height: 32px;
  border-radius: 7px;
  background: #fff;
}

.customer-price-workbench .price-table-compact tbody tr {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.customer-price-workbench .price-table-compact tbody tr:hover {
  background: rgba(40, 100, 216, 0.055);
  box-shadow: inset 3px 0 0 rgba(40, 100, 216, 0.42);
}

.customer-price-workbench .price-table-compact td:first-child {
  font-weight: 750;
  color: #22314a;
}

.admin-ops-workbench .admin-ops-hero {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--by-line);
  border-radius: var(--by-radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.94) 50%, rgba(255, 245, 250, 0.88));
  box-shadow: var(--by-shadow-soft);
}

.admin-ops-workbench .admin-ops-kicker {
  color: var(--by-accent);
  font-family: var(--by-mono);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.admin-ops-workbench .admin-ops-hero h2 {
  color: var(--by-ink);
  font-weight: 880;
  letter-spacing: 0;
}

.admin-ops-workbench .admin-ops-hero h2 i {
  color: var(--by-accent);
}

.admin-ops-workbench .admin-ops-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.admin-ops-workbench .admin-ops-actions .btn {
  margin-right: 0 !important;
}

.admin-ops-workbench .row.mb-4.g-3 > [class*="col-"] > .card {
  border-left: 3px solid rgba(40, 100, 216, 0.28) !important;
}

.admin-ops-workbench .row.mb-4.g-3 h4 {
  color: var(--by-ink) !important;
  font-weight: 900;
}

.admin-ops-workbench .card-header .small {
  line-height: 1.55;
}

.admin-ops-workbench .admin-dashboard-orders-bleed .card {
  border-radius: 0 !important;
}

.admin-ops-workbench .admin-dashboard-orders-bleed .card-header {
  padding-left: max(1rem, calc((100vw - 1440px) / 2 + 1rem));
  padding-right: max(1rem, calc((100vw - 1440px) / 2 + 1rem));
}

.admin-ops-workbench .admin-dashboard-orders-bleed .card-body {
  padding-left: max(1rem, calc((100vw - 1440px) / 2 + 1rem));
  padding-right: max(1rem, calc((100vw - 1440px) / 2 + 1rem));
}

.admin-ops-workbench form.row.g-3 {
  row-gap: 0.85rem !important;
}

.admin-ops-workbench form .form-label {
  margin-bottom: 0.28rem;
  font-size: 0.78rem;
}

.admin-ops-workbench .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-ops-workbench .admin-order-row {
  position: relative;
}

.admin-ops-workbench .admin-order-row td:first-child {
  box-shadow: inset 3px 0 0 rgba(82, 96, 117, 0.22);
}

.admin-ops-workbench .admin-order-row.status-进行中 td:first-child {
  box-shadow: inset 3px 0 0 rgba(184, 121, 22, 0.65);
}

.admin-ops-workbench .admin-order-row.status-待验收 td:first-child,
.admin-ops-workbench .admin-order-row.status-待打手确认 td:first-child {
  box-shadow: inset 3px 0 0 rgba(40, 100, 216, 0.64);
}

.admin-ops-workbench .admin-order-row.status-纠纷中 td:first-child {
  box-shadow: inset 3px 0 0 rgba(217, 67, 95, 0.76);
}

.admin-ops-workbench .admin-order-row.status-已完成 td:first-child {
  box-shadow: inset 3px 0 0 rgba(35, 128, 93, 0.68);
}

.admin-ops-workbench .order-no-link {
  display: inline-flex;
  align-items: center;
  max-width: 12rem;
  padding: 0.2rem 0.42rem;
  border-radius: 6px;
  background: rgba(40, 100, 216, 0.07);
  color: #1f55bd;
  text-decoration: none;
}

.admin-ops-workbench .order-no-link:hover {
  background: rgba(40, 100, 216, 0.12);
  color: #173f91;
}

.admin-ops-workbench .money-cell {
  font-family: var(--by-mono);
  font-weight: 850;
  white-space: nowrap;
}

.admin-ops-workbench .money-customer {
  color: #17335f;
}

.admin-ops-workbench .money-player {
  color: #225c48;
}

.admin-ops-workbench .payqr-col {
  background: rgba(35, 128, 93, 0.06) !important;
}

@media (max-width: 768px) {
  .admin-ops-workbench .admin-ops-hero {
    display: block !important;
  }

  .admin-ops-workbench .admin-ops-actions {
    justify-content: flex-start;
    margin-top: 0.9rem;
  }

  .customer-price-workbench #searchTask,
  .customer-price-workbench input[name="phone"] {
    min-width: 100% !important;
  }
}

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