/* Dashboard base styles for Tailwind CDN mode */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent: #2563eb;
}

body {
  background: #ffffff;
  color: var(--text-primary);
}

#detail {
  background: #ffffff;
}

/* ═══ Cards ═══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.card-header {
  padding: 0.9rem 1.15rem;
  font-size: 0.68rem;
  line-height: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

/* ═══ Metrics ═══ */
.metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.metric-label {
  margin-bottom: 0.35rem;
  font-size: 0.69rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.5rem;
  line-height: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.metric-sub {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.05rem;
}

/* ═══ Colors ═══ */
.up {
  color: #059669;
  font-weight: 700;
}

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

.neutral {
  color: var(--text-muted);
}

/* ═══ Signal Tags ═══ */
.signal-tag {
  display: inline-block;
  font-size: 0.65rem;
  line-height: 0.9rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}

.tag-long {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.tag-short {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.tag-neutral {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ═══ Scale Labels ═══ */
.label-ss,
.label-s,
.label-n,
.label-l,
.label-sl {
  display: inline-block;
  padding: 0.1rem 0.42rem;
  border-radius: 0.375rem;
  font-size: 0.63rem;
  font-weight: 700;
}

.label-ss {
  background: #fee2e2;
  color: #991b1b;
}

.label-s {
  background: #fef2f2;
  color: #b91c1c;
}

.label-n {
  background: #f1f5f9;
  color: #334155;
}

.label-l {
  background: #ecfdf5;
  color: #047857;
}

.label-sl {
  background: #d1fae5;
  color: #065f46;
}

/* ═══ Token List ═══ */
.token-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.78rem 1.15rem;
  border-left: 3px solid transparent;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.token-item:hover {
  background: #f8fbff;
}

.token-item.active {
  border-left-color: var(--accent);
  background: #eff6ff;
}

/* ═══ Progress Bars ═══ */
.bar-wrap {
  width: 100%;
  height: 0.38rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 260ms ease;
}

.bar-long {
  background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
}

.bar-short {
  background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
}

.bar-neutral {
  background: #94a3b8;
}

/* ═══ Alert Items ═══ */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.68rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.alert-item .time {
  color: var(--text-muted);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.67rem;
  white-space: nowrap;
  min-width: 110px;
  padding-top: 1px;
}

.alert-long {
  border-left: 3px solid #10b981;
}

.alert-short {
  border-left: 3px solid #ef4444;
}

.alert-info {
  border-left: 3px solid #3b82f6;
}

/* ═══ Buttons ═══ */
.btn-action {
  padding: 0.62rem 1rem;
  border-radius: 0.62rem;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: all 150ms ease;
}

.btn-disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.btn-long-active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
  cursor: pointer;
}

.btn-long-active:hover {
  background: #059669;
}

.btn-short-active {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.22);
  cursor: pointer;
}

.btn-short-active:hover {
  background: #dc2626;
}

/* ═══ Timeframe Buttons ═══ */
.tf-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 120ms ease;
}

.tf-btn:hover {
  background: #e2e8f0;
}

.tf-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.tf-active:hover {
  background: #1d4ed8;
}

/* ═══ Pulse ═══ */
@keyframes pulse-soft {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.52;
  }
}

.animate-pulse {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Alert modal entrance */
@keyframes bounce-in {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-bounce-in {
  animation: bounce-in 0.3s ease-out;
}
