/* ============================================================
   AGC 鉴真 Admin - Desktop Styles
   ============================================================ */
:root {
  --ink-900: #050b1a;
  --ink-800: #0a1530;
  --ink-700: #0e1f3f;
  --ink-600: #152b56;
  --ink-500: #1e3a72;
  --ink-400: #2a4d8f;
  --gold-100: #fbf3d9;
  --gold-200: #f1de9f;
  --gold-300: #e6c870;
  --gold-400: #d4af37;
  --gold-500: #b8902a;
  --gold-600: #8c6c1d;
  --silver-100: #f0f2f7;
  --silver-200: #d8dde9;
  --silver-300: #b3bccf;
  --silver-400: #8a96ad;
  --surface-0: #f7f8fc;
  --surface-1: #ffffff;
  --surface-2: #f0f3f9;
  --surface-3: #e6ecf5;
  --text-primary: #0a1530;
  --text-secondary: #4a5878;
  --text-muted: #8a96ad;
  --success: #2d8a6b;
  --danger:  #c43d4b;
  --warning: #d98c2b;
  --shadow-sm: 0 2px 8px rgba(10,21,48,0.06);
  --shadow-md: 0 8px 24px rgba(10,21,48,0.10);
  --shadow-lg: 0 20px 50px rgba(10,21,48,0.16);
  --shadow-gold: 0 8px 30px rgba(212,175,55,0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(ellipse at top left, rgba(212,175,55,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(30,58,114,0.05) 0%, transparent 50%),
    #f4f6fb;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 100%);
  padding: 28px 20px;
  color: white;
  position: relative;
}
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-400), transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  padding: 0 6px;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-900);
  box-shadow: 0 4px 12px rgba(212,175,55,0.4);
}
.brand-text .cn {
  font-size: 14px; font-weight: 600; letter-spacing: 0.1em; line-height: 1.2;
}
.brand-text .en {
  font-size: 9px; font-style: italic; color: var(--gold-300);
  letter-spacing: 0.2em; text-transform: uppercase;
  font-family: 'Cormorant Garamond', serif;
}

.nav-label {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin: 24px 6px 12px;
  text-transform: uppercase;
}
.nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--silver-200);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.nav li:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}
.nav li.active {
  background: linear-gradient(90deg, rgba(212,175,55,0.15) 0%, transparent 100%);
  color: var(--gold-300);
}
.nav li.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--gold-400);
  border-radius: 0 2px 2px 0;
}
.nav li .icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.nav li.active .icon { opacity: 1; color: var(--gold-300); }

.sidebar-footer {
  position: absolute;
  bottom: 24px; left: 20px; right: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-800);
  font-weight: 600;
  font-size: 13px;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 12px; font-weight: 500; color: white; }
.user-role {
  font-size: 10px;
  color: var(--silver-300);
  letter-spacing: 0.1em;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
}

/* Main */
.main {
  background: var(--surface-0);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  background: white;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--surface-3);
}
.topbar h1 {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-800);
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar h1 .accent { color: var(--gold-500); }
.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.breadcrumb .sep { margin: 0 8px; color: var(--silver-300); }
.breadcrumb .current { color: var(--text-secondary); }

.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink-800); }
.icon-btn .badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--danger);
  border-radius: 50%;
}
.icon-btn.primary {
  background: var(--ink-800);
  color: white;
  width: auto;
  padding: 0 14px;
  gap: 6px;
  font-size: 13px;
}
.icon-btn.primary:hover { background: var(--ink-700); }

.content {
  flex: 1;
  padding: 28px 32px;
}

/* Form card */
.form-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-3);
  overflow: hidden;
}
.form-card-head {
  padding: 20px 28px;
  border-bottom: 1px solid var(--surface-3);
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-card-head .icon-wrap {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-500);
}
.form-card-head h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-800);
}
.form-card-head .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  margin-left: auto;
  text-transform: uppercase;
}
.form-body { padding: 32px 28px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-field label .req { color: var(--danger); font-weight: 600; }
.form-field .hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.form-input, .form-textarea {
  height: 42px;
  border: 1px solid var(--surface-3);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  background: white;
  transition: all 0.2s;
  color: var(--text-primary);
  width: 100%;
}
.form-textarea {
  height: 80px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}
.form-input.mono, .form-textarea.mono {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  letter-spacing: 0.05em;
}

.upload-area {
  border: 2px dashed var(--surface-3);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  background: var(--surface-0);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.upload-area:hover {
  border-color: var(--gold-400);
  background: rgba(212,175,55,0.04);
}
.upload-area.has-image {
  border-style: solid;
  border-color: var(--gold-400);
  background: white;
  padding: 12px;
}
.upload-area .upload-icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-500);
}
.upload-area .upload-title {
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.upload-area .upload-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.upload-area .upload-spec {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.1em;
}
.upload-area .preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}
.upload-area .preview-info {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.upload-area .preview-info .replace {
  color: var(--gold-500);
  font-weight: 500;
  cursor: pointer;
  margin-left: 8px;
}
.upload-area input[type="file"] { display: none; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-3);
  margin-top: 8px;
}

.btn {
  height: 42px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}
.btn-primary {
  background: linear-gradient(135deg, var(--ink-700) 0%, var(--ink-800) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(10,21,48,0.25);
  position: relative;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid var(--gold-400);
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10,21,48,0.35);
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-500) 100%);
  color: var(--ink-800);
  box-shadow: 0 4px 12px rgba(212,175,55,0.35);
  font-weight: 600;
}
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--surface-3);
}
.btn-secondary:hover { background: var(--surface-3); }
.btn-danger {
  background: rgba(196,61,75,0.1);
  color: var(--danger);
  border: 1px solid rgba(196,61,75,0.3);
}
.btn-danger:hover { background: rgba(196,61,75,0.18); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: white;
  border: 1px solid var(--surface-3);
  border-radius: 10px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-card:hover::before { opacity: 1; }
.stat-card .label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-card .value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink-800);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .value .unit {
  font-size: 16px;
  color: var(--text-muted);
  margin-left: 4px;
  font-weight: 500;
}

/* Table */
.table-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--surface-3);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table-toolbar {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--surface-3);
  background: var(--surface-0);
}
.search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
}
.search-input-wrap .icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-input-wrap input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--surface-3);
  border-radius: 8px;
  padding: 0 14px 0 38px;
  font-size: 13px;
  background: white;
  transition: all 0.2s;
}
.search-input-wrap input:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}
.search-input-wrap input.mono {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  letter-spacing: 0.05em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  text-align: left;
  padding: 14px 20px;
  background: var(--surface-0);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--surface-3);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--surface-3);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--surface-0); }
.data-table tbody tr:last-child td { border-bottom: none; }

.cell-id {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 12px;
  color: var(--gold-500);
  letter-spacing: 0.05em;
  font-weight: 500;
}
.cell-inner {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 12px;
  color: var(--ink-700);
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.05em;
}
.cell-thumb { display: flex; align-items: center; gap: 8px; }
.cell-thumb-img {
  width: 36px; height: 50px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  flex-shrink: 0;
}
.cell-thumb-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cell-thumb-info .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-800);
  margin-bottom: 2px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-thumb-info .sub {
  font-size: 11px;
  color: var(--text-muted);
}
.cell-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  color: var(--gold-600);
  border: 1px solid var(--gold-300);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cell-score .gem {
  width: 6px; height: 6px;
  background: var(--gold-500);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.cell-version {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.cell-time {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.cell-actions { display: flex; gap: 6px; }
.icon-action {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-action:hover {
  background: var(--gold-100);
  color: var(--gold-500);
  border-color: var(--gold-300);
}
.icon-action.danger:hover {
  background: rgba(196,61,75,0.08);
  color: var(--danger);
  border-color: rgba(196,61,75,0.3);
}

.empty-row {
  text-align: center;
  padding: 60px 20px !important;
  color: var(--text-muted);
  font-size: 13px;
}

.table-pagination {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--surface-3);
  background: var(--surface-0);
}
.table-pagination .info {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.pagination-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}
.pagination-controls button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--surface-3);
  background: white;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  transition: all 0.15s;
}
.pagination-controls button:hover:not(:disabled) {
  border-color: var(--gold-400);
  color: var(--ink-800);
}
.pagination-controls button.active {
  background: var(--ink-800);
  color: white;
  border-color: var(--ink-800);
}
.pagination-controls button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Backgrounds */
.bg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.bg-panel {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--surface-3);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bg-panel-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bg-panel-head .title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bg-panel-head .icon-box {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ink-700), var(--ink-800));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-300);
  position: relative;
}
.bg-panel-head .icon-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 1px solid var(--gold-400);
}
.bg-panel-head h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-800);
}
.bg-panel-head .sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 2px;
}
.bg-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(45,138,107,0.1);
  color: var(--success);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.bg-status::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(45,138,107,0.2);
}
.bg-status.inactive {
  background: var(--surface-2);
  color: var(--text-muted);
}
.bg-status.inactive::before {
  background: var(--text-muted);
  box-shadow: none;
}
.bg-panel-body { padding: 24px; }
.bg-preview {
  position: relative;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(10,21,48,0.5) 0%, rgba(10,21,48,0.7) 100%);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0, transparent 20px, rgba(212,175,55,0.06) 20px, rgba(212,175,55,0.06) 21px);
  pointer-events: none;
}
.bg-preview.empty {
  background: linear-gradient(180deg, rgba(10,21,48,0.05) 0%, rgba(10,21,48,0.1) 100%);
  color: var(--text-muted);
  font-size: 13px;
}
.bg-preview .ph {
  position: relative;
  z-index: 1;
  text-align: center;
}
.bg-preview .ph .ic {
  width: 48px; height: 48px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.bg-actions { display: flex; gap: 8px; margin-top: 16px; }
.bg-actions .btn { flex: 1; justify-content: center; }

.upload-card {
  background: var(--surface-0);
  border: 2px dashed var(--surface-3);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-card:hover {
  border-color: var(--gold-400);
  background: rgba(212,175,55,0.04);
}
.upload-card .upload-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-500);
  border: 1px solid var(--gold-300);
}
.upload-card .upload-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-800);
  margin-bottom: 4px;
}
.upload-card .upload-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.upload-card .upload-specs {
  display: inline-flex;
  gap: 16px;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.upload-card .upload-specs span::before {
  content: '◆ ';
  color: var(--gold-400);
  font-size: 6px;
  vertical-align: middle;
  margin-right: 4px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-title .ic {
  width: 20px; height: 20px;
  color: var(--gold-500);
}
.section-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-800);
}
.section-title .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-left: auto;
}
.section-title .en::before { content: 'UPLOAD NEW IMAGE'; }

/* Modal */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10,21,48,0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal.small { max-width: 420px; }
.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-800);
}
.modal-close {
  background: transparent;
  border: none;
  width: 32px; height: 32px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink-800); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--surface-3);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--surface-0);
}

.confirm-body {
  text-align: center;
  padding: 32px 24px;
}
.confirm-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(196,61,75,0.1);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
}
.confirm-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-800);
  margin-bottom: 8px;
}
.confirm-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Toast */
.toast-wrap {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: white;
  border: 1px solid var(--surface-3);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(10,21,48,0.18);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 480px;
  animation: toast-in 0.2s ease;
  pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--gold-500); }
.toast .ic { flex-shrink: 0; }
.toast.success .ic { color: var(--success); }
.toast.error .ic { color: var(--danger); }
.toast.info .ic { color: var(--gold-500); }
.toast .text { flex: 1; }
.toast .title { font-weight: 500; color: var(--ink-800); }
.toast .desc { font-size: 12px; color: var(--text-secondary); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* View pages */
.view { display: none; }
.view.active { display: block; }

/* ============================================================
   Login / Auth Styles
   ============================================================ */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer .user { flex: 1; }
.logout-btn {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  color: var(--silver-300);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.logout-btn:hover {
  color: white;
  border-color: var(--danger);
  background: rgba(196,61,75,0.18);
}

.security-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 32px 0;
  padding: 12px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fdf6e3 0%, #fbeed3 100%);
  border: 1px solid #eccb7a;
  color: #7a5b12;
  font-size: 13px;
}
.security-banner svg { flex-shrink: 0; color: var(--warning); }

.login-mask {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background:
    radial-gradient(ellipse at top left, rgba(212,175,55,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(30,58,114,0.25) 0%, transparent 55%),
    linear-gradient(160deg, #050b1a 0%, #0a1530 60%, #0e1f3f 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-mask.show { display: flex; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface-1);
  border-radius: 16px;
  padding: 40px 36px 32px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.06);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.login-brand .brand-mark {
  width: 42px; height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-900);
  box-shadow: 0 4px 16px rgba(212,175,55,0.45);
  flex-shrink: 0;
}
.login-brand .cn {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.login-brand .en {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.22em;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  margin-top: 3px;
}
.login-field { margin-bottom: 18px; }
.login-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.05em;
}
.login-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--surface-3);
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
}
.login-input:focus {
  border-color: var(--gold-400);
  background: white;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.14);
}
.login-error {
  margin: 4px 0 14px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #fdecec;
  border: 1px solid #f2c1c7;
  color: var(--danger);
  font-size: 12.5px;
}
.login-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  color: var(--ink-900);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  box-shadow: var(--shadow-gold);
  transition: all 0.2s;
}
.login-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.login-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.login-foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--surface-3);
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
}

/* Responsive */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .bg-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 20px; }
  .topbar { padding: 14px 20px; }
  .topbar h1 { font-size: 18px; }
  .security-banner { margin: 14px 20px 0; }
}
