/**
 * Agent Arena V2 - Comprehensive CSS
 * Theme: 金融专业风 (Financial Professional) Light Theme
 * Version: 2.1 — Typography Refined
 * Last Updated: 2026-03-18
 */

/* =========================================================================
   WEB FONTS
   - Playfair Display: 高端衬线标题字体
   - Inter: 正文无衬线字体（含中文 fallback Noto Sans SC）
   - DM Mono: 轻量等宽字体（替代 Courier New，用于数字/代码）
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@300;400;500&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* =========================================================================
   CSS VARIABLES — 字体令牌系统
   ========================================================================= */
:root {
  /* 字体族 */
  --font-heading: 'Playfair Display', Georgia, 'Noto Serif SC', serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', 'Fira Code', monospace;

  /* 字重 */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* 字号阶梯（Major Third 1.25 比例） */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: 36px;
  --fs-4xl: 48px;

  /* 行高 */
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  /* 字间距 */
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.04em;
  --ls-caps: 0.1em;
}

/* =========================================================================
   RESET & FOUNDATIONS
   ========================================================================= */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: #faf9f7;
  color: #1a1a1a;
  line-height: var(--lh-normal);
  overflow-x: hidden;
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-normal);
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* =========================================================================
   TYPOGRAPHY HIERARCHY
   ========================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: 0.5em;
  letter-spacing: var(--ls-tight);
  color: #1a1a1a;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-base); font-weight: var(--fw-semibold); }

p {
  margin-bottom: 1em;
  line-height: var(--lh-relaxed);
}

/* 数字专用样式 — 大数字、价格、收益率 */
.num-display {
  font-family: var(--font-heading);
  font-weight: var(--fw-light);
  letter-spacing: var(--ls-tight);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.num-data {
  font-family: var(--font-mono);
  font-weight: var(--fw-regular);
  letter-spacing: 0.01em;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.num-price {
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* 标签文字 — 小号大写 */
.label-caps {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  color: #8a8a8a;
}

/* 辅助说明文字 */
.text-caption {
  font-size: var(--fs-sm);
  color: #8a8a8a;
  line-height: var(--lh-snug);
}

a {
  color: #c8a45c;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #d4b073;
  text-decoration: underline;
}

/* =========================================================================
   NAVBAR
   ========================================================================= */

.navbar {
  background-color: #1b2838;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: var(--fw-semibold);
  color: #c8a45c;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.navbar-nav {
  display: flex;
  gap: 32px;
  list-style: none;
  flex: 1;
  margin-left: 64px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  padding: 0 0 4px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-item:hover {
  color: #c8a45c;
}

.nav-item.active {
  color: #c8a45c;
  border-bottom-color: #c8a45c;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  padding: 0 0 4px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #c8a45c;
}

.nav-link.active {
  color: #c8a45c;
  border-bottom-color: #c8a45c;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  padding: 0 0 4px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-login:hover {
  color: #c8a45c;
}

.navbar-right,
.nav-right {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-left: auto;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1.5px solid #c8a45c;
  background-color: transparent;
  color: #c8a45c;
  font-family: var(--font-heading);
}

.btn-sm:hover {
  background-color: #c8a45c;
  color: #1b2838;
}

/* =========================================================================
   LAYOUT: CONTAINER & GRID
   ========================================================================= */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }

.flex {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* =========================================================================
   SPACING UTILITIES
   ========================================================================= */

.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 32px; }

.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.mb-xl { margin-bottom: 32px; }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.p-sm { padding: 8px; }
.p-md { padding: 16px; }
.p-lg { padding: 24px; }

/* =========================================================================
   HERO SECTION
   ========================================================================= */

.hero {
  background-color: #faf9f7;
  border-top: 3px solid #c8a45c;
  padding: 60px 32px 40px 32px;
  text-align: center;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  color: #1a1a1a;
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  color: #4a4a4a;
  margin-bottom: 20px;
  font-weight: var(--fw-regular);
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: #8a8a8a;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

/* =========================================================================
   TICKER BAR
   ========================================================================= */

.ticker-bar {
  background-color: #f3f1ed;
  padding: 12px 32px;
  border-bottom: 1px solid #e8e4de;
  overflow: hidden;
}

.ticker-content {
  display: flex;
  gap: 40px;
  font-size: 13px;
  font-weight: 500;
  animation: scroll-ticker 30s linear infinite;
}

.ticker-item {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.ticker-label {
  color: #1a1a1a;
  font-weight: 600;
}

.ticker-value {
  color: #4a4a4a;
}

.ticker-up {
  color: #16a34a;
  font-weight: 600;
}

.ticker-down {
  color: #dc2626;
  font-weight: 600;
}

@keyframes scroll-ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* =========================================================================
   STATS BAR
   ========================================================================= */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 24px 32px;
  background-color: #faf9f7;
}

.card-stat {
  background-color: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border-top: 3px solid #c8a45c;
}

.card-stat-label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: #8a8a8a;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  margin-bottom: 8px;
}

.card-stat-value {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: var(--fw-light);
  color: #1a1a1a;
  letter-spacing: var(--ls-tight);
  line-height: 1.1;
}

.card-stat-sub {
  font-size: var(--fs-xs);
  color: #8a8a8a;
  margin-top: 6px;
  font-weight: var(--fw-medium);
}

/* =========================================================================
   CARDS
   ========================================================================= */

.card {
  background-color: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e4de;
}

.card-value {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-light);
  color: #1a1a1a;
  letter-spacing: var(--ls-tight);
}

.card-sub {
  font-size: 12px;
  color: #8a8a8a;
  margin-top: 4px;
}

/* =========================================================================
   TABLES
   ========================================================================= */

.table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
}

.table th {
  padding: 10px 16px;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  background-color: #f3f1ed;
  border-bottom: 1px solid #e8e4de;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e8e4de;
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-snug);
}

.table tbody tr:hover {
  background-color: #faf9f7;
}

.sortable-table th {
  cursor: pointer;
  user-select: none;
}

.sortable-table th:hover {
  background-color: #ede9e3;
}

/* =========================================================================
   TEXT UTILITIES
   ========================================================================= */

.text-up {
  color: #dc2626;   /* 涨红 — 中国股市规范 */
  font-weight: var(--fw-semibold);
}

.text-down {
  color: #16a34a;   /* 跌绿 — 中国股市规范 */
  font-weight: var(--fw-semibold);
}

.text-muted {
  color: #8a8a8a;
}

.text-secondary {
  color: #4a4a4a;
}

.text-primary {
  color: #1a1a1a;
}

.text-accent {
  color: #c8a45c;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-bold { font-weight: 700; }
.text-semi { font-weight: 600; }
.text-normal { font-weight: 400; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =========================================================================
   BADGES
   ========================================================================= */

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  background-color: #f3f1ed;
  color: #4a4a4a;
  border: 0.5px solid #e8e4de;
}

.badge-green {
  background-color: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.badge-red {
  background-color: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.badge-blue {
  background-color: #dbeafe;
  color: #1e3a8a;
  border-color: #93c5fd;
}

.badge-gold {
  background-color: #fef3c7;
  color: #92400e;
  border-color: #fde047;
}

/* =========================================================================
   TAGS
   ========================================================================= */

.tag {
  display: inline-block;
  background-color: #f3f1ed;
  color: #4a4a4a;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  border: 0.5px solid #e8e4de;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #c8a45c;
  color: #ffffff;
  border-color: #c8a45c;
}

.btn-primary:hover {
  background-color: #d4b073;
  border-color: #d4b073;
}

.btn-outline {
  background-color: transparent;
  color: #c8a45c;
  border: 1.5px solid #c8a45c;
}

.btn-outline:hover {
  background-color: #c8a45c;
  color: #ffffff;
}

.btn-buy {
  background-color: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

.btn-buy:hover {
  background-color: #15803d;
  border-color: #15803d;
}

.btn-sell {
  background-color: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-sell:hover {
  background-color: #b91c1c;
  border-color: #b91c1c;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 32px;
  font-size: 16px;
}

/* =========================================================================
   FORMS
   ========================================================================= */

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #e8e4de;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1a1a1a;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #c8a45c;
  box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-input::placeholder {
  color: #8a8a8a;
}

/* =========================================================================
   TABS
   ========================================================================= */

.tabs-container {
  display: flex;
  flex-direction: column;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid #e8e4de;
  gap: 0;
}

.tab {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #4a4a4a;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: transparent;
  border: none;
  font-family: var(--font-heading);
}

.tab:hover {
  color: #1a1a1a;
  background-color: #faf9f7;
}

.tab.active {
  color: #c8a45c;
  border-bottom-color: #c8a45c;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* =========================================================================
   SECTIONS & CARDS
   ========================================================================= */

.section-header {
  padding: 16px;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  background-color: #faf9f7;
  border-bottom: 1px solid #e8e4de;
}

.rank-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: #c8a45c;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f1ed;
  border-radius: 50%;
}

.profit-value {
  font-family: var(--font-mono);
  font-weight: 600;
}

.profit-positive {
  color: #16a34a;
}

.profit-negative {
  color: #dc2626;
}

/* =========================================================================
   MARKET INDICES
   ========================================================================= */

.market-indices {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.index-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background-color: #f3f1ed;
  border-radius: 6px;
  border: 0.5px solid #e8e4de;
}

.index-label {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
}

.index-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
}

.index-change {
  font-size: 12px;
  font-weight: 600;
}

.index-up {
  color: #16a34a;
}

.index-down {
  color: #dc2626;
}

/* =========================================================================
   ALERTS & NOTIFICATIONS
   ========================================================================= */

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border-left: 4px solid transparent;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border-left-color: #16a34a;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border-left-color: #dc2626;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-left-color: #fbbf24;
}

.alert-info {
  background-color: #dbeafe;
  color: #1e3a8a;
  border-left-color: #3b82f6;
}

/* =========================================================================
   MODAL
   ========================================================================= */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(26, 26, 26, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e8e4de;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #1a1a1a;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #8a8a8a;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: #1a1a1a;
}

.modal-body {
  padding: 20px;
}

/* =========================================================================
   SIDEBAR
   ========================================================================= */

.sidebar {
  background-color: #f3f1ed;
  border-right: 1px solid #e8e4de;
  width: 240px;
  min-height: 100vh;
  padding: 20px 0;
}

.sidebar-item {
  padding: 12px 16px;
  color: #4a4a4a;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-weight: 500;
}

.sidebar-item:hover {
  background-color: #ede9e3;
  color: #1a1a1a;
}

.sidebar-item.active {
  background-color: #faf9f7;
  color: #c8a45c;
  border-left-color: #c8a45c;
}

/* =========================================================================
   CODE BLOCK
   ========================================================================= */

.code-block {
  background-color: #1b2838;
  color: #e8e4de;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}

.code-block code {
  color: #e8e4de;
}

/* =========================================================================
   PAGINATION
   ========================================================================= */

.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 16px 0;
}

.pagination-item {
  padding: 8px 12px;
  border: 1px solid #e8e4de;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #ffffff;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 13px;
}

.pagination-item:hover {
  border-color: #c8a45c;
  color: #c8a45c;
}

.pagination-item.active {
  background-color: #c8a45c;
  color: #ffffff;
  border-color: #c8a45c;
}

.pagination-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.footer {
  background-color: #1b2838;
  color: #8a8a8a;
  padding: 32px;
  text-align: center;
  font-size: 12px;
  border-top: 1px solid #2d3f54;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer a {
  color: #c8a45c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  text-decoration: underline;
}

.footer p {
  margin: 0;
}

.footer p + p {
  margin-top: 12px;
}

/* =========================================================================
   CHARTS & VISUALIZATIONS
   ========================================================================= */

.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
  background-color: #ffffff;
  border: 1px solid #e8e4de;
  border-radius: 8px;
  padding: 16px;
}

.sparkline {
  display: inline-block;
  width: 60px;
  height: 20px;
  vertical-align: middle;
}

.ring-chart {
  width: 100%;
  height: auto;
}

/* =========================================================================
   PODIUM
   ========================================================================= */

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  height: 200px;
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.podium-rank {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.podium-rank.first {
  background-color: #c8a45c;
  order: 2;
  height: 140px;
}

.podium-rank.second {
  background-color: #a8a8a8;
  order: 1;
  height: 100px;
}

.podium-rank.third {
  background-color: #d4a574;
  order: 3;
  height: 60px;
}

.podium-label {
  font-size: 12px;
  font-weight: 600;
  color: #4a4a4a;
}

/* =========================================================================
   SCROLLBAR
   ========================================================================= */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f3f1ed;
}

::-webkit-scrollbar-thumb {
  background: #c8a45c;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4b073;
}

/* =========================================================================
   ANIMATIONS
   ========================================================================= */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* =========================================================================
   RESPONSIVE DESIGN
   ========================================================================= */

@media (max-width: 1200px) {
  .container {
    padding: 0 24px;
  }

  .navbar {
    padding: 0 24px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .navbar-nav {
    margin-left: 32px;
    gap: 24px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  .navbar {
    padding: 0 16px;
    height: 48px;
  }

  .navbar-logo {
    font-size: 20px;
  }

  .navbar-nav {
    display: none;
  }

  .navbar-right {
    margin-left: auto;
  }

  .hero {
    padding: 40px 16px 24px 16px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-tagline {
    font-size: 12px;
  }

  .ticker-bar {
    padding: 8px 16px;
  }

  .ticker-content {
    gap: 32px;
  }

  .stats-bar {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .container {
    padding: 0 16px;
  }

  .card {
    padding: 16px;
  }

  .card-title {
    font-size: 14px;
  }

  .table {
    font-size: 12px;
  }

  .table th,
  .table td {
    padding: 10px 12px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e8e4de;
    min-height: auto;
    padding: 0;
  }

  .sidebar-item {
    padding: 10px 12px;
    font-size: 12px;
  }

  .modal {
    width: 95%;
    max-width: none;
  }

  .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }

  .navbar {
    height: 44px;
    padding: 0 12px;
  }

  .navbar-logo {
    font-size: 18px;
  }

  .navbar-right {
    gap: 8px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }

  .hero {
    padding: 32px 12px 16px 12px;
  }

  .hero-title {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .hero-tagline {
    font-size: 11px;
  }

  .card-stat-value {
    font-size: 22px;
  }

  .stat-mini-value {
    font-size: 16px;
  }

  .container {
    padding: 0 12px;
  }

  .table {
    font-size: 11px;
  }

  .table th,
  .table td {
    padding: 8px 10px;
  }

  .card {
    padding: 12px;
  }

  .section-header {
    padding: 12px;
    font-size: 14px;
  }

  .gap-sm { gap: 4px; }
  .gap-md { gap: 8px; }
  .gap-lg { gap: 12px; }

  .mt-sm { margin-top: 4px; }
  .mt-md { margin-top: 8px; }
  .mt-lg { margin-top: 12px; }

  .mb-sm { margin-bottom: 4px; }
  .mb-md { margin-bottom: 8px; }
  .mb-lg { margin-bottom: 12px; }
}

/* =========================================================================
   UTILITY HELPERS
   ========================================================================= */

.hidden { display: none !important; }
.visible { display: block !important; }
.invisible { visibility: hidden; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.float-left { float: left; }
.float-right { float: right; }
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

.no-wrap { white-space: nowrap; }
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

.user-select-none { user-select: none; }
.user-select-all { user-select: all; }

/* =========================================================================
   PRINT STYLES
   ========================================================================= */

@media print {
  body {
    background-color: #ffffff;
  }

  .navbar,
  .footer,
  .no-print {
    display: none;
  }

  .container {
    max-width: 100%;
  }

  a {
    text-decoration: underline;
  }
}
