@font-face {
  font-family: Manrope;
  src: url("manrope-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("manrope-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("manrope-800.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #151414;
  --paper: #f7f6f5;
  --white: #fff;
  --red: #b91525;
  --deep-red: #9b0f1e;
  --pale-red: #fff0f1;
  --muted: #615b5b;
  --line: #ded9d9;
  font: 400 16px/1.55 Manrope, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  accent-color: var(--red);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, h3, p { margin: 0 0 .55rem; }
h1, h2, h3, strong { font-weight: 800; }
h1 { font-size: clamp(2rem, 6vw, 3.7rem); line-height: 1.05; letter-spacing: -.055em; }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); letter-spacing: -.035em; }
h3 { font-size: 1.1rem; line-height: 1.4; overflow-wrap: anywhere; }
a { color: var(--deep-red); font-weight: 800; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #d0303f; outline-offset: 3px; }
section { margin-top: 1.9rem; }
form { margin: .65rem 0; }
form:last-child, p:last-child { margin-bottom: 0; }

.masthead { background: var(--ink); color: var(--white); border-bottom: 4px solid var(--red); }
.bar, .shell { width: min(calc(100% - 3rem), 1060px); margin-inline: auto; }
.bar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.shell { padding-block: 2.25rem 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--white); text-decoration: none; }
.brand img { border: 1px solid #f2e9e9; border-radius: 50%; width: 48px; height: 48px; }
.brand span { font-size: 1.08rem; letter-spacing: .02em; line-height: 1.15; }
.brand small { display: block; color: #ddd4d4; font-size: .76rem; font-weight: 600; letter-spacing: .1em; margin-top: .24rem; }
.account, .row, .page-heading { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.account { margin: 0; flex-wrap: nowrap; }
.account-name { min-width: 0; text-align: right; }
.account-name strong { overflow-wrap: anywhere; }
.account-name small { display: block; color: #ddd4d4; font-size: .75rem; }
.masthead .secondary { background: transparent; border-color: #8e8181; color: var(--white); }
.masthead .secondary:hover { background: #35292b; }
.page-heading { justify-content: space-between; margin-bottom: 1.35rem; }
.page-heading h1 { margin-bottom: 0; }
.eyebrow { color: var(--deep-red); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .58rem .93rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--red);
  color: var(--white);
  font: 800 .92rem/1.35 Manrope, system-ui, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--deep-red); }
button:disabled { opacity: .55; cursor: default; }
.secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.secondary:hover { background: #f4eded; }
.wave-nav { display: flex; align-items: center; gap: .45rem; padding: .35rem; background: #eeebeb; border-radius: 11px; width: fit-content; }
.wave-nav .secondary { background: transparent; border-color: transparent; }
.wave-nav .secondary:hover { background: var(--white); }
.wave-nav .button { min-width: 6.8rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .9rem; }
.order-card, .task-group, .label-panel {
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.order-card { border-left: 4px solid var(--red); }
.task-group + .task-group { margin-top: .8rem; }
.task-card {
  background: var(--paper);
  padding: .9rem 1rem;
  margin-top: .7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.task-heading { display: flex; justify-content: space-between; align-items: start; gap: .6rem; }
.task-heading h3 span { display: inline-block; color: var(--muted); font-size: .82rem; font-weight: 600; margin-inline-start: .4rem; }
.quantity { font-size: 1.12rem; white-space: nowrap; }
.meta { color: var(--muted); font-size: .88rem; }
.status { font-weight: 800; }
[data-status="active"] { border-color: var(--red); }
[data-status="active"] .status,
[data-status="review"] .status,
[data-status="approval"] .status { color: var(--deep-red); }
.alert { color: var(--deep-red); background: var(--pale-red); border-left: 3px solid var(--red); padding: .75rem 1rem; border-radius: 5px; margin: .8rem 0; }
.history ul { margin: 0; padding-inline-start: 1.3rem; }
.history li + li { margin-top: .4rem; }

label { display: inline-block; }
input:not([type="checkbox"], [type="hidden"]), select {
  min-height: 44px;
  max-width: 100%;
  padding: .45rem .65rem;
  border: 1px solid #a99f9f;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
input[type="number"] { width: 6.5rem; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin: 0; flex: 0 0 auto; }
.task-card label, .order-card label { margin: .25rem .3rem .25rem 0; max-width: 100%; }
.check-row { display: flex; align-items: center; min-height: 44px; gap: .6rem; }
details { margin-top: .65rem; }
summary { cursor: pointer; color: var(--deep-red); font-weight: 800; padding-block: .45rem; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .9rem .65rem; margin: 1.05rem 0; min-width: 0; }
legend { font-weight: 800; padding-inline: .25rem; }
.label-panel { max-width: 45rem; }

.login-layout {
  display: grid;
  grid-template-columns: minmax(15rem, .85fr) minmax(0, 1fr);
  max-width: 52rem;
  min-height: 420px;
  margin: clamp(0px, 8vh, 6rem) auto;
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 35px #26171913;
}
.login-brand {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.2rem;
  background: var(--ink);
  border-right: 5px solid var(--red);
  color: var(--white);
  padding: 2rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .07em;
}
.login-brand img { width: min(180px, 100%); height: auto; border-radius: 50%; border: 1px solid #f2e9e9; }
.login-panel { margin: 0; align-self: center; padding: clamp(1.25rem, 5vw, 3rem); }
.login-panel h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.25rem; }
.login-panel form { margin-bottom: 1rem; }
.login-panel .field { display: grid; gap: .35rem; margin-bottom: .8rem; font-weight: 800; }
.login-panel button { width: 100%; margin-top: .6rem; }

@media (max-width: 600px) {
  .bar, .shell { width: calc(100% - 1.75rem); }
  .bar { min-height: 66px; gap: .55rem; }
  .brand { gap: .45rem; }
  .brand img { width: 38px; height: 38px; }
  .brand span, .account strong { font-size: .87rem; }
  .account { gap: .45rem; }
  .account button { padding-inline: .55rem; font-size: .8rem; }
  .shell { padding-top: 1.55rem; }
  section { margin-top: 1.45rem; }
  .wave-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: .22rem; }
  .wave-nav .button { min-width: 0; padding-inline: .2rem; font-size: .85rem; }
  .order-card, .task-group, .label-panel { padding: .9rem; }
  .task-card { padding: .7rem; }
  .login-layout { grid-template-columns: 1fr; margin: 0 auto; max-width: 27rem; }
  .login-brand { padding: 1.25rem; gap: .65rem; border-right: 0; border-bottom: 4px solid var(--red); }
  .login-brand img { width: 92px; }
}

.work-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .8rem;
}
.queue-count {
  margin-left: .45rem;
  font-variant-numeric: tabular-nums;
}
.orders-panel { margin-top: 1.9rem; }
.orders-panel summary {
  color: var(--ink);
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  letter-spacing: -.035em;
}
.orders-panel .grid { margin-top: .5rem; }
.queue-empty { margin-top: 1.6rem; }
.wave-controls { position: sticky; top: 0; z-index: 1; padding-block: .55rem; background: var(--paper); }
.report-scroll { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; background: var(--white); font-variant-numeric: tabular-nums; }
.report-table th, .report-table td { padding: .6rem .75rem; border: 1px solid var(--line); text-align: left; }
.report-table thead { background: var(--ink); color: var(--white); }
.report-table tbody th { white-space: nowrap; }

@media (max-width: 600px) {
  .wave-nav.two-categories { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .work-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-nav .button { min-height: 44px; padding-inline: .55rem; font-size: .8rem; }
  .orders-panel { margin-top: 1.45rem; }
}
