:root {
  --bg: #090b10;
  --panel: #11141c;
  --panel-2: #161a24;
  --border: #252b38;
  --text: #f2f5f9;
  --muted: #929cad;
  --accent: #79f2c0;
  --accent-2: #73a7ff;
  --danger: #ff6b75;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -20%, rgba(65, 134, 255, .16), transparent 35rem),
    radial-gradient(circle at 90% 10%, rgba(85, 245, 176, .09), transparent 28rem),
    var(--bg);
  font-family: var(--sans);
  line-height: 1.5;
}
a { color: inherit; }
button, input, select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(9, 11, 16, .72);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #07120e; background: var(--accent); box-shadow: 0 0 32px rgba(121,242,192,.2); }
.account { display: flex; align-items: center; gap: 12px; }
.account-copy { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.account-copy strong { font-size: .82rem; }
.account-copy small { color: var(--muted); font-size: .72rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); }

.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 80px; }
.site-footer { color: #687284; border-top: 1px solid rgba(255,255,255,.06); padding: 25px; text-align: center; font-size: .78rem; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1.02; letter-spacing: -.055em; margin-bottom: 18px; }
h2 { letter-spacing: -.025em; }
code { font-family: var(--mono); }
.eyebrow { color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 12px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: none; text-decoration: none; font-size: .82rem; font-weight: 720; cursor: pointer; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #07120e; background: var(--accent); }
.button-secondary { border-color: var(--border); background: var(--panel-2); }
.button-quiet { color: var(--muted); }
.button-danger { color: var(--danger); border-color: rgba(255,107,117,.28); background: rgba(255,107,117,.07); }

.login-card { width: min(630px, 100%); margin: 8vh auto; padding: clamp(28px, 6vw, 68px); border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(145deg, rgba(22,26,36,.98), rgba(13,16,23,.96)); box-shadow: 0 30px 100px rgba(0,0,0,.4); }
.login-card h1 span { color: var(--accent); }
.login-card > p { max-width: 500px; color: var(--muted); font-size: 1.05rem; }
.google-button { margin-top: 18px; min-height: 50px; padding-inline: 22px; }
.google-button span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: #4285f4; background: white; font-weight: 900; }
.login-card .fine-print { margin: 20px 0 0; font-size: .75rem; }
.alert { padding: 13px 15px; border: 1px solid rgba(255,107,117,.35); border-radius: 10px; color: #ffb4ba; background: rgba(255,107,117,.08); font-size: .86rem; }
.alert-success { color: #a8f8d5; border-color: rgba(121,242,192,.3); background: rgba(121,242,192,.07); }

.hero { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 36px; }
.hero h1 { margin-bottom: 10px; }
.hero p { color: var(--muted); margin: 0; }
.hero p code { color: var(--accent); padding: 3px 7px; border-radius: 6px; background: rgba(121,242,192,.08); }
.stat-card { min-width: 155px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: rgba(17,20,28,.8); }
.stat-card strong, .stat-card span { display: block; }
.stat-card strong { font-size: 1.9rem; line-height: 1; }
.stat-card span { margin-top: 7px; color: var(--muted); font-size: .75rem; }

.forwarding-card { margin-bottom: 34px; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(18,22,30,.96), rgba(13,16,23,.94)); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-heading h2 { margin: 0 0 5px; font-size: 1.25rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: .83rem; }
.target-count { flex: 0 0 auto; padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .7rem; }
.target-form { display: flex; gap: 10px; margin: 18px 0 14px; }
.target-url-field { flex: 1; }
.target-form input[type="url"] { width: 100%; min-height: 44px; padding: 0 14px; color: var(--text); border: 1px solid var(--border); border-radius: 10px; outline: none; background: var(--bg); }
.target-form input[type="url"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(121,242,192,.1); }
.target-list { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; }
.target-empty { padding: 24px; color: var(--muted); text-align: center; font-size: .8rem; }
.target-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border-bottom: 1px solid var(--border); }
.target-row:last-child { border-bottom: 0; }
.target-state { display: inline-flex; justify-content: center; padding: 4px 7px; border-radius: 999px; color: var(--accent); background: rgba(121,242,192,.09); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.target-state.is-paused { color: #ffd38b; background: rgba(255,187,75,.1); }
.target-main { min-width: 0; }
.target-main strong, .target-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.target-main strong { font-family: var(--mono); font-size: .78rem; }
.target-main small { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.target-actions { display: flex; gap: 7px; }

.filters { display: flex; gap: 10px; margin-bottom: 18px; }
.search-field { flex: 1; }
input[type="search"], select { width: 100%; min-height: 44px; padding: 0 14px; color: var(--text); border: 1px solid var(--border); border-radius: 10px; outline: none; background: var(--panel); }
input[type="search"]:focus, select:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(115,167,255,.12); }
select { width: 150px; }

.event-list { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: rgba(17,20,28,.78); }
.event-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 250px 20px; align-items: center; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background .15s ease; }
.event-row:last-child { border-bottom: 0; }
.event-row:hover { background: rgba(255,255,255,.025); }
.method { display: inline-flex; align-items: center; justify-content: center; width: max-content; min-width: 58px; padding: 5px 8px; border-radius: 7px; font-family: var(--mono); font-size: .68rem; font-weight: 800; letter-spacing: .05em; color: #a8d0ff; background: rgba(72,143,255,.12); }
.method-post { color: #87f4c5; background: rgba(80,224,164,.11); }
.method-delete { color: #ff9da4; background: rgba(255,107,117,.11); }
.method-patch { color: #ffd38b; background: rgba(255,187,75,.11); }
.event-main, .event-meta { min-width: 0; }
.event-main strong, .event-main small, .event-meta time, .event-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-main strong { margin-bottom: 5px; font-size: .91rem; }
.event-main small, .event-meta small { color: var(--muted); font-size: .75rem; }
.event-meta { text-align: right; }
.event-meta time { margin-bottom: 5px; color: #c8cfda; font-size: .8rem; }
.row-arrow { color: #525d70; }
.empty-state { padding: 90px 24px; text-align: center; }
.empty-state h2 { margin-bottom: 6px; }
.empty-state p { color: var(--muted); }
.empty-icon { color: var(--accent); font-size: 2.2rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--muted); font-size: .8rem; }
.pagination div { display: flex; gap: 8px; }

.detail-nav { margin-bottom: 34px; color: var(--muted); font-size: .84rem; }
.detail-nav a { text-decoration: none; }
.detail-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.event-title-line { display: flex; align-items: center; gap: 14px; }
.event-title-line h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 3.2rem); }
.event-id { margin: 9px 0 0; color: var(--muted); font-family: var(--mono); font-size: .76rem; }
.detail-actions { display: flex; gap: 9px; }
.metadata-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin: 0 0 26px; border: 1px solid var(--border); border-radius: 15px; background: var(--border); }
.metadata-grid div { min-width: 0; padding: 17px 18px; background: var(--panel); }
.metadata-grid .wide { grid-column: 1 / -1; }
.metadata-grid dt { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.metadata-grid dd { overflow: hidden; margin: 5px 0 0; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: .78rem; }
.detail-stack { display: grid; gap: 20px; }
.code-card, .delivery-card { overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--panel); }
.code-card-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.code-card-header .eyebrow { margin: 0 0 3px; }
.code-card-header h2 { margin: 0; font-size: .95rem; }
.copy-button { padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; color: var(--muted); background: var(--panel-2); cursor: pointer; font-size: .72rem; }
pre { max-height: 580px; overflow: auto; margin: 0; padding: 20px; color: #d7e0eb; font-family: var(--mono); font-size: .78rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.delivery-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 13px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.delivery-row:last-child { border-bottom: 0; }
.delivery-status { padding: 4px 7px; border-radius: 999px; color: #a8d0ff; background: rgba(72,143,255,.12); text-align: center; font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.status-succeeded { color: var(--accent); background: rgba(121,242,192,.09); }
.status-failed { color: var(--danger); background: rgba(255,107,117,.1); }
.status-pending { color: #ffd38b; background: rgba(255,187,75,.1); }
.delivery-main { min-width: 0; }
.delivery-main strong, .delivery-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-main strong { font-family: var(--mono); font-size: .75rem; }
.delivery-main small { margin-top: 4px; color: var(--muted); font-size: .7rem; }
.delivery-error { grid-column: 2; color: #ffadb3; font-family: var(--mono); font-size: .7rem; }
.error-state { min-height: 55vh; }
.error-code { color: var(--accent); font-family: var(--mono); font-size: 4rem; font-weight: 900; opacity: .35; }
.error-state h1 { font-size: 2.7rem; }
.dev-stack { margin-top: 30px; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }

@media (max-width: 800px) {
  .page-shell { width: min(100% - 28px, 1180px); padding-top: 42px; }
  .account-copy, .avatar { display: none; }
  .hero { align-items: stretch; flex-direction: column; }
  .stat-card { width: 100%; }
  .filters { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .filters label:not(.search-field) { flex: 1; }
  select { width: 100%; }
  .event-row { grid-template-columns: 64px minmax(0, 1fr) 15px; gap: 10px; }
  .event-meta { grid-column: 2; grid-row: 2; text-align: left; }
  .row-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .detail-hero { align-items: flex-start; flex-direction: column; }
  .metadata-grid { grid-template-columns: 1fr 1fr; }
  .target-row { grid-template-columns: 62px minmax(0, 1fr); }
  .target-actions { grid-column: 2; }
}

@media (max-width: 480px) {
  .site-header { padding-inline: 14px; }
  .button-quiet { padding-inline: 8px; }
  .event-row { padding-inline: 13px; }
  .event-meta small { display: none; }
  .metadata-grid { grid-template-columns: 1fr; }
  .metadata-grid .wide { grid-column: auto; }
  .section-heading, .target-form { flex-direction: column; }
  .target-url-field, .target-form .button { width: 100%; }
}
