/* ── ADMIN PANEL ────────────────────────────────── */

.admin-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-tab {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── КАРТОЧКИ ЗАКАЗОВ ───────────────────────────── */

.admin-order-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 12px 16px 0;
}

.admin-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.admin-order-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.admin-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.admin-status-badge.status-new {
  background: #FFF3E0;
  color: #E65100;
}

.admin-status-badge.status-prog {
  background: #E3F2FD;
  color: #1565C0;
}

.admin-status-badge.status-ready {
  background: var(--green-bg);
  color: var(--green);
}

.admin-status-badge.status-cancelled {
  background: var(--red-bg);
  color: var(--red);
}

.admin-order-product {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.admin-order-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.admin-status-btn {
  width: 100%;
  padding: 10px 0;
  border: 1px solid var(--border2);
  border-radius: var(--rsm);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  font-family: 'Mulish', sans-serif;
  transition: background 0.15s;
}

.admin-status-btn:active {
  background: var(--blush);
}

/* ── ПУСТОЕ СОСТОЯНИЕ ───────────────────────────── */

.admin-empty {
  padding: 60px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

/* ── СЕКЦИЯ ─────────────────────────────────────── */

.admin-section-label {
  padding: 14px 16px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ── БАННЕР ─────────────────────────────────────── */

.admin-banner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
}

.admin-banner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rsm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.admin-banner-card.active {
  border-color: var(--accent);
  background: var(--red-bg);
}

.admin-banner-emoji {
  font-size: 24px;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.admin-banner-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.admin-banner-check {
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
}

.admin-no-banner {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: var(--muted);
  border: 0.5px dashed var(--border2);
  border-radius: var(--r);
  background: var(--blush);
}

/* ── ЗАГРУЗКА ────────────────────────────────────── */
.admin-loading {
  padding: 60px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ── НОВЫЕ КАРТОЧКИ ЗАКАЗОВ ─────────────────────── */
.adm-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  margin: 10px 16px 0;
  cursor: pointer;
  transition: transform 0.15s;
  overflow: hidden;
}

.adm-card:active {
  transform: scale(0.98);
}

.adm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 0.5px solid var(--border);
}

.adm-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.adm-uname {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.adm-created {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.adm-card-body {
  padding: 10px 14px 12px;
}

.adm-product {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.adm-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

/* ── СТАТУС БЕЙДЖИ ───────────────────────────────── */
.adm-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.st-new         { background: #FFF3E0; color: #E65100; }
.st-confirmed   { background: #E8F5E9; color: #2E7D32; }
.st-prog        { background: #E3F2FD; color: #1565C0; }
.st-ready       { background: var(--green-bg); color: var(--green); }
.st-done        { background: var(--blush); color: var(--muted); }
.st-cancelled   { background: var(--red-bg); color: var(--red); }

/* ── ОВЕРЛЕЙ / BOTTOM SHEET ──────────────────────── */
.adm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  transition: background 0.28s;
}

.adm-overlay.visible {
  background: rgba(0, 0, 0, 0.45);
}

.adm-sheet {
  width: 100%;
  max-height: 88vh;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.adm-overlay.visible .adm-sheet {
  transform: translateY(0);
}

.adm-sheet-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}

.adm-sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
}

.adm-sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blush);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.adm-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 32px;
}

/* ── ТАБЛИЦА ДЕТАЛЕЙ ─────────────────────────────── */
.adm-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.adm-detail-table tr {
  border-bottom: 0.5px solid var(--border);
}

.adm-detail-table tr:last-child {
  border-bottom: none;
}

.adm-dt-key {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  width: 38%;
  vertical-align: top;
}

.adm-dt-val {
  padding: 10px 20px 10px 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  vertical-align: top;
  line-height: 1.5;
}

/* ── КНОПКИ СТАТУСА ──────────────────────────────── */
.adm-section-lbl {
  padding: 16px 20px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.adm-st-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 0 16px;
}

.adm-st-btn {
  padding: 10px 6px;
  border-radius: var(--rsm);
  border: 1.5px solid var(--border2);
  background: var(--surface);
  font-family: 'Mulish', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.adm-st-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.adm-st-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── КНОПКА УДАЛЕНИЯ ─────────────────────────────── */
.adm-delete-btn {
  display: block;
  width: calc(100% - 32px);
  margin: 20px 16px 0;
  padding: 13px;
  border-radius: var(--r);
  border: 1.5px solid #E53935;
  background: transparent;
  font-family: 'Mulish', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #E53935;
  cursor: pointer;
  transition: background 0.15s;
}

.adm-delete-btn:active {
  background: #FFEBEE;
}

/* Desktop: ограничиваем ширину sheet */
@media (min-width: 560px) {
  .adm-overlay {
    position: absolute;
  }

  .adm-sheet {
    max-width: 430px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
  }
}
