@import url("../shop/css/shop.css");

.admin-signin-page {
  min-height: 100vh;
  margin: 0;
  background: #eef2eb;
  color: #172417;
}

.signin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  min-height: 100vh;
}

.signin-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2rem, 6vw, 6rem);
  background: #172b1b;
  color: #fff;
}

.signin-logo { width: min(260px, 60%); margin-bottom: 4rem; }
.signin-eyebrow { color: #b9e889; text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 700; }
.signin-intro h1 { max-width: 650px; margin: .7rem 0 1rem; color: #fff; font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 5rem); line-height: 1.05; }
.signin-intro p { max-width: 480px; color: #dae8d9; font-size: 1.08rem; line-height: 1.55; }
.signin-note { margin-top: 3rem; padding: .7rem .9rem; border: 1px solid #6c916a; border-radius: 9px; color: #e3f2de; font-size: .85rem; }
.signin-panel { align-self: center; justify-self: center; width: min(440px, calc(100% - 3rem)); padding: 2rem 0; }
.signin-panel-top { display: inline-flex; align-items: center; gap: .55rem; color: #36713e; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.signin-lock { font-size: .7rem; }
.signin-panel h2 { margin: .7rem 0 .4rem; font-family: var(--font-display); font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.15; }
.signin-help { margin: 0 0 2rem; color: #5b685d; line-height: 1.5; }
.signin-panel label { display: block; margin: 1rem 0 .5rem; font-weight: 700; }
.signin-username { box-sizing: border-box; width: 100%; min-height: 56px; padding: .8rem 1rem; border: 1px solid #aebbad; border-radius: 10px; background: white; font: inherit; font-size: 1.05rem; }
.signin-username:focus { outline: 3px solid #a9d982; outline-offset: 2px; border-color: #36713e; }
.signin-pin-wrap { position: relative; }
.signin-pin-wrap input { box-sizing: border-box; width: 100%; min-height: 56px; padding: .8rem 5rem .8rem 1rem; border: 1px solid #aebbad; border-radius: 10px; background: white; font: inherit; font-size: 1.05rem; }
.signin-pin-wrap input:focus { outline: 3px solid #a9d982; outline-offset: 2px; border-color: #36713e; }
.signin-reveal { position: absolute; right: .5rem; top: .45rem; min-width: 58px; min-height: 44px; border: 0; background: transparent; color: #2d6233; font: inherit; font-weight: 700; cursor: pointer; }
.signin-reveal:focus-visible, .signin-submit:focus-visible { outline: 3px solid #a9d982; outline-offset: 2px; }
.signin-submit { min-height: 52px; margin-top: 1.1rem; font-size: 1rem; }
.signin-submit:disabled { opacity: .65; cursor: wait; }
.signin-error { margin: .8rem 0 0; padding: .8rem .9rem; border-radius: 8px; border: 1px solid #e8b6ac; background: #fff2ef; color: #8c251a; font-size: .92rem; }
.signin-support { margin-top: 1.6rem; color: #59675a; font-size: .85rem; line-height: 1.5; }
.signin-support code { font-size: .9em; }
.admin-load-error { width: min(540px, calc(100% - 2rem)); margin: 12vh auto; padding: 2rem; border: 1px solid #dbe4d8; border-radius: 14px; background: white; box-shadow: 0 8px 30px rgb(0 0 0 / 5%); }
.admin-load-error h1 { margin-top: 0; font-family: var(--font-display); }
.admin-load-error p { line-height: 1.5; }
.admin-load-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.admin-load-actions .btn { min-height: 44px; }

@media (max-width: 760px) {
  .signin-layout { display: block; }
  .signin-intro { padding: 1.4rem 1.5rem; min-height: 0; }
  .signin-logo { width: 135px; margin: 0 0 1.1rem; }
  .signin-intro h1 { margin: .35rem 0; font-size: 1.7rem; }
  .signin-intro p { margin: .3rem 0; font-size: .9rem; }
  .signin-note { display: none; }
  .signin-panel { width: min(440px, calc(100% - 3rem)); padding: 2.5rem 0; }
}

body.admin {
  background: #f5f6f4;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 0px);
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0;
  }
  .admin-sidebar .brand {
    display: none;
  }
  .admin-sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    -webkit-overflow-scrolling: touch;
  }
  .admin-sidebar a {
    flex: 0 0 auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem !important;
    border-radius: 999px;
    background: #2a2a2a;
    color: #eee;
  }
  .admin-sidebar a.active {
    background: var(--ffm-lime);
    color: var(--ffm-black);
  }
  .admin-sidebar .logout {
    margin-top: 0;
    padding-top: 0.4rem;
    border-top: none;
  }
  .admin-main {
    padding: 1rem 0.9rem 5rem;
  }
}

.admin-sidebar {
  background: #171a17;
  color: #eee;
  padding: 1.25rem 0;
}

.admin-sidebar .brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid #333;
  margin-bottom: 0.75rem;
  text-decoration: none;
}

.admin-sidebar .brand img {
  width: 72px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.08));
}

.admin-sidebar .brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: #999;
}

.admin-sidebar .brand span {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-heading {
  display: block;
  padding: 1rem 1.25rem 0.3rem;
  color: #747b74;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-login__logo {
  display: block;
  width: min(220px, 70%);
  height: auto;
  margin: 0 auto 1rem;
}

.admin-sidebar a.active {
  background: #2a2a2a;
  color: #7dce6a;
}

.admin-sidebar nav {
  display: flex;
  flex-direction: column;
}

.admin-sidebar a {
  padding: 0.55rem 1.25rem;
  color: #ccc;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: #2a2a2a;
  color: var(--ffm-lime);
}

.admin-sidebar .logout {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  color: #f88;
}

.admin-main {
  padding: 1.25rem 1.75rem 2rem;
  max-width: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dde1dc;
}

.admin-page-head .admin-sub {
  margin-bottom: 0;
}

.admin-eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  color: #697069;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sync-state,
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  color: #346636;
  font-size: 0.8rem;
  font-weight: 700;
}

.sync-state {
  margin-top: 0.3rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid #cfe0cf;
  border-radius: 999px;
  background: #edf7ed;
}

.sync-state i,
.live-indicator i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #3e9544;
  box-shadow: 0 0 0 3px rgb(62 149 68 / 14%);
}

.admin-main h1 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.admin-sub {
  color: var(--ffm-muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.kpi {
  background: var(--ffm-card);
  padding: 1rem;
  border-radius: var(--ffm-radius);
  border-left: 4px solid var(--ffm-lime);
}

.kpi .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ffm-muted);
}

.kpi .value {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.kpi.warn {
  border-left-color: #e6a700;
}

.kpi.good {
  border-left-color: #2e7d32;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  overflow: hidden;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.data-table th {
  background: #f5f5f5;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #eee;
}

.status-pill.new {
  background: #e3f2fd;
  color: #1565c0;
}
.status-pill.preparing {
  background: #fff3e0;
  color: #e65100;
}
.status-pill.ready {
  background: #e8f5e9;
  color: #2e7d32;
}
.status-pill.completed {
  background: #f3f3f3;
  color: #555;
}
.status-pill.cancelled {
  background: #ffebee;
  color: #c62828;
}

.admin-login {
  max-width: 360px;
  margin: 4rem auto;
  padding: 2rem;
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  box-shadow: 0 4px 24px rgb(0 0 0 / 8%);
}

.admin-login h1 {
  text-align: center;
  font-size: 1.35rem;
}

.panel {
  background: var(--ffm-card);
  padding: 1rem;
  border-radius: var(--ffm-radius);
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.inline-form .form-group {
  margin: 0;
  flex: 1;
  min-width: 120px;
}

select.status-select {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font: inherit;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-toolbar input,
.admin-toolbar select {
  padding: 0.5rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.admin-toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
}

.orders-commandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.orders-commandbar .chip-row {
  margin-bottom: 0.65rem;
}

.orders-live-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.live-indicator.is-offline {
  color: #9a5b00;
}

.live-indicator.is-offline i {
  background: #d68b13;
}

.order-search {
  margin-bottom: 0.75rem;
}

.order-search input[type="search"] {
  min-height: 44px;
  border-color: #d5dad4;
  box-shadow: 0 1px 2px rgb(0 0 0 / 3%);
}

.orders-workspace {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(430px, 1.55fr);
  gap: 1rem;
  min-height: 560px;
}

.order-master,
.order-detail {
  min-width: 0;
  border: 1px solid #e0e3df;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgb(28 38 28 / 5%);
}

.order-master {
  align-self: start;
  max-height: calc(100vh - 235px);
  overflow: auto;
}

.order-list-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid #e8ebe7;
  background: rgb(255 255 255 / 96%);
  color: #6b716b;
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}

.order-list-head strong {
  color: #202520;
}

.order-list-item {
  display: block;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 0;
  border-bottom: 1px solid #eef0ed;
  border-left: 4px solid transparent;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.order-list-item:hover {
  background: #fafbf9;
}

.order-list-item.is-selected {
  border-left-color: var(--ffm-lime);
  background: #f2f8ef;
}

.order-list-item__top,
.order-list-item__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.order-list-item__top b {
  white-space: nowrap;
}

.order-list-item__meta {
  display: block;
  margin: 0.28rem 0 0.5rem;
  color: #707770;
  font-size: 0.8rem;
}

.order-list-item__bottom {
  justify-content: flex-start;
}

.order-detail {
  align-self: start;
  min-height: 440px;
}

.order-detail-card.work-card {
  margin: 0;
  padding: 1.25rem;
  border-radius: 14px;
}

.order-kicker {
  display: block;
  margin-bottom: 0.2rem;
  color: #727872;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
}

.order-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}

.order-facts div {
  padding: 0.7rem;
  border: 1px solid #e5e8e4;
  border-radius: 9px;
  background: #fafbf9;
}

.order-facts span,
.order-facts strong {
  display: block;
}

.order-facts span {
  margin-bottom: 0.2rem;
  color: #757b75;
  font-size: 0.72rem;
}

.order-facts strong {
  font-size: 0.9rem;
}

.order-empty,
.order-detail-empty {
  padding: 2rem 1rem;
  color: #727872;
  text-align: center;
}

.order-empty p,
.order-detail-empty p {
  margin: 0.35rem 0 0;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #eef6ee;
  border-radius: 10px;
  font-size: 0.9rem;
}

.bulk-move {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.bulk-move select {
  min-height: 36px;
}

.table-actions {
  white-space: nowrap;
}

.table-actions .btn {
  margin-right: 0.2rem;
}

input.cat-name {
  width: 100%;
  min-width: 10rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font: inherit;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.data-table tr.is-hidden-row td {
  color: #888;
}

.admin-split {
  display: grid;
  gap: 1rem;
}

@media (min-width: 960px) {
  .admin-split {
    grid-template-columns: 1.5fr 0.8fr;
    align-items: start;
  }
}

.data-table tr.low td {
  background: #fff8e1;
}

.data-table input,
.data-table select {
  width: 100%;
  max-width: 9rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font: inherit;
}

.data-table .grow {
  max-width: none;
}

.status-pill.paid {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-pill.unpaid {
  background: #fff3e0;
  color: #e65100;
}

.status-pill.hidden-item {
  background: #eee;
  color: #666;
}

.order-lines {
  margin: 0.35rem 0;
  padding-left: 1.1rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.check-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.check-row label {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  font-weight: 600;
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--ffm-lime);
  color: var(--ffm-black);
  font-size: 0.75rem;
}

.admin-sidebar a.active .nav-count {
  background: var(--ffm-black);
  color: var(--ffm-lime);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 800px) {
  .action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.action-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 92px;
  padding: 0.9rem 1rem;
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  border-left: 4px solid var(--ffm-lime);
  color: inherit;
}

.action-tile span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ffm-muted);
}

.action-tile strong {
  font-size: 1.45rem;
  line-height: 1.1;
}

.chart-card {
  padding-bottom: 0.4rem;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
}

.chart-head h2 {
  margin-bottom: 0.15rem;
}

.chart-head .chip-row {
  margin: 0;
}

.chart-total {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chart-plot {
  position: relative;
  min-height: 180px;
  touch-action: pan-y;
}

.chart-plot svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-grid {
  stroke: #ececec;
  stroke-width: 1;
}

.chart-label {
  fill: var(--ffm-muted);
  font-size: 11px;
  font-family: var(--font-body);
}

.chart-area {
  fill: url("#sales-fill");
}

.chart-line {
  fill: none;
  stroke: #5d7c00;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: #fff;
  stroke: #5d7c00;
  stroke-width: 2;
}

.chart-guide {
  stroke: #c5c5c5;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-hot {
  fill: #fff;
  stroke: var(--ffm-lime);
  stroke-width: 3;
}

.chart-guide[hidden],
.chart-hot[hidden],
.chart-tip[hidden] {
  display: none !important;
}

.chart-tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  background: #1a1a1a;
  color: #fff;
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.35;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
}

.chart-tip strong {
  display: block;
  font-weight: 600;
  color: var(--ffm-lime);
}

.action-tile.warn {
  border-left-color: #e6a700;
}

.action-tile.good {
  border-left-color: #2e7d32;
}

.chip-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin-bottom: 0.85rem;
  padding-bottom: 0.15rem;
}

.chip {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.chip.is-active {
  background: var(--ffm-lime);
  border-color: var(--ffm-lime);
  color: var(--ffm-black);
}

.work-card,
.catalog-row,
.stock-row,
.mini-order {
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.work-card__head,
.mini-order,
.catalog-row,
.stock-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.work-card h2,
.catalog-row strong,
.stock-row strong {
  margin: 0;
  font-size: 1.05rem;
}

.work-card__total,
.catalog-row__price {
  font-weight: 700;
  white-space: nowrap;
}

.work-card__when {
  margin: 0.45rem 0;
  color: var(--ffm-muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.work-actions,
.catalog-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.step-btn {
  min-height: 48px;
  flex: 1 1 140px;
}

.tap {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.05rem;
}

.note {
  background: #fff8e1;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.plain-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
}

.plain-list li {
  margin: 0.35rem 0;
}

.stock-row[hidden],
#stock-empty[hidden] {
  display: none !important;
}

.inv-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 200px);
  width: 100%;
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  box-shadow: 0 1px 0 rgb(0 0 0 / 4%);
}

.inv-table {
  width: 100%;
  min-width: 0;
  margin: 0;
  table-layout: auto;
}

.inv-table th,
.inv-table td {
  white-space: nowrap;
}

.inv-table td.inv-product {
  white-space: normal;
  width: 32%;
}

.inv-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

.inv-table tbody tr.stock-row {
  display: table-row;
  padding: 0;
  margin: 0;
  background: transparent;
  border-radius: 0;
  align-items: stretch;
  justify-content: unset;
  gap: 0;
}

.inv-table tbody tr.stock-row.is-low td {
  background: #fff8e1;
}

.inv-product {
  min-width: 12rem;
}

.inv-sku {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #555;
}

.inv-table .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

.cat-panel {
  background: var(--ffm-card);
  border-radius: var(--ffm-radius);
  padding: 0.35rem 1rem 0.85rem;
  margin-bottom: 1rem;
}

.cat-panel summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
}

.cat-panel .admin-toolbar {
  margin-top: 0.5rem;
}

.qty-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.inv-table select.cat-pick {
  width: auto;
  min-width: 8rem;
  max-width: 11rem;
}

.status-pill.stock-ok {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-pill.stock-low {
  background: #fff8e1;
  color: #e65100;
}

.status-pill.stock-out {
  background: #ffebee;
  color: #c62828;
}

.qty-control {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.qty-control button {
  min-width: 2.1rem;
  min-height: 38px;
  border: none;
  border-right: 1px solid #e4e4e4;
  background: #f6f6f6;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.35rem;
}

.qty-control button:hover {
  background: #ececec;
}

.qty-control button.qty-nudge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.qty-control input {
  width: 3.4rem !important;
  max-width: 3.4rem !important;
  min-height: 38px;
  border: none !important;
  border-radius: 0 !important;
  text-align: center;
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.inv-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-width: 13rem;
}

.inv-quick .btn {
  min-height: 32px;
  padding: 0.2rem 0.55rem;
}

.inv-table input.inv-meta {
  width: 5.2rem;
  max-width: 5.2rem;
}

.work-card summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

#stock-empty {
  padding: 1rem;
}

.catalog-row.is-hidden-row {
  opacity: 0.65;
}

.stock-row.is-low {
  background: #fff8e1;
}

.stock-row__name {
  flex: 1;
  min-width: 0;
}

.stepper {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
}

.stepper button {
  width: 48px;
  height: 48px;
  border: none;
  background: #f4f4f4;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
}

.stepper input {
  width: 3.2rem;
  height: 48px;
  border: none;
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  -moz-appearance: textfield;
  appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.admin-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(12px);
  background: #1a1a1a;
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 40;
  max-width: calc(100% - 2rem);
}

.admin-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.admin-login #pin {
  min-height: 52px;
  font-size: 1.45rem;
  letter-spacing: 0.28em;
  text-align: center;
}

@media (max-width: 640px) {
  .catalog-row,
  .stock-row,
  .mini-order {
    flex-wrap: wrap;
  }
  .catalog-row__actions,
  .work-actions {
    width: 100%;
  }
  .catalog-row__actions .btn,
  .mini-order .btn {
    min-height: 44px;
  }
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0;
  }
  .admin-sidebar .brand {
    display: none;
  }
  .admin-sidebar nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
  }
  .admin-sidebar .nav-heading {
    display: none;
  }
  .admin-sidebar a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #2a2a2a;
    color: #eee;
  }
  .admin-sidebar a.active {
    background: var(--ffm-lime);
    color: var(--ffm-black);
  }
  .admin-sidebar a.active .nav-count {
    background: var(--ffm-black);
    color: var(--ffm-lime);
  }
  .admin-sidebar .logout {
    margin-top: 0;
    padding-top: 0.4rem;
    border-top: none;
    color: #f88;
  }
}

@media (max-width: 899px) {
  .orders-workspace {
    grid-template-columns: 1fr;
  }
  .order-master {
    max-height: none;
  }
  .order-detail {
    scroll-margin-top: 72px;
  }
}

@media (max-width: 600px) {
  .admin-page-head {
    display: block;
  }
  .sync-state {
    margin-top: 0.75rem;
  }
  .orders-commandbar {
    display: block;
  }
  .orders-live-tools {
    justify-content: space-between;
  }
  .order-facts {
    grid-template-columns: 1fr;
  }
}

.docs-embed h2 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.docs-steps {
  margin: 0.75rem 0;
  padding-left: 1.2rem;
}

.docs-steps > li {
  margin: 0.85rem 0;
}

.docs-steps ol {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.docs-embed code {
  font-size: 0.85em;
  background: #f0f2f4;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}
