.admin-page {
  width: min(1540px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.admin-header,
.admin-stats {
  display: flex;
}

.admin-header {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-kicker {
  display: inline-block;
  color: #9aabc7;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-header h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: #fff;
  color: #8d551b;
  text-decoration: none;
  font-weight: 800;
  border: 1px solid rgba(141, 85, 27, 0.15);
}

.admin-stats {
  gap: 16px;
  margin-bottom: 26px;
}

.admin-stats article {
  flex: 1;
  padding: 18px;
  border-radius: 24px;
  background: #f7f9fd;
  box-shadow: var(--shadow);
}

.admin-stats strong {
  display: block;
  font-size: 2rem;
}

.admin-stats span {
  color: var(--muted);
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.order-card {
  padding: 20px;
  border-radius: 24px;
  background: #f9fbff;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 800;
}

.order-content {
  display: grid;
  gap: 10px;
}

.order-items {
  display: grid;
  gap: 10px;
}

.order-item-line {
  display: flex;
  gap: 10px;
}

.order-item-line > div {
  display: grid;
  gap: 8px;
  flex: 1;
}

.qty-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #e9eef7;
  font-size: 0.84rem;
  font-weight: 800;
}

.ingredient-list {
  display: grid;
  gap: 6px;
}

.ingredient-row {
  display: grid;
  gap: 2px;
}

.ingredient-row span {
  color: #7d8fae;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ingredient-row strong {
  color: #233047;
  font-size: 0.92rem;
  font-weight: 700;
}

.tag,
.note-box {
  padding: 10px 12px;
  border-radius: 14px;
}

.tag {
  background: #eef3fb;
  color: #677895;
}

.note-box {
  background: #fff5de;
  color: #9b6929;
}

.order-footer {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.status-actions {
  display: flex;
  justify-content: center;
  align-items: center;
}

.status-btn {
  width: min(100%, 220px);
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.status-btn.primary {
  background: #fff0ca;
  color: #9b640f;
}

.status-btn.success {
  background: #dff7ea;
  color: #24754f;
}

.status-btn.muted {
  background: #eef3fb;
  color: #7d8fae;
}

.completed-wrap {
  margin-top: 24px;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--line-soft);
  background: #fff;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

th {
  color: #91a0bd;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  .admin-header,
  .admin-stats,
  .orders-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .back-link {
    width: 100%;
    justify-content: center;
  }
}
