/* ═══════════════════════════════════════════════════════════════
   GEO 数据处理工具 — 清爽浅色 BI 风格
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-base:        #f4f7fb;
  --bg-surface:     #ffffff;
  --bg-surface-2:   #f8fbff;
  --bg-hover:       #eef5ff;
  --border:         #d9e5f3;
  --border-strong:  #c5d6ea;
  --accent:         #2f6bff;
  --accent-hover:   #1f5df0;
  --accent-soft:    rgba(47, 107, 255, 0.10);
  --text-primary:   #16324f;
  --text-secondary: #4d6885;
  --text-muted:     #7f96ad;
  --success:        #11a36a;
  --warning:        #d48806;
  --danger:         #d14343;
  --shadow:         0 8px 28px rgba(22, 50, 79, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(180deg, #f7faff 0%, #f2f6fb 100%);
  color: var(--text-primary);
  font-family: "Inter", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 14px;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.navbar {
  background: #162136 !important;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  padding: 0 1.5rem;
  height: 58px;
}

.navbar-brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff !important;
}

.navbar-brand span {
  color: #4d88ff;
}

.nav-user-link,
.nav-user-name {
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 600;
}

.nav-user-link:hover {
  color: #fff;
}

.btn-nav-logout {
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: .35rem .8rem;
  font-size: 12px;
  font-weight: 600;
}

.btn-nav-logout:hover {
  background: rgba(255,255,255,.08);
}

.main-content {
  min-width: 0;
  min-height: calc(100vh - 58px);
  padding: 1.5rem 1.5rem 2rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .03em;
  padding: .85rem 1.25rem;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem 1.35rem 1.1rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #2f6bff 0%, #28c7d9 100%);
}
.metric-card:hover {
  transform: translateY(-2px);
  border-color: #b8cdf0;
  box-shadow: 0 12px 32px rgba(22, 50, 79, 0.11);
}
.metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .45rem;
}
.metric-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, #2f6bff 0%, #19b8d6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.metric-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: .4rem;
}

.board-table {
  max-height: 72vh;
  overflow-y: auto;
}
.board-table::-webkit-scrollbar { width: 6px; height: 6px; }
.board-table::-webkit-scrollbar-track { background: transparent; }
.board-table::-webkit-scrollbar-thumb { background: #c6d6e9; border-radius: 6px; }

.table {
  color: var(--text-primary);
  margin: 0;
}
.table thead th {
  background: #f7fbff;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding: .8rem 1rem;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
.table tbody td {
  padding: .78rem 1rem;
  vertical-align: middle;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
}
.table tbody tr {
  border-bottom: 1px solid #edf3fb;
  transition: background .15s ease;
}
.table-striped tbody tr:nth-of-type(odd) {
  background: #fcfdff;
}
.table tbody tr:hover,
.table-striped tbody tr:nth-of-type(odd):hover {
  background: var(--bg-hover);
}

.truncate-cell {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}
.form-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .45rem;
}
.form-control,
.form-select,
textarea.form-control {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  padding: .55rem .9rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,107,255,.15);
  color: var(--text-primary);
  outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-select option { color: var(--text-primary); }
.form-text { color: var(--text-secondary); font-size: 12px; }

.btn-primary {
  background: linear-gradient(90deg, #2f6bff 0%, #4d88ff 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: .55rem 1.15rem;
  box-shadow: 0 8px 18px rgba(47,107,255,.18);
}
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(90deg, #1f5df0 0%, #3b78ff 100%);
  color: #fff;
}
.btn-outline-secondary {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: .55rem 1.15rem;
}
.btn-outline-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline-primary {
  background: transparent;
  border: 1px solid #bcd2f5;
  border-radius: 9px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: .34rem .8rem;
}
.btn-outline-primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-hover);
}
.btn-sm { padding: .34rem .8rem; font-size: 12px; }

.nav-tabs {
  border-bottom: 1px solid var(--border);
  gap: .35rem;
}
.nav-tabs .nav-link {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: .65rem 1rem;
}
.nav-tabs .nav-link:hover {
  color: var(--text-primary);
  border-bottom-color: #c8daf1;
}
.nav-tabs .nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: .35em .7em;
  border-radius: 999px;
}
.text-bg-success { background: rgba(17,163,106,.12) !important; color: var(--success) !important; }
.text-bg-secondary { background: rgba(127,150,173,.16) !important; color: var(--text-secondary) !important; }
.text-bg-warning { background: rgba(212,136,6,.12) !important; color: var(--warning) !important; }
.text-bg-danger { background: rgba(209,67,67,.12) !important; color: var(--danger) !important; }

.modal-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-primary);
}
.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.4rem;
}
.modal-title { font-weight: 700; font-size: 15px; }
.btn-close { opacity: .6; }
.modal-body { padding: 1.25rem 1.4rem; }

.pre-wrap {
  white-space: pre-wrap;
  line-height: 1.72;
  color: var(--text-secondary);
  font-size: 13px;
}

.batch-list { max-height: 70vh; overflow-y: auto; }
.list-group-item {
  background: transparent;
  border: none;
  border-bottom: 1px solid #edf3fb;
  padding: .95rem 0;
  color: var(--text-primary);
}
.list-group-item:last-child { border-bottom: none; }

.page-header { margin-bottom: 1.4rem; }
.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: .01em;
  margin-bottom: .15rem;
}
.page-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

.chart-wrap { position: relative; padding: .5rem; }

.summary-row-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}

.summary-value {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.summary-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e8f1fb;
  overflow: hidden;
}

.summary-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff 0%, #28c7d9 100%);
  transition: width .4s ease;
}

.chart-note {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: .3rem;
}

.chip-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: .45rem .65rem;
}

.chip-list,
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.chip-input {
  border: none;
  outline: none;
  flex: 1 1 180px;
  min-width: 140px;
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .35rem .7rem;
  font-size: 12px;
  font-weight: 600;
}

.chip-brand,
.chip-confirmed {
  background: rgba(47,107,255,.12);
  color: var(--accent);
  border: 1px solid rgba(47,107,255,.18);
}

.chip-suggestion {
  background: #f4f7fb;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.chip-remove,
.chip-add,
#removeBrand {
  border: none;
  background: transparent;
  color: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.suggestion-area {
  margin-top: .75rem;
}

.suggestion-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .45rem;
}
