/* =========================================================
   VANMANHGAMING – LUXURY ADMIN STUDIO
   Kế thừa design tokens từ ../css/style.css
   ========================================================= */
:root {
  --sb-w: 272px;
  --lux-border: rgba(255, 255, 255, .09);
  --lux-border-2: rgba(255, 255, 255, .20);
  --lux-err: #fca5a5;
  --lux-ok: #86efac;
  --lux-warn: #fde68a;
}

[hidden] {
  display: none !important;
}

input, textarea, select, .card p, .item-info, .muted, .activity-body, .status-dl dd, .pp-tagline {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* =========================================================
   1. LOGIN PAGE
   ========================================================= */
.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 48px);
}
.auth-card {
  width: min(460px, 100%);
  padding: clamp(28px, 4.5vw, 42px);
  border-radius: 24px;
  background: rgba(16, 16, 19, .95);
  border: 1px solid var(--lux-border-2);
  box-shadow: 0 36px 100px rgba(0, 0, 0, .72), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  display: grid;
  gap: 18px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-logo-mark {
  width: 44px;
  height: 44px;
}
.auth-logo-mark svg {
  width: 20px;
  height: 20px;
}
.auth-brand-name {
  font: 600 1.15rem/1.1 var(--serif);
  letter-spacing: -.015em;
}
.auth-title {
  font: 400 clamp(2.1rem, 5vw, 2.8rem)/1.02 var(--serif);
  letter-spacing: -.03em;
}
.auth-sub {
  color: var(--muted);
  font-size: .9rem;
  margin-top: -6px;
}
.auth-foot {
  text-align: center;
  color: var(--muted);
  font-size: .74rem;
  letter-spacing: .04em;
  padding-top: 8px;
  border-top: 1px solid var(--lux-border);
}
.pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-wrap input {
  padding-right: 46px !important;
}
.pass-toggle {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: color .2s, background .2s, border-color .2s;
}
.pass-toggle:hover, .pass-toggle[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, .07);
  border-color: var(--lux-border);
}

@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-7px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
}
.auth-card.is-shake {
  animation: cardShake .36s var(--ease);
}

/* =========================================================
   2. SHELL & SIDEBAR
   ========================================================= */
.admin-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--sb-w) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns .28s var(--expo);
}
.admin-shell.is-collapsed {
  --sb-w: 84px;
}

.sidebar {
  z-index: 210;
  border-right: 1px solid var(--lux-border);
  background: rgba(13, 13, 16, .96);
  padding: 24px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .28s var(--expo), transform .28s var(--expo);
}
.sb-brand {
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--lux-border);
}
.sb-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sb-brand .logo {
  min-width: 0;
  gap: 11px;
}
.sb-text {
  display: grid;
  min-width: 0;
  transition: opacity .2s;
}
.sb-text strong {
  font: 600 1.02rem/1.15 var(--serif);
  white-space: nowrap;
}
.sb-tag {
  font: 500 .66rem var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.sb-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--lux-border);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex: none;
  transition: color .2s, border-color .2s, background .2s, transform .25s var(--expo);
}
.sb-icon-btn:hover {
  color: var(--text);
  border-color: var(--lux-border-2);
  background: rgba(255, 255, 255, .08);
}
.sb-close-btn, .sb-open-btn {
  display: none;
}

.admin-shell.is-collapsed .sb-text,
.admin-shell.is-collapsed .sb-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}
.admin-shell.is-collapsed .sb-brand-row {
  flex-direction: column;
  gap: 10px;
}
.admin-shell.is-collapsed .sb-collapse-btn svg {
  transform: rotate(180deg);
}
.admin-shell.is-collapsed .sb-nav button,
.admin-shell.is-collapsed .sb-foot .btn {
  justify-content: center;
  padding-inline: 0;
  gap: 0;
}

.sb-nav {
  display: grid;
  gap: 6px;
}
.sb-nav button {
  position: relative;
  text-align: left;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: color .22s, background .22s, border-color .22s, transform .25s var(--expo);
}
.sb-nav button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border-color: var(--lux-border);
  transform: translateX(2px);
}
.sb-nav button.active {
  color: #fff;
  background: linear-gradient(110deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03));
  border-color: rgba(255, 255, 255, .17);
  box-shadow: inset 3px 0 0 #d8d8d8, 0 8px 26px rgba(0, 0, 0, .24);
}
.sb-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--lux-border);
}
.sb-foot .btn {
  justify-content: flex-start;
  padding-inline: 14px;
  white-space: nowrap;
}

.sb-overlay {
  position: fixed;
  inset: 0;
  z-index: 205;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(4px);
}

/* =========================================================
   3. MAIN AREA & TOPBAR
   ========================================================= */
.main-area {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 46px) clamp(18px, 4vw, 48px) 84px;
}
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--lux-border);
  margin-bottom: 28px;
}
.topbar-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.topbar-title {
  display: grid;
  gap: 6px;
}
.topbar h1 {
  font: 400 clamp(1.85rem, 3.6vw, 2.75rem)/1.06 var(--serif);
  letter-spacing: -.03em;
}
.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* =========================================================
   4. PANELS, CARDS, STATS & SKELETON
   ========================================================= */
.panel { display: none; gap: 22px; }
.panel.active { display: grid; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.panel.panel-enter {
  animation: panelIn .28s var(--expo);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.stat {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  border: 1px solid var(--lux-border);
  border-radius: 18px;
  padding: 22px;
  display: grid;
  gap: 12px;
  transition: border-color .3s, transform .3s var(--expo), box-shadow .3s;
}
.stat:hover {
  transform: translateY(-3px);
  border-color: var(--lux-border-2);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .45);
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}
.stat small {
  font: 500 .7rem var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.stat b {
  font: 400 2.45rem/1 var(--serif);
  color: var(--text);
}
.is-skeleton {
  position: relative;
  color: transparent !important;
  background: rgba(255, 255, 255, .08);
  border-radius: 8px;
  min-width: 56px;
  width: fit-content;
  overflow: hidden;
}
.is-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .16) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: skelSweep 1.2s infinite;
}
@keyframes skelSweep {
  to { transform: translateX(100%); }
}

.card {
  background: linear-gradient(145deg, rgba(24, 24, 27, .92), rgba(15, 15, 17, .92));
  border: 1px solid var(--lux-border);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  gap: 18px;
  align-content: start;
  transition: border-color .3s, box-shadow .35s;
}
.card:hover {
  border-color: var(--lux-border-2);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .38);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card h2 {
  font: 400 1.35rem/1.2 var(--serif);
  letter-spacing: -.015em;
}
.card-subhead {
  font: 500 .74rem var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--lux-border);
}
.muted { color: var(--muted); font-size: .88rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}
.overview-side {
  display: grid;
  gap: 20px;
  align-content: start;
}
.quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---- Activity & Status ---- */
.activity-list {
  display: grid;
  gap: 10px;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--lux-border);
  background: rgba(255, 255, 255, .02);
}
.activity-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--lux-border-2);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--silver);
}
.activity-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.activity-body strong {
  font-size: .88rem;
  font-weight: 500;
}
.activity-meta {
  display: flex;
  gap: 8px;
  font-size: .74rem;
  color: var(--muted);
}
.activity-empty {
  padding: 16px;
  text-align: center;
  border: 1px dashed var(--lux-border);
  border-radius: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid rgba(134, 239, 172, .28);
  background: rgba(134, 239, 172, .08);
  font: 500 .74rem var(--mono);
  color: var(--lux-ok);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lux-ok);
}
.status-dl {
  margin: 0;
  display: grid;
  gap: 10px;
}
.status-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--lux-border);
  font-size: .86rem;
}
.status-dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.status-dl dt { color: var(--muted); }
.status-dl dd { margin: 0; text-align: right; color: var(--silver); }

/* =========================================================
   5. FORMS, BUTTONS, BADGES, DROPZONE, PROGRESS
   ========================================================= */
.admin-shell .field input,
.admin-shell .field textarea,
.admin-shell .field select,
.auth-card .field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(0, 0, 0, .42);
  color: var(--text);
  font-size: .9rem;
  transition: border-color .22s, box-shadow .22s, background .22s;
}
.admin-shell .field textarea { min-height: 96px; resize: vertical; }
.admin-shell .field input:focus,
.admin-shell .field textarea:focus,
.admin-shell .field select:focus,
.auth-card .field input:focus {
  outline: 0;
  border-color: #d8d8d8;
  background: rgba(0, 0, 0, .65);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
}
.admin-shell select option {
  background: #141417;
  color: var(--text);
}

/* ---- Luxury Custom Select ---- */
.lux-select {
  position: relative;
}
.lux-select-btn {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(0, 0, 0, .42);
  color: var(--text);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: border-color .22s, background .22s, box-shadow .22s;
}
.lux-select-btn:hover {
  border-color: rgba(255, 255, 255, .26);
}
.lux-select.is-open .lux-select-btn,
.lux-select-btn:focus-visible {
  outline: 0;
  border-color: #d8d8d8;
  background: rgba(0, 0, 0, .65);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .08);
}
.lux-select-arrow {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform .2s var(--ease);
  flex: none;
}
.lux-select.is-open .lux-select-arrow {
  transform: rotate(180deg);
}
.lux-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--lux-border-2);
  background: #141417;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .82);
  display: grid;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
}
.lux-select-opt {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--silver);
  font-size: .88rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background .16s, color .16s;
}
.lux-select-opt:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}
.lux-select-opt[aria-selected="true"] {
  background: rgba(255, 255, 255, .13);
  color: #fff;
  font-weight: 500;
}

/* ---- GitHub Sync Bar ---- */
.gh-sync-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.gh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: var(--silver);
  cursor: pointer;
}
.gh-toggle input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 99px;
  border: 1px solid var(--lux-border-2);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  transition: background .2s, border-color .2s;
  flex: none;
}
.gh-toggle input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .22s var(--expo), background .2s;
}
.gh-toggle input:checked {
  background: rgba(255, 255, 255, .18);
  border-color: var(--text);
}
.gh-toggle input:checked::after {
  transform: translateX(18px);
  background: var(--text);
}
.field-label {
  font: 500 .76rem var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field-err {
  min-height: 1.1em;
  font-size: .78rem;
  color: var(--lux-err);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid var(--lux-border-2);
  background: rgba(255, 255, 255, .05);
  font: 500 .72rem var(--mono);
  color: var(--silver);
}
.badge-warn {
  border-color: rgba(253, 230, 138, .35);
  background: rgba(253, 230, 138, .08);
  color: var(--lux-warn);
}

.btn-danger {
  border-color: rgba(248, 113, 113, .36);
  color: var(--lux-err);
}
.btn-danger:hover {
  background: rgba(248, 113, 113, .14);
  border-color: #f87171;
  color: #fecaca;
}

.btn-spin {
  display: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
.btn-primary .btn-spin {
  border-color: rgba(0, 0, 0, .25);
  border-top-color: #080808;
}
.btn.is-loading .btn-spin { display: inline-block; }
.btn.is-loading .ic { display: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---- Dropzone ---- */
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  padding: 20px 16px;
  border-radius: 15px;
  border: 1px dashed rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
  transition: border-color .22s, background .22s, transform .22s;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--text);
  background: rgba(255, 255, 255, .06);
}
.dropzone-compact {
  padding: 12px 14px;
}
.dz-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 5px;
  color: var(--muted);
}
.dz-empty strong {
  font-size: .86rem;
  color: var(--text);
  font-weight: 500;
}
.dz-empty span { font-size: .76rem; }
.dz-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.dz-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--lux-border-2);
  flex: none;
}
.dz-meta {
  display: grid;
  min-width: 0;
}
.dz-meta strong {
  font-size: .84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dz-meta span {
  font: 400 .74rem var(--mono);
  color: var(--muted);
}

/* ---- Progress ---- */
.progress-wrap { display: grid; gap: 6px; }
.progress {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .10);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #a3a3a3, #ffffff);
  transition: width .16s linear;
}
@keyframes progIndet {
  from { transform: translateX(-100%); }
  to { transform: translateX(260%); }
}
.progress.is-indeterminate .progress-bar {
  width: 40% !important;
  animation: progIndet 1.1s infinite ease-in-out;
}

/* =========================================================
   6. MEDIA, MUSIC, PROFILE, PROJECTS
   ========================================================= */
.media-current {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.thumb-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--lux-border-2);
  background: #000;
}
.thumb-cover {
  width: 84px;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--lux-border-2);
  background: #000;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
}
.gal-item {
  border: 1px solid var(--lux-border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, .35);
  display: grid;
  transition: border-color .22s, transform .22s;
}
.gal-item:hover { border-color: var(--lux-border-2); transform: translateY(-2px); }
.gal-item.is-current { border-color: rgba(255, 255, 255, .45); }
.gal-thumb { position: relative; }
.gal-thumb img { width: 100%; height: 96px; object-fit: cover; background: #000; }
.gal-badge { position: absolute; left: 8px; top: 8px; background: rgba(8, 8, 8, .85); }
.gal-act { display: flex; justify-content: space-between; gap: 6px; padding: 8px; }
.gal-act .btn-sm { padding: 0 10px; min-height: 30px; font-size: .76rem; }

.list-items { display: grid; gap: 10px; }
.item-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid var(--lux-border);
  background: rgba(255, 255, 255, .02);
  transition: border-color .22s, background .22s, opacity .2s;
}
.item-row:hover { border-color: var(--lux-border-2); background: rgba(255, 255, 255, .045); }
.track-row.is-dragging { opacity: .45; }
.track-row.drop-before { box-shadow: 0 -2px 0 #fff; }
.track-row.drop-after { box-shadow: 0 2px 0 #fff; }
.drag-handle {
  color: var(--muted);
  cursor: grab;
  display: grid;
  place-items: center;
}
.item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  flex: 1;
}
.item-info img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--lux-border-2);
  flex: none;
}
.track-meta { min-width: 0; flex: 1; display: grid; gap: 4px; }
.item-info strong { display: block; font-size: .92rem; }
.item-info small { display: block; color: var(--muted); font: 400 .74rem var(--mono); overflow-wrap: anywhere; }
.track-prev-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
  max-width: 240px;
}
.track-prev-bar { height: 100%; width: 0%; background: #fff; }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.profile-preview {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--lux-border);
  background: rgba(0, 0, 0, .35);
}
.pp-card-head { display: flex; align-items: center; gap: 14px; }
.pp-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--lux-border-2); }
.pp-card-head strong { display: block; font: 600 1.15rem var(--serif); }
.pp-tagline { font: 400 1.2rem/1.35 var(--serif); }

.proj-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.proj-admin-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--lux-border);
  background: rgba(255, 255, 255, .02);
}
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* =========================================================
   7. ALERTS, DIALOGS, TOASTS & PREVIEW MODAL
   ========================================================= */
.a-alert {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--lux-border-2);
  background: rgba(255, 255, 255, .05);
  font-size: .86rem;
}
.a-alert-err { border-color: rgba(248, 113, 113, .42); background: rgba(248, 113, 113, .08); color: var(--lux-err); }
.a-alert-ok { border-color: rgba(134, 239, 172, .38); background: rgba(134, 239, 172, .08); color: var(--lux-ok); }
.a-alert-info { border-color: var(--lux-border-2); color: var(--silver); }

.a-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border-radius: 20px;
  border: 1px solid var(--lux-border-2);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 36px 100px rgba(0, 0, 0, .85);
}
.a-dialog::backdrop, .preview-modal::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(8px);
}
.a-dialog[open], .preview-modal[open] {
  animation: pop .32s var(--expo);
}
.a-dialog-body {
  padding: 24px;
  display: grid;
  gap: 14px;
}
.a-dialog-body h3 { font: 400 1.45rem var(--serif); }
.a-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.preview-modal {
  width: min(1220px, 95vw);
  height: 88vh;
  border: 1px solid var(--lux-border-2);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .88);
}
.pm-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--lux-border);
}
.pm-frame { width: 100%; height: calc(100% - 62px); border: 0; background: #080808; }

.a-toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.a-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--lux-border-2);
  background: rgba(16, 16, 18, .94);
  backdrop-filter: blur(16px);
  color: var(--text);
  font-size: .86rem;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s var(--ease), transform .24s var(--expo);
}
.a-toast.is-in { opacity: 1; transform: translateY(0); }
.a-toast.is-out { opacity: 0; transform: translateY(6px); }
.a-toast-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--silver); }
.a-toast-success .a-toast-dot { background: var(--lux-ok); }
.a-toast-error .a-toast-dot { background: var(--lux-err); }

/* =========================================================
   8. RESPONSIVE & REDUCED MOTION
   ========================================================= */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .sb-collapse-btn { display: none; }
  .sb-close-btn, .sb-open-btn { display: grid; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(290px, 86vw);
    transform: translateX(-105%);
  }
  .admin-shell.drawer-open .sidebar {
    transform: translateX(0);
    box-shadow: 24px 0 80px rgba(0, 0, 0, .75);
  }
}

@media (max-width: 560px) {
  .stats-grid, .grid-2, .proj-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .item-info { min-width: 0; }
  .topbar { flex-direction: column; align-items: flex-start; }
  .top-actions { width: 100%; }
  .top-actions .btn { flex: 1; }
  .preview-modal { width: 100vw; height: 100svh; max-width: none; max-height: none; border-radius: 0; }
  .pm-bar { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-shell *, .auth-wrap *, .a-dialog, .preview-modal, .a-toast {
    animation: none !important;
    transition: none !important;
  }
}
