/* ═══════════════════════════════════════════════
   Blue Chip — Premium Corporate Design
   ═══════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f5;
  --surface-3: #e4e7ef;
  --surface-hover: #f8f9fc;
  --terracotta: #1b3a6b;
  --terracotta-hover: #142f53;
  --terracotta-subtle: rgba(27, 58, 107, 0.08);
  --terracotta-light: rgba(27, 58, 107, 0.04);
  --gold: #c4a25c;
  --gold-hover: #b48f45;
  --gold-subtle: rgba(196, 162, 92, 0.12);
  --gold-light: rgba(196, 162, 92, 0.06);
  --steel: #3a6b8a;
  --steel-subtle: rgba(58, 107, 138, 0.08);
  --teal: #2d7d6a;
  --rose: #c45464;
  --text: #151b29;
  --text-secondary: #586074;
  --text-muted: #9098aa;
  --border: #dce0ea;
  --border-strong: #c8cdda;
  --shadow: 0 1px 3px rgba(15, 25, 45, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 25, 45, 0.08);
  --shadow-lg: 0 8px 32px rgba(15, 25, 45, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --header-h: 60px;
  --sidebar-w: 220px;

  /* Legacy aliases */
  --navy: #151b29;
  --navy-light: #1e2a3e;
  --accent: var(--terracotta);
  --accent-hover: var(--terracotta-hover);
  --accent-light: var(--terracotta-subtle);
  --accent-subtle: var(--terracotta-light);
  --primary: var(--terracotta);
  --primary-dark: #0f2242;
  --green: #2d7d6a;
  --red: var(--rose);
  --success: var(--teal);
  --danger: var(--rose);
  --warning: #c4a25c;
  --amber: #c4a25c;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Noto Sans SC', 'Microsoft YaHei', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: var(--terracotta-subtle); color: var(--terracotta); }

a { color: var(--terracotta); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--terracotta-hover); }
img { max-width: 100%; }
ul { list-style: none; }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
code, .mono { font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace; }

/* ─── Header & Navigation ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--terracotta);
  white-space: nowrap;
  letter-spacing: -0.3px;
}
.logo:hover { color: var(--terracotta-hover); }
.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 4px;
  overflow-x: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-list a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s;
}
.nav-list a:hover { color: var(--terracotta); background: var(--terracotta-subtle); }
.nav-list a.active {
  color: var(--terracotta);
  background: var(--terracotta-subtle);
  font-weight: 600;
}
.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.user-actions .username {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
}
.nav-toggle, .sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-toggle:hover, .sidebar-toggle:hover { background: var(--terracotta-subtle); color: var(--terracotta); }

/* ─── Sidebar ─── */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  overflow-y: auto;
  z-index: 90;
  transition: transform 0.25s ease;
}
.sidebar h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding: 0 8px;
  font-family: 'Noto Sans SC', sans-serif;
}
.sidebar-menu { display: flex; flex-direction: column; gap: 2px; }
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.sidebar-menu a:hover { background: var(--terracotta-subtle); color: var(--terracotta); }
.sidebar-menu a svg { flex-shrink: 0; }

/* ─── Content Wrapper ─── */
.content-wrapper {
  margin-top: var(--header-h);
  margin-left: var(--sidebar-w);
  padding: 28px 32px;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* ─── Footer ─── */
.site-footer {
  margin-left: var(--sidebar-w);
  padding: 28px 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  text-align: center;
  position: relative;
  z-index: 1;
  background: var(--surface);
}
.site-footer p { margin-bottom: 4px; }
.site-footer a { color: var(--text-secondary); margin: 0 4px; }
.site-footer a:hover { color: var(--terracotta); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 11px 28px; font-size: 14px; }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-hover); box-shadow: 0 4px 12px rgba(27, 58, 107, 0.25); transform: translateY(-1px); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--terracotta-subtle); color: var(--terracotta); }
.btn-danger { background: var(--rose); color: #fff; }
.btn-danger:hover { background: #c44a5a; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196, 162, 92, 0.3); }
.btn-outline-gold { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold-subtle); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
a.btn:hover { color: inherit; }
a.btn-primary:hover { color: #fff; }

/* ─── Messages / Alerts ─── */
.msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}
.msg svg { flex-shrink: 0; }
.msg-ok { background: rgba(45, 125, 106, 0.08); border-color: rgba(45, 125, 106, 0.15); color: var(--teal); }
.msg-err { background: rgba(196, 84, 100, 0.08); border-color: rgba(196, 84, 100, 0.15); color: var(--rose); }
.msg-warn { background: var(--gold-subtle); border-color: rgba(196, 162, 92, 0.2); color: #8a7a50; }
.msg-warn a { color: var(--terracotta); }

/* ─── Form Elements ─── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.form-input {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.1); }
.form-input::placeholder { color: var(--text-muted); }
select.form-input { cursor: pointer; }

/* ─── Tables ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 11px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  position: relative;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .resizer {
  position: absolute;
  right: 0; top: 0;
  width: 4px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

/* ─── Tags / Badges ─── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-secondary);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-gold { background: var(--gold-subtle); color: var(--gold); }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Modal ─── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 24, 20, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.modal.show { display: flex; }
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 680px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(28, 24, 20, 0.15);
  animation: scaleIn 0.2s ease;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--terracotta-subtle); color: var(--terracotta); }

/* ─── Pagination ─── */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.15s;
}
.pagination a { color: var(--text-secondary); }
.pagination a:hover { background: var(--terracotta-subtle); color: var(--terracotta); }

/* ─── Page Hero ─── */
.page-hero {
  text-align: center;
  padding: 52px 20px 40px;
}
.page-hero .hero-icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  background: var(--terracotta-subtle);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
  transition: transform 0.2s;
}
.page-hero:hover .hero-icon { transform: scale(1.05); }
.page-hero h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.4px;
}
.page-hero p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Content Card ─── */
.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.content-card .cc-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.content-card .cc-title svg { flex-shrink: 0; }



/* ─── Info Grid ─── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.info-item label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.info-item span { font-size: 14px; color: var(--text); font-weight: 500; }

/* ─── Auth Pages ─── */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 20% 50%, rgba(27, 58, 107, 0.04) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(196, 162, 92, 0.04) 0%, transparent 50%);
}
.auth-page {
  position: relative;
  z-index: 1;
  background: var(--surface);
  padding: 44px 40px 36px;
  border-radius: 16px;
  width: 400px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 2px 20px rgba(28, 24, 20, 0.08);
  border: 1px solid var(--border);
  animation: authIn 0.35s ease;
}
@keyframes authIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.auth-bg::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 58, 107, 0.05) 0%, transparent 70%);
  top: -200px; right: -80px;
}
.auth-logo {
  width: 56px; height: 56px;
  background: var(--terracotta);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
}
.auth-page h1 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.auth-page .sub { font-size: 13px; color: var(--text-secondary); margin: 0 0 28px; }
.auth-field { margin-bottom: 18px; text-align: left; }
.auth-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.2px; }
.auth-field .input-wrap { position: relative; display: flex; align-items: center; }
.auth-field .input-wrap input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: all 0.2s;
}
.auth-field .input-wrap input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.08); }
.auth-field .input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.auth-field .input-icon svg { display: block; }
.auth-btn {
  width: 100%;
  padding: 12px;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}
.auth-btn:hover { background: var(--terracotta-hover); box-shadow: 0 4px 16px rgba(27, 58, 107, 0.25); transform: translateY(-1px); }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.auth-error { background: rgba(196, 84, 100, 0.08); color: var(--rose); border: 1px solid rgba(196, 84, 100, 0.15); padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 20px; text-align: left; display: flex; align-items: flex-start; gap: 8px; }
.auth-error svg { flex-shrink: 0; margin-top: 1px; }
.auth-success { background: rgba(45, 125, 106, 0.08); color: var(--teal); border: 1px solid rgba(45, 125, 106, 0.15); padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; justify-content: center; }
.auth-footer { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); }
.auth-footer a { color: var(--terracotta); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ─── Homepage ─── */
.home-search {
  max-width: 560px;
  margin: 0 auto 52px;
  display: flex;
  gap: 8px;
}
.home-search input {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
}
.home-search input:focus { border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(27, 58, 107, 0.08); }
.home-search input::placeholder { color: var(--text-muted); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 20px 28px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--terracotta);
  opacity: 0;
  transition: opacity 0.25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.feature-card:hover::before { opacity: 1; }
.feature-card .fc-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  color: var(--terracotta);
  transition: transform 0.25s;
  width: 40px;
  height: 40px;
}
.feature-card:hover .fc-icon { transform: scale(1.12); }
.feature-card .fc-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.feature-card .fc-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ─── Search Results ─── */
.search-wrap { max-width: 1100px; margin: 0 auto; }
.search-header {
  background: var(--surface);
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.search-header h1 { font-size: 18px; margin: 0; display: flex; align-items: center; gap: 8px; }
.search-header h1 svg { flex-shrink: 0; }
.search-header form { flex: 1; display: flex; gap: 8px; min-width: 250px; }
.search-header input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.search-header input:focus { border-color: var(--terracotta); }
.search-header input::placeholder { color: var(--text-muted); }
.search-stats { font-size: 13px; color: var(--text-secondary); margin: -4px 0 20px; }
.result-section { margin-bottom: 24px; }
.result-section h2 {
  font-size: 15px;
  margin: 0 0 10px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-section h2 svg { flex-shrink: 0; }
.result-section h2 .badge { font-size: 11px; font-weight: 500; background: var(--terracotta-subtle); color: var(--terracotta); padding: 2px 10px; border-radius: 12px; margin-left: 6px; }
.result-card {
  display: block;
  background: var(--surface);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 6px;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.result-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.result-card .source-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.source-list .source-tag { background: var(--steel-subtle); color: var(--steel); }
.source-labour .source-tag { background: rgba(196, 84, 100, 0.1); color: var(--rose); }
.source-material .source-tag { background: var(--gold-subtle); color: var(--gold); }
.source-news .source-tag { background: rgba(45, 125, 106, 0.1); color: var(--teal); }
.result-card .result-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.result-card .result-title .hl { background: rgba(196, 162, 92, 0.15); color: var(--gold); padding: 0 3px; border-radius: 2px; }
.result-card .result-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.result-card .result-desc .hl { background: rgba(196, 162, 92, 0.15); color: var(--gold); padding: 0 3px; border-radius: 2px; }
.result-card .result-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { display: inline-block; }
.empty-state a { color: var(--terracotta); }
.hl { background: rgba(196, 162, 92, 0.15); color: var(--gold); padding: 0 3px; border-radius: 2px; }

/* ─── VIP Page ─── */
.vip-page { max-width: 1000px; margin: 0 auto; padding: 20px 0; }
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--terracotta), #0f2242);
  color: #fff;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.vip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 30px 0;
}
.vip-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}
.vip-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.vip-card.recommended { border-color: var(--terracotta); }
.vip-card .rec-tag {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--terracotta);
  color: #fff;
  padding: 4px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.vip-card .vc-icon { display: flex; justify-content: center; align-items: center; margin-bottom: 14px; color: var(--terracotta); }
.vip-card h2 { font-size: 22px; margin-bottom: 4px; font-weight: 700; }
.vip-card .sub { font-size: 14px; color: var(--terracotta); font-weight: 600; margin-bottom: 16px; }
.vip-card .desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.vip-card .features { text-align: left; margin-bottom: 24px; }
.vip-card .features li { padding: 7px 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.vip-card .features li::before { content: '✓'; color: var(--teal); font-weight: 700; }
.vip-contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
  margin: 30px 0;
}
.vip-contact h3 { font-size: 18px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.vip-contact p { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }

/* ─── Standard List (chajia.php) ─── */
.std-page { max-width: 1000px; margin: 0 auto; }
.std-header {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.std-header h1 { font-size: 18px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.std-header h1 svg { flex-shrink: 0; }
.std-header p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.std-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--terracotta-subtle);
  color: var(--terracotta);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}
.std-list { padding: 0; margin: 0; }
.std-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.15s;
  display: block;
  text-decoration: none;
}
.std-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.std-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 12px;
}
.std-bar .left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.std-bar .icon-box {
  width: 38px; height: 38px;
  background: var(--terracotta-subtle);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--terracotta);
}
.std-bar .title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.std-bar .date { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.std-bar .link-hint { display: flex; align-items: center; gap: 4px; color: var(--terracotta); font-size: 12px; flex-shrink: 0; opacity: 0; transition: opacity 0.2s; }
.std-bar .std-seq { width: 28px; font-size: 12px; color: var(--text-muted); font-weight: 500; text-align: center; flex-shrink: 0; }
.std-item:hover .link-hint { opacity: 1; }

/* ─── Labor / Material Info Pages ─── */
.data-page { max-width: 1200px; margin: 20px auto; }
.data-header {
  background: var(--surface);
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.data-header h1 {
  font-size: 18px;
  margin: 0 0 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.data-header h1 svg { flex-shrink: 0; }
.data-header h1 button { margin-left: auto; }
.search-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-field {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.search-field:focus { border-color: var(--terracotta); }
.search-field::placeholder { color: var(--text-muted); }
select.search-field { cursor: pointer; }
.table-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.price-highlight {
  font-weight: 700;
  color: var(--terracotta);
  font-size: 14px;
}
.price-highlight em { font-style: normal; color: var(--text-muted); }

/* ─── Detail Page ─── */
.detail-page { max-width: 900px; margin: 0 auto; }
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow);
}
.detail-card h1 { font-size: 24px; margin-bottom: 16px; }
.detail-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.detail-back:hover { color: var(--terracotta); }
.detail-back svg { flex-shrink: 0; }

/* ─── Rich Content (UEditor) ─── */
.rich-content { font-size: 15px; line-height: 1.9; color: var(--text-secondary); word-wrap: break-word; }
.rich-content p { margin: 0 0 16px; }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; display: block; box-shadow: var(--shadow); }
.rich-content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.rich-content td, .rich-content th { border: 1px solid var(--border-strong); padding: 10px 14px; text-align: left; color: var(--text); }
.rich-content th { background: var(--surface-2); font-weight: 600; }
.rich-content blockquote { border-left: 3px solid var(--terracotta); padding: 12px 18px; background: var(--surface-2); margin: 16px 0; border-radius: 0 6px 6px 0; }
.rich-content ul, .rich-content ol { margin: 10px 0; padding-left: 24px; }
.rich-content li { margin-bottom: 6px; }
.rich-content a { color: var(--terracotta); text-decoration: underline; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 24px 0 12px; }
.rich-content h2 { font-size: 20px; }
.rich-content h3 { font-size: 17px; }

/* ─── Keyframes ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Utility ─── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-terracotta { color: var(--terracotta); }
.text-sm { font-size: 12.5px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 20px; right: 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transition: opacity 0.3s;
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .nav-list a { font-size: 12px; padding: 7px 10px; }
}
@media (max-width: 992px) {
  .nav-toggle, .sidebar-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.show { display: flex; }
  .nav-list { flex-direction: column; gap: 0; width: 100%; }
  .nav-list a { padding: 12px 0; border-bottom: 1px solid var(--border); border-radius: 0; }
  .user-actions { margin-left: 0; margin-top: 12px; width: 100%; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .content-wrapper, .site-footer { margin-left: 0; }
}
@media (max-width: 640px) {
  .site-header { padding: 0 12px; }
  .logo { font-size: 16px; }
  .content-wrapper { padding: 16px; }
  .data-header h1 { flex-direction: column; align-items: flex-start; gap: 8px; }
  .data-header h1 button { margin-left: 0; }
  .search-bar { flex-direction: column; align-items: stretch; }
  .search-bar input, .search-bar select { width: 100%; }
  .pagination { flex-direction: column; gap: 8px; }
}
