:root {
  --ink: #18202c;
  --ink-soft: #4a5668;
  --paper: #fff8ea;
  --paper-strong: #fffdf7;
  --night: #17213a;
  --night-2: #25324e;
  --amber: #f6b84b;
  --amber-2: #ffe1a1;
  --teal: #36b8b0;
  --mint: #72d6a0;
  --coral: #e8665b;
  --blue: #4da6ff;
  --violet: #8467d7;
  --line: rgba(24, 32, 44, 0.16);
  --shadow: 0 18px 45px rgba(18, 23, 35, 0.24);
  --radius: 8px;
  --focus: 0 0 0 4px rgba(54, 184, 176, 0.35);
  --font: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--ink);
  background: #121a2d;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.96), rgba(43, 39, 64, 0.88) 42%, rgba(31, 64, 72, 0.84)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 90px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.65) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 10%, rgba(246, 184, 75, 0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 22%, rgba(114, 214, 160, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 34%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

input,
select {
  min-height: 44px;
  border: 2px solid rgba(24, 32, 44, 0.18);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  color: var(--ink);
  background: var(--paper-strong);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  margin-bottom: 16px;
  color: #fff8ea;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 248, 234, 0.42);
  border-radius: 50%;
  background: conic-gradient(from 20deg, var(--amber), var(--teal), var(--violet), var(--amber));
  color: #18202c;
  font-weight: 900;
}

.brand-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-stack strong {
  display: block;
  font-size: 1rem;
  color: #fff8ea;
}

.brand-stack span {
  display: block;
  color: rgba(255, 248, 234, 0.72);
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-btn {
  color: #18202c;
  background: linear-gradient(180deg, #ffe7a6, var(--amber));
  box-shadow: 0 8px 0 rgba(114, 77, 23, 0.28), 0 14px 28px rgba(0, 0, 0, 0.18);
  padding: 0.78rem 1rem;
}

.secondary-btn {
  color: #fffdf7;
  background: #2f6f73;
  box-shadow: 0 7px 0 rgba(12, 52, 54, 0.36);
  padding: 0.72rem 0.95rem;
}

.ghost-btn {
  color: #fff8ea;
  border: 1px solid rgba(255, 248, 234, 0.34);
  background: rgba(255, 255, 255, 0.09);
  padding: 0.64rem 0.8rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  color: #fff8ea;
  border: 1px solid rgba(255, 248, 234, 0.3);
  background: rgba(255, 255, 255, 0.1);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.icon-btn:active {
  transform: translateY(1px);
}

.surface {
  border: 1px solid rgba(255, 248, 234, 0.3);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.94);
  box-shadow: var(--shadow);
}

.soft-surface {
  border: 1px solid rgba(24, 32, 44, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 248, 234, 0.72);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 30px;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: #17213a;
  background: #f4dfaa;
  font-size: 0.86rem;
  font-weight: 800;
}

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

.status-dot {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.status-dot.is-on {
  background: var(--mint);
}

.feedback {
  min-height: 44px;
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  background: #edf9f6;
  color: #21323a;
  font-weight: 700;
}

.feedback.warning {
  border-color: var(--coral);
  background: #fff1eb;
}

.feedback.success {
  border-color: var(--mint);
  background: #edfff4;
}

.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 10px;
  }

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

  .topbar-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }

  .icon-btn {
    flex: 0 0 44px;
  }
}
