/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@700;800&display=swap');

:root {
  --bg: #0d0d1a;
  --bg2: #12122a;
  --bg3: #1a1a35;
  --card: #161628;
  --border: #2a2a4a;
  --accent: #00d4aa;
  --accent2: #7c3aed;
  --accent3: #f59e0b;
  --text: #e8e8f0;
  --muted: #8888aa;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* ---- LAYOUT ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s;
}
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  padding: 0;
}

/* ---- SIDEBAR ---- */
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo .logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.sidebar-logo .logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: white;
}
.sidebar-logo .logo-sub {
  font-size: 11px;
  color: var(--muted);
}

.sidebar-nav { flex: 1; padding: 16px 12px; }
.nav-section { margin-bottom: 24px; }
.nav-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  padding: 0 8px;
  margin-bottom: 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  margin-bottom: 2px;
}
.nav-item:hover, .nav-item.active {
  background: rgba(0,212,170,0.1);
  color: var(--accent);
}
.nav-item.active { border-left: 3px solid var(--accent); }
.nav-item .nav-icon { font-size: 18px; flex-shrink: 0; }

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--muted); }

/* ---- TOP BAR ---- */
.topbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ---- PAGE CONTENT ---- */
.page-content { padding: 28px; }

/* ---- PAGE STYLES ---- */
.page-main {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px 40px;
}
.page-breadcrumb {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  margin-bottom: 14px;
}
.page-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.page-hero {
  background: linear-gradient(135deg, rgba(0,212,170,0.18), rgba(124,58,237,0.16));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  border-radius: 28px;
  padding: 34px 32px;
  margin-bottom: 26px;
}
.page-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  margin-bottom: 18px;
}
.page-lead {
  color: rgba(255,255,255,0.88);
  font-size: 16px;
  max-width: 760px;
}
.page-section {
  display: grid;
  gap: 22px;
}
.content-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.14);
}
.content-card h3 {
  margin-bottom: 16px;
  color: #ffffff;
}
.content-card p {
  color: rgba(255,255,255,0.78);
  line-height: 1.8;
  margin-bottom: 16px;
}
.content-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.content-card li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.88);
}
.content-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}
.page-grid { display:grid; grid-template-columns: 1fr 1fr; gap:24px; }
.contact-form { display:flex; flex-direction:column; gap:14px; }
.contact-form input,
.contact-form textarea { width:100%; padding:14px 16px; border-radius:16px; border:1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color:#fff; font-size:14px; }
.contact-form textarea { min-height:140px; resize:vertical; }
.contact-form .btn { width: fit-content; }
@media (max-width: 820px) {
  .page-main { padding: 0 16px 30px; }
  .page-grid { grid-template-columns: 1fr; }
}

/* ---- CARDS ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.accent::before { background: var(--accent); }
.stat-card.purple::before { background: var(--accent2); }
.stat-card.amber::before { background: var(--accent3); }
.stat-card.danger::before { background: var(--danger); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin: 8px 0 4px; }
.stat-icon { font-size: 32px; position: absolute; right: 18px; top: 18px; opacity: .15; }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--bg3); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 12px 14px; text-align: left; font-weight: 600; }
td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-success { background: rgba(16,185,129,.15); color: #10b981; }
.badge-warning { background: rgba(245,158,11,.15); color: #f59e0b; }
.badge-danger  { background: rgba(239,68,68,.15);  color: #ef4444; }
.badge-info    { background: rgba(59,130,246,.15);  color: #3b82f6; }
.badge-purple  { background: rgba(124,58,237,.15);  color: #7c3aed; }
.badge-muted   { background: rgba(136,136,170,.15); color: var(--muted); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0d0d1a; }
.btn-primary:hover { background: #00e5b7; }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: rgba(239,68,68,.15); color: var(--danger); border: 1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .5px; }
.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,170,.15);
}
.form-control::placeholder { color: var(--muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- FLASH MESSAGES ---- */
.flash-msg {
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}
.flash-success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: #10b981; }
.flash-error   { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.3);  color: #ef4444; }
.flash-info    { background: rgba(59,130,246,.15);  border: 1px solid rgba(59,130,246,.3);  color: #3b82f6; }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 20px; }
.page-btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  transition: all .2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ---- PRODUCT GRID ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 820px) {
  .product-grid { grid-template-columns: 1fr; }
}

.product-pagination { display:flex;gap:8px;align-items:center;justify-content:center;margin:16px 0 20px }
.product-pagination .page-btn { background:var(--bg3);border:1px solid var(--border);padding:8px 12px;border-radius:8px;cursor:pointer;margin:0 6px }
.product-pagination .page-btn.active { background:var(--accent);color:#111;border-color:var(--accent) }
.product-pagination .page-btn:disabled { opacity:.5;cursor:default }
.product-pagination .page-ell { padding:6px 8px;color:var(--muted);font-size:14px }

/* Footer */
.site-footer { background: var(--bg2); border-top:1px solid var(--border); padding:18px 20px; margin-top:28px }
.site-footer .footer-inner { max-width:1100px; margin:0 auto; }
.site-footer .footer-line { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:13px; color:var(--muted); }
.site-footer .footer-line span { display:flex; align-items:center; gap:8px; }
.site-footer .footer-links a { color:var(--muted); text-decoration:none }
.site-footer .footer-links a:hover { color:var(--accent) }
@media (max-width:820px) {
  .site-footer { padding:16px 16px; }
  .site-footer .footer-line { flex-direction:column; align-items:flex-start; }
}
.product-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  position: relative;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,212,170,.15); }
.product-card.selected { border-color: var(--accent); background: rgba(0,212,170,.05); }
.product-card .product-img {
  width: 100%; height: 120px;
  object-fit: cover;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.product-img-placeholder {
  width: 100%; height: 120px;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.product-info { padding: 12px; }
.product-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.product-price { font-size: 12px; color: var(--accent); font-weight: 700; }
.product-stock { font-size: 11px; color: var(--muted); }
.product-check {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: 12px; color: var(--bg);
}
.product-card.selected .product-check { display: flex; }

/* ---- SHOP SELECTOR ---- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.shop-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all .25s;
  text-align: center;
}
.shop-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,212,170,.15); }
.shop-card.selected { border-color: var(--accent); background: rgba(0,212,170,.08); }
.shop-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}
.shop-card h3 { font-family: 'Syne', sans-serif; font-size: 17px; margin-bottom: 4px; }
.shop-card p { font-size: 12px; color: var(--muted); }

/* ---- CART ---- */
.cart-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position: sticky; top: 70px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.cart-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.cart-item:last-child { border-bottom: none; }
.cart-total {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  margin-top: 16px;
}

/* ---- HOMEPAGE ---- */
.hero-section {
  text-align: center;
  padding: 80px 24px 60px;
  background: radial-gradient(ellipse at center top, rgba(0,212,170,.12) 0%, transparent 70%);
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero-title span { color: var(--accent); }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 540px; margin: 0 auto 32px; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  display: none;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: slideIn .25s ease;
}
@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-family: 'Syne', sans-serif; font-size: 18px; }
.modal-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 22px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---- STEPS ---- */
.steps {
  display: flex; gap: 0;
  margin-bottom: 36px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 18px; left: 18px; right: 18px;
  height: 2px;
  background: var(--border);
}
.step {
  flex: 1; text-align: center; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  z-index: 1;
  transition: all .3s;
}
.step.active .step-dot, .step.done .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.step-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.step.active .step-label { color: var(--accent); }

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

/* ---- QUANTITY CONTROL ---- */
.qty-control {
  display: flex; align-items: center; gap: 8px;
}
.qty-btn {
  width: 28px; height: 28px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all .2s;
}
.qty-btn:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.qty-val { min-width: 32px; text-align: center; font-weight: 700; }

/* ---- SEARCH BOX ---- */
.search-box {
  position: relative;
  margin-bottom: 20px;
}
.search-box input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--text);
  padding: 10px 18px 10px 40px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
}
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---- PRINT ---- */
@media print {
  .sidebar, .topbar, .btn, .no-print { display: none !important; }
  .main-content { margin: 0 !important; }
  body { background: white; color: black; }
  .card { border: 1px solid #ddd; box-shadow: none; }
}

/* ---- ANIMATIONS ---- */
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- PRODUCT IMAGE IN TABLE ---- */
.product-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.product-thumb-placeholder {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
