:root {
  --ylhq-yellow: #ffc523;
  --ylhq-yellow-hover: #eda700;
  --ylhq-charcoal: #313131;
  --ylhq-muted: #888888;
  --ylhq-text: #525252;
  --ylhq-white: #ffffff;
  --ylhq-paper: #fcfcfc;
  --ylhq-line: #e6e6e6;
  --ylhq-ok: #006567;
  --ylhq-bad: #d6000f;
}

* {
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ylhq-text);
  background: var(--ylhq-paper);
}

h1, h2, h3 {
  font-family: Raleway, sans-serif;
  color: var(--ylhq-charcoal);
  font-weight: 700;
}

.site-header {
  background: var(--ylhq-charcoal);
  color: var(--ylhq-white);
}

.site-header .inner,
.site-footer .inner,
.page {
  width: min(1060px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
  padding: 0.7rem 0;
}

.brand img {
  display: block;
  height: 48px;
  width: auto;
}

.tool-name {
  margin: 0 auto 0 0;
  font-family: Raleway, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ylhq-yellow);
}

.site-nav {
  display: flex;
  gap: 0.4rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ylhq-charcoal);
  background: var(--ylhq-yellow);
}

.header-accent {
  height: 4px;
  background: var(--ylhq-yellow);
}

.page {
  flex: 1;
  padding: 2.4rem 0 3.5rem;
}

.intro h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.25;
}

.intro p {
  max-width: 40rem;
  margin: 0 0 1.6rem;
  color: var(--ylhq-muted);
}

.panel {
  padding: 1.6rem 1.7rem 1.4rem;
  background: var(--ylhq-white);
  border: 1px solid var(--ylhq-line);
  box-shadow: 0 8px 24px rgba(49, 49, 49, 0.06);
}

.panel section + section {
  margin-top: 1.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--ylhq-line);
}

.panel h2 {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
}

.hint {
  margin: 0 0 1rem;
  color: var(--ylhq-muted);
}

code {
  font-size: 0.86em;
  background: #fff6d8;
  color: var(--ylhq-charcoal);
  padding: 0.1em 0.35em;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 13px;
  font-weight: 700;
  color: var(--ylhq-charcoal);
}

input[type="text"],
input[type="email"] {
  font: inherit;
  font-weight: 400;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ylhq-line);
  border-radius: 0;
  background: var(--ylhq-white);
  color: var(--ylhq-charcoal);
}

input:focus {
  outline: 0;
  border-color: var(--ylhq-yellow);
  box-shadow: 0 0 0 3px rgba(255, 197, 35, 0.35);
}

.span-2 {
  grid-column: 1 / -1;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 8.2rem;
  padding: 1.2rem;
  border: 2px dashed var(--ylhq-yellow);
  background: #fff9e9;
  cursor: pointer;
  text-align: center;
}

.drop-zone.dragover {
  background: var(--ylhq-yellow);
  color: var(--ylhq-charcoal);
}

.drop-zone input {
  display: none;
}

.drop-zone span {
  color: var(--ylhq-muted);
  font-weight: 400;
}

.drop-zone.dragover span {
  color: var(--ylhq-charcoal);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

button {
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: 0;
  border-radius: 0;
  padding: 0.85rem 1.35rem;
  background: var(--ylhq-yellow);
  color: var(--ylhq-white);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

button:hover {
  background: var(--ylhq-yellow-hover);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  margin: 0;
  color: var(--ylhq-muted);
}

.status.ok {
  color: var(--ylhq-ok);
}

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

.site-footer {
  background: var(--ylhq-charcoal);
  color: var(--ylhq-muted);
  margin-top: auto;
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--ylhq-yellow);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--ylhq-white);
}

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

  .span-2 {
    grid-column: auto;
  }

  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.page.wide {
  width: min(1180px, calc(100% - 2rem));
}

.search-input {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--ylhq-line);
  background: var(--ylhq-white);
  color: var(--ylhq-charcoal);
  margin-bottom: 0.85rem;
}

.search-input:focus {
  outline: 0;
  border-color: var(--ylhq-yellow);
  box-shadow: 0 0 0 3px rgba(255, 197, 35, 0.35);
}

.browse-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.order-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--ylhq-white);
  color: var(--ylhq-charcoal);
  border: 1px solid var(--ylhq-line);
  border-left: 4px solid transparent;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.order-card:hover,
.order-card.active {
  background: var(--ylhq-white);
  border-left-color: var(--ylhq-yellow);
  color: var(--ylhq-charcoal);
}

.order-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.order-card p {
  margin: 0;
  color: var(--ylhq-muted);
  font-size: 13px;
}

.order-card .meta {
  margin-top: 0.45rem;
  font-size: 12px;
  font-weight: 700;
  color: var(--ylhq-charcoal);
}

.campaign-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.campaign-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  max-width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--ylhq-white);
  color: var(--ylhq-charcoal);
  border: 1px solid var(--ylhq-line);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.campaign-tab strong {
  font-family: Raleway, sans-serif;
  font-size: 14px;
}

.campaign-tab span {
  color: var(--ylhq-muted);
  font-size: 12px;
}

.campaign-tab:hover,
.campaign-tab.active {
  background: var(--ylhq-yellow);
  border-color: var(--ylhq-yellow);
  color: var(--ylhq-charcoal);
}

.campaign-tab.active span,
.campaign-tab:hover span {
  color: var(--ylhq-charcoal);
}

.recipient-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.recipient-heading {
  margin-top: 1.4rem;
}

table.data tbody tr.order-row {
  cursor: pointer;
}

table.data tbody tr.order-row:hover {
  background: #fff8e1;
}

table.data tbody tr.order-row.active {
  background: var(--ylhq-yellow);
}

.order-number {
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.order-number.missing {
  font-weight: 400;
  color: var(--ylhq-muted);
}

.recipient-toolbar h2 {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ylhq-line);
  background: var(--ylhq-white);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data th,
table.data td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--ylhq-line);
  text-align: left;
  vertical-align: top;
}

table.data th {
  background: var(--ylhq-charcoal);
  color: var(--ylhq-white);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data a {
  color: var(--ylhq-charcoal);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.scanned {
  background: #e4f3f3;
  color: var(--ylhq-ok);
}

.badge.pending {
  background: #fff6d8;
  color: #9a3412;
}

.pager {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.pager button {
  padding: 0.5rem 0.8rem;
  font-size: 12px;
}

.empty {
  color: var(--ylhq-muted);
  padding: 1rem 0;
}

@media (max-width: 900px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }
}
