@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500&display=swap');

:root {
  --esp-red: #e7352b;
  --esp-red-hover: #ff4a40;
  --esp-red-muted: rgba(231, 53, 43, 0.18);
  --esp-red-glow: rgba(231, 53, 43, 0.35);
  --bg-page: #0f1114;
  --bg-surface: #161a20;
  --bg-elevated: #1c2129;
  --bg-input: #12161c;
  --bg-filter: #141820;
  --bg-subtle: #131820;
  --border: #2a3140;
  --border-soft: #222830;
  --border-focus: rgba(231, 53, 43, 0.55);
  --text-primary: #e8eaed;
  --text-secondary: #9aa3b2;
  --text-muted: #6b7380;
  --text-link: #ff6b63;
  --row-hover: #1a2030;
  --row-stripe: #13171e;
  --status-active: #3ecf8e;
  --status-preview: #6ba3ff;
  --status-legacy: #7a8290;
  --status-negative: #ff9147;
  --status-negative-muted: rgba(255, 145, 71, 0.12);
  --font-sans: 'Source Sans 3', system-ui, sans-serif;
  --font-mono: 'Source Code Pro', monospace;
  --header-h: 64px;
  --radius: 6px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --content-max: 1120px;
  --product-sidebar-w: 280px;
  --ease-out: 150ms ease;
  --ease-medium: 250ms ease;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.25);
  --scrollbar-thumb: #3a4254;
  --scrollbar-thumb-hover: #4d566c;
  --scrollbar-size: 6px;
  --series-c: #4dd0e1;
  --series-s: #f5a623;
  --series-h: #3ecf8e;
  --series-p: #b18cff;
  --series-classic: #9aa3b2;
  --breakpoint-tablet: 900px;
  --breakpoint-mobile: 640px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  background:
    radial-gradient(ellipse 1200px 600px at 15% -10%, rgba(231, 53, 43, 0.07), transparent),
    radial-gradient(ellipse 900px 500px at 100% 0%, rgba(107, 163, 255, 0.05), transparent),
    var(--bg-page);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

:focus-visible {
  outline: 2px solid var(--esp-red);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--border-focus);
}

::selection { background: var(--esp-red-muted); }

.state-panel {
  text-align: center;
  padding: var(--space-8) var(--space-6);
  color: var(--text-secondary);
}

.state-panel__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--text-muted);
}

.state-panel__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.state-panel__text {
  font-size: var(--text-base);
  margin-bottom: var(--space-5);
}

.state-panel__cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--esp-red);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--ease-out);
}

.state-panel__cta:hover {
  background: var(--esp-red-hover);
  text-decoration: none;
}

.badge--series {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 9px;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge--series-c { background: rgba(77, 208, 225, 0.16); color: var(--series-c); }
.badge--series-s { background: rgba(245, 166, 35, 0.16); color: var(--series-s); }
.badge--series-h { background: rgba(62, 207, 142, 0.16); color: var(--series-h); }
.badge--series-p { background: rgba(177, 140, 255, 0.16); color: var(--series-p); }
.badge--series-classic { background: rgba(154, 163, 178, 0.15); color: var(--series-classic); }

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-input) 50%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s ease infinite;
  border-radius: var(--radius-sm);
  display: block;
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
