.ad {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 100px);
  background: #fff8e6;
  color: var(--ink);
}
.ad-rail {
  display: flex;
  align-items: center;
  overflow-x: auto;
  background: var(--sun);
  padding: 10px 12px;
  position: -webkit-sticky;
  position: sticky;
  top: var(--bar-h,0);
  z-index: 20;
  scrollbar-width: none;
}
.ad-rail::-webkit-scrollbar {
  display: none;
}
.ad-brand {
  display: flex;
  flex-direction: column;
  margin-right: 14px;
  flex: none;
}
.ad-brand strong {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
}
.ad-brand span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ad-tab {
  display: flex;
  align-items: center;
  flex: none;
  border: 0;
  background: none;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  margin-right: 4px;
  transition: background-color .2s, color .2s;
}
.ad-tab:hover {
  background: rgba(255, 255, 255, .5);
}
.ad-tab.on {
  background: var(--ink);
  color: #fff;
}
.ad-count {
  margin-left: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--rose);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}
.ad-count.spring {
  animation: lm-spring .6s var(--spring);
}
.ad-main {
  padding: 20px 16px 40px;
  min-width: 0;
}
.ad-view {
  max-width: 1240px;
  margin: 0 auto;
}
.ad-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.ad-head h1 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -.01em;
}
.ad-head p {
  color: var(--muted);
  font-size: 14px;
}
.ad-card {
  background: #fff;
  border: 2px solid var(--ink);
  padding: 18px;
  min-width: 0;
}
.ad-card h2 {
  font-size: 17px;
  margin-bottom: 12px;
}
.ad-gap {
  margin-top: 26px;
}
.ad-muted {
  color: var(--muted);
  font-size: 14px;
}
.ad-money {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ad-hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.ad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  transition: transform .2s var(--out);
}
.ad-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}
.ad-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.ad-btn-rose {
  background: var(--rose);
  border-color: var(--rose);
}
.ad-btn-small {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
  background: var(--sun);
  border-color: var(--sun);
  color: var(--ink);
}
.ad-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 12px;
  margin-bottom: 14px;
}
.ad-kpi {
  padding: 16px;
  border: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
}
.ad-kpi span {
  font-size: 13px;
  font-weight: 700;
}
.ad-kpi strong {
  font-family: var(--display);
  font-size: clamp(24px, 2.3vw, 36px);
  white-space: nowrap;
  line-height: 1.1;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.ad-kpi.sun {
  background: var(--sun);
}
.ad-kpi.rose {
  background: var(--rose);
  color: #fff;
}
.ad-kpi.mint {
  background: var(--mint);
}
.ad-kpi.lilac {
  background: var(--lilac);
}
.ad-kpi.bump {
  animation: ad-bump .6s var(--spring);
}
@keyframes ad-bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}
.ad-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 14px;
}
.ad-spark {
  width: 100%;
  height: auto;
  display: block;
}
.ad-spark-line {
  fill: none;
  stroke: var(--rose-deep);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ad-spark-area {
  fill: var(--blush);
}
.ad-spark-dot {
  fill: var(--rose);
  stroke: #fff;
  stroke-width: 3;
}
.ad-axis {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.ad-feed-list,
.ad-low-list,
.ad-lines {
  list-style: none;
}
.ad-feed-row {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 1.6s ease;
}
.ad-feed-row:hover {
  background: var(--cream);
}
.ad-feed-row.new {
  animation: ad-in .7s var(--spring), ad-glow 2.4s ease;
}
@keyframes ad-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ad-glow {
  0%, 40% {
    background: var(--blush);
  }
  100% {
    background: transparent;
  }
}
.ad-feed-top {
  display: flex;
  align-items: center;
}
.ad-feed-top strong {
  margin-right: 10px;
}
.ad-feed-top .ad-money {
  margin-left: auto;
}
.ad-feed-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.ad-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--line);
}
.ad-chip.placed {
  background: var(--rose);
  color: #fff;
}
.ad-chip.packed {
  background: var(--sun);
}
.ad-chip.shipped {
  background: var(--sky);
}
.ad-chip.delivered {
  background: var(--mint);
}
.ad-low-list li,
.ad-lines li {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.ad-thumb {
  position: relative;
  width: 40px;
  height: 52px;
  overflow: hidden;
  flex: none;
  margin-right: 12px;
  background: var(--cream);
}
.ad-thumb.big {
  width: 52px;
  height: 68px;
}
.ad-thumb .ph {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.ad-low-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
}
.ad-low-text span {
  color: var(--muted);
  font-size: 13px;
}
.ad-stock {
  font-size: 13px;
  font-weight: 700;
  margin: 0 10px;
}
.ad-stock.low {
  color: var(--rose-deep);
}
.ad-stock.out {
  color: #fff;
  background: var(--ink);
  padding: 2px 6px;
}
@media (min-width:700px) {
  .ad-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width:1100px) {
  .ad-dash-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
  .ad-chart {
    grid-column: 1;
  }
  .ad-feed {
    grid-column: 2;
    grid-row: 1/3;
  }
  .ad-low {
    grid-column: 1;
  }
}
.ad-orders {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 14px;
  align-items: start;
}
.ad-table-card {
  padding: 0;
  overflow-x: auto;
}
.ad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ad-table th {
  text-align: left;
  background: var(--sun);
  padding: 10px;
  font-size: 13px;
  white-space: nowrap;
}
.ad-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ad-table tr {
  cursor: pointer;
}
.ad-table tbody tr:hover {
  background: var(--cream);
}
.ad-table tr.sel {
  background: var(--blush);
}
.ad-table tr.new {
  animation: ad-in .7s var(--spring), ad-glow 2.4s ease;
}
.ad-you {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
}
.ad-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ad-detail-head h2 {
  font-family: var(--display);
  font-size: 26px;
  margin: 0;
}
.ad-lines {
  margin: 12px 0;
}
.ad-lines .ad-money {
  margin-left: 10px;
}
.ad-totals p {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
}
.ad-totals p:last-child {
  border-top: 2px solid var(--ink);
  margin-top: 6px;
  padding-top: 8px;
  font-size: 16px;
}
.ad-steps {
  list-style: none;
  display: flex;
  margin: 16px 0;
}
.ad-steps li {
  flex: 1 1 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 2px;
  background: var(--line);
  margin-right: 3px;
  transition: background-color .4s;
}
.ad-steps li:last-child {
  margin-right: 0;
}
.ad-steps li.on {
  background: var(--rose);
  color: #fff;
}
.ad-detail .ad-btn {
  width: 100%;
}
.ad-done {
  font-weight: 700;
  color: #1d7a4f;
}
@media (max-width:1499px) {
  .ad-table .items {
    display: none;
  }
}
@media (min-width:1100px) {
  .ad-orders {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }
  .ad-detail {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--bar-h,0px) + 16px);
  }
}
.ad-products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 14px;
}
.ad-product-top {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.ad-product-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ad-product-name strong {
  font-size: 15px;
}
.ad-switch {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  cursor: pointer;
}
.ad-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.ad-switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--line);
  margin-right: 10px;
  transition: background-color .25s;
  flex: none;
}
.ad-switch-track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .3s var(--spring);
}
.ad-switch input:checked + .ad-switch-track {
  background: var(--rose);
}
.ad-switch input:checked + .ad-switch-track::after {
  transform: translateX(18px);
}
.ad-switch input:focus-visible + .ad-switch-track {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.ad-stock-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.ad-stock-table th {
  font-weight: 600;
  color: var(--muted);
  padding: 4px;
  text-align: center;
  white-space: nowrap;
}
.ad-stock-table th:first-child {
  text-align: left;
}
.ad-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px var(--line);
}
.ad-stock-table td {
  padding: 3px;
}
.ad-stock-table th:first-child {
  width: 22px;
  padding-left: 0;
}
.ad-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ad-cell {
  width: 100%;
  min-width: 34px;
  height: 32px;
  border: 0;
  background: #f4f1ec;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ad-cell:disabled {
  cursor: default;
  opacity: 1;
  color: var(--ink);
}
.ad-cell.low {
  background: var(--blush);
  color: var(--rose-deep);
}
.ad-cell.out {
  background: var(--rose);
  color: #fff;
}
.ad-cell.low:hover,
.ad-cell.out:hover {
  background: var(--rose-deep);
  color: #fff;
}
.ad-cell.drop {
  animation: ad-drop .9s ease;
}
.ad-cell.rise {
  animation: ad-rise .9s ease;
}
@keyframes ad-drop {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.25);
    background: var(--rose);
    color: #fff;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes ad-rise {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.25);
    background: var(--mint);
  }
  100% {
    transform: scale(1);
  }
}
@media (min-width:700px) {
  .ad-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width:1200px) {
  .ad-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.ad-store {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-gap: 14px;
  align-items: start;
}
.ad-announce {
  display: flex;
}
.ad-announce input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 2px solid var(--ink);
  border-right: 0;
  padding: 0 12px;
  font: inherit;
}
.ad-heroes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-gap: 10px;
}
.ad-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 2px solid var(--line);
  background: #fff;
  padding: 0 0 10px;
  transition: border-color .2s, transform .2s var(--out);
}
.ad-hero:hover {
  transform: translateY(-2px);
}
.ad-hero.on {
  border-color: var(--ink);
}
.ad-hero-img {
  position: relative;
  display: block;
  padding-top: 56%;
  overflow: hidden;
  margin-bottom: 8px;
}
.ad-hero-img .ph {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.ad-hero strong,
.ad-hero .ad-muted {
  padding: 0 10px;
}
.ad-hero .ad-muted {
  font-size: 12px;
}
.ad-live {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--rose);
  color: #fff;
  padding: 2px 8px;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s, transform .3s var(--spring);
}
.ad-hero.on .ad-live {
  opacity: 1;
  transform: none;
}
.ad-phone {
  width: 240px;
  margin: 0 auto;
  border: 10px solid var(--ink);
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
}
.ad-phone-bar {
  background: var(--rose);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  padding: 6px 8px;
  word-break: break-word;
}
.ad-phone-head {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.ad-phone-hero {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.ad-phone-hero .ph {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
.ad-phone-headline {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: #fff;
  padding: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
@media (min-width:1000px) {
  .ad {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .ad-rail {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 14px;
    height: calc(100vh - var(--bar-h,0px));
    overflow: visible;
  }
  .ad-brand {
    margin: 0 0 24px 6px;
  }
  .ad-brand strong {
    font-size: 28px;
  }
  .ad-tab {
    margin: 0 0 6px;
    border-radius: 0;
    justify-content: space-between;
  }
  .ad-main {
    padding: 28px 28px 48px;
  }
  .ad-store {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ad-feed-row.new,
  .ad-table tr.new,
  .ad-kpi.bump,
  .ad-cell.drop,
  .ad-cell.rise,
  .ad-count.spring {
    animation: none;
  }
}
