:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-2: #111113;
  --ink: #f3f3f1;
  --muted: #aba399;
  --line: rgba(255, 176, 105, 0.2);
  --line-soft: rgba(255, 176, 105, 0.12);
  --accent: #ff9f46;
  --accent-bright: #ffd6a9;
  --danger: #ff8869;
  --ok: #ffbe7b;
  --display-font: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono-font: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

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

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--display-font);
  background: radial-gradient(1200px 900px at 86% -10%, rgba(255, 130, 34, 0.13) 0%, transparent 66%),
    radial-gradient(940px 780px at 8% 16%, rgba(255, 166, 89, 0.08) 0%, transparent 62%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(760px 600px at 16% 0%, rgba(255, 134, 36, 0.07) 0%, transparent 70%),
    radial-gradient(920px 520px at 88% 82%, rgba(255, 146, 58, 0.04) 0%, transparent 74%);
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(74px);
  pointer-events: none;
  opacity: 0.14;
  z-index: 0;
}

.orb-a {
  width: 350px;
  height: 350px;
  left: 6vw;
  top: -110px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 188, 141, 0.36), rgba(255, 122, 23, 0.08));
}

.orb-b {
  width: 390px;
  height: 390px;
  right: 5vw;
  bottom: -150px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 196, 152, 0.3), rgba(255, 111, 0, 0.1));
}

.console-shell {
  position: relative;
  z-index: 2;
  width: min(1360px, 95vw);
  margin: 0 auto;
  padding: 0 0 2.2rem;
  display: grid;
  gap: 1rem;
}

.chrome {
  position: sticky;
  top: 0;
  z-index: 7;
  min-height: 64px;
  padding: 0.9rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.9), rgba(10, 10, 11, 0.5));
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(7px);
}

.brand-stack {
  display: grid;
  gap: 0.25rem;
}

.brand {
  font-family: var(--mono-font);
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.66rem;
}

.title {
  margin-top: 0.25rem;
  font-size: 1.12rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.subtitle {
  margin-top: 0.3rem;
  color: #d0c8bf;
  max-width: 70ch;
  line-height: 1.44;
  font-size: 0.87rem;
}

.chrome-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip-link,
.chip-button {
  font-family: var(--mono-font);
  text-decoration: none;
  color: #f0eeea;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.48rem 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.64rem;
  background: linear-gradient(120deg, rgba(255, 142, 41, 0.08), rgba(20, 20, 21, 0.56));
  cursor: pointer;
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.chip-link {
  display: inline-flex;
  align-items: center;
}

.chip-button:hover,
.chip-link:hover,
.chip-button:focus-visible,
.chip-link:focus-visible {
  border-color: var(--accent-bright);
  box-shadow: 0 0 14px rgba(255, 146, 52, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.status-chip {
  font-family: var(--mono-font);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid rgba(255, 180, 108, 0.24);
  border-radius: 999px;
  padding: 0.46rem 0.76rem;
  color: #c8ac91;
  background: rgba(18, 18, 19, 0.56);
}

.status-chip.ok {
  color: #f7d3ae;
}

.status-chip.bad {
  color: var(--danger);
}

.feedback-banner {
  border: 1px solid rgba(255, 191, 128, 0.34);
  border-radius: 0.86rem;
  padding: 0.58rem 0.72rem;
  font-family: var(--mono-font);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.63rem;
  color: #ffdcb8;
}

.feedback-banner.error {
  border-color: rgba(255, 136, 110, 0.38);
  color: #ffc3b0;
}

.feedback-banner.success {
  color: #ffdcb8;
}

.hidden {
  display: none;
}

.quick-note {
  border: 1px solid var(--line-soft);
  border-radius: 0.85rem;
  padding: 0.6rem 0.72rem;
  color: #d6c9bb;
  background: rgba(18, 18, 19, 0.44);
}

.quick-note strong {
  color: #f0d9be;
}

.section-block {
  border: 1px solid var(--line-soft);
  border-radius: 0.96rem;
  padding: 0.86rem;
  background: rgba(16, 16, 17, 0.42);
  backdrop-filter: blur(9px);
}

.two-col {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.eyebrow {
  font-family: var(--mono-font);
  font-size: 0.61rem;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h2 {
  margin-top: 0.25rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.provider-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.provider-card {
  border: 1px solid var(--line-soft);
  border-radius: 0.82rem;
  padding: 0.7rem;
  display: grid;
  gap: 0.45rem;
  background: rgba(20, 20, 21, 0.54);
}

.provider-card h3 {
  font-size: 1rem;
  font-weight: 600;
}

.provider-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag {
  border: 1px solid rgba(255, 184, 114, 0.2);
  border-radius: 999px;
  padding: 0.24rem 0.46rem;
  font-family: var(--mono-font);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c7ac94;
}

.provider-card p {
  color: #c8beb2;
  line-height: 1.4;
  font-size: 0.83rem;
}

.provider-actions {
  display: flex;
  gap: 0.46rem;
  flex-wrap: wrap;
}

.provider-actions button,
.provider-actions a {
  font-family: var(--mono-font);
  font-size: 0.61rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 0.4rem 0.68rem;
  border: 1px solid rgba(255, 186, 118, 0.24);
  text-decoration: none;
  color: #f1ede7;
  background: rgba(20, 20, 21, 0.58);
  cursor: pointer;
}

.provider-actions button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.meta-count {
  color: #c6a689;
  font-family: var(--mono-font);
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.connection-list,
.upload-list,
.feed-event-list {
  display: grid;
  gap: 0.62rem;
}

.connection-item,
.upload-item,
.feed-event-item {
  border: 1px solid var(--line-soft);
  border-radius: 0.82rem;
  padding: 0.68rem;
  display: grid;
  gap: 0.34rem;
  background: rgba(19, 19, 20, 0.58);
}

.connection-head,
.upload-head,
.feed-event-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.connection-name,
.upload-name,
.feed-event-name {
  font-size: 0.92rem;
}

.connection-sub,
.upload-sub,
.feed-event-sub {
  color: #c6b8aa;
  font-size: 0.77rem;
}

.status-pill {
  border-radius: 999px;
  padding: 0.24rem 0.48rem;
  font-family: var(--mono-font);
  font-size: 0.57rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border: 1px solid rgba(255, 190, 123, 0.3);
}

.status-pill.connected,
.status-pill.processed,
.status-pill.success {
  color: #ffe1bf;
}

.status-pill.pending_auth {
  color: #ffd4a8;
}

.status-pill.error {
  color: #ffb7a2;
  border-color: rgba(255, 125, 99, 0.38);
}

.status-pill.disabled {
  color: #d1b79d;
}

.connection-details,
.upload-details,
.feed-event-details {
  display: grid;
  gap: 0.2rem;
  color: #bca996;
  font-size: 0.73rem;
}

.upload-preview-label {
  margin-top: 0.28rem;
  color: #e2c6aa;
  font-family: var(--mono-font);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.57rem;
}

.upload-preview {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 0.58rem;
  border: 1px solid rgba(255, 188, 121, 0.18);
  background: rgba(10, 10, 11, 0.56);
  padding: 0.45rem 0.5rem;
  color: #decab6;
  font-size: 0.68rem;
  line-height: 1.4;
}

.connection-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.connection-actions button {
  border: 1px solid rgba(255, 187, 119, 0.24);
  border-radius: 999px;
  background: rgba(20, 20, 21, 0.62);
  color: #eee7de;
  padding: 0.38rem 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono-font);
  font-size: 0.59rem;
  cursor: pointer;
}

.stack-form {
  display: grid;
  gap: 0.46rem;
}

.custom-provider-form {
  max-width: 760px;
}

label {
  display: grid;
  gap: 0.23rem;
  font-size: 0.73rem;
  color: #d0c2b3;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 0.68rem;
  border: 1px solid rgba(255, 180, 108, 0.2);
  background: rgba(13, 13, 14, 0.7);
  color: #ece7e2;
  padding: 0.52rem 0.6rem;
  font: inherit;
}

textarea {
  resize: vertical;
}

.solid-button {
  border: 1px solid rgba(255, 195, 131, 0.34);
  border-radius: 0.76rem;
  background: linear-gradient(120deg, rgba(255, 152, 55, 0.16), rgba(255, 111, 0, 0.08));
  color: #f5f1eb;
  padding: 0.6rem 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--mono-font);
  font-size: 0.62rem;
  cursor: pointer;
}

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

  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .console-shell {
    width: min(1360px, 96vw);
  }

  .chrome {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.82rem;
  }

  .chrome-actions {
    justify-content: flex-start;
  }
}
