@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800&family=Barlow:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── Design tokens ────────────────────────────────────────────────────────── */
:root {
  --bg:        #080c10;
  --bg2:       #0e1318;
  --bg3:       #141b22;
  --bg4:       #1a2330;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.13);
  --accent:    #00e5b0;
  --accent2:   #ff6b2b;
  --accent3:   #4d9fff;
  --text:      #e8edf2;
  --text2:     #8a9bb0;
  --text3:     #4a5a6a;
  --danger:    #ff4757;
  --success:   #00c97a;
  --warning:   #ffb020;
  --radius:    6px;
  --radius-lg: 12px;
  --shadow:    0 2px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --ff-head:   'Barlow Condensed', sans-serif;
  --ff-body:   'Barlow', sans-serif;
  --ff-mono:   'JetBrains Mono', monospace;
  --nav-h:     64px;
  --transition: 0.18s ease;
}

/* ─── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ─── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.container--xs { max-width: 480px; margin: 0 auto; padding: 0 24px; }

/* ─── Navigation ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(8,12,16,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.nav__inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.nav__logo {
  font-family: var(--ff-head);
  font-size: 22px; font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  white-space: nowrap;
}
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav__link {
  font-size: 13px; font-weight: 500; letter-spacing: 0.5px;
  color: var(--text2); padding: 6px 12px; border-radius: var(--radius);
  transition: all var(--transition); white-space: nowrap;
}
.nav__link:hover, .nav__link.active { color: var(--text); background: var(--bg3); opacity: 1; }
.nav__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav__cart-btn {
  position: relative;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); padding: 8px 14px; border-radius: var(--radius);
  font-size: 13px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.nav__cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav__cart-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: var(--bg);
  font-size: 10px; font-weight: 700; font-family: var(--ff-mono);
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-family: var(--ff-head); font-size: 15px; font-weight: 600;
  letter-spacing: 0.5px; cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition); white-space: nowrap;
  text-transform: uppercase;
}
.btn--primary {
  background: var(--accent); color: var(--bg);
  border-color: var(--accent);
}
.btn--primary:hover { background: transparent; color: var(--accent); opacity: 1; }
.btn--outline {
  background: transparent; color: var(--text);
  border-color: var(--border2);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
.btn--danger {
  background: transparent; color: var(--danger);
  border-color: var(--danger);
}
.btn--danger:hover { background: var(--danger); color: #fff; opacity: 1; }
.btn--sm { padding: 7px 14px; font-size: 13px; }
.btn--lg { padding: 14px 32px; font-size: 17px; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Form elements ────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text2);
  font-family: var(--ff-head);
}
.form-input, .form-select, .form-textarea {
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); padding: 11px 14px;
  border-radius: var(--radius); font-size: 14px;
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,176,0.08);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.form-select { appearance: none; cursor: pointer; }
.form-select option { background: var(--bg3); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 2px; }
.form-hint  { font-size: 12px; color: var(--text3); }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.card--hover {
  transition: border-color var(--transition), transform var(--transition);
  cursor: pointer;
}
.card--hover:hover { border-color: var(--border2); transform: translateY(-2px); }

/* ─── Badges / chips ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 4px;
  font-family: var(--ff-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
}
.badge--new      { background: rgba(0,229,176,0.1); color: var(--accent); border: 1px solid rgba(0,229,176,0.25); }
.badge--used     { background: rgba(255,107,43,0.1); color: var(--accent2); border: 1px solid rgba(255,107,43,0.25); }
.badge--hot      { background: rgba(255,176,32,0.1); color: var(--warning); border: 1px solid rgba(255,176,32,0.25); }
.badge--success  { background: rgba(0,201,122,0.1); color: var(--success); border: 1px solid rgba(0,201,122,0.25); }
.badge--danger   { background: rgba(255,71,87,0.1);  color: var(--danger);  border: 1px solid rgba(255,71,87,0.25); }
.badge--info     { background: rgba(77,159,255,0.1); color: var(--accent3); border: 1px solid rgba(77,159,255,0.25); }
.badge--muted    { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }

/* ─── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; border-left: 3px solid;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert--success { background: rgba(0,201,122,0.08); border-color: var(--success); color: var(--success); }
.alert--danger  { background: rgba(255,71,87,0.08);  border-color: var(--danger);  color: var(--danger); }
.alert--warning { background: rgba(255,176,32,0.08); border-color: var(--warning); color: var(--warning); }
.alert--info    { background: rgba(77,159,255,0.08); border-color: var(--accent3); color: var(--accent3); }

/* ─── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--bg3); padding: 10px 16px;
  font-family: var(--ff-head); font-size: 11px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--text2);
  text-align: left; border-bottom: 1px solid var(--border);
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg3); }

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; font-size: 13px; font-weight: 500;
  color: var(--text2); background: transparent; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  transition: all var(--transition); margin-bottom: -1px;
  font-family: var(--ff-head); letter-spacing: 0.5px;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Dividers ─────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ─── Spinner ──────────────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast notifications ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 12px 18px;
  font-size: 13px; min-width: 260px; max-width: 360px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
}
.toast--success { border-left: 3px solid var(--success); }
.toast--danger  { border-left: 3px solid var(--danger); }
.toast--info    { border-left: 3px solid var(--accent3); }
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ─── Page header ──────────────────────────────────────────────────────────── */
.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-header__label {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 2px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 8px;
}
.page-header__title {
  font-family: var(--ff-head); font-size: 36px; font-weight: 800;
  letter-spacing: -0.5px; line-height: 1.1;
}
.page-header__sub { font-size: 15px; color: var(--text2); margin-top: 8px; }

/* ─── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--text3);
}
.empty-state__icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state__title { font-family: var(--ff-head); font-size: 20px; color: var(--text2); margin-bottom: 8px; }

/* ─── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 24px; backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  animation: slideUp 0.25s ease;
}
.modal__title {
  font-family: var(--ff-head); font-size: 22px; font-weight: 700;
  margin-bottom: 20px;
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ─── Sidebar layout ───────────────────────────────────────────────────────── */
.sidebar-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  color: var(--text2); font-size: 14px; font-weight: 500;
  transition: all var(--transition);
}
.sidebar__link:hover, .sidebar__link.active {
  background: var(--bg3); color: var(--text); opacity: 1;
}
.sidebar__link.active { color: var(--accent); }
.sidebar__icon { font-size: 16px; width: 20px; text-align: center; }

/* ─── Product card ─────────────────────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 20px; }
.product-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  cursor: pointer;
}
.product-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.product-card__img {
  height: 160px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; position: relative;
}
.product-card__badge { position: absolute; top: 10px; left: 10px; }
.product-card__body { padding: 16px; }
.product-card__brand { font-family: var(--ff-mono); font-size: 10px; color: var(--text3); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.product-card__name  { font-family: var(--ff-head); font-size: 17px; font-weight: 700; margin-bottom: 10px; line-height: 1.2; }
.product-card__specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.spec-chip {
  font-family: var(--ff-mono); font-size: 10px;
  padding: 3px 8px; border-radius: 4px;
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border);
}
.spec-chip--hl { color: var(--accent); border-color: rgba(0,229,176,0.2); background: rgba(0,229,176,0.05); }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; }
.product-card__price {
  font-family: var(--ff-head); font-size: 22px; font-weight: 700;
}
.product-card__price small { font-size: 11px; font-weight: 400; color: var(--text3); display: block; }
.product-card__add {
  background: var(--accent); color: var(--bg);
  border: none; width: 36px; height: 36px;
  border-radius: var(--radius); font-size: 20px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); line-height: 1;
}
.product-card__add:hover { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* ─── Stat box ─────────────────────────────────────────────────────────────── */
.stat-box { background: var(--bg3); border-radius: var(--radius); padding: 16px 20px; }
.stat-box__val { font-family: var(--ff-head); font-size: 28px; font-weight: 800; }
.stat-box__val--accent { color: var(--accent); }
.stat-box__val--orange { color: var(--accent2); }
.stat-box__label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-family: var(--ff-mono); margin-top: 2px; }

/* ─── Chat bubble ──────────────────────────────────────────────────────────── */
.msg-bubble {
  max-width: 75%; padding: 12px 16px;
  border-radius: 12px; font-size: 14px; line-height: 1.5;
}
.msg-bubble--customer {
  background: var(--bg3); border: 1px solid var(--border);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.msg-bubble--admin {
  background: rgba(0,229,176,0.1); border: 1px solid rgba(0,229,176,0.2);
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.msg-meta { font-size: 11px; color: var(--text3); margin-top: 4px; font-family: var(--ff-mono); }

/* ─── Payment method selector ──────────────────────────────────────────────── */
.pay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 10px; }
.pay-option {
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 14px 12px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--bg3);
}
.pay-option:hover { border-color: var(--accent); }
.pay-option.selected { border-color: var(--accent); background: rgba(0,229,176,0.07); }
.pay-option input { display: none; }
.pay-option__icon { font-size: 24px; margin-bottom: 6px; }
.pay-option__label { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; font-family: var(--ff-head); }

/* ─── Section titles ───────────────────────────────────────────────────────── */
.section-title {
  font-family: var(--ff-head); font-size: 13px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--text2);
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nav__links { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); }
}
