:root {
  color-scheme: dark;
  --bg: #020806;
  --panel: #0c1712;
  --panel-2: #101f18;
  --line: #24563d;
  --line-bright: #5ef08e;
  --text: #f3fff7;
  --muted: #a9beb0;
  --gold: #f4d36b;
  --green: #72ee94;
  --red: #ff6868;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
  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:
    radial-gradient(circle at top left, rgba(61, 180, 94, 0.18), transparent 34rem),
    linear-gradient(135deg, #030806 0%, #0a130f 48%, #04100a 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1600px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 0 22px;
}

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

.history-button {
  min-height: 42px;
  border-color: rgba(94, 240, 142, 0.62);
  background: linear-gradient(180deg, #7cf5a0, #35b864);
}

.instructions-button {
  min-height: 42px;
  border-color: rgba(244, 211, 107, 0.7);
  background: linear-gradient(180deg, #ffe58a, #d6a92f);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  min-width: 390px;
  padding: 10px 18px 10px 10px;
  border: 1px solid rgba(94, 240, 142, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(114, 238, 148, 0.08), rgba(244, 211, 107, 0.055) 42%, rgba(2, 8, 6, 0)),
    rgba(2, 8, 6, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 70px rgba(0, 0, 0, 0.28);
}

.mark {
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  isolation: isolate;
  border: 1px solid rgba(114, 238, 148, 0.88);
  border-radius: 16px;
  background:
    radial-gradient(circle at 32% 22%, rgba(244, 211, 107, 0.26), transparent 28%),
    linear-gradient(145deg, #153421 0%, #07110c 72%);
  color: #ffe98c;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 0 34px rgba(94, 240, 142, 0.12),
    0 0 24px rgba(94, 240, 142, 0.16);
  overflow: hidden;
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(244, 211, 107, 0.36);
  border-radius: 11px;
  transform: rotate(45deg);
  z-index: -1;
}

.mark::after {
  inset: 17px;
  border-color: rgba(94, 240, 142, 0.34);
}

.mark-label {
  font-size: 17px;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(244, 211, 107, 0.38);
}

.mark-scan {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 13px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(94, 240, 142, 0.96), transparent);
  box-shadow: 0 0 12px rgba(94, 240, 142, 0.7);
}

.brand-copy {
  display: grid;
  gap: 2px;
  align-content: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 29px;
  line-height: 1;
  letter-spacing: 0;
  color: #f4d36b;
  text-shadow: 0 0 24px rgba(244, 211, 107, 0.16);
}

h1 span {
  font-weight: 900;
  color: #f9d760;
}

h1 strong {
  margin-left: 1px;
  font-weight: 1000;
  background: linear-gradient(180deg, #fff5aa 0%, #f4d36b 45%, #b98219 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand p,
.muted,
small {
  color: var(--muted);
}

.brand p {
  font-size: 14px;
  color: #d7eadb;
}

.brand p span {
  color: rgba(94, 240, 142, 0.82);
  padding: 0 5px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(114, 238, 148, 0.24);
  border-radius: 999px;
  background: rgba(9, 19, 14, 0.78);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8a958d;
}

.dot.ready {
  background: var(--green);
  box-shadow: 0 0 18px rgba(114, 238, 148, 0.9);
}

.dot.error {
  background: var(--red);
}

.panel {
  border: 1px solid rgba(94, 240, 142, 0.38);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 31, 24, 0.96), rgba(7, 15, 11, 0.98));
  box-shadow: var(--shadow);
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  gap: 24px;
  align-items: end;
  padding: 28px;
}

.login-panel h2,
.hero h2,
.queue-panel h2 {
  margin-top: 4px;
  font-size: 24px;
}

.login-panel h2 {
  font-size: 30px;
  font-weight: 1000;
  background: linear-gradient(90deg, #fff6b1 0%, #f4d36b 34%, #c99422 72%, #fff2a2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
}

.login-prompt {
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 850;
}

.eyebrow {
  color: var(--line-bright);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-height: 44px;
  border: 1px solid rgba(180, 210, 190, 0.28);
  border-radius: 8px;
  background: #eef6f1;
  color: #07100c;
  padding: 0 12px;
  font-weight: 750;
}

button {
  min-height: 42px;
  border: 1px solid rgba(244, 211, 107, 0.64);
  border-radius: 8px;
  background: linear-gradient(180deg, #76f19a, #42b96b);
  color: #041008;
  padding: 0 16px;
  font-weight: 950;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(180deg, #14251c, #0b1610);
  color: var(--text);
  border-color: rgba(114, 238, 148, 0.42);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: grayscale(0.5);
}

.hidden {
  display: none !important;
}

.top-workspace {
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(420px, 0.92fr);
  gap: 14px;
  align-items: stretch;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(2, 8, 6, 0.64), rgba(2, 8, 6, 0.24) 48%, rgba(2, 8, 6, 0.42)),
    linear-gradient(180deg, rgba(2, 8, 6, 0.04), rgba(2, 8, 6, 0.38)),
    url("/coa-clouds-hero.png") center / cover no-repeat;
  min-height: 220px;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.78);
}

.hero .muted {
  color: #d7e6dc;
  max-width: 760px;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.9);
}

.upload-card {
  position: relative;
  min-height: 172px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 2px dashed rgba(94, 240, 142, 0.55);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(94, 240, 142, 0.14), rgba(244, 211, 107, 0.06)),
    rgba(4, 12, 9, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 18px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.upload-card input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(244, 211, 107, 0.6);
  color: var(--gold);
  font-size: 34px;
  line-height: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) repeat(4, minmax(110px, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
}

.rd-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: stretch;
}

.rd-summary-grid .metric-action {
  min-width: 220px;
}

.rd-summary-grid .compact-input {
  min-width: 190px;
}

.failed-retry-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-top: 14px;
  padding: 14px 16px;
}

.failed-retry-panel h2 {
  margin-top: 3px;
  font-size: 18px;
}

.failed-retry-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  max-height: 58px;
  overflow: hidden;
}

.server-queue-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 238px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 8px 2px 0;
  scrollbar-color: rgba(94, 240, 142, 0.72) rgba(2, 8, 6, 0.72);
}

.server-queue-list::-webkit-scrollbar {
  width: 10px;
}

.server-queue-list::-webkit-scrollbar-track {
  background: rgba(2, 8, 6, 0.72);
  border-radius: 999px;
}

.server-queue-list::-webkit-scrollbar-thumb {
  background: rgba(94, 240, 142, 0.72);
  border-radius: 999px;
}

.failed-retry-list span {
  max-width: 240px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 104, 104, 0.42);
  border-radius: 999px;
  background: rgba(255, 104, 104, 0.08);
  color: #ffd1d1;
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-queue-list span {
  max-width: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.failed-retry-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  position: sticky;
  top: 12px;
}

.soft-green-button {
  max-width: 360px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(94, 240, 142, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(94, 240, 142, 0.16), rgba(94, 240, 142, 0.07));
  color: #d9ffe2;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: none;
}

.soft-green-button:hover:not(:disabled) {
  border-color: rgba(94, 240, 142, 0.75);
  background: linear-gradient(180deg, rgba(94, 240, 142, 0.24), rgba(94, 240, 142, 0.1));
}

.danger-button {
  max-width: 360px;
  min-height: 46px;
  background: linear-gradient(180deg, #ff7777, #d83a3a);
  color: #160202;
  border-color: rgba(255, 205, 205, 0.75);
}

.metric {
  min-height: 72px;
  padding: 12px 16px;
  background: rgba(2, 8, 6, 0.34);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 3px;
  font-size: 23px;
}

.metric strong.gate-pass {
  color: var(--green);
  text-shadow: 0 0 16px rgba(94, 240, 142, 0.18);
}

.metric strong.gate-blocked {
  color: var(--red);
  text-shadow: 0 0 16px rgba(255, 104, 104, 0.18);
}

.metric-action {
  display: grid;
  align-content: center;
  justify-items: stretch;
  gap: 6px;
  background: rgba(2, 8, 6, 0.82);
}

.metric-action button {
  width: 100%;
  min-height: 54px;
  border: 4px solid rgba(244, 211, 107, 0.96);
  background: linear-gradient(180deg, #ffe58a, #57d879 52%, #2ebd63);
  font-size: 17px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7);
}

.email-summary-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.email-summary-toggle input {
  accent-color: var(--green);
}

.metric-action small {
  text-align: center;
  font-size: 11px;
}

.queue-panel {
  margin-top: 14px;
  padding: 14px;
}

.console-panel {
  padding: 14px;
  height: 242px;
  min-height: 242px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  gap: 10px;
}

.empty {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(94, 240, 142, 0.22);
  border-radius: 8px;
}

.queue-panel .table-wrap {
  max-height: 430px;
}

.queue-panel table {
  min-width: 0;
  table-layout: fixed;
}

.console-output {
  height: 100%;
  min-height: 150px;
  max-height: 160px;
  overflow: auto;
  border: 1px solid rgba(94, 240, 142, 0.24);
  border-radius: 8px;
  background: #020705;
  padding: 10px;
  font-family: "Cascadia Mono", "Consolas", ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  line-height: 1.42;
}

.console-line {
  display: grid;
  grid-template-columns: 96px minmax(240px, 0.82fr) 1fr;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: #d9efe1;
}

.console-line span {
  color: #7f9b89;
}

.console-line strong {
  color: #f2fff6;
}

.console-line em {
  color: #a9beb0;
  font-style: normal;
  overflow-wrap: anywhere;
}

.console-line.ok strong {
  color: var(--green);
}

.console-line.warn strong,
.console-line.blocked strong {
  color: var(--gold);
}

.console-line.error strong {
  color: var(--red);
}

.console-line.muted-line {
  display: block;
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.history-table {
  min-width: 980px;
}

th,
td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.queue-panel th,
.queue-panel td {
  padding: 3px 4px;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-panel th:nth-child(1),
.queue-panel td:nth-child(1) {
  width: 54px;
}

.queue-panel th:nth-child(2),
.queue-panel td:nth-child(2) {
  width: 112px;
}

.queue-panel th:nth-child(3),
.queue-panel td:nth-child(3) {
  width: 12%;
}

.queue-panel th:nth-child(4),
.queue-panel td:nth-child(4),
.queue-panel th:nth-child(5),
.queue-panel td:nth-child(5) {
  width: 196px;
}

.queue-panel th:nth-child(6),
.queue-panel td:nth-child(6) {
  width: 12%;
}

.queue-panel th:nth-child(7),
.queue-panel td:nth-child(7) {
  width: 17%;
}

.queue-panel th:nth-child(8),
.queue-panel td:nth-child(8) {
  width: 96px;
}

.row-actions {
  display: block;
}

.row-actions button {
  min-height: 24px;
  width: 84px;
  padding: 0 6px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #122119;
  color: var(--line-bright);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: #effff3;
  font-weight: 650;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(94, 240, 142, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(114, 238, 148, 0.44);
  border-radius: 999px;
  color: var(--green);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.pill.warn {
  border-color: rgba(244, 211, 107, 0.64);
  color: var(--gold);
}

.pill.metrc-alert {
  border-color: rgba(255, 221, 92, 0.9);
  background: linear-gradient(180deg, rgba(255, 221, 92, 0.22), rgba(255, 221, 92, 0.08));
  color: #ffe36f;
  box-shadow: 0 0 14px rgba(255, 221, 92, 0.16);
}

.pill.sent {
  border-color: rgba(244, 211, 107, 0.96);
  background: rgba(244, 211, 107, 0.15);
  color: #ffe36f;
  box-shadow: 0 0 18px rgba(244, 211, 107, 0.18);
}

.pill.recovered {
  border-color: rgba(94, 240, 142, 0.9);
  background: linear-gradient(180deg, rgba(94, 240, 142, 0.24), rgba(94, 240, 142, 0.09));
  color: var(--green);
  box-shadow: 0 0 18px rgba(94, 240, 142, 0.18);
}

.pill.error {
  border-color: rgba(255, 104, 104, 0.82);
  background: rgba(255, 104, 104, 0.12);
  color: var(--red);
}

.spinner {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
}

.spinner-card {
  width: min(670px, calc(100vw - 34px));
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(94, 240, 142, 0.52);
  border-radius: 12px;
  background: #07110d;
  text-align: center;
}

.spinner-counter {
  min-width: 76px;
  padding: 5px 14px;
  border: 1px solid rgba(244, 211, 107, 0.8);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(244, 211, 107, 0.24), rgba(244, 211, 107, 0.08));
  color: var(--gold);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.spinner-events {
  width: 100%;
  max-height: 190px;
  overflow: auto;
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid rgba(94, 240, 142, 0.22);
  border-radius: 8px;
  background: rgba(2, 7, 5, 0.78);
  text-align: left;
}

.spinner-event {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 9px;
  align-items: start;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  line-height: 1.35;
}

.spinner-event span {
  color: #8fab99;
  font-weight: 800;
}

.spinner-event strong {
  color: #ecfff2;
  font-weight: 850;
}

.spinner-event.ok strong {
  color: var(--green);
}

.spinner-event.warn strong,
.spinner-event.blocked strong {
  color: var(--gold);
}

.spinner-event.error strong {
  color: var(--red);
}

.spinner-event.pulse strong {
  color: #c8d9cf;
  font-style: italic;
}

.spinner-gif {
  width: 135px;
  height: 135px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 0 14px rgba(94, 240, 142, 0.24));
}

.spinner.quiet .spinner-events {
  display: none;
}

.spinner.quiet.with-events .spinner-events {
  display: grid;
}

.spinner.quiet .spinner-gif {
  width: 169px;
  height: 169px;
}

#spinnerText {
  white-space: pre-line;
}

.spinner.simple .spinner-gif {
  display: none;
}

.spinner.simple .spinner-card::before {
  content: "";
  width: 86px;
  height: 86px;
  border: 8px solid rgba(94, 240, 142, 0.18);
  border-top-color: var(--line-bright);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

dialog {
  width: min(980px, calc(100vw - 36px));
  border: 1px solid rgba(94, 240, 142, 0.5);
  border-radius: 12px;
  background: #07110d;
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 22px;
}

dialog.wide-modal {
  width: min(1380px, calc(100vw - 28px));
}

.modal-head {
  padding-right: 42px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.x {
  position: absolute;
  right: 12px;
  top: 12px;
  min-height: 30px;
  width: 32px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.18);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.compact-detail {
  margin: 14px 0;
}

.duplicate-body {
  margin-top: 10px;
  color: var(--text);
}

.duplicate-body p {
  margin: 0 0 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.centered-actions {
  justify-content: center;
}

.complete-modal {
  width: min(720px, calc(100vw - 34px));
  text-align: center;
}

.complete-gif {
  width: min(330px, 88vw);
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  margin: 0 auto 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.complete-body {
  margin-top: 12px;
}

.complete-body p {
  margin-top: 10px;
}

.complete-body .detail-grid {
  text-align: left;
}

.instructions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.instruction-card {
  position: relative;
  min-height: 138px;
  padding: 16px 16px 16px 56px;
  border: 1px solid rgba(94, 240, 142, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 31, 24, 0.9), rgba(5, 13, 9, 0.94));
}

.instruction-card span {
  position: absolute;
  left: 15px;
  top: 16px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(244, 211, 107, 0.16);
  color: var(--gold);
  border: 1px solid rgba(244, 211, 107, 0.5);
  font-weight: 950;
}

.instruction-card strong {
  display: block;
  color: var(--line-bright);
  font-size: 16px;
  margin-bottom: 7px;
}

.instruction-card p {
  color: #d7e6dc;
  line-height: 1.45;
}

.complete-sent strong {
  color: var(--green);
  text-shadow: 0 0 18px rgba(114, 238, 148, 0.22);
}

.complete-failed strong {
  color: var(--red);
  text-shadow: 0 0 18px rgba(255, 104, 104, 0.18);
}

.detail {
  padding: 12px;
  border: 1px solid rgba(94, 240, 142, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.detail span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.detail-success {
  border-color: rgba(94, 240, 142, 0.55);
  background: rgba(94, 240, 142, 0.08);
}

.detail-success strong {
  color: var(--green);
  text-shadow: 0 0 16px rgba(94, 240, 142, 0.18);
}

.detail-failed {
  border-color: rgba(255, 104, 104, 0.68);
  background: rgba(255, 104, 104, 0.09);
}

.detail-failed strong {
  color: var(--red);
  text-shadow: 0 0 16px rgba(255, 104, 104, 0.18);
}

.detail-warn {
  border-color: rgba(244, 211, 107, 0.5);
  background: rgba(244, 211, 107, 0.07);
}

.detail-warn strong {
  color: var(--gold);
}

.detail-wide {
  grid-column: 1 / -1;
}

.detail pre {
  margin: 8px 0 0;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  color: #eaffef;
  font: 12px/1.45 "Cascadia Mono", "Consolas", ui-monospace, SFMono-Regular, monospace;
}

.failed-detail-wrap {
  grid-column: 1 / -1;
  border-color: rgba(255, 104, 104, 0.36);
  max-height: 410px;
}

.failed-detail-table {
  min-width: 1180px;
}

.failed-detail-table th,
.failed-detail-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.failed-detail-table td {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.failed-detail-table .failed-reason {
  max-width: 340px;
  color: var(--red);
  white-space: normal;
}

.recipients-text {
  width: min(620px, 100%);
  min-height: 170px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(94, 240, 142, 0.4);
  border-radius: 8px;
  background: #08130e;
  color: #effff3;
  font: 14px/1.45 "Cascadia Mono", "Consolas", ui-monospace, SFMono-Regular, monospace;
}

.timeline-detail ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.timeline-detail li {
  margin: 4px 0;
  color: #effff3;
  font-weight: 750;
}

.try-reupload-button {
  margin-top: 10px;
  width: fit-content;
  border-color: var(--gold);
  background: linear-gradient(180deg, #fff0a8 0%, #6be380 100%);
  color: #06130d;
  box-shadow: 0 0 14px rgba(255, 219, 93, 0.2);
}

.test-email-button {
  border-color: rgba(255, 221, 92, 0.78);
  background: linear-gradient(180deg, #ffe98a 0%, #64d882 100%);
  color: #06130d;
  box-shadow: 0 0 16px rgba(255, 221, 92, 0.16);
}

.compact-input {
  align-items: stretch;
}

.compact-input input {
  width: 100%;
  min-height: 42px;
  margin-top: 9px;
}

.queue-plan-button {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.failed-retry-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto) minmax(110px, auto) auto;
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid rgba(94, 240, 142, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.failed-retry-item strong,
.failed-retry-item small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.details-button {
  max-width: 240px;
  text-align: left;
  white-space: normal;
}

.history-table tbody tr {
  cursor: pointer;
}

.history-table tbody tr:hover {
  background: rgba(94, 240, 142, 0.08);
}

.header-email-button {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .login-panel,
  .top-workspace,
  .hero,
  .summary-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .brand {
    width: 100%;
    min-width: 0;
  }

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

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

  .failed-retry-item {
    grid-template-columns: 1fr;
  }
}
