@font-face {
  font-family: 'Geist';
  src: url('https://musechain.io/fonts/geist/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #090a0c;
  --bg-card: #111317;
  --bg-card-sub: #16191f;
  --bg-border: #222630;
  --text: #ededed;
  --text-dim: #9aa1b0;
  --text-muted: #5e6573;
  --lime: #ccff00;
  --lime-dim: rgba(204, 255, 0, 0.14);
  --lime-border: rgba(204, 255, 0, 0.35);
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.12);
  --radius: 12px;
  --radius-sm: 6px;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(9, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bg-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.pill-net {
  background: var(--bg-card-sub);
  color: var(--text-dim);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--bg-border);
  font-family: var(--font-mono);
}

.top-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}

.profile-link, .office-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  transition: all 0.15s ease;
}

.profile-link:hover, .office-link:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.avatar-icon {
  background: var(--lime);
  color: #000;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 64px 20px;
  flex: 1;
  width: 100%;
}

.hero-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  background: linear-gradient(145deg, #111317 0%, #0c0e12 100%);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 32px;
  align-items: center;
  margin-bottom: 28px;
}

.hero-copy .kicker {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: inline-block;
}

.hero-copy h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-copy .lede {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.hero-copy code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.85em;
  color: #fff;
}

.meta-notice {
  background: rgba(204, 255, 0, 0.05);
  border: 1px solid var(--lime-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #e5e9f0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.meta-notice .info-icon {
  flex-shrink: 0;
  color: var(--lime);
  margin-top: 2px;
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-img {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--bg-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  object-fit: cover;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.selector-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selector-wrap label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

.selector-wrap select {
  background: var(--bg-card-sub);
  color: #fff;
  border: 1px solid var(--bg-border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.selector-wrap select:focus {
  border-color: var(--lime);
}

.stats-ribbon {
  display: flex;
  gap: 20px;
}

.stat-cell {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-val {
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.text-lime {
  color: var(--lime);
}

.text-success {
  color: var(--green);
}

/* Receipts Grid & Cards */
.receipts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.receipt-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.receipt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(204, 255, 0, 0.4);
}

.receipt-top-perforation {
  height: 6px;
  background: repeating-linear-gradient(90deg, #111317, #111317 6px, #1c212a 6px, #1c212a 12px);
  border-bottom: 1px dashed var(--bg-border);
}

.receipt-header {
  padding: 16px 20px 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--bg-border);
}

.receipt-app-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #fff;
}

.receipt-cat {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.success {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.receipt-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.fn-badge {
  display: inline-block;
  background: var(--bg-card-sub);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(204, 255, 0, 0.2);
  width: fit-content;
}

.mono-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #cbd5e1;
  word-break: break-all;
}

.receipt-footer {
  padding: 14px 20px;
  background: var(--bg-card-sub);
  border-top: 1px dashed var(--bg-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.record-link {
  font-size: 0.78rem;
  color: var(--lime);
  font-family: var(--font-mono);
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.record-link:hover {
  color: #fff;
}

.tx-preview {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--bg-border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-dim);
  font-size: 0.88rem;
  max-width: 440px;
  margin: 0 auto;
}

/* Mechanics Section */
.mechanics-panel {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 28px;
}

.mechanics-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.mechanics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.m-card {
  background: var(--bg-card-sub);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  position: relative;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--lime);
  font-weight: 700;
  margin-bottom: 8px;
}

.m-card h3 {
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.m-card p {
  font-size: 0.83rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Footer */
.footer {
  border-top: 1px solid var(--bg-border);
  padding: 24px 20px;
  margin-top: auto;
  background: #060708;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-inner a {
  color: var(--lime);
  text-decoration: underline;
}

.footer-inner .sub {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

@media (max-width: 768px) {
  .hero-strip {
    grid-template-columns: 1fr;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .stats-ribbon {
    justify-content: space-between;
  }
}