:root {
  --primary-color: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --hover-bg: #f1f5f9;
  --danger-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --purple-color: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;
  --gold-color: #eab308;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Noto Sans SC', -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
}

/* ========== Header ========== */
.main-header {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: sticky; top: 0; z-index: 50;
}
.header-container {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.5rem; color: var(--primary-color); }
.logo h1 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.logo span { color: var(--primary-color); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-weight: 500; transition: color 0.2s; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }
.user-profile { display: flex; align-items: center; gap: 1rem; border-left: 1px solid var(--border-color); padding-left: 1.5rem; margin-left: 0.5rem; }
#userNameBadge { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.logout-link { color: var(--text-secondary) !important; font-size: 0.85rem; }
.mobile-menu-btn { display: none; cursor: pointer; color: var(--text-primary); }

/* Notification badge */
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger-color); color: white;
  font-size: 0.7rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; margin-left: 4px;
  line-height: 1;
}

/* ========== Search Section ========== */
.search-section { background: var(--surface-color); padding: 2rem 1.5rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.search-container { max-width: 800px; margin: 0 auto; text-align: center; }
.search-box { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.search-input-wrapper { flex: 1; position: relative; display: flex; align-items: center; }
.search-input-wrapper svg { position: absolute; left: 1rem; }
.search-input-wrapper input { width: 100%; height: 48px; padding: 0 1rem 0 3rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 1rem; transition: border-color 0.2s; }
.search-input-wrapper input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1); }
.primary-btn { height: 48px; padding: 0 1.5rem; background: var(--primary-color); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background 0.2s; font-family: inherit; }
.primary-btn:hover { background: var(--primary-hover); }
.primary-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Advanced Filter Row */
.adv-filter-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.adv-filter-row label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
.adv-filter-row input[type="date"],
.adv-filter-row input[type="number"] {
  height: 34px; padding: 0 0.6rem; border: 1px solid var(--border-color); border-radius: 6px;
  font-size: 0.85rem; color: var(--text-primary); background: var(--surface-color);
  transition: border-color 0.2s; font-family: inherit; width: 130px;
}
.adv-filter-row input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.1); }
.adv-filter-row .sep { color: var(--text-secondary); font-size: 0.85rem; }
.adv-filter-row input[type="number"] { width: 90px; }

.outline-btn { padding: 0.5rem 1rem; background: transparent; border: 1px solid var(--border-color); border-radius: 6px; color: var(--text-primary); cursor: pointer; transition: all 0.2s; font-family: inherit; font-size: 0.9rem; }
.outline-btn:hover:not(:disabled) { border-color: var(--primary-color); color: var(--primary-color); }
.outline-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.stats-text { font-size: 0.9rem; color: var(--text-secondary); }

/* ========== Main Content ========== */
.main-content { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; display: flex; gap: 2rem; }
.sidebar { width: 240px; flex-shrink: 0; }
.filter-group { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 1.5rem; overflow: hidden; }
.filter-group h3 { padding: 1rem; font-size: 1rem; border-bottom: 1px solid var(--border-color); background: var(--hover-bg); }
.filter-group ul { list-style: none; }
.filter-group li { padding: 0.75rem 1rem; font-size: 0.9rem; cursor: pointer; color: var(--text-secondary); transition: all 0.2s; }
.filter-group li:hover { background: var(--hover-bg); color: var(--text-primary); }
.filter-group li.active { color: var(--primary-color); font-weight: 500; border-left: 3px solid var(--primary-color); }

#regionFilter {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 0.5rem;
  gap: 0.25rem;
}
#regionFilter li {
  padding: 0.4rem 0.5rem;
  text-align: center;
  border-left: none;
  border-radius: 4px;
}
#regionFilter li.active {
  background: rgba(29, 78, 216, 0.1);
  border-left: none;
}

.list-section { flex: 1; min-width: 0; }

.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--primary-color); gap: 1rem; }
.list-header h2 { font-size: 1.25rem; color: var(--text-primary); white-space: nowrap; }
.list-header-right { display: flex; align-items: center; gap: 0.75rem; }
.sort-tabs span { font-size: 0.9rem; color: var(--primary-color); cursor: pointer; }

/* Export Button */
.export-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1rem; background: var(--success-color); color: white;
  border: none; border-radius: 6px; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; white-space: nowrap; font-family: inherit;
}
.export-btn:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.export-btn:active { transform: translateY(0); }

/* ========== List Items ========== */
.bids-list { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 8px; }
.list-item { display: flex; flex-direction: column; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); text-decoration: none; transition: background 0.2s; position: relative; }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--hover-bg); }
.item-top { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem; }
.item-badge { background: #e0e7ff; color: #3730a3; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; white-space: nowrap; flex-shrink: 0; }
.item-title { font-size: 1.05rem; color: var(--text-primary); font-weight: 500; line-height: 1.4; flex: 1; }
.list-item:hover .item-title { color: var(--primary-color); }

/* Favorite Star */
.fav-star-btn { background: none; border: none; cursor: pointer; padding: 0.25rem; flex-shrink: 0; transition: transform 0.2s; line-height: 1; }
.fav-star-btn:hover { transform: scale(1.2); }
.fav-star-btn.active { animation: starBounce 0.4s ease; }
@keyframes starBounce { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
.fav-star-btn svg { width: 20px; height: 20px; stroke: var(--text-secondary); fill: none; transition: all 0.2s; }
.fav-star-btn.active svg { stroke: var(--gold-color); fill: var(--gold-color); }
.fav-star-btn:hover svg { stroke: var(--gold-color); }

.item-meta { display: flex; gap: 2rem; color: var(--text-secondary); font-size: 0.85rem; padding-left: calc(0.75rem + 3.5rem); }
.meta-info { display: flex; align-items: center; gap: 0.3rem; }
.item-budget { display: inline-flex; align-items: center; gap: 0.25rem; background: #fef3c7; color: #92400e; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 500; }
.highlight { color: var(--danger-color); font-weight: 600; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 2rem; padding-bottom: 3rem; }

/* Loader */
.loader-container { padding: 3rem 0; text-align: center; }
.loader { width: 30px; height: 30px; border: 3px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; display: none; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Auth Modal ========== */
.auth-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(5px); z-index: 1000; display: flex; justify-content: center; align-items: center; }
.auth-box { background: var(--surface-color); border-radius: 12px; padding: 2.5rem; width: 90%; max-width: 400px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); text-align: center; }
.auth-brand { margin-bottom: 1rem; }
.auth-box h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.auth-subtitle { color: var(--text-secondary); margin-bottom: 2rem; font-size: 0.9rem; }
.input-group { margin-bottom: 1rem; }
.input-group input { width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border-color); border-radius: 6px; font-size: 1rem; }
.input-group input:focus { outline: none; border-color: var(--primary-color); }
.role-selector { display: flex; justify-content: space-around; margin-bottom: 1.5rem; font-size: 0.9rem; }
.role-radio { cursor: pointer; display: flex; align-items: center; gap: 0.3rem; }
.block-btn { width: 100%; padding: 0.8rem; font-size: 1.1rem; border-radius: 6px; margin-top: 0.5rem; }
.auth-switch { margin-top: 1.5rem; font-size: 0.9rem; }
.auth-switch a { color: var(--primary-color); text-decoration: none; font-weight: 500; }
.auth-error { color: var(--danger-color); margin-top: 1rem; font-size: 0.9rem; min-height: 20px; }

/* ========== Detail Section ========== */
.detail-section { flex: 1; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 2rem; min-width: 0; }
.detail-top-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--border-color); gap: 0.75rem; flex-wrap: wrap; }
.detail-top-nav-right { display: flex; align-items: center; gap: 0.5rem; }
.primary-outline { border-color: var(--primary-color); color: var(--primary-color); text-decoration: none; display: inline-block; }
.detail-fav-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 1rem; border: 1px solid var(--border-color); border-radius: 6px; background: transparent; cursor: pointer; font-size: 0.9rem; font-family: inherit; color: var(--text-secondary); transition: all 0.2s; }
.detail-fav-btn:hover { border-color: var(--gold-color); color: var(--gold-color); }
.detail-fav-btn.active { border-color: var(--gold-color); color: var(--gold-color); background: #fffbeb; }
.detail-header { text-align: center; margin-bottom: 2rem; }
.detail-header h1 { font-size: 1.5rem; color: var(--text-primary); margin-bottom: 1rem; line-height: 1.4; }
.detail-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; color: var(--text-secondary); font-size: 0.9rem; background: var(--bg-color); padding: 1rem; border-radius: 6px; }
.detail-badge { background: #e0e7ff; color: #3730a3; padding: 0.2rem 0.5rem; border-radius: 4px; }

/* ========== AI Summary Box ========== */
.ai-summary-box { background: linear-gradient(135deg, var(--purple-light) 0%, #ede9fe 100%); border: 1px solid var(--purple-border); border-radius: 12px; padding: 1.75rem; margin-bottom: 2rem; position: relative; overflow: hidden; }
.ai-summary-box::before { content: ''; position: absolute; top: -30px; right: -30px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%); border-radius: 50%; }
.ai-summary-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.ai-summary-header h3 { color: var(--purple-color); font-size: 1.05rem; display: flex; align-items: center; gap: 0.4rem; }
.ai-status-badge { font-size: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 12px; font-weight: 500; }
.ai-status-badge.loading { background: #fef3c7; color: #92400e; }
.ai-status-badge.done { background: #d1fae5; color: #065f46; }
.ai-status-badge.cached { background: #e0e7ff; color: #3730a3; }

.ai-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.ai-card { background: var(--surface-color); border-radius: 8px; padding: 1rem; border: 1px solid rgba(139, 92, 246, 0.15); transition: all 0.2s; }
.ai-card:hover { border-color: rgba(139, 92, 246, 0.35); box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08); }
.ai-card-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.3rem; }
.ai-card-value { font-size: 0.95rem; color: var(--text-primary); font-weight: 500; word-break: break-all; }
.ai-card.budget .ai-card-value { font-size: 1.3rem; color: #b45309; font-weight: 700; }
.ai-card.contact .ai-card-value { color: var(--primary-color); }
.ai-card.contact .ai-card-value a { color: inherit; text-decoration: none; }
.ai-card.contact .ai-card-value a:hover { text-decoration: underline; }
.ai-card.qualification { grid-column: 1 / -1; }
.ai-card.qualification .ai-card-value { font-size: 0.9rem; font-weight: 400; line-height: 1.6; }
.ai-summary-text { background: var(--surface-color); border-radius: 8px; padding: 1rem; font-size: 0.95rem; line-height: 1.7; color: var(--text-primary); border: 1px solid rgba(139, 92, 246, 0.15); }

.ai-skeleton { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem 0; }
.ai-skeleton-line { height: 14px; background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
.ai-skeleton-line:nth-child(1) { width: 85%; } .ai-skeleton-line:nth-child(2) { width: 65%; } .ai-skeleton-line:nth-child(3) { width: 75%; } .ai-skeleton-line:nth-child(4) { width: 50%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ========== Detail Content ========== */
.detail-content { background: #ffffff; padding: 3rem 4rem; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); line-height: 2; font-size: 1.05rem; color: #334155; overflow-x: auto; font-family: 'Noto Sans SC', sans-serif; }
.detail-content * { max-width: 100% !important; font-family: inherit !important; }
.detail-content p { margin-bottom: 1.2rem; text-align: justify; }
.detail-content h1, .detail-content h2, .detail-content h3 { color: #1e293b; margin-top: 2rem; margin-bottom: 1rem; font-weight: 600; }
.detail-content h1 { font-size: 1.5rem; border-bottom: 2px solid #f1f5f9; padding-bottom: 0.5rem; }
.detail-content h2 { font-size: 1.3rem; } .detail-content h3 { font-size: 1.15rem; }
.detail-content a { color: var(--primary-color); text-decoration: none; }
.detail-content a:hover { text-decoration: underline; }
.detail-content table { width: 100% !important; border-collapse: collapse; margin: 2rem 0; font-size: 0.95rem; box-shadow: 0 0 0 1px #e2e8f0; border-radius: 4px; overflow: hidden; }
.detail-content th, .detail-content td { border: 1px solid #e2e8f0; padding: 0.75rem 1rem; text-align: left; }
.detail-content th { background-color: #f8fafc; color: #0f172a; font-weight: 600; }
.detail-content tr:nth-child(even) { background-color: #f8fafc; }
.detail-content tr:hover { background-color: #f1f5f9; }
.detail-content img { display: block; margin: 2rem auto; border-radius: 4px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }

/* ========== Dashboard / Workspace ========== */
.dashboard-section { flex: 1; min-width: 0; }
.dash-header { margin-bottom: 2rem; }
.dash-header h2 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.dash-header p { color: var(--text-secondary); font-size: 0.9rem; }

.dash-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.dash-stat-card {
  background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 10px;
  padding: 1.25rem; text-align: center; transition: all 0.2s;
}
.dash-stat-card:hover { border-color: var(--primary-color); box-shadow: 0 4px 12px rgba(29, 78, 216, 0.08); transform: translateY(-2px); }
.dash-stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.dash-stat-val { font-size: 1.8rem; font-weight: 700; color: var(--primary-color); }
.dash-stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }

.dash-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.dash-panel {
  background: var(--surface-color); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 1.5rem; min-height: 200px;
}
.dash-panel h3 { font-size: 1.05rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem; color: var(--text-primary); }

/* Subscription list */
.sub-list { list-style: none; }
.sub-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 0; border-bottom: 1px solid var(--hover-bg);
  font-size: 0.9rem;
}
.sub-item:last-child { border-bottom: none; }
.sub-keyword { font-weight: 500; color: var(--primary-color); }
.sub-meta { font-size: 0.8rem; color: var(--text-secondary); }
.sub-del-btn {
  background: none; border: none; color: var(--danger-color);
  cursor: pointer; font-size: 0.85rem; padding: 0.25rem 0.5rem;
  border-radius: 4px; transition: background 0.2s;
}
.sub-del-btn:hover { background: #fef2f2; }

/* Add subscription form */
.sub-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.sub-form input {
  flex: 1; height: 36px; padding: 0 0.75rem; border: 1px solid var(--border-color);
  border-radius: 6px; font-size: 0.85rem; font-family: inherit;
}
.sub-form input:focus { outline: none; border-color: var(--primary-color); }
.sub-form button {
  height: 36px; padding: 0 1rem; background: var(--primary-color); color: white;
  border: none; border-radius: 6px; font-size: 0.85rem; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}

/* Push settings */
.push-settings { margin-top: 1.5rem; background: var(--bg-color); padding: 1.25rem; border-radius: 8px; border: 1px dashed var(--border-color); }
.push-settings h4 { font-size: 0.95rem; margin-bottom: 1rem; color: var(--text-primary); display: flex; align-items: center; justify-content: space-between; }
.push-form-group { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.push-form-group select { padding: 0 0.5rem; border: 1px solid var(--border-color); border-radius: 6px; font-family: inherit; font-size: 0.85rem; width: 100px; }
.push-form-group input { flex: 1; height: 36px; padding: 0 0.75rem; border: 1px solid var(--border-color); border-radius: 6px; font-size: 0.85rem; font-family: inherit; }
.push-form-group input:focus, .push-form-group select:focus { outline: none; border-color: var(--primary-color); }
.push-save-btn { width: 100%; height: 36px; background: var(--surface-color); border: 1px solid var(--border-color); color: var(--text-primary); border-radius: 6px; cursor: pointer; transition: all 0.2s; font-size: 0.85rem; }
.push-save-btn:hover { background: var(--hover-bg); border-color: var(--primary-color); color: var(--primary-color); }

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 20px; }
.slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(20px); }

/* Notification list */
.notif-list { list-style: none; }
.notif-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0; border-bottom: 1px solid var(--hover-bg);
  font-size: 0.85rem; cursor: pointer; transition: background 0.2s;
}
.notif-item:hover { background: var(--hover-bg); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: 4px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { font-weight: 600; }
.notif-item.unread::before { content: ''; width: 6px; height: 6px; background: var(--primary-color); border-radius: 50%; flex-shrink: 0; margin-right: 0.5rem; }
.notif-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.notif-time { color: var(--text-secondary); font-size: 0.75rem; margin-left: 0.5rem; white-space: nowrap; }

/* Entity directory */
.entity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.entity-card {
  background: var(--hover-bg); border-radius: 6px; padding: 0.6rem 0.8rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; transition: all 0.2s;
}
.entity-card:hover { background: var(--primary-light); }
.entity-name { font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.entity-count { background: var(--primary-light); color: var(--primary-color); padding: 0.1rem 0.5rem; border-radius: 10px; font-size: 0.75rem; font-weight: 600; }

/* Mark all read button */
.mark-read-btn { font-size: 0.8rem; color: var(--primary-color); background: none; border: none; cursor: pointer; padding: 0.2rem 0.5rem; border-radius: 4px; }
.mark-read-btn:hover { background: var(--primary-light); }

/* Empty state */
.empty-state { text-align: center; color: var(--text-secondary); padding: 2rem 1rem; font-size: 0.9rem; }

/* ========== Toast ========== */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--text-primary); color: white; padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 0.9rem; z-index: 2000; opacity: 0; transition: all 0.3s ease; pointer-events: none; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== Mobile ========== */
@media (max-width: 768px) {
  .header-container { padding: 0 1rem; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface-color); flex-direction: column; gap: 0; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); z-index: 100; }
  .nav-links.show { display: flex; }
  .nav-links a { padding: 1rem; border-bottom: 1px solid var(--hover-bg); width: 100%; text-align: center; }
  .user-profile { border-left: none; margin: 0; padding: 1rem; border-bottom: 1px solid var(--hover-bg); width: 100%; justify-content: center; }
  .mobile-menu-btn { display: block; }
  .search-section { padding: 1.5rem 1rem 1rem; }
  .search-box { flex-direction: column; }
  .primary-btn { width: 100%; }
  .adv-filter-row { flex-direction: column; gap: 0.5rem; }
  .adv-filter-row input[type="date"], .adv-filter-row input[type="number"] { width: 100%; }
  .main-content { flex-direction: column; padding: 0 1rem; margin: 1rem auto; gap: 1rem; }
  .sidebar { width: 100%; display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }
  .filter-group { flex: 1; min-width: 150px; margin-bottom: 0; }
  .list-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .list-header-right { width: 100%; justify-content: space-between; }
  .item-meta { flex-direction: column; gap: 0.5rem; padding-left: 0; margin-top: 0.5rem; }
  .item-top { flex-direction: column; align-items: flex-start; }
  .item-badge { margin-bottom: 0.2rem; }
  .detail-content { padding: 1.5rem; }
  .detail-top-nav { flex-direction: column; }
  .detail-top-nav-right { width: 100%; justify-content: space-between; }
  .ai-cards-grid { grid-template-columns: 1fr; }
  .ai-card.qualification { grid-column: auto; }
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-panels { grid-template-columns: 1fr; }
  .entity-grid { grid-template-columns: 1fr; }
}

/* ========================================================
   🔥 酷炫数据大屏工作台样式 (Dark Tech Theme & Glassmorphism)
   ======================================================== */
#dashboardSection {
  background: radial-gradient(circle at top right, #0f172a, #020617);
  color: #e2e8f0;
  padding: 2rem;
  min-height: 100vh;
  border-radius: 12px;
}

.dash-header h2 {
  color: #f8fafc;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.dash-subtitle {
  color: #94a3b8;
  font-size: 1rem;
}

/* KPI 核心卡片 */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: skewX(-20deg);
  animation: shine 6s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

.kpi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.4);
}

.kpi-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
}
.glow-blue { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.glow-green { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.glow-purple { color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }

.kpi-icon svg {
  width: 32px; height: 32px;
  filter: drop-shadow(0 0 8px currentColor);
}

.kpi-info h4 {
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
  text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* 图表容器栅格 */
.dash-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-container.wide {
  grid-column: span 2;
}

.chart-container {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.chart-container:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.chart-title {
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  padding-left: 0.8rem;
  border-left: 3px solid #3b82f6;
  text-shadow: 0 0 8px rgba(59,130,246,0.3);
}

.echarts-box {
  width: 100%;
  height: 350px;
}

/* 覆盖旧面板样式以适配大屏 */
.dash-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.dash-panel {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
}
.dash-panel h3 { color: #f8fafc; }
.dash-panel input {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}
.notif-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
.notif-item h4 { color: #fff; }
.notif-item p { color: #94a3b8; }
.sub-item { background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255,255,255,0.1); }
