/* 中泓全生态易货商城管理后台 - 专业UI设计系统 */

/* ===== CSS 变量 ===== */
:root {
  /* 品牌主色 - 深蓝渐变体系 */
  --color-primary: #003153;
  --color-primary-dark: #002440;
  --color-primary-light: #004a7a;
  --color-accent: #36B37E;

  /* 渐变 */
  --gradient-brand: linear-gradient(135deg, #002440 0%, #003153 50%, #004a7a 100%);
  --gradient-header: linear-gradient(180deg, #002440 0%, #003153 100%);

  /* 中性色 */
  --color-bg: #F5F7FA;
  --color-bg-card: #ffffff;
  --color-border: #E8EDF3;
  --color-border-light: #F1F5F9;
  --color-text-primary: #1F2A37;
  --color-text-secondary: #4B5563;
  --color-text-muted: #9AA4B2;

  /* 状态色 */
  --color-success: #36B37E;
  --color-warning: #FF7D00;
  --color-error: #EF4444;
  --color-info: #2563eb;

  /* 功能色 */
  --color-purple: #8B5CF6;
  --color-orange: #F97316;
  --color-teal: #14B8A6;
  --color-pink: #EC4899;

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 8px rgba(0,49,83,0.08);
  --shadow-hover: 0 4px 16px rgba(0,49,83,0.1);

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--color-text-primary);
  background: var(--color-bg);
  line-height: 1.5;
}

.status-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
}

.success-banner {
  color: #17694a;
  background: rgba(54, 179, 126, 0.12);
  border: 1px solid rgba(54, 179, 126, 0.28);
}

.error-banner {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.26);
}

/* ===== 登录页面 ===== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--gradient-brand);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
  will-change: transform;
}

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

.login-card {
  background: white;
  padding: 48px 40px;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 420px;
  position: relative;
  z-index: 1;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.login-subtitle {
  font-size: 13px;
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.login-form .form-field {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text-primary);
  transition: border-color 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.login-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  align-items: end;
  gap: 12px;
}

.login-captcha-row input {
  flex: 1;
}

.login-captcha-button {
  width: 136px;
  height: 44px;
  padding: 0;
  border: 1px dashed rgba(0, 49, 83, 0.24);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(0, 49, 83, 0.08), rgba(255, 125, 0, 0.08));
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.login-captcha-button.disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-captcha-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-captcha-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.login-captcha-tip {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.login-button {
  width: 100%;
  padding: 13px;
  background: var(--gradient-brand);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  box-shadow: 0 4px 12px rgba(0,49,83,0.3);
}

.login-button:hover {
  opacity: 0.9;
}

/* ===== 管理后台布局 ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== 顶部导航 ===== */
.admin-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--gradient-header);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 220px;
  flex-shrink: 0;
}

.header-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.header-brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.header-brand-name {
  color: white;
  font-size: 15px;
  font-weight: 700;
}

.header-brand-name small {
  display: block;
  font-size: 10px;
  opacity: 0.55;
  font-weight: 400;
}

.header-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.header-breadcrumb span {
  color: rgba(255,255,255,0.85);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

.btn-text {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.btn-text:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* ===== 侧边栏 ===== */
.admin-sidebar {
  position: fixed;
  top: 56px;
  left: 0;
  bottom: 0;
  width: 220px;
  background: white;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  z-index: 100;
}

.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.sidebar-header h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  padding: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.nav-item.active {
  background: #EEF4FF;
  color: var(--color-primary);
  font-weight: 600;
}

/* ===== 主内容区 ===== */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 220px;
  margin-top: 56px;
}

.admin-content {
  flex: 1;
  padding: 24px;
  min-height: calc(100vh - 56px);
}

/* ===== 页面容器 ===== */
.page-container {
  max-width: 1400px;
}

.page-container h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 20px;
}

/* ===== 卡片 ===== */
.content-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.card-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.card-head::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gradient-brand);
  border-radius: 2px;
  display: inline-block;
}

/* ===== 筛选区 ===== */
.audit-filter-grid {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-input,
.filter-select {
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 13px;
  color: var(--color-text-primary);
  outline: none;
  background: white;
  min-width: 160px;
  transition: border-color 0.2s;
}

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

.audit-filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ===== 按钮 ===== */
.primary-cta,
.inline-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  background: var(--color-primary);
  color: white;
}

.primary-cta:hover,
.inline-cta:hover {
  background: var(--color-primary-light);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: white;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition: all 0.15s;
}

.ghost-button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-primary {
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

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

.btn-secondary {
  padding: 8px 16px;
  background: white;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: var(--color-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  padding: 2px 0;
  font-size: 12px;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* ===== 表格 ===== */
.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

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

thead th {
  background: #F8FAFC;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 13px;
  color: var(--color-text-secondary);
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: #FAFBFC;
}

tbody tr:hover td {
  background: #F0F4F8;
  transition: background 0.2s;
}

tbody tr:last-child td {
  border-bottom: none;
}

.goods-table-wrap {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
}

.goods-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

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

.goods-table td {
  overflow: visible;
  text-overflow: clip;
}

.goods-table [data-col="actions"] {
  position: sticky;
  right: 0;
  z-index: 2;
  overflow: visible;
  background: #fff;
  box-shadow: inset 1px 0 0 #CBD5E1, -14px 0 22px rgba(15, 23, 42, 0.24), -2px 0 0 rgba(100, 116, 139, 0.38);
}

.goods-table thead [data-col="actions"] {
  z-index: 3;
  background: #F8FAFC;
}

.goods-table tbody tr:nth-child(even) [data-col="actions"] {
  background: #FAFBFC;
}

.goods-table tbody tr:hover [data-col="actions"] {
  background: #F0F4F8;
}

.goods-cell-text {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.goods-table [data-col="id"] .goods-cell-text {
  overflow: visible;
  text-overflow: clip;
}

.goods-table-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.goods-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.goods-row-actions .btn-link {
  flex: 0 0 auto;
}

.goods-action-spacer {
  color: var(--color-text-muted);
  font-size: 12px;
}

.operation-log-table {
  table-layout: fixed;
}

.operation-log-cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-table-wrap {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
}

.order-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

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

.order-table td {
  overflow: visible;
  text-overflow: clip;
}

.order-table [data-col="actions"] {
  position: sticky;
  right: 0;
  z-index: 2;
  overflow: visible;
  background: #fff;
  box-shadow: inset 1px 0 0 #CBD5E1, -14px 0 22px rgba(15, 23, 42, 0.24), -2px 0 0 rgba(100, 116, 139, 0.38);
}

.order-table thead [data-col="actions"] {
  z-index: 3;
  background: #F8FAFC;
}

.order-table tbody tr:nth-child(even) [data-col="actions"] {
  background: #FAFBFC;
}

.order-table tbody tr:hover [data-col="actions"] {
  background: #F0F4F8;
}

.order-cell-text {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.order-table-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.order-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.order-row-actions .btn-link {
  flex: 0 0 auto;
}

.order-goods-image-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.order-goods-image-group {
  padding: 12px;
  background: var(--color-bg-secondary);
  border-radius: 6px;
}

.order-goods-image-title {
  margin-bottom: 10px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.order-goods-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-goods-image-thumb {
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.order-goods-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.order-goods-image-thumb:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.order-goods-image-preview-mask {
  z-index: 1200;
  background: rgba(15, 23, 42, 0.72);
}

.order-goods-image-preview-panel {
  width: min(92vw, 1040px);
  max-height: 92vh;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,0.36);
}

.order-goods-image-preview-body {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(92vh - 92px);
  overflow: auto;
  background: #0F172A;
  border-radius: 10px;
  padding: 12px;
}

.order-goods-image-preview-body img {
  max-width: 100%;
  max-height: calc(92vh - 120px);
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.goods-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.goods-detail-section .detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  background: var(--color-bg-secondary);
  border-radius: 6px;
}

.goods-detail-section .detail-item > span:first-child {
  min-width: 90px;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.goods-detail-section .detail-item > span:last-child {
  color: var(--color-text);
  font-weight: 500;
  word-break: break-word;
  white-space: pre-wrap;
}

.goods-detail-text-block {
  align-items: flex-start;
  margin-top: 16px;
}

.order-row-actions .order-action-warning {
  color: #D97706;
}

.order-row-actions .order-action-warning:hover {
  color: #B45309;
}

.order-action-slot {
  flex: 0 0 58px;
  display: inline-flex;
  align-items: center;
}

.order-review-action-slot {
  flex-basis: 132px;
  gap: 10px;
}

.order-action-slot-empty {
  height: 1px;
}

.order-cell-muted {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.bean-account-table-wrap {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
}

.bean-account-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

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

.bean-account-table td {
  overflow: visible;
  text-overflow: clip;
}

.bean-account-table [data-col="actions"] {
  position: sticky;
  right: 0;
  z-index: 2;
  overflow: visible;
  background: #fff;
  box-shadow: inset 1px 0 0 #CBD5E1, -14px 0 22px rgba(15, 23, 42, 0.24), -2px 0 0 rgba(100, 116, 139, 0.38);
}

.bean-account-table thead [data-col="actions"] {
  z-index: 3;
  background: #F8FAFC;
}

.bean-account-table tbody tr:nth-child(even) [data-col="actions"] {
  background: #FAFBFC;
}

.bean-account-table tbody tr:hover [data-col="actions"] {
  background: #F0F4F8;
}

.bean-account-cell-text {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.bean-account-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.bean-account-row-actions .btn-link {
  flex: 0 0 auto;
}

.inventory-flow-table-wrap,
.bean-flow-table-wrap,
.shipment-record-table-wrap {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
}

.inventory-flow-table,
.bean-flow-table,
.shipment-record-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

.inventory-flow-table th,
.inventory-flow-table td,
.bean-flow-table th,
.bean-flow-table td,
.shipment-record-table th,
.shipment-record-table td {
  white-space: nowrap;
}

.inventory-flow-table td,
.bean-flow-table td,
.shipment-record-table td {
  overflow: visible;
  text-overflow: clip;
}

.inventory-flow-cell-text,
.bean-flow-cell-text,
.shipment-record-cell-text {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.shipment-record-table [data-col="actions"] {
  position: sticky;
  right: 0;
  z-index: 2;
  overflow: visible;
  background: #fff;
  box-shadow: -14px 0 22px rgba(15, 23, 42, 0.24), -2px 0 0 rgba(100, 116, 139, 0.38);
}

.shipment-record-table thead [data-col="actions"] {
  z-index: 3;
  background: #F8FAFC;
}

.shipment-record-table tbody tr:nth-child(even) [data-col="actions"] {
  background: #FAFBFC;
}

.shipment-record-table tbody tr:hover [data-col="actions"] {
  background: #F0F4F8;
}

.shipment-record-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.shipment-record-row-actions .btn-link {
  flex: 0 0 auto;
}

/* ===== 状态标签 ===== */
.status-badge,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tone-success,
.tag-success {
  background: #D1FAE5;
  color: #065F46;
}

.tone-warning,
.tag-warning {
  background: #FEF3C7;
  color: #92400E;
}

.tone-danger,
.tag-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.tone-info,
.tag-info {
  background: #DBEAFE;
  color: #1E40AF;
}

.tone-order-pending {
  background: #FEF3C7;
  color: #92400E;
}

.tone-order-shipped {
  background: #DBEAFE;
  color: #1D4ED8;
}

.tone-after-review {
  background: #EDE9FE;
  color: #5B21B6;
}

.tone-order-finished {
  background: #D1FAE5;
  color: #065F46;
}

.tone-after-refunded {
  background: #CFFAFE;
  color: #155E75;
}

.tone-default,
.tag-default {
  background: #F1F5F9;
  color: #64748B;
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

.pagination-info {
  font-size: 13px;
  color: var(--color-text-muted);
}

.pagination-btns {
  display: flex;
  gap: 4px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: all 0.15s;
}

.page-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.page-btn:hover:not(.active) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== 弹窗 ===== */
.password-modal-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.password-modal-mask.is-hidden {
  display: none;
}

.password-modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

.password-modal .card-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.close-modal-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.close-modal-btn:hover {
  background: var(--color-bg);
  color: var(--color-text-primary);
}

.modal-tip {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

/* ===== 表单 ===== */
.login-form,
.compact-form {
  width: 100%;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field span {
  display: block;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.field-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--color-text-primary);
  background: white;
  outline: none;
  transition: border-color 0.2s;
}

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

.field-input:read-only {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.field-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

/* ===== 空状态 ===== */
.section-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
  text-align: center;
  font-size: 13px;
}

/* ===== 占位页面 ===== */
.placeholder-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.placeholder-content {
  text-align: center;
}

.placeholder-content h2 {
  font-size: 24px;
  color: var(--color-text-primary);
  margin-bottom: 10px;
}

.placeholder-content p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ===== 订单详情 ===== */
.detail-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border-light);
}

.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-section h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 16px;
}

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

.detail-item {
  display: flex;
  align-items: flex-start;
}

.detail-label {
  color: var(--color-text-muted);
  min-width: 100px;
  flex-shrink: 0;
  font-size: 13px;
}

.detail-value {
  color: var(--color-text-secondary);
  word-break: break-all;
  font-size: 13px;
}

/* ===== 筛选区（订单页面）===== */
.filter-section {
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-row .field-input {
  flex: 1;
  min-width: 150px;
}

.filter-row button {
  flex-shrink: 0;
}

/* ===== 个人中心 ===== */
.profile-section {
  background: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.profile-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--color-text-primary);
}

/* ===== 统计卡片 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  cursor: pointer;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

/* ===== 工作台卡片 ===== */
.audit-table-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 16px;
}

/* ===== 工作台布局 ===== */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.metric-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  cursor: pointer;
}

.metric-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.todo-section {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 20px;
}

.todo-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--color-text-primary);
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text-secondary);
  transition: background 0.2s;
  cursor: pointer;
}

.todo-item:hover {
  background: #EEF4FF;
}

.todo-count {
  color: white;
  font-size: 12px;
  font-weight: 600;
}

/* ===== 页面头部 ===== */
.page-header {
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* ===== 表格容器 ===== */
.table-container {
  overflow-x: auto;
  margin-top: 16px;
}

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

.data-table thead th {
  background: #F8FAFC;
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 13px;
  color: var(--color-text-secondary);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: #FAFBFC;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== 弹窗关闭按钮 ===== */
.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--color-bg);
  color: var(--color-text-primary);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-main {
    margin-left: 0;
  }

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

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

  .goods-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 图片上传 ===== */
.image-upload-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.image-upload-item {
  position: relative;
  width: 100px;
  height: 100px;
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
  overflow: hidden;
}

.image-upload-item:hover {
  border-color: var(--color-primary);
}

.image-upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--color-text-muted);
  font-size: 12px;
}

.image-upload-btn::before {
  content: '+';
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.image-preview {
  position: relative;
  width: 100px;
  height: 100px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: var(--color-error);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
}

.image-preview:hover .image-delete-btn {
  opacity: 1;
}

.image-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.image-full {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
