/* ============================================================
   ITZBLAZE PLATFORM - Main Stylesheet
   Aesthetic: Dark command-center / refined industrial
   Fonts: DM Mono (code/numbers) + Sora (UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg:          #0d0f14;
  --bg-2:        #13161d;
  --bg-3:        #1a1e28;
  --bg-4:        #222736;
  --border:      #2a2f3e;
  --border-2:    #343b4f;

  --text:        #e8eaf0;
  --text-2:      #9ba3bc;
  --text-3:      #636a83;

  --accent:      #6c63ff;
  --accent-2:    #8b83ff;
  --accent-dim:  rgba(108,99,255,.15);
  --accent-glow: rgba(108,99,255,.35);

  --gold:        #f5c842;
  --gold-dim:    rgba(245,200,66,.12);

  --green:       #22d3a5;
  --green-dim:   rgba(34,211,165,.12);

  --red:         #ff5c7a;
  --red-dim:     rgba(255,92,122,.12);

  --yellow:      #ffa94d;
  --yellow-dim:  rgba(255,169,77,.12);

  --blue:        #38bdf8;
  --blue-dim:    rgba(56,189,248,.12);

  --sidebar-w:   240px;
  --header-h:    60px;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --transition:  all .2s cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Sora', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   LAYOUT
   ============================================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-logo {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.sidebar-logo .logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--text);
}
.sidebar-logo .logo-badge {
  font-size: .6rem;
  background: var(--accent-dim);
  color: var(--accent-2);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 2px;
  letter-spacing: .08em;
  font-family: 'DM Mono', monospace;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section {
  padding: 14px 18px 6px;
  font-size: .65rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: .12em;
  color: var(--text-3);
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-2);
  font-size: .85rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--bg-3);
  color: var(--text);
  border-left-color: var(--border-2);
}
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-2);
  border-left-color: var(--accent);
}
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: .6rem;
  padding: 1px 6px;
  border-radius: 99px;
  font-family: 'DM Mono', monospace;
}

.sidebar-user {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role {
  font-size: .65rem;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sidebar-user .logout-btn {
  color: var(--text-3);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  background: none; border: none;
}
.sidebar-user .logout-btn:hover { color: var(--red); background: var(--red-dim); }

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 1rem; font-weight: 600; flex: 1; }
.topbar-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-dim);
  border: 1px solid rgba(245,200,66,.25);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-family: 'DM Mono', monospace;
  font-size: .82rem;
  color: var(--gold);
}
.topbar-balance .balance-icon { font-size: 1rem; }

.page-body {
  flex: 1;
  padding: 28px;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---- Cards ---- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}
.card-subtitle {
  font-size: .75rem;
  color: var(--text-3);
  margin-top: 2px;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-3);
}

/* ---- Stat Cards ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border-2); transform: translateY(-1px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.accent::before    { background: var(--accent); }
.stat-card.gold::before      { background: var(--gold); }
.stat-card.green::before     { background: var(--green); }
.stat-card.red::before       { background: var(--red); }
.stat-card.blue::before      { background: var(--blue); }
.stat-card.yellow::before    { background: var(--yellow); }

.stat-label {
  font-size: .7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-family: 'DM Mono', monospace;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  color: var(--text);
  line-height: 1;
}
.stat-icon {
  position: absolute;
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  opacity: .08;
}
.stat-sub { font-size: .72rem; color: var(--text-3); margin-top: 4px; }

/* ---- Grid layouts ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .83rem;
}
thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: .68rem;
  font-family: 'DM Mono', monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-3); color: var(--text); }
.td-mono { font-family: 'DM Mono', monospace; font-size: .8rem; }

/* ---- Badges / Pills ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 99px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge-active     { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,211,165,.3); }
.badge-suspended  { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(255,169,77,.3); }
.badge-banned     { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,92,122,.3); }
.badge-admin      { background: var(--accent-dim); color: var(--accent-2); border: 1px solid rgba(108,99,255,.3); }
.badge-user       { background: var(--bg-4); color: var(--text-2); border: 1px solid var(--border); }
.badge-completed  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,211,165,.3); }
.badge-refunded   { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(56,189,248,.3); }
.badge-pending    { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(255,169,77,.3); }
.badge-purchase   { background: var(--red-dim); color: var(--red); }
.badge-grant      { background: var(--green-dim); color: var(--green); }
.badge-deduction  { background: var(--red-dim); color: var(--red); }
.badge-bonus      { background: var(--gold-dim); color: var(--gold); }
.badge-reward     { background: var(--accent-dim); color: var(--accent-2); }
.badge-featured   { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(245,200,66,.3); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: .83rem;
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 0 20px var(--accent-dim);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-2);
  box-shadow: 0 0 28px var(--accent-glow);
  color: white;
}
.btn-secondary {
  background: var(--bg-4);
  color: var(--text);
  border-color: var(--border-2);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-3); border-color: var(--text-3); }
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(255,92,122,.3);
}
.btn-danger:hover:not(:disabled) { background: var(--red); color: white; }
.btn-success {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34,211,165,.3);
}
.btn-success:hover:not(:disabled) { background: var(--green); color: #0a1a14; }
.btn-gold {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: rgba(245,200,66,.3);
}
.btn-gold:hover:not(:disabled) { background: var(--gold); color: #1a1200; }
.btn-sm { padding: 5px 12px; font-size: .77rem; }
.btn-xs { padding: 3px 9px; font-size: .7rem; }
.btn-icon { padding: 7px; width: 34px; height: 34px; justify-content: center; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.form-control {
  width: 100%;
  padding: 9px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .85rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-control::placeholder { color: var(--text-3); }
select.form-control { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636a83' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: .72rem; color: var(--text-3); margin-top: 4px; }
.form-error { font-size: .72rem; color: var(--red); margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ---- Alerts / Flash ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .83rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
}
.alert-success { background: var(--green-dim); color: var(--green); border-color: rgba(34,211,165,.3); }
.alert-error   { background: var(--red-dim);   color: var(--red);   border-color: rgba(255,92,122,.3); }
.alert-warning { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(255,169,77,.3); }
.alert-info    { background: var(--accent-dim); color: var(--accent-2); border-color: rgba(108,99,255,.3); }
.alert .alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert .alert-close { margin-left: auto; cursor: pointer; opacity: .7; background: none; border: none; color: inherit; font-size: 1rem; padding: 0; }
.alert .alert-close:hover { opacity: 1; }

/* ---- Toasts ---- */
#toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  min-width: 280px;
  max-width: 380px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: toastIn .3s ease;
}
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-info    { border-left: 3px solid var(--accent); }
.toast.toast-warning { border-left: 3px solid var(--yellow); }
.toast .toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast .toast-body { flex: 1; font-size: .83rem; }
.toast .toast-title { font-weight: 600; margin-bottom: 2px; }
.toast .toast-close { cursor: pointer; opacity: .5; background: none; border: none; color: var(--text); font-size: 1rem; padding: 0; }
.toast .toast-close:hover { opacity: 1; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); max-height: 100px; }
  to   { opacity: 0; transform: translateX(20px); max-height: 0; padding: 0; margin: 0; }
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-family: 'DM Mono', monospace;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
}
.page-link:hover { background: var(--bg-4); color: var(--text); border-color: var(--border-2); }
.page-link.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-link.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ---- Search/Filter Bar ---- */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar .form-control { width: auto; }
.filter-bar .search-wrap { position: relative; flex: 1; min-width: 200px; }
.filter-bar .search-wrap .form-control { padding-left: 36px; }
.filter-bar .search-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: .9rem;
}

/* ---- Modal ---- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: .95rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}
.modal-close:hover { background: var(--red-dim); color: var(--red); border-color: rgba(255,92,122,.3); }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ---- Shop Items ---- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.shop-item-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.shop-item-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(108,99,255,.2); }
.shop-item-card .item-img {
  width: 100%; height: 160px;
  object-fit: cover;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.shop-item-card .item-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-item-card .item-body { padding: 14px; }
.shop-item-card .item-name { font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--text); }
.shop-item-card .item-desc { font-size: .77rem; color: var(--text-3); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-item-card .item-meta { display: flex; align-items: center; justify-content: space-between; }
.shop-item-card .item-price {
  font-family: 'DM Mono', monospace;
  font-size: .95rem;
  font-weight: 700;
  color: var(--gold);
}
.shop-item-card .item-stock { font-size: .7rem; color: var(--text-3); }
.shop-item-card .item-stock.low { color: var(--red); }
.shop-item-card .item-footer { padding: 12px 14px; border-top: 1px solid var(--border); }
.shop-item-card .badge-featured { position: absolute; top: 10px; right: 10px; }
.shop-item-card .cant-afford { opacity: .55; }

/* ---- User Avatar ---- */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--accent-2);
  border: 2px solid var(--border-2);
  flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 2rem; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: .5; }
.empty-state .empty-title { font-size: 1rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.empty-state .empty-desc { font-size: .83rem; }

/* ---- Separator ---- */
.sep { height: 1px; background: var(--border); margin: 20px 0; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mt-4  { margin-top: 16px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-sm { font-size: .82rem; }
.text-xs { font-size: .72rem; }
.text-muted { color: var(--text-3); }
.text-gold  { color: var(--gold); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-accent { color: var(--accent-2); }
.mono { font-family: 'DM Mono', monospace; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.w-full { width: 100%; }

/* ---- Auth Pages ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 50% -20%, rgba(108,99,255,.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 100%, rgba(108,99,255,.08) 0%, transparent 60%);
  padding: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo .logo-mark {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 14px;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 30px var(--accent-glow);
}
.auth-logo h1 { font-size: 1.3rem; font-weight: 700; }
.auth-logo p  { font-size: .82rem; color: var(--text-3); margin-top: 4px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-3); font-size: .75rem;
  margin: 16px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer { text-align: center; margin-top: 20px; font-size: .82rem; color: var(--text-3); }

/* ---- Page Header ---- */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.3rem; font-weight: 700; }
.page-header p  { font-size: .83rem; color: var(--text-3); margin-top: 4px; }

/* ---- Landing ---- */
.landing {
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(108,99,255,.2) 0%, transparent 60%);
}
.landing-nav {
  display: flex;
  align-items: center;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.landing-hero {
  text-align: center;
  padding: 100px 40px 80px;
}
.landing-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.landing-hero p { font-size: 1.1rem; color: var(--text-2); max-width: 500px; margin: 0 auto 36px; }
.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 0 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p  { font-size: .82rem; color: var(--text-3); }

/* ---- Quick Nav Cards ---- */
.quick-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.quick-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.quick-card:hover { background: var(--bg-4); border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.quick-card .qc-icon { font-size: 2rem; }
.quick-card .qc-label { font-size: .82rem; font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page-body { padding: 16px; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 24px; }
  .landing-nav, .landing-features { padding-left: 20px; padding-right: 20px; }
}

/* ---- Spinner ---- */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Dropdown ---- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  min-width: 160px;
  box-shadow: var(--shadow);
  z-index: 200;
  display: none;
  overflow: hidden;
}
.dropdown-menu.open { display: block; animation: fadeIn .15s ease; }
.dropdown-item {
  padding: 9px 14px;
  font-size: .82rem;
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: var(--transition);
  border: none; background: none; width: 100%; text-align: left; text-decoration: none;
}
.dropdown-item:hover { background: var(--bg-3); color: var(--text); }
.dropdown-item.danger:hover { background: var(--red-dim); color: var(--red); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Loading overlay ---- */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(13,15,20,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
}
