/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #080E1A;
  --bg-card:     #0D1526;
  --bg-sidebar:  #0A1020;
  --bg-elevated: #111827;
  --border:      #1A2540;
  --border-2:    #1E2F4D;
  --text:        #E2E8F0;
  --text-2:      #94A3B8;
  --text-3:      #475569;
  --accent:      #3B82F6;
  --accent-2:    #60A5FA;
  --green:       #10B981;
  --green-bg:    rgba(16, 185, 129, 0.08);
  --red:         #EF4444;
  --red-bg:      rgba(239, 68, 68, 0.08);
  --amber:       #F59E0B;
  --amber-bg:    rgba(245, 158, 11, 0.07);
  --purple:      #8B5CF6;
  --nav-h:       52px;
  --sidebar-w:   252px;
  --radius:      10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image: radial-gradient(
    ellipse 90% 40% at 50% -10%,
    rgba(59, 130, 246, 0.10) 0%,
    transparent 60%
  );
}

/* ── Top Navigation Bar ─────────────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(8, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  z-index: 100;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: 180px;
}

.nav-logo {
  width: 26px;
  height: 30px;
  filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.5));
}

.nav-title {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.2;
}

.nav-sub {
  display: block;
  font-size: 10.5px;
  color: var(--text-3);
}

/* Centered search */
.nav-search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search-icon {
  position: absolute;
  left: 11px;
  pointer-events: none;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.nav-search-input {
  width: 100%;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 8px 36px 8px 34px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nav-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.nav-search-input::placeholder {
  color: var(--text-3);
}

.nav-kbd {
  position: absolute;
  right: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--text-3);
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
}

/* Right badges */
.nav-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-badge {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(30, 47, 77, 0.6);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-badge--green {
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.07);
}

.nav-badge--link {
  text-decoration: none;
  transition: border-color 0.15s;
}

.nav-badge--link:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.nav-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.75);
  }
}

/* ── App layout ──────────────────────────────────────────────────────────────── */
.app {
  display: flex;
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
  align-items: flex-start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Provider list fills the sidebar and scrolls */
.provider-list {
  list-style: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.provider-list::-webkit-scrollbar {
  width: 3px;
}

.provider-list::-webkit-scrollbar-track {
  background: transparent;
}

.provider-list::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 2px;
}

.provider-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
}

.category-sep {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-top: 1px solid rgba(26, 37, 64, 0.7);
  margin-top: 4px;
}

.category-sep:first-child {
  border-top: none;
  margin-top: 0;
}

.cat-count {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-2);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 9px;
  font-weight: 600;
}

.provider-list li[data-role="item"] {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6.5px 14px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-2);
  border-left: 2px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.provider-list li[data-role="item"]:hover {
  background: rgba(59, 130, 246, 0.06);
  color: var(--text);
  border-left-color: rgba(59, 130, 246, 0.3);
}

.provider-list li[data-role="item"].active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-2);
  border-left-color: var(--accent);
  font-weight: 500;
}

.provider-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: rgba(10, 16, 32, 0.5);
}

.sidebar-footer small {
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.4;
  display: block;
}

/* ── Main content ────────────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 0 44px; /* Reduced bottom padding */
  max-width: 1200px; /* Wider design */
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.main-header {
  width: 100%;
  margin: 0 auto 36px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
  padding: 4px 12px;
  background: rgba(59, 130, 246, 0.09);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
}

.hero-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.main-header h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin-bottom: 14px;
}

.hero-highlight {
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 15px;
  color: var(--text-2);
  max-width: 80ch;
  margin: 0 auto 22px auto;
  line-height: 1.7;
}

.stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 21, 38, 0.8);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 7px 14px;
}

.stat-pill--new {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.06);
}

.stat-n {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.stat-l {
  font-size: 11px;
  color: var(--text-3);
}

/* ── Intake ──────────────────────────────────────────────────────────────────── */
.intake {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto 28px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.intake::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.4;
}

.intake-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.intake-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-2);
}

.intake-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

.auto-badge {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(59, 130, 246, 0.09);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: var(--accent-2);
}

.textarea-wrap {
  position: relative;
}

textarea#secretInput {
  width: 100%;
  min-height: 128px;
  background: rgba(8, 14, 26, 0.8);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
  z-index: 1;
}

textarea#secretInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea#secretInput::placeholder {
  color: var(--text-3);
  font-size: 12px;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.45), transparent);
  z-index: 2;
  pointer-events: none;
  animation: scan-idle 5s ease-in-out infinite;
}

@keyframes scan-idle {
  0% {
    top: 0;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 0.5;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.intake-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.intake-hint {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.ghost-btn:hover {
  border-color: var(--text-3);
  color: var(--text);
  background: rgba(30, 45, 74, 0.3);
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.22);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.38);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-bg);
}

.copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-bg);
}

.copy-btn.failed {
  border-color: var(--red);
  color: var(--red);
}

/* ── Results ─────────────────────────────────────────────────────────────────── */
.results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Case cards */
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
  animation: card-in 0.25s cubic-bezier(0.2, 0, 0.2, 1) both;
  transition: box-shadow 0.2s, transform 0.2s;
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Status-based left border */
.case-card[data-status="valid"] {
  border-left: 3px solid var(--green);
}

.case-card[data-status="invalid"] {
  border-left: 3px solid var(--red);
}

.case-card[data-status="blocked"] {
  border-left: 3px solid var(--amber);
}

.case-card[data-status="unknown"],
.case-card[data-status="error"] {
  border-left: 3px solid var(--text-3);
}

.case-card__head {
  padding: 13px 18px;
  background: rgba(13, 21, 38, 0.6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: rgba(26, 37, 64, 0.7);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 6px;
  color: var(--text-2);
}

/* ── Stamps ──────────────────────────────────────────────────────────────────── */
.stamp {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  padding: 6px 16px;
  border-radius: 7px;
  text-transform: uppercase;
  animation: stamp-pop 0.32s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes stamp-pop {
  from {
    transform: scale(1.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.stamp--valid {
  background: var(--green-bg);
  color: #34D399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.14);
}

.stamp--invalid {
  background: var(--red-bg);
  color: #F87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.14);
}

.stamp--unknown,
.stamp--error {
  background: rgba(17, 24, 39, 0.6);
  color: #64748B;
  border: 1px solid var(--border-2);
}

.stamp--blocked {
  background: var(--amber-bg);
  color: #FBBF24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.14);
}

.stamp--pending {
  background: transparent;
  border: 1px dashed var(--border-2);
  color: var(--text-3);
  animation: none;
  position: relative;
  overflow: hidden;
}

.stamp--pending::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.14), transparent);
  animation: shimmer 1.3s ease-in-out infinite;
}

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

.stamp--mini {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 5px;
  animation: none;
}

/* Card body */
.case-card__body {
  padding: 18px;
}

.key-display {
  background: rgba(8, 14, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 13px;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: #67E8F9;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.key-display strong {
  color: var(--text-3);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.result-headline {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 11px;
  line-height: 1.5;
}

.result-identity {
  background: rgba(26, 37, 64, 0.35);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 13px;
  margin: 9px 0 11px;
  font-size: 13px;
}

.result-identity strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-3);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.result-access {
  list-style: none;
  padding: 0;
  margin: 9px 0;
}

.result-access li {
  font-size: 13px;
  color: var(--text-2);
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border-bottom: 1px solid rgba(26, 37, 64, 0.4);
}

.result-access li:last-child {
  border-bottom: none;
}

/* ── Fallback terminal panel ─────────────────────────────────────────────────── */
.fallback {
  background: #04080F;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  margin-top: 14px;
  overflow: hidden;
}

.command-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 8px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.82rem;
  line-height: 1.5;
}

.fallback > p {
  margin: 0;
  padding: 7px 13px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.07);
  border-bottom: 1px solid rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  gap: 5px;
}

.fallback > p::before {
  content: '▶';
  font-size: 8px;
}

.fallback pre {
  margin: 0;
  padding: 13px 15px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.8;
  color: #7DD3FC;
  white-space: pre;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.fallback-actions {
  padding: 7px 13px 11px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Raw/decoded */
.raw {
  margin-top: 11px;
}

.raw summary {
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-3);
  padding: 7px 11px;
  background: rgba(26, 37, 64, 0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  list-style: none;
  user-select: none;
}

.raw summary:hover {
  color: var(--text-2);
}

.raw pre {
  margin-top: 8px;
  background: rgba(8, 14, 26, 0.9);
  padding: 11px 13px;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 52px 20px 40px;
  color: var(--text-2);
}

.empty-shield {
  width: 88px;
  margin: 0 auto 20px;
}

.empty-shield svg {
  width: 100%;
}

.ring-1 {
  animation: ring-expand 3s ease-out infinite;
}

.ring-2 {
  animation: ring-expand 3s ease-out 0.65s infinite;
}

@keyframes ring-expand {
  0% {
    opacity: 0;
    r: 18;
  }
  20% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    r: 46;
  }
}

.shield-pulse {
  animation: shield-glow 3s ease-in-out infinite;
}

@keyframes shield-glow {
  0%, 100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.75;
  }
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 18px;
}

.empty-hints {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.empty-hints span {
  font-size: 12px;
  color: var(--text-3);
}

.empty-hints code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(26, 37, 64, 0.6);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--accent-2);
}

/* ── Manual provider panel ───────────────────────────────────────────────────── */
.provider-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 30px;
  position: relative;
  overflow: hidden;
}

.provider-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.panel-icon-wrap {
  width: 48px;
  height: 48px;
  background: rgba(26, 37, 64, 0.7);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.panel-icon {
  font-size: 22px;
}

.panel-header h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.panel-sub {
  font-size: 12px;
  color: var(--text-3);
}

.manual-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.manual-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manual-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.manual-fields input {
  background: rgba(8, 14, 26, 0.8);
  border: 1px solid var(--border-2);
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.15s;
  text-transform: none;
  letter-spacing: normal;
}

.manual-fields input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.manual-fields input::placeholder {
  color: var(--text-3);
}

/* ── Legend ──────────────────────────────────────────────────────────────────── */
.legend {
  width: 100%;
  margin: 34px auto 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.legend h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 11px;
  justify-content: center;
  width: 100%;
}

.legend-item {
  background: var(--bg-card);
  border: 1px solid var(--border-2);
  border-radius: 9px;
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.legend-item p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
  text-align: right;
  letter-spacing: 0.01em;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.app-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 60px;
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* --- Footer Link Styling --- */
.app-footer a {
  color: var(--accent-2); /* This applies the exact same #60A5FA light blue as AKIA... */
  text-decoration: none; 
  font-weight: 600; 
  transition: all 0.15s ease-in-out;
}

.app-footer a:hover {
  color: var(--accent); /* Changes to the slightly darker blue when hovered */
  text-decoration: underline; 
}

/* ── Utilities ───────────────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .main-content {
    padding: 24px 20px 60px;
  }
}

@media (max-width: 700px) {
  .sidebar {
    display: none;
  }
  .nav-badges .nav-badge {
    display: none;
  }
  .nav-badges .nav-badge--link {
    display: flex;
  }
}

@media (max-width: 500px) {
  .topnav {
    padding: 0 12px;
    gap: 10px;
  }
  .nav-brand {
    min-width: unset;
  }
  .nav-sub {
    display: none;
  }
  .nav-kbd {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
