/* EVE Corp Tools - Design System */

:root {
  /* Core palette - muted professional tones */
  --bg-base: #0a0e14;
  --bg-elevated: #151921;
  --bg-raised: #1e242e;
  --surface: #262d3a;
  --surface-hover: #2f3847;

  /* Borders & dividers */
  --border: #2a3342;
  --border-soft: #1f2633;
  --border-hover: #3d4759;

  /* Text hierarchy */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-tertiary: #6e7681;
  --text-inverse: #0a0e14;

  /* Accent colors */
  --accent-primary: #4493f8;
  --accent-primary-hover: #58a6ff;
  --accent-secondary: #f78166;
  --accent-success: #3fb950;
  --accent-warning: #d29922;
  --accent-caution: #f39c12;
  --accent-danger: #f85149;

  /* Functional colors */
  --status-ok: #238636;
  --status-warning: #9e6a03;
  --status-critical: #da3633;
  --status-neutral: #6e7681;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;

  /* Radiuses */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base reset & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

a:visited {
  color: var(--accent-primary);
}

/* Ensure links in paragraphs have good contrast */
p a,
.muted a {
  color: var(--accent-primary-hover);
  font-weight: 500;
}

p a:hover,
.muted a:hover {
  color: var(--text-primary);
}

/* Layout */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* Navigation */
.menu-btn {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 1001;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.menu-btn:hover {
  background: var(--surface);
  border-color: var(--border-hover);
}

.menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 88px var(--space-lg) var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar h3 {
  margin: 0 0 var(--space-md);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.sidebar a,
.sidebar button {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 10px var(--space-md);
  margin: var(--space-xs) 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-align: left;
}

.sidebar a:hover,
.sidebar button:hover {
  background: var(--surface);
  color: var(--accent-primary-hover);
  border-color: var(--border-soft);
}

.sidebar a:visited {
  color: var(--text-primary);
}

.sidebar form {
  margin: var(--space-md) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-soft);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* Header */
.site-header {
  margin-bottom: var(--space-xl);
}

.site-header h1 {
  margin: 0 0 var(--space-sm);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.site-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.card h2 {
  margin: 0 0 var(--space-sm);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card h3 {
  margin: var(--space-lg) 0 var(--space-md);
  font-size: 16px;
  font-weight: 600;
}

.card h4 {
  margin: var(--space-md) 0 var(--space-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Small inline character portrait - rank rows, kill/loss lists, etc. */
.portrait-inline {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  vertical-align: middle;
  flex-shrink: 0;
}

/* Ranked list (leaderboards, top-kills/losses) - rank badge + portrait +
   name on one line, a magnitude bar + value below. Not a <table>: the bar
   is the point, and a bare data table was the exact "looks ugly" complaint
   this replaced. */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.rank-list > div:nth-child(1) .rank-badge {
  background: rgba(210, 153, 34, 0.16);
  color: var(--accent-warning);
}

.rank-list > div:nth-child(2) .rank-badge {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

.rank-list > div:nth-child(3) .rank-badge {
  background: rgba(217, 119, 6, 0.16);
  color: #d97706;
}

.rank-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-value {
  flex-shrink: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.rank-bar-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--surface);
  overflow: hidden;
  margin-left: calc(22px + var(--space-sm));
}

.rank-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
}

.rank-bar-fill.danger {
  background: var(--accent-danger);
}

/* Buttons */
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

button:hover,
.button:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

button:active,
.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
  font-weight: 600;
}

.button.primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
}

.button.discord {
  background: #5865f2;
  border-color: #5865f2;
  color: white;
  font-weight: 600;
}

.button.discord:hover {
  background: #4752c4;
  border-color: #4752c4;
}

.button.small {
  padding: 6px 12px;
  font-size: 13px;
}

.button.danger {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
  color: white;
  font-weight: 600;
}

.button.danger:hover {
  background: #e5342a;
  border-color: #e5342a;
}

/* Low-emphasis destructive action - a filled .danger button reads as
   equally important as .primary, but "Remove" should be the last thing
   someone reaches for, not visually competing with it. */
.button.danger-quiet {
  background: transparent;
  border-color: var(--border);
  color: var(--text-tertiary);
  font-weight: 500;
}

.button.danger-quiet:hover {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
  color: white;
}

/* Filter forms with grouped action buttons */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Page header - title/subtitle + a row of stat tiles. Formalizes the
   pattern already used informally (and slightly differently) by
   adms/cost-indexes/fuel-monitor/pi-monitor - use this on any new feature
   page's landing view instead of inventing another one-off header block. */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.page-header h2 {
  margin: 0 0 4px;
}

.page-header .muted {
  margin: 0;
}

.stat-row {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.stat-tile {
  padding: var(--space-md);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 140px;
}

.stat-tile-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.stat-tile-value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-tile-value.critical { color: var(--accent-danger); }
.stat-tile-value.warning { color: var(--accent-warning); }
.stat-tile-value.caution { color: var(--accent-caution); }
.stat-tile-value.ok { color: var(--accent-success); }

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-tile {
    min-width: 110px;
    padding: var(--space-sm) var(--space-md);
  }

  .stat-tile-value {
    font-size: 20px;
  }
}

/* Key/value detail tables (e.g. request detail page) */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.kv-table {
  width: 100%;
}

.kv-table td {
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 0;
  vertical-align: top;
}

.kv-table td:first-child {
  white-space: nowrap;
  width: 1%;
  padding-right: var(--space-md);
}

/* Forms */
input,
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

input[type="checkbox"],
input[type="radio"] {
  transition: none;
  width: auto;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(68, 147, 248, 0.1);
}

textarea {
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-md) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  padding: var(--space-md) var(--space-sm);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  padding: var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: var(--bg-raised);
}

/* Links in tables */
table a {
  color: var(--accent-primary-hover);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

table a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

table a:visited {
  color: var(--accent-primary-hover);
}

/* Utility classes */
.muted {
  color: var(--text-secondary);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.dt {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dt .time {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .wrap {
    padding: var(--space-md);
    padding-top: 72px;
  }

  .card {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }

  .site-header h1 {
    font-size: 24px;
  }

  .site-header p {
    font-size: 14px;
  }

  .sidebar {
    width: min(86vw, 320px);
    padding: 88px var(--space-md) var(--space-md);
  }

  /* Responsive tables */
  table {
    min-width: 680px;
  }

  .responsive-table,
  .kv-table {
    min-width: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    display: block;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
  }

  .responsive-table td[data-label=""] {
    justify-content: flex-end;
  }

  .responsive-table td[data-label=""]::before {
    content: none;
  }

  button,
  .button {
    width: 100%;
    justify-content: center;
  }

  .filter-actions {
    flex-direction: column;
  }

  .filter-grid,
  .detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Larger screens - optimize space usage */
@media (min-width: 1440px) {
  .wrap {
    max-width: 1400px;
  }
}

/* Touch optimizations */
@media (hover: none) and (pointer: coarse) {
  button,
  .button,
  .sidebar a,
  .sidebar button {
    min-height: 44px;
    padding: 12px 16px;
  }

  .menu-btn {
    width: 48px;
    height: 48px;
  }
}

/* Toggle switch component */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  border-radius: var(--radius-full);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-success);
  border-color: var(--accent-success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.1);
}

/* Profile card */
.profile-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 240px;
}

.profile-name {
  margin: 0 0 var(--space-sm);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 14px;
}

.profile-meta img {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

/* Definition list for settings */
.settings-list {
  display: grid;
  grid-template-columns: minmax(140px, 240px) 1fr;
  gap: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
}

.settings-list dt {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  padding-top: 2px;
}

.settings-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .settings-list {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .settings-list dt {
    margin-top: var(--space-sm);
    padding-top: 0;
  }
}

/* Action row */
.action-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

/* Code inline */
code {
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-primary);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge.success {
  background: rgba(63, 185, 80, 0.1);
  color: var(--accent-success);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.badge.warning {
  background: rgba(210, 153, 34, 0.1);
  color: var(--accent-warning);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.badge.danger {
  background: rgba(218, 54, 51, 0.1);
  color: var(--accent-danger);
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.badge.neutral {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge.info {
  background: rgba(68, 147, 248, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(68, 147, 248, 0.3);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Warning badge for volume saturation */
.warning-badge {
  background: rgba(210, 153, 34, 0.15);
  color: var(--accent-warning);
  border: 1px solid rgba(210, 153, 34, 0.4);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  font-weight: 600;
}

/* Character card detail (profile page collapsible card): hero ship banner,
   accented stat tiles, implant/mail cards below. The current system's NAME
   is the DOTLAN hyperlink - no trailing map icon. */
.cdc-hero {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-raised));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cdc-hero-render {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.cdc-hero-main {
  min-width: 0;
}

.cdc-hero-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.cdc-hero-ship {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.cdc-hero-ship-nick {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.cdc-hero-location {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 14px;
}

.cdc-system-link {
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
}

.cdc-system-link:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

.cdc-loc-sep {
  color: var(--text-tertiary);
}

.cdc-loc-place {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-secondary);
  min-width: 0;
}

.cdc-structure-icon {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.cdc-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.cdc-tile {
  position: relative;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
}

.cdc-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--tile-accent, var(--accent-primary));
}

.cdc-tile-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.cdc-tile-icon {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
}

.cdc-tile-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cdc-tile-alert {
  color: var(--accent-danger);
}

.cdc-tile-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.cdc-implant-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cdc-implant-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cdc-implant-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .cdc-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .cdc-hero-render {
    width: 72px;
    height: 72px;
  }
}
