/* ============================================================
   ADMIN DESIGN SYSTEM  — ad-* prefix (components) + adm-* prefix (layout/sidebar)
   ============================================================ */

/* ── Admin page wrapper ──────────────────────────────────── */
section.adm-admin-wrap {
  background: #f5f6fa;
  padding: 0 !important;
}
.adm-content-area {
  padding: 24px;
  min-height: calc(100dvh - 60px);
}
@media (max-width: 1199px) {
  .adm-content-area { padding: 16px; }
}
@media (max-width: 767px) {
  .adm-content-area { padding: 12px; }
}

/* ── Dark Admin Sidebar ──────────────────────────────────── */
.adm-sidebar {
  background: #0f1623;
  min-height: calc(100dvh - 60px);
  padding: 0 0 24px 0;
  position: sticky;
  top: 60px;
  height: calc(100dvh - 60px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.adm-sidebar::-webkit-scrollbar { width: 4px; }
.adm-sidebar::-webkit-scrollbar-track { background: transparent; }
.adm-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* User block */
.adm-user-block {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}
.adm-user-name {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-user-email {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation sections */
.adm-nav-section {
  padding: 18px 18px 5px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation items */
.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255,255,255,0.6);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.adm-nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}
.adm-nav-item.active {
  color: #fff;
  background: rgba(200,16,46,0.15);
  border-left-color: #C8102E;
  font-weight: 600;
}
.adm-nav-item i {
  font-size: 16px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
button.adm-nav-item {
  border: none;
  background: none;
  width: calc(100% - 0px);
  text-align: left;
}

/* ── Sidebar collapsible groups ──────────────────────────── */
.adm-nav-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 10px 18px;
  color: rgba(255,255,255,0.55);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
  border-left: 3px solid transparent;
}
.adm-nav-group-btn span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-nav-group-btn span i {
  font-size: 16px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.adm-nav-group-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}
.adm-nav-group-btn:not(.collapsed) {
  color: rgba(255,255,255,0.85);
}
.adm-caret {
  font-size: 12px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: rgba(255,255,255,0.3);
}
.adm-nav-group-btn.collapsed .adm-caret {
  transform: rotate(-90deg);
}

/* Sub-navigation items */
.adm-nav-sub {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 18px 7px 38px;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}
.adm-nav-sub i {
  font-size: 14px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.adm-nav-sub:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
  text-decoration: none;
}
.adm-nav-sub.active {
  color: #fff;
  background: rgba(200,16,46,0.15);
  border-left-color: #C8102E;
  font-weight: 600;
}

/* Mobile sidebar dark */
.adm-sidebar-mobile {
  background: #0f1623 !important;
}
.adm-sidebar-mobile .adm-nav-item { color: rgba(255,255,255,0.6); }
.adm-sidebar-mobile .adm-nav-item:hover,
.adm-sidebar-mobile .adm-nav-item.active { color: #fff; }
.adm-sidebar-mobile .adm-nav-section { color: rgba(255,255,255,0.28); }
.adm-sidebar-mobile .adm-user-name { color: #fff; }
.adm-sidebar-mobile .adm-user-email { color: rgba(255,255,255,0.4); }

/* ── Topbar ─────────────────────────────────────────────── */
.ad-topbar {
  background: #ffffff;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid #e8edf2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ad-topbar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ad-topbar-brand {
  color: #0f1623;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-topbar-brand i { font-size: 17px; color: #C8102E; }
.ad-topbar-brand:hover { color: #C8102E; text-decoration: none; }
.ad-topbar-sep { color: #cbd5e1; margin: 0 8px; font-size: 14px; }
.ad-topbar-page {
  color: #64748b;
  font-size: 13.5px;
  font-weight: 500;
}
.ad-topbar-right { display: flex; align-items: center; gap: 16px; }
.ad-topbar-link {
  color: #64748b;
  font-size: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color .15s;
}
.ad-topbar-link:hover { color: #0f1623; text-decoration: none; }
.ad-topbar-link i { font-size: 15px; }
.ad-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e8edf2;
}
.ad-topbar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

/* ── Stat cards ──────────────────────────────────────────── */
.ad-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.ad-stat {
  background: #ffffff;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
.ad-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: var(--white);
}
.ad-stat-icon.green  { background: linear-gradient(135deg, #059669 0%, #047857 100%); }
.ad-stat-icon.red    { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.ad-stat-icon.amber  { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.ad-stat-icon.blue   { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }
.ad-stat-icon.purple { background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%); }
.ad-stat-body .ad-stat-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 3px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.ad-stat-body .ad-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

/* ── Card container ──────────────────────────────────────── */
.ad-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
  margin-bottom: 20px;
}
.ad-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 56px;
  background: #fafbfc;
}
.ad-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-card-title i { font-size: 16px; color: #94a3b8; }
.ad-card-count {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 5px;
  padding: 2px 8px;
}
.ad-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Normalize control heights so create/filter/search line up on one row */
.ad-card-actions form { margin: 0; }
.ad-card-actions .ad-btn,
.ad-card-actions .ad-search,
.ad-card-actions .ad-filter-select { height: 34px; }

/* ── Table ───────────────────────────────────────────────── */
.ad-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ad-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.ad-table thead tr {
  background: #f8fafc;
  border-bottom: 2px solid #e8edf2;
}
.ad-table th {
  padding: 10px 14px;
  font-weight: 600;
  color: #334155;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}
.ad-table th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ad-table th a:hover { color: #0f172a; }
.ad-table td {
  padding: 11px 14px;
  color: #1e293b;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
}
.ad-table tbody tr:last-child td { border-bottom: none; }
.ad-table tbody tr:hover td { background: #f8fafc; }

/* Text truncate */
.ad-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

/* ── Badges ──────────────────────────────────────────────── */
.ad-badge {
  display: inline-block;
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.5;
}
.ad-badge-success   { background: #dcfce7; color: #166534; }
.ad-badge-danger    { background: #fee2e2; color: #991b1b; }
.ad-badge-warning   { background: #fef3c7; color: #92400e; }
.ad-badge-info      { background: #dbeafe; color: #1e40af; }
.ad-badge-primary   { background: #ede9fe; color: #5b21b6; }
.ad-badge-secondary { background: #f1f5f9; color: #475569; }
.ad-badge-cyan      { background: #cffafe; color: #155e75; }

/* ── Buttons ─────────────────────────────────────────────── */
.ad-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.ad-btn:hover { transform: translateY(-1px); filter: brightness(0.93); text-decoration: none; }
.ad-btn:active { transform: none; filter: brightness(0.88); }
.ad-btn i { font-size: 13px; }
.ad-btn-primary {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.ad-btn-primary:hover { color: #ffffff; }
.ad-btn-success   { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.ad-btn-danger    { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.ad-btn-secondary {
  background: #ffffff;
  color: #475569;
  border-color: #e2e8f0;
}
.ad-btn-secondary:hover { background: #f8fafc; color: #0f172a; }

/* Icon-only button (30×30) */
.ad-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all .15s ease;
  text-decoration: none;
  vertical-align: middle;
}
.ad-icon-btn-edit   { background: #f1f5f9; color: #475569; }
.ad-icon-btn-edit:hover   { background: #e2e8f0; color: #0f172a; }
.ad-icon-btn-view   { background: #0f172a; color: #ffffff; }
.ad-icon-btn-view:hover   { background: #1e293b; color: #ffffff; }
.ad-icon-btn-img    { background: #ede9fe; color: #5b21b6; }
.ad-icon-btn-img:hover    { background: #ddd6fe; }
.ad-icon-btn-danger { background: #fee2e2; color: #991b1b; }
.ad-icon-btn-danger:hover { background: #fecaca; }
.ad-icon-btn-on  { background: #dcfce7; color: #166534; }
.ad-icon-btn-on:hover  { background: #bbf7d0; }
.ad-icon-btn-off { background: #f1f5f9; color: #94a3b8; }
.ad-icon-btn-off:hover { background: #e2e8f0; color: #475569; }

/* ── Search form ─────────────────────────────────────────── */
.ad-search {
  display: flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  overflow: hidden;
  background: #ffffff;
  height: 34px;
}
.ad-search input {
  height: 100%;
  padding: 0 12px;
  border: none;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  width: 180px;
  background: transparent;
}
.ad-search input::placeholder { color: #94a3b8; }
.ad-search-btn {
  height: 100%;
  padding: 0 11px;
  border: none;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  border-left: 1px solid #e2e8f0;
  transition: background .15s;
}
.ad-search-btn:hover { background: #f1f5f9; color: #0f172a; }

/* ── Filter bar ──────────────────────────────────────────── */
.ad-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  background: #fafbfc;
}
.ad-filter label { font-size: 12px; font-weight: 600; color: #475569; margin: 0; }
.ad-filter-select {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #0f172a;
  background: #ffffff;
  cursor: pointer;
  outline: none;
}
.ad-filter-select:focus { border-color: #64748b; }

/* ── Back button ─────────────────────────────────────────── */
.ad-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 18px;
  transition: all .15s ease;
}
.ad-back:hover { background: #f8fafc; color: #0f172a; text-decoration: none; }
.ad-back i { font-size: 13px; }

/* ── Empty state ─────────────────────────────────────────── */
.ad-empty {
  text-align: center;
  padding: 56px 20px;
  color: #94a3b8;
}
.ad-empty i { font-size: 40px; display: block; margin-bottom: 12px; color: #cbd5e1; }
.ad-empty p { font-size: 13px; margin: 0; }

/* ── Thumbnail / avatar ──────────────────────────────────── */
.ad-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}
.ad-thumb {
  width: 52px;
  height: 38px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}
.ad-product-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

/* ── Star chip ───────────────────────────────────────────── */
.ad-star {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
}
.ad-star .s { color: #f59e0b; font-size: 13px; }

/* ── Pay chip ────────────────────────────────────────────── */
.ad-pay {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
}
.ad-pay.paid   { background: #d1fae5; color: #065f46; }
.ad-pay.failed { background: #fee2e2; color: #991b1b; }

/* ── Pagination ──────────────────────────────────────────── */
.ad-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 14px 20px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

/* ── Detail page cards ───────────────────────────────────── */
.ad-detail-card {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  border-radius: 10px;
  padding: 20px 22px;
}
.ad-detail-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ad-detail-card-title i { font-size: 16px; color: #94a3b8; }
.ad-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
}
.ad-info-row:last-child { border-bottom: none; }
.ad-info-row .lbl { color: #64748b; flex-shrink: 0; min-width: 110px; font-weight: 500; }
.ad-info-row .val { font-weight: 500; text-align: right; color: #1e293b; }

/* Order totals */
.ad-totals { max-width: 320px; margin-left: auto; }
.ad-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
}
.ad-total-row:last-child { border-bottom: none; }
.ad-total-row .lbl { color: #64748b; }
.ad-total-row .val { font-weight: 500; color: #1e293b; }
.ad-total-row.grand .lbl,
.ad-total-row.grand .val { font-size: 15px; font-weight: 700; color: #0f172a; }

/* Update status form */
.ad-update-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ad-status-select {
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  font-size: 13px;
  color: #0f172a;
  background: #ffffff;
  min-width: 200px;
  outline: none;
  cursor: pointer;
}
.ad-status-select:focus { border-color: #64748b; }

/* ── Page header (detail/form pages) ─────────────────────── */
.ad-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ad-page-header h5 { margin: 0; font-weight: 700; font-size: 18px; color: #0f172a; }

/* ── Utility classes ─────────────────────────────────────── */
.ad-text-muted  { color: #94a3b8; }
.ad-text-xs     { font-size: 11px; }
.ad-text-sm     { font-size: 12px; }
.ad-fw-medium   { font-weight: 500; }
.ad-fw-semibold { font-weight: 600; }
.ad-nowrap      { white-space: nowrap; }
.ad-text-right  { text-align: right; }
.ad-text-center { text-align: center; }
.ad-date        { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.gap-6          { gap: 6px !important; }
.gap-10         { gap: 10px !important; }
.mt-4           { margin-top: 4px !important; }

/* Variant tag (size/color chip in order detail) */
.ad-variant-tag {
  font-size: 11px;
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 4px;
  color: #475569;
}

/* Small button modifier */
.ad-btn.ad-btn-sm {
  font-size: 12px;
  padding: 5px 12px;
  height: auto;
}

/* ── Admin form inputs — override shop styles ────────────── */
/*
 * styles.css renders inputs with background+border both = #F5F5F5,
 * making them invisible against the admin's #f5f6fa page background.
 * Scope: content forms only — excludes .ad-search and .ad-filter-select
 * so compact search bars and filter dropdowns are not affected.
 * input[type=color] is intentionally excluded — .color-circle handles it.
 */
.adm-admin-wrap form:not(.ad-search) textarea,
.adm-admin-wrap form:not(.ad-search) input[type=text],
.adm-admin-wrap form:not(.ad-search) input[type=password],
.adm-admin-wrap form:not(.ad-search) input[type=datetime],
.adm-admin-wrap form:not(.ad-search) input[type=datetime-local],
.adm-admin-wrap form:not(.ad-search) input[type=date],
.adm-admin-wrap form:not(.ad-search) input[type=month],
.adm-admin-wrap form:not(.ad-search) input[type=time],
.adm-admin-wrap form:not(.ad-search) input[type=week],
.adm-admin-wrap form:not(.ad-search) input[type=number],
.adm-admin-wrap form:not(.ad-search) input[type=email],
.adm-admin-wrap form:not(.ad-search) input[type=url],
.adm-admin-wrap form:not(.ad-search) input[type=search],
.adm-admin-wrap form:not(.ad-search) input[type=tel] {
  background-color: #ffffff;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  padding: 0 14px;
  height: 40px;
  width: 100%;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.adm-admin-wrap form:not(.ad-search) textarea {
  border-radius: 8px;
  resize: vertical;
  height: auto;
  min-height: 88px;
  padding: 10px 14px;
}
.adm-admin-wrap form:not(.ad-search) textarea:focus,
.adm-admin-wrap form:not(.ad-search) input[type=text]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=password]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=datetime]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=datetime-local]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=date]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=month]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=time]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=week]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=number]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=email]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=url]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=search]:focus,
.adm-admin-wrap form:not(.ad-search) input[type=tel]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background-color: #ffffff;
}
.adm-admin-wrap form:not(.ad-search) textarea::placeholder,
.adm-admin-wrap form:not(.ad-search) input::placeholder {
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 400;
}

/* Select override — excludes .ad-filter-select (compact filter dropdowns) */
.adm-admin-wrap form:not(.ad-search) select:not(.ad-filter-select),
.adm-admin-wrap .tf-select select {
  background-color: #ffffff;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  color: #0f172a;
  font-size: 13.5px;
  padding: 0 14px;
  height: 40px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
  width: 100%;
}
.adm-admin-wrap form:not(.ad-search) select:not(.ad-filter-select):focus,
.adm-admin-wrap .tf-select select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Label override */
.adm-admin-wrap form:not(.ad-search) fieldset label,
.adm-admin-wrap form:not(.ad-search) > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* Fieldset reset — no extra margins: parent .form_content grid gap already spaces rows */
.adm-admin-wrap form:not(.ad-search) fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Disabled state */
.adm-admin-wrap form:not(.ad-search) input:disabled,
.adm-admin-wrap form:not(.ad-search) select:disabled,
.adm-admin-wrap form:not(.ad-search) textarea:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

/* ── Checkbox / toggle labels — restore inline style ────────── */
/* The broad "fieldset label" rule makes ALL labels block+bold+margin.
   Checkbox labels must stay inline and normal-weight.
   Covers: coupon-form (isPermanent/isPublic/isActive),
           product (limitedEdition, removableStrap, adjustableStrap). */
.adm-admin-wrap form:not(.ad-search) fieldset .checkbox-wrap label,
.adm-admin-wrap form:not(.ad-search) fieldset label.mb-0,
.adm-admin-wrap form:not(.ad-search) .fieldset-checkbox label {
  display: inline;
  font-weight: 400;
  font-size: 14px;
  margin-bottom: 0;
  color: #1e293b;
}

/* ── .box-icon label (image upload trigger) — no extra margin ── */
.adm-admin-wrap form:not(.ad-search) .box-icon label {
  margin-bottom: 0;
  font-weight: 400;
  display: inline-block;
}

/* ── inv-qty-input — restore compact size for inventory table ── */
/* The generic input[type=number] rule gives width:100% which breaks
   the stock-grid table cells. Restore to the original compact style. */
.adm-admin-wrap .inv-qty-input {
  width: 80px !important;
  height: 34px !important;
  padding: 4px 8px !important;
  text-align: center !important;
  font-size: 13px !important;
  border-radius: 6px !important;
}

/* ── Button inside label+input grid rows — align to input bottom ── */
/* When a .btn-remove sits beside a fieldset that has a label above the
   input, the button cell is taller than the button itself (label adds
   ~25px). align-self:end pushes the button down to sit flush with
   the input, matching both the category and color/size delete rows. */
.adm-admin-wrap .tf-grid-layout .btn-remove,
.adm-admin-wrap .tf-grid-layout > .tf-btn {
  align-self: end;
}

/* ── .tf-btn in admin — shrink to match input height (40px) ── */
/* shop .tf-btn is 56px tall (padding 16px + line-height 24px); this
   brings all action buttons inline with text inputs so rows align. */
.adm-admin-wrap .tf-btn {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 0 18px;
  height: 40px;
  border-radius: 8px;
  gap: 6px;
  font-weight: 600;
}
.adm-admin-wrap .tf-btn .icon {
  font-size: 14px;
}
/* Full-width save button — slightly taller to stand out */
.adm-admin-wrap .btn-submit_form.tf-btn {
  height: 44px;
  font-size: 14px;
}

/* ── Color picker circle — sized to match 40px input height ── */
.adm-admin-wrap .color-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #d1d5db;
  flex-shrink: 0;
}
/* Oversized + overflow:hidden crops browser-default inset padding
   so the color swatch fills the entire circle. */
.adm-admin-wrap .color-circle input[type="color"] {
  width: 200%;
  height: 200%;
  margin: -50%;
  padding: 0;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1199px) {
  .ad-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
  .ad-card-header { padding: 12px 16px; }
  .ad-table th, .ad-table td { padding: 9px 10px; }
  .ad-stats { grid-template-columns: repeat(2, 1fr); }
  .ad-filter { padding: 8px 16px; }
  .ad-pagination { padding: 12px 16px; }
}
@media (max-width: 767px) {
  .ad-search input { width: 130px; }
  .ad-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .ad-stats { gap: 10px; }
  .ad-card-header { flex-direction: column; align-items: stretch; gap: 8px; }
  .ad-card-actions { justify-content: flex-start; }
  .ad-pagination { justify-content: center; }
  .ad-topbar { padding: 0 14px; }
}

/* ── Outline button (visually same as .ad-btn-secondary) ─── */
.ad-btn-outline {
  background: #ffffff;
  color: #475569;
  border-color: #e2e8f0;
}
.ad-btn-outline:hover { background: #f8fafc; color: #0f172a; }

/* ── Page title inside .ad-page-header ───────────────────── */
.ad-page-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Action bar (approve / cancel buttons row) ───────────── */
.ad-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ── Card body padding ───────────────────────────────────── */
.ad-card-body {
  padding: 20px;
}
@media (max-width: 991px) {
  .ad-card-body { padding: 16px; }
}

/* ── Form label class ────────────────────────────────────── */
.ad-form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* ── Form control class ──────────────────────────────────── */
.ad-form-control {
  display: block;
  width: 100%;
  background-color: #ffffff;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  color: #0f172a;
  font-size: 13.5px;
  padding: 0 14px;
  height: 40px;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ad-form-control:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  background-color: #ffffff;
}
.ad-form-control::placeholder { color: #94a3b8; font-size: 13.5px; }
textarea.ad-form-control {
  height: auto;
  min-height: 88px;
  padding: 10px 14px;
  resize: vertical;
}
.ad-form-control:disabled {
  background-color: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

/* ── Compact form control for table cells ────────────────── */
.ad-form-control-sm {
  height: 32px !important;
  padding: 0 8px !important;
  font-size: 13px !important;
  border-radius: 6px !important;
}

/* ── Detail view label / value ───────────────────────────── */
.ad-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}
.ad-detail-value {
  font-size: 13.5px;
  font-weight: 500;
  color: #1e293b;
}

/* ── Grand total chip ────────────────────────────────────── */
.ad-total-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
}
.ad-total-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.ad-total-value {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
