/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f0f2f5;
  --sidebar-bg: #001529;
  --sidebar-hover: #002140;
  --sidebar-active: #1677ff;
  --sidebar-sub-bg: #000c17;
  --primary: #1677ff;
  --primary-hover: #66b1ff;
  --primary-light: #ecf5ff;
  --success: #67c23a;
  --success-hover: #85ce61;
  --success-light: #f0f9eb;
  --warning: #e6a23c;
  --warning-hover: #ebb563;
  --warning-light: #fdf6ec;
  --danger: #f56c6c;
  --danger-hover: #f78989;
  --danger-light: #fef0f0;
  --info: #909399;
  --info-hover: #a6a9ad;
  --info-light: #f4f4f5;
  --text: #303133;
  --text-secondary: #909399;
  --border: #dcdfe6;
  --card-bg: #ffffff;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --gray-100: #f5f7fa;
  --gray-200: #ebeef5;
  --gray-300: #e4e7ed;
  --gray-400: #dcdfe6;
  --gray-border: #dcdfe6;
  --white: #ffffff;
  --gold-50: #fdf6ec;
  --gold-700: #d48806;
  --gold-border: #ffd666;
  --blue-50: #eff6ff;
  --blue-600: #2563eb;
  --blue-border: #bfdbfe;
  --red-50: #fef2f2;
  --red-600: #dc2626;
  --success-bg: #f0f9eb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 1px 1px rgba(22,119,255,1);
  outline: none;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea { transition: border-color 0.2s, box-shadow 0.2s; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 20px; border-radius: 4px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); background: var(--white); color: var(--text);
  cursor: pointer; transition: all 0.2s; line-height: 1.5;
}
.btn:hover { border-color: var(--primary); background: var(--primary-light); }
.btn:focus { border-color: var(--primary); background: var(--primary-light); outline: none; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-primary:focus { background: var(--primary-hover); border-color: var(--primary-hover); outline: 2px solid rgba(64,158,255,0.3); }

.btn-success { background: var(--success); border-color: var(--success); color: var(--white); }
.btn-success:hover { background: var(--success-hover); border-color: var(--success-hover); }
.btn-success:focus { background: var(--success-hover); border-color: var(--success-hover); outline: 2px solid rgba(103,194,58,0.3); }

.btn-warning { background: var(--warning); border-color: var(--warning); color: var(--white); }
.btn-warning:hover { background: var(--warning-hover); border-color: var(--warning-hover); }
.btn-warning:focus { background: var(--warning-hover); border-color: var(--warning-hover); outline: 2px solid rgba(230,162,60,0.3); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--white); }
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn-danger:focus { background: var(--danger-hover); border-color: var(--danger-hover); outline: 2px solid rgba(245,108,108,0.3); }

.btn-secondary { background: var(--white); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--primary); background: var(--primary-light); }
.btn-secondary:focus { border-color: var(--primary); background: var(--primary-light); outline: none; }

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 3px; }
.btn-loading { opacity: 0.7; pointer-events: none; cursor: not-allowed; }

/* ========== Main Layout ========== */
#page-main { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px; min-width: 220px; background: var(--sidebar-bg);
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
  bottom: 0; z-index: 100; overflow-y: auto;
}
.sidebar-brand {
  padding: 24px 20px 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo { font-size: 28px; }
.sidebar-title { color: var(--white); font-size: 16px; font-weight: 600; }
.sidebar-nav { flex: 1; padding: 8px 0; }
.sidebar-footer { padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer a {
  display: block; padding: 12px 20px; color: rgba(255,255,255,0.45);
  font-size: 13px; transition: color 0.2s;
}
.sidebar-footer a:hover { color: rgba(255,255,255,0.85); }

.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px;
  color: rgba(255,255,255,0.65); font-size: 14px; transition: all 0.2s; cursor: pointer;
}
.nav-item:hover { color: var(--white); background: var(--sidebar-hover); }
.nav-item.active { color: var(--white); background: var(--sidebar-active); border-left: 4px solid var(--white); padding-left: 16px; }

.nav-group { overflow: hidden; }
.nav-parent {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; color: rgba(255,255,255,0.65); font-size: 14px;
  cursor: pointer; transition: all 0.2s; user-select: none;
}
.nav-parent:hover { color: var(--white); background: var(--sidebar-hover); }
.nav-parent .nav-arrow {
  font-size: 14px; transition: transform 0.25s; color: rgba(255,255,255,0.55);
}
.nav-group:not(.open) .nav-arrow { transform: rotate(-90deg); }
.nav-sub { background: var(--sidebar-sub-bg); overflow: hidden; max-height: 200px; transition: max-height 0.3s ease; }
.nav-group:not(.open) .nav-sub { max-height: 0; }
.nav-sub-item { padding-left: 52px !important; font-size: 13px !important; }
.nav-sub-item::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.25); margin-right: 4px; flex-shrink: 0;
}

.main-content { flex: 1; margin-left: 150px; padding: 22px 32px; position: relative; z-index: 1; }
.page-title { font-size: 22px; font-weight: 600; margin-bottom: 24px; }

/* ========== Filter Bar ========== */
.filter-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 16px;
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  position: relative; z-index: 100;
}
.filter-bar select,
.filter-bar input {
  padding: 7px 12px; border: 1px solid var(--gray-400); border-radius: 6px;
  font-size: 13px; background: var(--white); outline: none; height: 34px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-bar select:focus,
.filter-bar input:focus { border-color: var(--primary); box-shadow: 0 0 1px 1px rgba(22,119,255,1); }
.filter-bar select {
  min-width: 100px; padding-right: 28px;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c8c8c' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 8px;
}
.filter-bar select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231677ff' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
}
.filter-bar select option { padding: 6px 12px; }
.filter-bar select option:checked { font-weight: 600; color: var(--primary); background: transparent; }
.filter-bar select option:hover { background: var(--gray-200); }
.filter-bar input { width: 200px; flex: none; }
.filter-bar .btn { padding: 7px 16px; font-size: 13px; }
.filter-bar label { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.filter-sep { display: inline-flex; align-items: center; padding: 0 6px; font-size: 13px; color: var(--text-secondary); user-select: none; }

/* ========== Card ========== */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ========== Custom Select ========== */
.custom-select { position: relative; user-select: none; flex: none; }
.custom-select-trigger {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; border: 1px solid var(--gray-400); border-radius: 6px;
  font-size: 13px; background: var(--white); cursor: pointer;
  height: 34px; min-width: 100px; gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s; white-space: nowrap;
}
.custom-select-trigger::after {
  content: ''; width: 12px; height: 8px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c8c8c' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat center;
  background-size: 12px 8px; transition: transform 0.2s;
}
.custom-select.open .custom-select-trigger { border-color: var(--primary); box-shadow: 0 0 1px 1px rgba(22,119,255,1); }
.custom-select.open .custom-select-trigger::after { transform: rotate(180deg); }
.custom-select-popup {
  position: absolute; top: calc(100% + 4px); left: 0;
  min-width: 100%; width: max-content;
  background: var(--white); border: 1px solid var(--gray-400); border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); z-index: 99999;
  max-height: 240px; overflow-y: auto; display: none;
  animation: csFadeIn 0.15s ease;
}
.custom-select.open .custom-select-popup { display: block; }
@keyframes csFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.custom-select-option {
  padding: 8px 14px; cursor: pointer; font-size: 13px;
  white-space: nowrap; transition: background 0.15s;
}
.custom-select-option:hover { background: #f0f7ff; }
.custom-select-option.selected { color: var(--primary); font-weight: 600; background: #f5f9ff; }
.filter-bar .custom-select { min-width: 100px; }

/* ========== Search Clear ========== */
.search-input-wrap { position: relative; display: inline-block; }
.search-input-wrap input { padding-right: 24px !important; }
.search-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: #dcdfe6; color: var(--white); font-size: 12px;
  line-height: 16px; text-align: center; cursor: pointer;
  display: none; padding: 0; transition: background 0.2s;
}
.search-clear:hover { background: #c0c4cc; }
.search-clear.visible { display: block; }

/* ========== Tables ========== */
.table-container { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  background: var(--gray-100); padding: 12px 16px; text-align: left; font-weight: 500;
  color: var(--text-secondary); border-bottom: 1px solid var(--border);
  user-select: none; white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; }
.data-table th.sortable:hover { color: var(--primary); }
.data-table th.sortable .sort-arrow { font-size: 11px; margin-left: 4px; opacity: 0.35; }
.data-table th.sortable.sorted .sort-arrow { opacity: 1; color: var(--primary); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-100); }
.table-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.check-col { width: 40px; text-align: center; }
.check-col input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }
.col-num { width: 48px; text-align: center !important; color: #000000; font-size: 12px;font-weight: bolder; }

/* 已取消行程行变灰 */
.data-table tbody tr.row-cancelled td { background: #f5f5f5; color: #a0a0a0; }
.data-table tbody tr.row-cancelled:hover td { background: #ebebeb; }

/* ========== Tags ========== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.tag-vip { background: var(--gold-50); color: var(--gold-700); }
.tag-normal { background: var(--success-bg); color: var(--success); }
.tag-pending { background: var(--gold-50); color: var(--gold-700); }
.tag-driver { background: #E8F5E9; color: #2E7D32; }
.tag-passenger { background: #E3F2FD; color: #1565C0; }
.tag-gold { background: linear-gradient(135deg, #F6D365, #F0A500); color: #fff; }
.tag-silver { background: linear-gradient(135deg, #D0D0D0, #B0B0B0); color: #fff; }
.tag-bronze { background: linear-gradient(135deg, #CD7F32, #A0522D); color: #fff; }
.tag-approved { background: var(--success-bg); color: var(--success); }
.tag-rejected { background: #FFEBEE; color: var(--danger); }
.tag-info { background: var(--info-light); color: var(--info); }
.tag-default { background: var(--gray-100); color: var(--text-secondary); }
.tag-active { background: #e6f7ff; color: #1677ff; }
.tag-matched { background: #FFF3E0; color: #E65100; }
.tag-completed { background: var(--success-bg); color: var(--success); }
.tag-paid { background: var(--success-bg); color: var(--success); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-danger { background: var(--danger-light); color: var(--danger); }
.tag-closed { background: var(--gray-200); color: var(--text-secondary); }

/* ========== Pagination ========== */
.pagination {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 0 0; margin-top: 4px; flex-wrap: wrap; gap: 12px; position: relative;
}
.pagination-single { justify-content: flex-end; }
.pagination-info { font-size: 13px; color: var(--text-secondary); white-space: nowrap; font-weight: 700; }
.pagination-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination-btns .btn[disabled] { opacity: 0.4; pointer-events: none; cursor: not-allowed; }
.pagination-dots { padding: 0 4px; color: var(--text-secondary); font-size: 14px; user-select: none; }
.pagination-jump { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.pagination-jump input {
  width: 50px; height: 28px; text-align: center;
  border: 1px solid var(--border); border-radius: 3px; font-size: 13px; color: var(--text);
  transition: border-color 0.2s;
}
.pagination-jump input:focus { outline: none; border-color: var(--primary); }
.pagination-jump .btn { min-width: auto; padding: 5px 10px; }
.pagination-right { display: flex; align-items: center; gap: 16px; position: absolute; right: 0; }
.pagination-size { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.pagination-size select {
  height: 28px; min-width: 60px; border: 1px solid var(--border); border-radius: 3px;
  font-size: 13px; color: var(--text); padding: 0 6px;
  background: var(--white); cursor: pointer; transition: border-color 0.2s;
}
.pagination-size select:focus { outline: none; border-color: var(--primary); }
.ps-dropdown { position: relative; display: inline-block; outline: none; }
.ps-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; min-width: 52px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 3px;
  font-size: 13px; color: var(--text); background: var(--white);
  cursor: pointer; user-select: none; white-space: nowrap; transition: border-color 0.2s;
}
.ps-trigger::after { content: "\25B2"; font-size: 8px; margin-left: 2px; color: var(--text-secondary); }
.ps-dropdown:focus .ps-trigger, .ps-open .ps-trigger { border-color: var(--primary); }
.ps-menu {
  display: none; position: absolute; bottom: 100%; left: 0;
  margin: 0 0 4px 0; padding: 4px 0; list-style: none;
  min-width: 100%; background: var(--white);
  border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1); z-index: 1000;
}
.ps-open .ps-menu { display: block; }
.ps-menu li {
  padding: 6px 12px; font-size: 13px; color: var(--text);
  cursor: pointer; white-space: nowrap; text-align: center;
}
.ps-menu li:hover { background: #E8F3FF; color: var(--primary); }
.ps-menu li.ps-active { color: var(--primary); font-weight: 600; }

/* ========== Empty State ========== */
.empty-state { padding: 48px; text-align: center; color: var(--text-secondary); font-size: 14px; }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.modal-card {
  background: var(--white); border-radius: 12px; padding: 28px; width: 460px;
  max-width: 90vw; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-card h3 { font-size: 18px; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
#reject-reason {
  width: 100%; padding: 12px; border: 1px solid var(--gray-400); border-radius: 8px;
  font-size: 14px; font-family: inherit; resize: vertical; outline: none;
}
#reject-reason:focus { border-color: var(--primary); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; margin: 0; }
.modal-close-btn {
  background: none; border: none; font-size: 20px; color: var(--text-secondary);
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.modal-close-btn:hover { background: var(--gray-300); color: var(--text); }

/* ========== Image Modal ========== */
.image-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 1100; cursor: pointer;
}
.image-modal-overlay img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }

/* ========== Toast ========== */
.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  padding: 10px 24px; border-radius: 6px; color: var(--white); font-size: 14px;
  z-index: 2000; animation: toastIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ========== Tab Bar ========== */
.tabs {
  display: flex; gap: 0; background: var(--card-bg); border-radius: var(--radius);
  padding: 4px; margin-bottom: 20px; box-shadow: var(--shadow); max-width: fit-content;
}
.tab {
  padding: 8px 20px; border-radius: 6px; font-size: 14px;
  background: transparent; color: var(--text-secondary); transition: all 0.2s;
}
.tab.active { background: var(--primary); color: var(--white); }
.tab:hover:not(.active) { color: var(--text); }

/* ========== Batch Bar ========== */
.batch-bar {
  display: none; align-items: center; gap: 10px;
  background: #fffbe6; border: 1px solid #ffe58f; border-radius: 6px;
  padding: 10px 16px; margin-bottom: 12px; font-size: 13px;
}
.batch-bar.active { display: flex; }
.batch-bar .batch-count { color: var(--text); font-weight: 500; }

/* ========== Detail Modal ========== */
.detail-modal-card { width: 580px; max-width: 95vw; max-height: 80vh; overflow-y: auto; padding: 24px 28px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table td { padding: 8px 10px; border-bottom: 1px solid var(--gray-300); }
.detail-table .dl { color: var(--text-secondary); white-space: nowrap; width: 90px; font-weight: 500; }
.detail-table .dd { color: var(--text); word-break: break-all; }
.detail-info { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-info td { padding: 6px 8px; vertical-align: top; }
.detail-info .dl { color: var(--text-secondary); white-space: nowrap; width: 80px; }

/* ========== Skeleton ========== */
@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-block {
  background: linear-gradient(90deg, var(--gray-300) 25%, #e8e8e8 37%, var(--gray-300) 63%);
  background-size: 400% 100%; animation: skeleton-shine 1.4s ease infinite;
  border-radius: 4px; min-height: 20px;
}
.skeleton-table { padding: 16px; }
.skeleton-table .sk-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; }
.skeleton-table .sk-cell { height: 20px; border-radius: 4px; }
.skeleton-table .sk-cell.sk-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.skeleton-table .sk-cell.sk-num { width: 40px; }
.skeleton-table .sk-cell.sk-name { width: 100px; }
.skeleton-table .sk-cell.sk-phone { width: 120px; }
.skeleton-table .sk-cell.sk-time { width: 140px; }
.skeleton-table .sk-cell.sk-status { width: 60px; }
.skeleton-table .sk-cell.sk-action { width: 80px; }
.skeleton-table .sk-cell.sk-amount { width: 80px; }
.skeleton-table .sk-cell.sk-transaction { width: 160px; }

/* ========== Top Progress ========== */
.top-progress {
  position: fixed; top: 0; left: 0; width: 0%; height: 3px;
  background: var(--primary); z-index: 10000; opacity: 0; pointer-events: none;
}
.top-progress.active { opacity: 1; }

/* ========== Scrollbar ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }
* { scrollbar-width: thin; scrollbar-color: var(--gray-400) transparent; }
.sidebar { scrollbar-color: rgba(255,255,255,0.15) transparent; }

/* ========== Dark Mode ========== */
[data-theme="dark"] {
  --bg: #1a1a2e;
  --card-bg: #1e1e3a;
  --text: #e0e0e0;
  --text-secondary: #9090a0;
  --border: #3a3a5c;
  --shadow: 0 1px 3px rgba(0,0,0,0.35);
  --primary-light: #1a3050;
  --gray-100: #252545;
  --gray-200: #2e2e52;
  --gray-300: #383860;
  --gray-400: #444470;
  --gray-border: #3a3a5c;
  --white: #1e1e3a;
  --success-bg: #1a3a20;
  --gold-50: #2e2410;
  --gold-700: #f0c060;
  --gold-border: #5a3e10;
  --blue-50: #1a2a3e;
  --blue-600: #60a5fa;
  --blue-border: #2a4a6e;
  --red-50: #2e1a1a;
  --red-600: #f87171;
}
[data-theme="dark"] .filter-bar select,
[data-theme="dark"] .filter-bar input { background: #252545; color: #e0e0e0; border-color: var(--border); }
[data-theme="dark"] .custom-select-trigger { background: #252545; color: #e0e0e0; border-color: var(--border); }
[data-theme="dark"] .custom-select-popup { background: #2e2e52; border-color: var(--border); }
[data-theme="dark"] .custom-select-option:hover { background: #1a3050; }
[data-theme="dark"] .custom-select-option.selected { background: #1a3050; }
[data-theme="dark"] .review-batch-bar { background: #2e2410; border-color: #5a3e10; }
[data-theme="dark"] .batch-bar { background: #2e2410; border-color: #5a3e10; }
[data-theme="dark"] .table-container { background: var(--card-bg); }
[data-theme="dark"] .detail-block { background: var(--gray-100); }
[data-theme="dark"] .pagination-jump input,
[data-theme="dark"] .pagination-size select { background: var(--white); color: var(--text); }
[data-theme="dark"] .ps-trigger { background: var(--white); color: var(--text); }
[data-theme="dark"] .ps-menu { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] .ps-menu li:hover { background: #1a3050; }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.7); }
[data-theme="dark"] .skeleton-block {
  background: linear-gradient(90deg, var(--gray-300) 25%, #444470 37%, var(--gray-300) 63%);
  background-size: 400% 100%;
}
.theme-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; color: rgba(255,255,255,0.45);
  font-size: 13px; cursor: pointer; transition: color 0.2s;
  background: none; border: none; width: 100%; text-align: left;
}
.theme-toggle:hover { color: rgba(255,255,255,0.85); }
.theme-toggle-icon { font-size: 16px; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .sidebar { width: 200px; min-width: 200px; }
  .main-content { margin-left: 120px; }
}
@media (max-width: 768px) {
  .mobile-topbar {
    display: flex; position: fixed; top: 0; left: 0; right: 0; height: 52px;
    background: var(--white); border-bottom: 1px solid var(--border);
    align-items: center; padding: 0 16px; z-index: 1000;
  }
  .mobile-menu-btn { background: none; border: none; font-size: 22px; cursor: pointer; padding: 6px 10px; border-radius: 6px; color: var(--text); line-height: 1; }
  .mobile-topbar-title { font-size: 16px; font-weight: 600; margin-left: 12px; color: var(--text); }
  .mobile-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 998; }
  .mobile-sidebar-overlay.active { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; min-width: 260px;
    transform: translateX(-100%); transition: transform 0.25s ease; z-index: 999; box-shadow: none;
  }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.18); }
  .main-content { margin-left: 0 !important; padding: 68px 14px 24px; }
  .filter-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-bar > * { width: 100%; }
  .filter-bar .btn { width: 100%; }
  .pagination { flex-direction: column; gap: 10px; align-items: stretch; }
  .pagination > div { text-align: center; }
  .pagination-btns { justify-content: center; flex-wrap: wrap; }
  .pagination-right { justify-content: center; flex-wrap: wrap; gap: 8px; }
  .btn { min-height: 36px; }
  .btn-sm { min-height: 32px; padding: 6px 14px; }
  .data-table { min-width: 640px; }
  .trip-section-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .mobile-topbar-title { font-size: 14px; }
}
