/* ===========================================================
   Offer有方 — 样式表
   主色 #3B82F6 → 深色 #2563EB / 辅助 #10B981 / 警示 #F59E0B
   =========================================================== */

:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  --secondary: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --sidebar-w: 256px;
  --sidebar-w-collapsed: 64px;
  --topnav-h: 56px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  font-size: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ================= 侧边栏 ================= */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: none;
  flex-direction: column;
  transition: width 0.3s ease;
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}

.sidebar-head {
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 73px;
}

.sidebar.collapsed .sidebar-head {
  justify-content: center;
  padding: 16px 8px;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  white-space: nowrap;
}

.brand-sub {
  font-size: 14px;
  color: var(--gray-500);
  margin: 4px 0 0;
  white-space: nowrap;
}

.sidebar.collapsed .brand {
  display: none;
}

.collapse-btn {
  padding: 8px;
  border-radius: 8px;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  transition: background 0.2s, transform 0.3s;
  flex: none;
}

.collapse-btn:hover {
  background: var(--gray-100);
}

.sidebar.collapsed .collapse-btn {
  transform: rotate(180deg);
}

.collapse-btn svg {
  width: 20px;
  height: 20px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow: hidden;
}

.side-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--gray-600);
  transition: background 0.2s, color 0.2s;
  font-size: 15px;
  white-space: nowrap;
}

.side-link:hover {
  background: var(--gray-100);
}

.side-link.active {
  background: var(--primary);
  color: #fff;
}

.side-link .ico {
  font-size: 20px;
  line-height: 1;
  flex: none;
  width: 20px;
  text-align: center;
}

.sidebar.collapsed .side-link {
  justify-content: center;
  padding: 12px 8px;
}

.sidebar.collapsed .side-link .lbl {
  display: none;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.sidebar.collapsed .sidebar-user {
  padding: 16px 8px;
}

.su-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar.collapsed .su-inner {
  justify-content: center;
}

.su-avatar-wrap {
  position: relative;
  flex: none;
}

.su-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--gray-200);
}

.su-vip {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
}

.su-name {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.su-role {
  font-size: 12px;
  color: var(--gray-500);
  margin: 0;
}

.su-expire {
  font-size: 12px;
  color: var(--warning);
  margin: 2px 0 0;
}

.sidebar.collapsed .su-meta {
  display: none;
}

/* ================= 顶部导航 ================= */
.topnav {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  background: #fff;
  box-shadow: var(--shadow-sm);
  z-index: 40;
  display: none;
}

.topnav-inner {
  max-width: 1152px;
  margin-right: auto;
  margin-left: var(--sidebar-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topnav-h);
  padding: 0 24px;
  transition: margin-left 0.3s ease;
}

html.collapsed .topnav-inner {
  margin-left: var(--sidebar-w-collapsed);
}

.topnav-links {
  display: flex;
  gap: 8px;
}

.pill {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 999px;
  color: var(--gray-600);
  transition: background 0.2s, color 0.2s;
}

.pill:hover {
  background: var(--gray-100);
}

.pill.active {
  background: var(--primary);
  color: #fff;
}

/* ================= 主区域 ================= */
.main {
  padding: 56px 16px 96px;
  max-width: 1152px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ================= Banner ================= */
.banner {
  position: relative;
  overflow: hidden;
  height: 176px;
  border-radius: 12px;
  background: var(--gray-200);
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.banner-slide {
  min-width: 100%;
  height: 100%;
}

.banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.banner-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gray-400);
  padding: 0;
  transition: background 0.2s;
}

.banner-dots button.active {
  background: var(--gray-600);
}

/* ================= 区块标题 ================= */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 24px 0 16px;
  padding: 0 16px;
}

/* ================= 筛选卡片 ================= */
.filter-card {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.filter-grid .col-wide {
  grid-column: span 2;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.field input,
.field select {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 38px;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
}

.field input::placeholder {
  color: var(--gray-400);
}

.filter-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.filter-count {
  font-size: 14px;
  color: var(--gray-500);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* 列筛选下拉 */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--gray-600);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.dropdown-toggle:hover {
  color: var(--primary);
  background: var(--gray-50);
}

.dropdown-toggle svg {
  width: 16px;
  height: 16px;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 192px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  padding: 8px;
}

.dropdown-menu[hidden] {
  display: none;
}

.dropdown-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 14px;
  color: var(--gray-700);
  border-radius: 4px;
  cursor: pointer;
}

.dropdown-menu label:hover {
  background: var(--gray-50);
}

.dropdown-menu input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ================= 按钮 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
  transition: background 0.2s, opacity 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  font-weight: 500;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}

.btn-ghost {
  background: var(--gray-100);
  color: var(--gray-600);
}

.btn-ghost:hover {
  background: var(--gray-200);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-primary {
  color: var(--primary);
  font-size: 14px;
}

.link-primary:hover {
  color: var(--primary-dark);
}

/* ================= 表格 ================= */
.table-card {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  overflow: hidden;
}

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

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

table.jobs thead {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

table.jobs thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 80px;
}

table.jobs thead th.center {
  text-align: center;
}

table.jobs thead th.w-name {
  min-width: 120px;
  white-space: normal;
}

table.jobs thead th.w-pos {
  min-width: 100px;
  white-space: normal;
}

table.jobs tbody tr {
  background: #fff;
  transition: background 0.2s;
}

table.jobs tbody tr:nth-child(even) {
  background: var(--gray-50);
}

table.jobs tbody tr:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), transparent);
}

table.jobs tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}

td .t-date {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

td .t-company {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}

td .t-link-blue,
td .t-link-green {
  font-size: 12px;
  text-decoration: underline;
  white-space: nowrap;
  background: none;
  padding: 0;
}

td .t-link-blue {
  color: #2563eb;
}

td .t-link-blue:hover {
  color: #1e40af;
}

td .t-link-green {
  color: #16a34a;
}

td .t-link-green:hover {
  color: #15803d;
}

td .t-text {
  font-size: 14px;
  color: var(--gray-600);
  white-space: nowrap;
}

td .t-pos {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
}

td .t-deadline {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

td .t-code {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--gray-600);
  white-space: nowrap;
}

td .t-remark {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

/* 胶囊标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 18px;
}

.chip i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex: none;
  display: inline-block;
}

.chip-blue {
  background: #eff6ff;
  color: #1d4ed8;
}
.chip-blue i {
  background: #3b82f6;
}

.chip-green {
  background: #f0fdf4;
  color: #15803d;
}
.chip-green i {
  background: #22c55e;
}

.chip-purple {
  background: #faf5ff;
  color: #7e22ce;
}
.chip-purple i {
  background: #a855f7;
}

.chip-orange {
  background: #fff7ed;
  color: #c2410c;
}
.chip-orange i {
  background: #f97316;
}

.chip-pink {
  background: #fdf2f8;
  color: #be185d;
}
.chip-pink i {
  background: #ec4899;
}

.chip-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.action-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-apply:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

/* 单元格悬浮提示 */
.cell-tip {
  position: relative;
}

.tooltip {
  position: fixed;
  z-index: 9999;
  padding: 8px 12px;
  background: var(--gray-800);
  color: #fff;
  font-size: 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-xl);
  white-space: pre-wrap;
  word-break: break-all;
  pointer-events: none;
  max-width: 380px;
}

/* ================= 分页 ================= */
.pager-card {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}

.pager-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pager-info {
  font-size: 14px;
  color: var(--gray-600);
}

.pager-info b {
  color: var(--primary);
  font-weight: 700;
}

.pager-size {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-600);
}

.pager-size select {
  padding: 6px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  outline: none;
  background: #fff;
}

.pager-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.pager-btns button {
  padding: 6px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  color: var(--gray-700);
  background: #fff;
  transition: border-color 0.2s, color 0.2s;
}

.pager-btns button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pager-btns button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pager-btns button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pager-pages {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pager-pages .ellipsis {
  padding: 0 8px;
  color: var(--gray-400);
}

.pager-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  font-size: 14px;
  color: var(--gray-500);
}

.pager-jump input {
  width: 56px;
  padding: 6px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  text-align: center;
  outline: none;
  font-size: 14px;
}

.pager-jump button {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
}

/* ================= 空状态 / 加载 ================= */
.empty {
  text-align: center;
  padding: 64px 0;
  color: var(--gray-500);
}

.empty p:first-child {
  font-size: 20px;
  margin: 0 0 8px;
}

.empty p:last-child {
  font-size: 14px;
  margin: 0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 80px 0;
  color: var(--gray-500);
  font-size: 14px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================= 攻略 ================= */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  transition: box-shadow 0.2s;
}

.guide-card:hover {
  box-shadow: var(--shadow-md);
}

.guide-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.guide-top h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 4px;
}

.guide-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.6;
}

.guide-price {
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}

.guide-bottom {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-500);
}

.guide-state {
  font-size: 12px;
  color: var(--gray-400);
}

.guide-state.viewed {
  color: var(--secondary);
}

.guide-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.guide-state {
  flex: none;
}

/* ================= 个人中心 ================= */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--gray-800);
}

.user-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.user-head .avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--gray-200);
}

.user-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-head p {
  margin: 0;
  font-size: 13px;
  color: var(--gray-500);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--gray-200);
  font-size: 14px;
}

.kv:last-of-type {
  border-bottom: 0;
}

.kv .k {
  color: var(--gray-500);
}

.kv .v {
  font-weight: 500;
  text-align: right;
}

.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #7c2d12;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}

.price-tag {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.price-tag small {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
}

.benefits {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 8px;
}

.benefits li {
  font-size: 14px;
  color: var(--gray-600);
  display: flex;
  gap: 8px;
}

.benefits li::before {
  content: "✓";
  color: var(--secondary);
  font-weight: 700;
}

.activate-row {
  display: flex;
  gap: 8px;
}

.activate-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  outline: none;
}

.activate-row input:focus {
  border-color: var(--primary);
}

.invite-box {
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: var(--gray-600);
  word-break: break-all;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.hint {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 12px;
}

/* ================= 弹层 ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  animation: slideDown 0.25s ease-out;
  max-height: 92vh;
  overflow-y: auto;
}

.login-card,
.pay-card,
.qr-card {
  max-width: 360px;
  text-align: center;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 24px;
  line-height: 1;
  color: var(--gray-400);
  padding: 4px 8px;
  border-radius: 8px;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.modal-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 16px;
}

.qr-box {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.qr-box canvas {
  width: 200px;
  height: 200px;
  display: block;
}

.qr-mask {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
}

.qr-mask[hidden] {
  display: none;
}

.qr-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.qr-loading[hidden] {
  display: none;
}

.qr-tip {
  font-size: 12px;
  color: var(--gray-500);
  margin: 12px 0;
}

.login-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray-400);
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pay-amount {
  font-size: 14px;
  color: var(--gray-600);
  margin: 12px 0 4px;
}

.pay-amount strong {
  color: var(--danger);
  font-size: 18px;
}

.form-row {
  margin-bottom: 14px;
  text-align: left;
}

.form-row label {
  display: block;
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  outline: none;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.detail-address {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: var(--gray-600);
  text-align: left;
  word-break: break-all;
  line-height: 1.7;
  margin-bottom: 14px;
}

/* ================= Toast ================= */
.toasts {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  color: #fff;
  font-size: 14px;
  animation: slideDown 0.3s ease-out;
  white-space: nowrap;
}

.toast.success {
  background: var(--secondary);
}

.toast.error {
  background: var(--danger);
}

.toast.info {
  background: var(--gray-700);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ================= 响应式 ================= */
@media (min-width: 640px) {
  .main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .filter-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .pager-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
  }

  .topnav {
    display: block;
  }

  .tabbar,
  .mobile-bar {
    display: none;
  }

  .main {
    margin-left: var(--sidebar-w);
    padding: 80px 24px 48px;
    transition: margin-left 0.3s ease;
  }

  html.collapsed .main {
    margin-left: var(--sidebar-w-collapsed);
  }

  .banner {
    height: 224px;
  }

  .filter-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .filter-grid .col-wide {
    grid-column: span 1;
  }

  .profile-grid {
    grid-template-columns: 1fr 1fr;
  }

  .profile-grid .span-2 {
    grid-column: span 2;
  }
}

@media (min-width: 1280px) {
  .filter-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

@media (max-width: 1023px) {
  .tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 64px;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-around;
  }

  .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 100%;
    font-size: 12px;
    color: var(--gray-500);
  }

  .tab.active {
    color: var(--primary);
  }

  .tab span:first-child {
    font-size: 20px;
  }

  .mobile-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 45;
    height: 40px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
  }

  .mobile-login {
    font-size: 13px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--primary);
    padding: 4px 12px;
    border-radius: 999px;
  }

  .main {
    padding-top: 56px;
  }

  .section-title {
    padding: 0;
  }
}
