*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --accent:       #8B1A2A;
  --accent-h:     #6d1421;
  --accent-soft:  rgba(139,26,42,0.08);
  --bg:           #F3F4F8;
  --sidebar-w:    256px;
  --sidebar-bg:   #0A0A0A;
  --card:         #ffffff;
  --border:       #E8EAEF;
  --text:         #111318;
  --muted:        #717585;
  --danger:       #D92D20;
  --success:      #079455;
  --r:            12px;
  --sh:           0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --sh-md:        0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
}
html, body { height: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* ─── LAYOUT ─────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────── */
.admin-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0;
  z-index: 100; transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.admin-sidebar-logo {
  padding: 1.75rem 1.375rem 1.25rem;
  display: flex; align-items: center; gap: 0.625rem;
}
.admin-sidebar-logo .logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #fff; letter-spacing: -0.04em; flex-shrink: 0;
}
.admin-sidebar-logo .logo-text .brand {
  font-size: 0.9375rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1.1;
}
.admin-sidebar-logo .logo-text .sub {
  font-size: 0.6875rem; color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em; margin-top: 0.1rem;
}
.admin-nav { padding: 0.5rem 0.875rem; flex: 1; overflow-y: auto; }
.admin-nav-label {
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.25);
  padding: 1rem 0.5rem 0.375rem;
}
.admin-nav-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5625rem 0.75rem; color: rgba(255,255,255,0.55);
  text-decoration: none; font-size: 0.875rem; font-weight: 500;
  border-radius: 8px; margin-bottom: 1px;
  transition: color .15s, background .15s;
}
.admin-nav-link:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.06); }
.admin-nav-link.active { color: #fff; background: rgba(255,255,255,0.1); }
.admin-nav-link.active .nav-icon-wrap { background: var(--accent); color: #fff; }
.nav-icon-wrap {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.07); flex-shrink: 0;
  font-size: 0.875rem; transition: background .15s, color .15s;
}
.admin-nav-link:hover .nav-icon-wrap { background: rgba(255,255,255,0.12); color: #fff; }
.admin-sidebar-footer {
  padding: 1rem 1.375rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.admin-sidebar-footer a {
  display: flex; align-items: center; gap: 0.625rem;
  color: rgba(255,255,255,0.4); font-size: 0.8125rem; text-decoration: none;
  padding: 0.5rem 0.75rem; border-radius: 8px;
  transition: color .15s, background .15s;
}
.admin-sidebar-footer a:hover { color: #fff; background: rgba(255,255,255,0.06); }

/* ─── MAIN ───────────────────────────────── */
.admin-main {
  margin-left: var(--sidebar-w); flex: 1;
  min-height: 100vh; display: flex; flex-direction: column;
}

/* ─── TOPBAR ─────────────────────────────── */
.admin-topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 0 1.75rem; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar-left { display: flex; align-items: center; gap: 0.5rem; }
.topbar-page-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.admin-topbar-title { font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; }
.admin-topbar-actions { display: flex; align-items: center; gap: 0.625rem; }

/* ─── BUTTONS ────────────────────────────── */
.admin-btn-primary {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5rem 1.125rem; background: var(--accent); color: #fff;
  border: none; border-radius: 8px; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; transition: background .15s, box-shadow .15s;
  font-family: inherit; letter-spacing: 0.01em;
}
.admin-btn-primary:hover { background: var(--accent-h); box-shadow: 0 0 0 3px rgba(139,26,42,0.18); }
.admin-btn-secondary {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5rem 1rem; background: var(--card); color: var(--muted);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.8125rem; font-weight: 500; cursor: pointer;
  transition: border-color .15s, color .15s; font-family: inherit;
}
.admin-btn-secondary:hover { border-color: #bbb; color: var(--text); }
.admin-btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; transition: all .15s; font-size: 0.875rem;
}
.admin-btn-icon:hover { background: var(--bg); color: var(--text); }
.admin-btn-icon.danger:hover { background: #FEF3F2; border-color: #FDA29B; color: var(--danger); }

/* ─── CONTENT ────────────────────────────── */
.admin-content { padding: 1.75rem; flex: 1; }

/* ─── STATS ──────────────────────────────── */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.admin-stat-card {
  background: var(--card); border-radius: var(--r);
  padding: 1.25rem 1.375rem; box-shadow: var(--sh);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.admin-stat-card__top { display: flex; align-items: center; justify-content: space-between; }
.admin-stat-card__label { font-size: 0.75rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; }
.admin-stat-card__icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.admin-stat-card__value { font-size: 2rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }

/* ─── SECTION CARD ───────────────────────── */
.admin-section-card {
  background: var(--card); border-radius: var(--r);
  box-shadow: var(--sh); margin-bottom: 1.25rem; overflow: hidden;
}
.admin-section-card__header {
  padding: 1rem 1.375rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.admin-section-card__title { font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; }
.admin-section-card__body { padding: 1.375rem; }

/* ─── SEARCH ─────────────────────────────── */
.admin-search { position: relative; display: flex; align-items: center; }
.admin-search i { position: absolute; left: 0.625rem; color: var(--muted); font-size: 0.875rem; pointer-events: none; }
.admin-search input {
  padding: 0.4375rem 0.75rem 0.4375rem 2rem;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.8125rem; color: var(--text); outline: none; width: 210px;
  background: var(--bg); font-family: inherit; transition: border-color .15s, background .15s;
}
.admin-search input:focus { border-color: var(--accent); background: #fff; }

/* ─── TABLE ──────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted);
  padding: 0.625rem 1rem; border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap; background: #FAFBFC;
}
.admin-table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background .1s; }
.admin-table tbody tr:hover td { background: #FAFBFD; }
.cat-thumb {
  width: 44px; height: 44px; border-radius: 8px;
  object-fit: cover; border: 1px solid var(--border);
  background: var(--bg); display: block;
}
.cat-thumb-placeholder {
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--bg); border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1.125rem;
}
.cat-name { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.badge-active {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.625rem; background: #ECFDF3;
  color: #067647; border-radius: 100px;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.02em;
}
.badge-active::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #17B26A; }
.badge-hidden {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.625rem; background: var(--bg);
  color: var(--muted); border-radius: 100px;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.02em;
}
.badge-hidden::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #D0D5DD; }
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 0.875rem; opacity:.2; }
.empty-state p { font-size: 0.9375rem; font-weight: 500; }

/* ─── FORM ───────────────────────────────── */
.admin-form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.admin-form-group label { font-size: 0.75rem; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.admin-form-group input, .admin-form-group select {
  width: 100%; padding: 0.5625rem 0.875rem;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.875rem; color: var(--text); outline: none;
  font-family: inherit; transition: border-color .15s, box-shadow .15s; background: #fff;
}
.admin-form-group input:focus, .admin-form-group select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,26,42,0.1);
}
.admin-img-preview { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); display: none; margin-top: 0.5rem; }

/* ─── MODAL ──────────────────────────────── */
.admin-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.admin-modal-overlay.open { opacity: 1; pointer-events: all; }
.admin-modal {
  background: #fff; border-radius: 16px;
  width: 480px; max-width: calc(100vw - 2rem);
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(12px) scale(.98); transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.admin-modal-overlay.open .admin-modal { transform: translateY(0) scale(1); }
.admin-modal-header { padding: 1.375rem 1.5rem 1rem; display: flex; align-items: flex-start; justify-content: space-between; }
.admin-modal-header h5 { font-size: 1.0625rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.admin-modal-header p { font-size: 0.8125rem; color: var(--muted); margin: 0.25rem 0 0; }
.admin-modal-close {
  background: var(--bg); border: none; border-radius: 6px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--muted); cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.admin-modal-close:hover { background: var(--border); }
.admin-modal-divider { height: 1px; background: var(--border); margin: 0; }
.admin-modal-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.admin-modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.5rem; }

/* ─── TOAST ──────────────────────────────── */
.admin-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  background: #18181B; color: #fff; border-radius: 10px;
  padding: 0.75rem 1.125rem; font-size: 0.8125rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(80px); opacity: 0; transition: all .3s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; gap: 0.625rem; min-width: 220px;
}
.admin-toast.show { transform: translateY(0); opacity: 1; }
.admin-toast.success { background: #052E16; }
.admin-toast.error { background: #7F1D1D; }
.admin-toast i { font-size: 1rem; }

/* ─── TOGGLE ─────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #D0D5DD; border-radius: 22px; cursor: pointer; transition: .2s; }
.toggle-slider::before {
  content:''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ─── BANNER GRID ────────────────────────── */
.banner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.875rem; }
@media(max-width:1100px){ .banner-grid { grid-template-columns: repeat(4,1fr); } }
@media(max-width:800px){ .banner-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:500px){ .banner-grid { grid-template-columns: repeat(2,1fr); } }
.banner-card { border-radius: 10px; overflow: hidden; background: var(--bg); box-shadow: var(--sh); transition: box-shadow .15s, transform .15s; }
.banner-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }

/* ─── PAGE HEADER ────────────────────────── */
.page-header-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.75rem; flex-wrap:wrap; }
.page-header-row h1 { font-size:1.375rem; font-weight:800; letter-spacing:-.03em; }
.topbar-breadcrumb { display:flex; align-items:center; gap:.5rem; font-size:.875rem; }
.topbar-breadcrumb a { color:var(--muted); text-decoration:none; transition:color .15s; }
.topbar-breadcrumb a:hover { color:var(--text); }
.topbar-breadcrumb .sep { color:var(--border); }
.topbar-breadcrumb .current { font-weight:600; color:var(--text); }

/* ─── ACARD ──────────────────────────────── */
.acard { background:var(--card); border-radius:12px; box-shadow:var(--sh); overflow:hidden; margin-bottom:1.25rem; border:1px solid var(--border); }
.acard-header { padding:1rem 1.375rem; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:.625rem; }
.acard-header-icon { width:30px; height:30px; border-radius:7px; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; font-size:.9rem; flex-shrink:0; }
.acard-header-title { font-size:.9375rem; font-weight:700; letter-spacing:-.01em; flex:1; }
.acard-body { padding:1.375rem; }

/* ─── SHARED FORM CONTROLS ───────────────── */
.form-group { display:flex; flex-direction:column; gap:.375rem; }
.form-group label { font-size:.8125rem; font-weight:600; color:var(--text); }
.form-group .hint { font-size:.75rem; color:var(--muted); margin-top:.125rem; }
.form-control-admin {
  width:100%; padding:.5625rem .875rem;
  border:1px solid var(--border); border-radius:8px;
  font-size:.875rem; color:var(--text); outline:none;
  font-family:inherit; background:#fff;
  transition:border-color .15s, box-shadow .15s;
}
.form-control-admin:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(139,26,42,.1); }
textarea.form-control-admin { resize:vertical; min-height:90px; line-height:1.5; }
.form-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
@media(max-width:640px){ .form-grid-2 { grid-template-columns:1fr; } }

/* ─── TAG BADGES ─────────────────────────── */
.badge-tag {
  display:inline-flex; align-items:center; padding:.1rem .35rem; border-radius:4px;
  font-size:.6rem; font-weight:800; letter-spacing:.05em; cursor:pointer;
  user-select:none; transition:all .15s; border:1px solid var(--border);
  color:var(--muted); background:transparent; font-family:inherit;
}
.badge-tag:hover { border-color:#bbb; color:var(--text); }
.badge-tag.new-active { background:#0D9488; color:#fff; border-color:#0D9488; }
.badge-tag.top-active { background:#D97706; color:#fff; border-color:#D97706; }
.tag-row { display:flex; gap:.3rem; margin-top:.25rem; flex-wrap:wrap; }

/* ─── PRODUCT LIST TABLE ─────────────────── */
.prod-table { width:100%; border-collapse:collapse; }
.prod-table th {
  font-size:.7rem; font-weight:700; color:var(--muted); text-transform:uppercase;
  letter-spacing:.05em; padding:.625rem 1rem; border-bottom:2px solid var(--border);
  text-align:left; background:var(--bg); white-space:nowrap;
}
.prod-table td { padding:.75rem 1rem; border-bottom:1px solid var(--border); vertical-align:middle; }
.prod-table tbody tr:hover { background:rgba(0,0,0,.018); }
.prod-table tbody tr:last-child td { border-bottom:none; }
.prod-thumb { width:40px; height:53px; object-fit:cover; border-radius:6px; display:block; flex-shrink:0; }
.prod-thumb-ph { width:40px; height:53px; border-radius:6px; background:var(--bg); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:.8rem; }
.prod-list-name { font-size:.875rem; font-weight:600; color:var(--text); text-decoration:none; line-height:1.2; }
.prod-list-name:hover { color:var(--accent); }
.tbl-icon-btn {
  width:28px; height:28px; border:1px solid var(--border); background:var(--card);
  border-radius:6px; cursor:pointer; display:inline-flex; align-items:center;
  justify-content:center; font-size:.875rem; color:var(--muted);
  text-decoration:none; transition:all .15s;
}
.tbl-icon-btn:hover { border-color:#bbb; color:var(--text); }
.tbl-icon-btn.danger:hover { border-color:#DC2626; color:#DC2626; background:rgba(220,38,38,.06); }

/* ─── PAGINATION ─────────────────────────── */
.pagination { display:flex; align-items:center; justify-content:center; gap:.375rem; padding:1rem 1.25rem; border-top:1px solid var(--border); flex-wrap:wrap; }
.page-btn {
  min-width:32px; height:32px; padding:0 .5rem;
  border:1px solid var(--border); background:var(--card); border-radius:7px;
  cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  font-size:.8125rem; font-weight:600; color:var(--muted); font-family:inherit;
  transition:all .15s; user-select:none;
}
.page-btn:hover:not(:disabled) { border-color:#bbb; color:var(--text); }
.page-btn.active { background:var(--text); color:#fff; border-color:var(--text); }
.page-btn:disabled { opacity:.35; cursor:not-allowed; pointer-events:none; }
.page-info { font-size:.8125rem; color:var(--muted); }

/* ─── FILTER CHIPS ──────────────────────── */
.filter-chips { display: flex; gap: .4rem; flex-wrap: wrap; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); }
.filter-chip {
  display: inline-flex; padding: .3rem .75rem; border-radius: 100px;
  border: 1px solid var(--border); background: var(--card); cursor: pointer;
  font-size: .75rem; font-weight: 600; color: var(--muted); transition: all .15s;
  white-space: nowrap; font-family: inherit;
}
.filter-chip:hover { border-color: #bbb; color: var(--text); }
.filter-chip.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ─── PRODUCT CARDS ──────────────────────── */
.prod-price { font-size: .875rem; font-weight: 700; color: var(--accent); }
.prod-old-price { font-size: .75rem; color: var(--muted); text-decoration: line-through; }
.color-dot {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block;
  border: 1.5px solid rgba(0,0,0,.12); flex-shrink: 0;
}
.prod-colors-row { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }

/* ─── INFO BOX ───────────────────────────── */
.admin-info-box {
  display: flex; align-items: flex-start; gap: .75rem;
  background: #EEF4FF; border: 1px solid #C7D9FF;
  border-radius: 10px; padding: .875rem 1rem;
}

/* ─── BANNER PAGE ────────────────────────── */
.banner-img-wrap { position: relative; overflow: hidden; aspect-ratio: 16/9; background: var(--bg); }
.banner-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.banner-card:hover .banner-img-wrap img { transform: scale(1.04); }
.banner-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.52);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.banner-card:hover .banner-overlay { opacity: 1; }
.banner-change-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: white; color: #0D0D0D;
  padding: .45rem .95rem; border-radius: 8px;
  font-size: .8125rem; font-weight: 600; cursor: pointer;
  transition: background .15s; user-select: none;
}
.banner-change-btn:hover { background: #e8e8e8; }
.banner-change-btn input[type="file"] { display: none; }
.banner-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: .375rem .625rem; gap: .5rem;
}
.banner-footer-name { font-size: .6875rem; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.banner-reset-btn {
  display: none; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .875rem; padding: .15rem .35rem;
  border-radius: 4px; transition: color .15s, background .15s; flex-shrink: 0;
}
.banner-reset-btn:hover { color: var(--danger); background: rgba(220,38,38,.08); }
.banner-changed-badge {
  display: none; align-items: center; gap: .25rem;
  font-size: .65rem; font-weight: 700; color: #3E6AE1; background: #EEF4FF;
  padding: .1rem .45rem; border-radius: 100px; flex-shrink: 0;
}

/* ─── CATEGORY CARDS GRID ───────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}
@media(max-width:600px){ .cat-grid { grid-template-columns: repeat(2,1fr); gap: .75rem; } }

.cat-card {
  border-radius: 12px; overflow: hidden; background: var(--card);
  box-shadow: var(--sh); border: 1px solid var(--border);
  transition: box-shadow .15s, transform .15s;
  display: flex; flex-direction: column;
}
.cat-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }

.cat-card-img {
  position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--bg);
}
.cat-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s;
}
.cat-card:hover .cat-card-img img { transform: scale(1.05); }
.cat-card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--border);
}
.cat-card-status {
  position: absolute; top: .5rem; left: .5rem;
}
.cat-card-actions {
  position: absolute; top: .4rem; right: .4rem;
  display: flex; gap: .3rem; opacity: 0; transition: opacity .15s;
}
.cat-card:hover .cat-card-actions { opacity: 1; }
.cat-card-btn {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); border: none; cursor: pointer;
  color: var(--text); font-size: .8rem; text-decoration: none;
  transition: background .15s, color .15s;
}
.cat-card-btn:hover { background: white; }
.cat-card-btn.danger:hover { background: white; color: var(--danger); }

.cat-card-body {
  padding: .625rem .75rem .75rem; flex: 1; display: flex; flex-direction: column; gap: .35rem;
}
.cat-card-name {
  font-weight: 700; font-size: .875rem; color: var(--text);
  text-decoration: none; display: block; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s;
}
.cat-card-name:hover { color: var(--accent); }
.cat-card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: .3rem;
}
.cat-card-id { font-size: .7rem; color: var(--muted); font-weight: 500; }

/* ─── COUNT PILL ─────────────────────────── */
.count-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .625rem; border-radius: 100px;
  background: #EEF4FF; color: #3E6AE1;
  font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.count-pill.empty { background: var(--bg); color: var(--muted); }

/* ─── CAT ROW ────────────────────────────── */
.cat-row-cell { display: flex; align-items: center; gap: .875rem; min-width: 200px; }
.cat-row-name { font-weight: 700; font-size: .9375rem; color: var(--text); text-decoration: none; transition: color .15s; display: block; }
.cat-row-name:hover { color: var(--accent); }
.cat-row-id { font-size: .7rem; color: var(--muted); margin-top: .1rem; font-weight: 500; }

/* ─── DASHBOARD QUICK LINKS ─────────────── */
.dash-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.dash-quick-card {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 1rem 1.125rem; border-radius: 10px;
  border: 1px solid var(--border); text-decoration: none;
  color: var(--text); transition: all .15s; background: #fff; cursor: pointer;
}
.dash-quick-card:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px rgba(139,26,42,0.08); }
.dash-quick-icon {
  width: 40px; height: 40px; border-radius: 8px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; color: var(--muted); flex-shrink: 0; transition: all .15s;
}
.dash-quick-card:hover .dash-quick-icon { background: rgba(139,26,42,0.08); color: var(--accent); }
.dash-quick-label { font-size: .875rem; font-weight: 600; }
.dash-quick-sub { font-size: .75rem; color: var(--muted); margin-top: .125rem; }

/* ─── MOBILE ─────────────────────────────── */
.admin-mobile-topbar {
  display: none; background: var(--sidebar-bg);
  padding: 0 1rem; height: 54px;
  align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.admin-mobile-topbar .brand { font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.admin-mobile-topbar .brand span { color: var(--accent); }
.admin-hamburger {
  background: none; border: none;
  color: rgba(255,255,255,0.75); font-size: 1.375rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  transition: background .15s, color .15s;
}
.admin-hamburger:hover { background: rgba(255,255,255,0.1); color: #fff; }
.admin-hamburger i { transition: transform .2s; }

/* Close button inside sidebar — mobile only */
.admin-sidebar-close {
  display: none;
  background: none; border: none;
  color: rgba(255,255,255,0.45); font-size: 1rem;
  cursor: pointer; padding: .25rem; border-radius: 6px;
  margin-left: auto; transition: color .15s, background .15s;
}
.admin-sidebar-close:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Body scroll lock when sidebar open */
body.sidebar-open { overflow: hidden; }

@media(max-width:767px){
  .admin-sidebar { transform: translateX(-100%); box-shadow: none; }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 8px 0 32px rgba(0,0,0,0.35); }
  .admin-sidebar-close { display: flex; align-items: center; justify-content: center; }
  .admin-main { margin-left: 0; }
  .admin-mobile-topbar { display: flex; }
  .admin-content { padding: 1.25rem 1rem; }
  .admin-topbar { display: none; }
}
.admin-overlay-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 99;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity .25s;
}
.admin-overlay-bg.show { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .7s linear infinite; }
