/* ====================================================================
   国匠名酒回收综合服务管理系统 - Web 运营后台样式表
   配色：东方深邃藏青 (#050E1F ~ #0B1B3D) + 尊贵香槟金 (#C5A365) + 工业级清爽中后台
   ==================================================================== */

:root {
  --bg-dark: #071124;
  --bg-card: #0d1b38;
  --bg-card-light: #13244a;
  --gold-primary: #C5A365;
  --gold-hover: #DFBF83;
  --gold-dark: #9E7D42;
  --text-main: #FFFFFF;
  --text-muted: #8E9BAE;
  --text-dim: #5C6B82;
  --border-color: rgba(197, 163, 101, 0.22);
  --border-light: rgba(255, 255, 255, 0.08);
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 顶部导航 Header */
.admin-header {
  height: 68px;
  background: linear-gradient(90deg, #050E1F 0%, #0c1c3e 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  color: #050E1F;
  box-shadow: 0 4px 12px rgba(197, 163, 101, 0.3);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--gold-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.api-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}

.api-status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid var(--border-light);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--gold-primary);
}

/* 主工作区布局 */
.admin-container {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 侧边栏 Sidebar */
.admin-sidebar {
  width: 240px;
  background: #09152b;
  border-right: 1px solid var(--border-light);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
}

.nav-item:hover {
  background: rgba(197, 163, 101, 0.08);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(197, 163, 101, 0.22) 0%, rgba(197, 163, 101, 0.04) 100%);
  color: var(--gold-primary);
  font-weight: 600;
  border-left: 3px solid var(--gold-primary);
}

.nav-item .icon {
  font-size: 18px;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
}

/* 主内容 Content */
.admin-main {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 顶部核心指标 KPI 卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-primary);
}

.kpi-title {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  font-family: "DIN Alternate", "Segoe UI", sans-serif;
}

.kpi-value.gold {
  color: var(--gold-primary);
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* 通用板块 Card */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--gold-primary);
  border-radius: 2px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 按钮通用 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
  color: #050E1F;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(197, 163, 101, 0.25);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-hover) 0%, var(--gold-primary) 100%);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--gold-primary);
}

.btn-outline:hover {
  background: rgba(197, 163, 101, 0.1);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--success);
}

.btn-success:hover {
  background: rgba(16, 185, 129, 0.28);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* 表格通用 Table */
.data-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background: #09152e;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: #e2e8f0;
  vertical-align: middle;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* 行内可编辑输入框 */
.table-input {
  background: #071124;
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  width: 100%;
  max-width: 130px;
  transition: border-color 0.2s;
}

.table-input:focus {
  border-color: var(--gold-primary);
  outline: none;
  background: #0a1733;
}

/* 状态徽章 */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pill.pickup {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.cancelled {
  background: rgba(142, 155, 174, 0.15);
  color: var(--text-dim);
  border: 1px solid rgba(142, 155, 174, 0.3);
}

/* 弹窗 Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.show,
.modal-overlay[style*="display: flex"] {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 540px;
  max-width: 90vw;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  color: #fff;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-input, .form-select {
  background: #071124;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}

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

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

/* Toast 提示 */
.toast-container {
  position: fixed;
  top: 24px;
  right: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  background: #0f244c;
  color: #fff;
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: 13px;
  animation: slide-in 0.3s ease;
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ====================================================================
   全屏登录拦截层与改密模态框样式
   ==================================================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, #0F234D 0%, #050E1F 100%);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 440px;
  max-width: 92vw;
  background: linear-gradient(145deg, #0d1b38 0%, #09142b 100%);
  border: 1px solid rgba(197, 163, 101, 0.35);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(197, 163, 101, 0.12);
  padding: 36px 32px;
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-badge-large {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F5DCA3 0%, #C5A365 100%);
  color: #0B1B3D;
  font-size: 26px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 6px 18px rgba(197, 163, 101, 0.4);
}

.login-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.login-header p {
  font-size: 11px;
  color: var(--gold-primary);
  letter-spacing: 1px;
  margin-top: 6px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.7;
}

.input-with-icon .form-input {
  padding-left: 38px;
  width: 100%;
}

.login-error-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  color: #FCA5A5;
  font-size: 12px;
  line-height: 1.4;
}

.login-tip {
  margin-top: 20px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(197, 163, 101, 0.3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.login-tip code {
  color: var(--gold-primary);
  background: rgba(197, 163, 101, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
}

.sidebar-bottom-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item-danger {
  color: #F87171 !important;
}

.nav-item-danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #EF4444 !important;
}

/* ====================================================================
   订单全景详情与名酒照片展示画廊
   ==================================================================== */
.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 18px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.order-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-detail-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-detail-val {
  font-size: 13px;
  color: #fff;
  font-weight: 500;
  word-break: break-all;
}

/* 照片展示画廊 */
.order-photos-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.order-photos-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.order-photo-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(197, 163, 101, 0.3);
  background: #060D1C;
  cursor: pointer;
  transition: all 0.25s ease;
}

.order-photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(197, 163, 101, 0.3);
  border-color: var(--gold-primary);
}

.order-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.order-photo-card:hover img {
  transform: scale(1.06);
}

.order-photo-card .photo-zoom-icon {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.order-photos-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-light);
}

/* 高清图片大图查看器 Lightbox */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}

.image-lightbox.show {
  display: flex !important;
}

.image-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(197, 163, 101, 0.4);
  cursor: default;
}

/* ===================================================
   运营素材与配置中心样式
   =================================================== */
.settings-form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 14px;
}

.settings-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.settings-card-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.settings-badge {
  background: rgba(197, 163, 101, 0.15);
  color: var(--gold-primary);
  border: 1px solid rgba(197, 163, 101, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.settings-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.preview-box-container {
  margin-top: 14px;
  background: #060D1A;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.preview-label {
  font-size: 11px;
  color: var(--gold-primary);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.preview-banner-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #0A162B;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.preview-banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-qrcode-wrap {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.preview-qrcode-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}



