@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@600;700;900&display=swap');

:root {
  --brand-primary: #0f766e;
  --brand-accent: #0284c7;
  --brand-ink: #0f172a;
  --brand-purple: #0f766e;
  --brand-violet: #0284c7;
  --brand-gradient: linear-gradient(130deg, #0f766e 0%, #0284c7 52%, #155e75 100%);

  --bg-primary: #edf2f7;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-soft: rgba(248, 251, 255, 0.82);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-light: rgba(148, 163, 184, 0.34);
  --shadow-sm: 0 8px 18px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 14px 30px rgba(15, 23, 42, 0.11);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.16);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0284c7;

  --font-stack: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'Noto Serif SC', serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', 'SF Mono', Menlo, Consolas, monospace;
}

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

body {
  font-family: var(--font-stack);
  background:
    radial-gradient(1200px 520px at 92% -10%, rgba(14, 116, 144, 0.2), transparent 60%),
    radial-gradient(1000px 540px at -12% 20%, rgba(5, 150, 105, 0.16), transparent 58%),
    linear-gradient(180deg, #f3f6fa 0%, #edf2f7 42%, #e8eef4 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Navigation */
.neta-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 66px;
  padding: 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-light);
  background: rgba(250, 253, 255, 0.82);
  backdrop-filter: blur(13px) saturate(130%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.neta-nav__brand {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #0b5344;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 0.45rem;
}

.neta-nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.34rem;
  flex: 1;
  min-width: 0;
}

.neta-nav__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.81rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.38rem 0.76rem;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.neta-nav__links a:hover {
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.26);
  background: rgba(16, 185, 129, 0.14);
}

.neta-nav__links a.active {
  color: #ffffff;
  border-color: transparent;
  background: var(--brand-gradient);
  box-shadow: 0 7px 14px rgba(2, 132, 199, 0.24);
}

.neta-nav__status {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  padding: 0.26rem 0.52rem;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.neta-nav__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}

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

@media (max-width: 860px) {
  .neta-nav {
    height: auto;
    flex-wrap: wrap;
    padding: 0.62rem 0.9rem;
    gap: 0.5rem;
  }

  .neta-nav__links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .neta-nav__status {
    margin-left: auto;
  }
}

/* Layout */
.neta-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.3rem;
}

.neta-header {
  margin-bottom: 1.15rem;
}

.neta-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #0b3a2e;
}

.neta-subtitle {
  margin-top: 0.28rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Cards */
.neta-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  padding: 1.05rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.neta-card:hover {
  transform: translateY(-2px);
  border-color: rgba(2, 132, 199, 0.42);
  box-shadow: var(--shadow-md);
}

.neta-card--stat {
  padding: 0.82rem 0.9rem;
}

.neta-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.neta-card__header h2,
.neta-card__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Stat cards */
.neta-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.neta-stats--wow .neta-card {
  background: var(--bg-card-soft);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-bottom: 0.28rem;
  font-weight: 600;
}

.stat-value {
  font-family: 'Manrope', var(--font-stack);
  font-size: 1.68rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.16;
}

.stat-change {
  font-size: 0.74rem;
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  display: inline-block;
  margin-top: 0.34rem;
  font-weight: 700;
}

.stat-change.up {
  background: rgba(16, 185, 129, 0.16);
  color: #065f46;
}

.stat-change.down {
  background: rgba(239, 68, 68, 0.14);
  color: #991b1b;
}

.stat-change.neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #334155;
}

/* Chart grid */
.neta-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.neta-chart-grid .full-width {
  grid-column: 1 / -1;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chart-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.chart-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.14rem;
}

.chart-container {
  height: 320px;
}

.chart-container.large {
  height: 390px;
}

/* Buttons */
.neta-btn,
.neta-btn.active {
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.4rem 0.76rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: all 0.16s ease;
}

.neta-btn:hover {
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.36);
  background: rgba(16, 185, 129, 0.14);
}

.neta-btn--active,
.neta-btn.active,
.neta-btn.neta-btn--active {
  color: #fff;
  border-color: transparent;
  background: var(--brand-gradient);
  box-shadow: 0 7px 14px rgba(2, 132, 199, 0.23);
}

.neta-btn--sm {
  padding: 0.34rem 0.62rem;
  font-size: 0.74rem;
}

.neta-btn--outline,
.neta-btn--export {
  border-style: dashed;
}

.neta-btn--outline:hover,
.neta-btn--export:hover {
  border-style: solid;
}

.neta-btn--primary {
  color: #fff;
  border-color: transparent;
  background: var(--brand-gradient);
}

.neta-btn-group,
.btn-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Footer and helper */
.neta-footer {
  margin-top: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.neta-text--success {
  color: #047857;
  font-weight: 700;
  font-size: 0.88rem;
}

/* Alerts */
.neta-alert {
  padding: 0.75rem 0.92rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.55rem;
  border-left: 4px solid;
  font-size: 0.84rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.neta-alert--critical {
  border-color: var(--danger);
  background: rgba(254, 226, 226, 0.72);
  color: #991b1b;
}

.neta-alert--warning {
  border-color: var(--warning);
  background: rgba(254, 243, 199, 0.72);
  color: #92400e;
}

.neta-alert--info {
  border-color: var(--info);
  background: rgba(224, 242, 254, 0.76);
  color: #075985;
}

/* Loading */
.neta-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0.7rem;
  height: 52vh;
  color: var(--text-muted);
}

.neta-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(148, 163, 184, 0.4);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Timestamp */
.neta-timestamp {
  color: var(--text-muted);
  font-size: 0.77rem;
}

/* Toast */
.neta-toast {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  background: #0f172a;
  color: #fff;
  padding: 0.68rem 1rem;
  border-radius: 10px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.24s ease;
  z-index: 120;
}

.neta-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .neta-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .neta-container {
    padding: 0.92rem;
  }

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

  .neta-card {
    padding: 0.85rem;
    border-radius: 14px;
  }

  .chart-container {
    height: 280px;
  }

  .chart-container.large {
    height: 340px;
  }
}
