:root {
  color-scheme: dark;
  --bg: #0e1116;
  --surface: #151a21;
  --surface-2: #1d2530;
  --ink: #edf2f7;
  --muted: #9aa8b6;
  --line: #2a3442;
  --accent: #4fd1bd;
  --accent-soft: #123832;
  --danger: #ff7b6d;
  --blue: #7cb7ff;
  --focus: #2f78d4;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 32px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 18px;
}

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

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
  letter-spacing: 0;
}

.status {
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.status.live {
  color: #b8f5d0;
  border-color: #285c3d;
  background: #102819;
}

.url-board {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.url-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.primary-url {
  grid-template-columns: 86px minmax(0, 1fr) auto auto;
}

.url-row label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.url-row input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f141b;
  color: var(--ink);
}

.url-row input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 190px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.icon-button,
.ghost-button,
.primary-button,
.secondary-button,
.tab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
}

.icon-button,
.ghost-button {
  padding: 0 14px;
}

.icon-button.strong {
  border-color: transparent;
  background: var(--accent);
  color: #06110f;
}

.ghost-button.danger {
  color: var(--danger);
}

.primary-button {
  width: 100%;
  border-color: transparent;
  background: var(--accent);
  color: #06110f;
}

.secondary-button {
  width: 100%;
  border-color: #365063;
  background: #10161e;
  color: var(--ink);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(275px, 0.78fr) minmax(420px, 1.55fr) minmax(290px, 0.82fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.request-list-panel,
.detail-panel,
.sender-panel {
  min-height: 660px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.request-list-panel,
.sender-panel {
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.panel-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.request-list {
  max-height: 598px;
  overflow: auto;
}

.request-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 70px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
}

.request-item:hover,
.request-item.active {
  background: var(--surface-2);
}

.method-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.request-summary {
  min-width: 0;
}

.request-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.request-time {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-panel {
  padding: 22px;
}

.empty-state {
  display: grid;
  place-content: center;
  min-height: 614px;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-state h2 {
  color: var(--ink);
  font-size: 1.35rem;
}

.hidden {
  display: none !important;
}

.detail-view {
  display: grid;
  gap: 18px;
}

.detail-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.detail-title h2 {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 1.25rem;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.meta-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #10161e;
}

.meta-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  padding: 0 14px;
}

.tab.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.code-box {
  min-height: 386px;
  max-height: 492px;
  overflow: auto;
  margin: 0;
  padding: 16px;
  border-radius: 6px;
  background: #070b10;
  color: #e8f0f7;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.sender-panel form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.sender-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.send-result {
  min-height: 22px;
  color: var(--muted);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .request-list-panel,
  .detail-panel,
  .sender-panel {
    min-height: auto;
  }

  .request-list {
    max-height: 360px;
  }

  .empty-state {
    min-height: 280px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    width: min(100vw - 20px, 1500px);
    padding-top: 12px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .url-row,
  .primary-url {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}
