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

:root {
  --bg: #07070f;
  --bg2: #0e0e1e;
  --bg3: #141428;
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --accent: #6c63ff;
  --accent2: #00d4aa;
  --accent3: #ff6b6b;
  --text: #eeeef5;
  --text2: #8888aa;
  --card-shadow: 0 8px 32px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
}

* { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

h1,h2,h3,h4,h5 { font-family: 'Syne', sans-serif; }

a { color: inherit; text-decoration: none; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 8px; align-items: center; }

.nav-links a {
  padding: 8px 16px; border-radius: 8px;
  color: var(--text2); font-size: 0.9rem; font-weight: 500;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--glass);
}

.nav-cart {
  background: var(--glass) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text) !important;
  position: relative;
}
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  display: none;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; border: none; transition: all .2s;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: #5a52e8; transform: translateY(-1px); }

.btn-secondary {
  background: var(--glass); color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); }

.btn-success { background: var(--accent2); color: #001a14; }
.btn-danger { background: var(--accent3); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── CARDS ── */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(108,99,255,0.3); }

/* ── PAGE LAYOUT ── */
.page { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }

.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 2rem; font-weight: 800; }
.page-header p { color: var(--text2); margin-top: 6px; }

/* ── GRID ── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

@media(max-width:900px){ .grid-3,.grid-4{ grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px){ .grid-3,.grid-4,.grid-2{ grid-template-columns: 1fr; } }

/* ── PRODUCT CARD ── */
.product-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .25s;
  cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); border-color: rgba(108,99,255,0.4); box-shadow: 0 16px 48px rgba(108,99,255,0.15); }

.product-thumb {
  width: 100%; height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  position: relative; overflow: hidden;
}

.product-body { padding: 18px; }
.product-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.product-meta { color: var(--text2); font-size: 0.82rem; margin-bottom: 14px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--accent2); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-purple { background: rgba(108,99,255,0.2); color: var(--accent); }
.badge-green  { background: rgba(0,212,170,0.15); color: var(--accent2); }
.badge-red    { background: rgba(255,107,107,0.2); color: var(--accent3); }
.badge-yellow { background: rgba(255,195,0,0.2); color: #ffc300; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text2); margin-bottom: 8px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select option { background: var(--bg3); }

/* ── SEARCH BAR ── */
.search-bar {
  display: flex; gap: 12px; align-items: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  margin-bottom: 28px;
}
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
}
.search-bar input::placeholder { color: var(--text2); }

/* ── FILTER CHIPS ── */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  padding: 6px 16px; border-radius: 20px;
  border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text2);
  cursor: pointer; font-size: 0.83rem; font-weight: 500;
  transition: all .2s;
}
.chip:hover, .chip.active {
  background: rgba(108,99,255,0.2);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--glass-border); }
th { font-family: 'Syne', sans-serif; font-size: 0.82rem; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; }
td { font-size: 0.9rem; }
tr:hover td { background: var(--glass); }

/* ── STAT CARDS ── */
.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content:''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.purple::before { background: var(--accent); }
.stat-card.green::before  { background: var(--accent2); }
.stat-card.red::before    { background: var(--accent3); }
.stat-card.yellow::before { background: #ffc300; }

.stat-icon { font-size: 2rem; margin-bottom: 12px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--text2); font-size: 0.85rem; margin-top: 4px; }

/* ── TABS ── */
.tabs { display: flex; gap: 4px; background: var(--glass); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px; width: fit-content; }
.tab {
  padding: 8px 20px; border-radius: 8px; cursor: pointer;
  font-size: 0.88rem; font-weight: 500; color: var(--text2);
  transition: all .2s;
}
.tab.active { background: var(--bg3); color: var(--text); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  display: none;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px; max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from{ transform: translateY(20px); opacity:0; } to{ transform: translateY(0); opacity:1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.3rem; font-weight: 800; }
.modal-close { background: var(--glass); border: none; color: var(--text2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 1rem; }
.modal-close:hover { color: var(--text); }

/* ── TOAST ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--bg2); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  animation: slideIn .3s ease; min-width: 280px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
@keyframes slideIn { from{ transform: translateX(40px); opacity:0; } to{ transform: translateX(0); opacity:1; } }
.toast.success { border-left: 3px solid var(--accent2); }
.toast.error   { border-left: 3px solid var(--accent3); }
.toast.info    { border-left: 3px solid var(--accent); }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--text2);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: .5; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }

/* ── HERO ── */
.hero {
  padding: 80px 24px 60px;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
@media(max-width:700px){ .hero { grid-template-columns: 1fr; } }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108,99,255,0.12); border: 1px solid rgba(108,99,255,0.25);
  color: var(--accent); border-radius: 20px; padding: 6px 16px;
  font-size: 0.82rem; font-weight: 600; letter-spacing:.05em;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800; line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { color: var(--text2); font-size: 1.05rem; margin-bottom: 32px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.mini-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px;
  animation: float 4s ease-in-out infinite;
}
.mini-card:nth-child(2) { animation-delay: 1s; }
.mini-card:nth-child(3) { animation-delay: .5s; }
.mini-card:nth-child(4) { animation-delay: 1.5s; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* ── SIDEBAR LAYOUT ── */
.sidebar-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
@media(max-width:800px){ .sidebar-layout { grid-template-columns: 1fr; } }

.sidebar {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky; top: 80px;
}
.sidebar-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text2); margin-bottom: 12px; font-weight: 600; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text2); font-size: 0.9rem;
  transition: all .2s; cursor: pointer;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(108,99,255,0.12); color: var(--text);
}
.sidebar-link .icon { font-size: 1.1rem; }

/* ── MISC ── */
.divider { height: 1px; background: var(--glass-border); margin: 24px 0; }
.text-muted { color: var(--text2); }
.text-accent { color: var(--accent); }
.text-green { color: var(--accent2); }
.text-red { color: var(--accent3); }
.fw-bold { font-weight: 700; }
.mt-auto { margin-top: auto; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }
