:root {
  --bg: #0b1120;
  --panel: #111827;
  --soft: #1f2937;
  --line: #334155;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #2563eb;
  --danger: #dc2626;
  --success: #16a34a;
  --white: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #f1f5f9; color: #0f172a; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.container { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: linear-gradient(135deg, #0f172a, #1e293b); color: var(--white); padding: 18px 0; margin-bottom: 24px; }
.topbar-flex { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-size: 24px; font-weight: 700; }
.brand-with-logo { display: flex; align-items: center; gap: 14px; }
.site-logo { width: 58px; height: 58px; object-fit: contain; border-radius: 14px; background: rgba(255,255,255,.08); padding: 6px; }
.muted { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 11px 16px; border-radius: 12px; background: var(--primary); color: #fff; cursor: pointer; font-weight: 700; gap: 8px; }
.button.secondary { background: #475569; }
.button.success { background: var(--success); }
.button.danger { background: var(--danger); }
.button.light { background: #fff; color: #0f172a; border: 1px solid #cbd5e1; }
.count-badge { min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #0f172a; color: #fff; padding: 0 7px; font-size: 12px; }
.card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, .06); border: 1px solid #e2e8f0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid { display: grid; grid-template-columns: minmax(350px, 460px) 1fr; gap: 18px; }
.users-grid { grid-template-columns: 340px 1fr; }
.hero-card { background: linear-gradient(180deg, #fff, #f8fafc); }
.product-grid { align-items: stretch; }
.product-card { display: flex; flex-direction: column; }
.product-card img { width: 100%; height: 280px; object-fit: contain; border-radius: 14px; background: #f8fafc; }
.image-button { border: 0; background: transparent; padding: 0; cursor: zoom-in; }
.product-title { font-size: 20px; font-weight: 700; margin: 12px 0 8px; }
.price-row { display: flex; gap: 10px; align-items: center; margin: 10px 0 12px; flex-wrap: wrap; }
.old-price { color: #64748b; text-decoration: line-through; }
.price { color: #dc2626; font-size: 22px; font-weight: 800; }
.badge { display: inline-block; padding: 7px 10px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 12px; font-weight: 700; }
.search-box { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
input, textarea, select { width: 100%; padding: 12px 13px; border-radius: 12px; border: 1px solid #cbd5e1; background: #fff; font: inherit; }
textarea { min-height: 120px; resize: vertical; }
label { font-weight: 700; display: block; margin-bottom: 8px; }
.field { margin-bottom: 15px; }
.checkbox-field label { font-weight: 600; display:flex; gap:8px; align-items:center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
th { background: #f8fafc; }
.notice { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 700; }
.notice.success { background: #dcfce7; color: #166534; }
.notice.error { background: #fee2e2; color: #991b1b; }
.product-detail { display: grid; grid-template-columns: minmax(280px, 540px) 1fr; gap: 24px; }
.product-detail img { width: 100%; max-height: 560px; object-fit: contain; border-radius: 18px; background: #f8fafc; }
.detail-thumbs { margin-top: 14px; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.thumb-button, .thumb-card { border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; padding: 8px; }
.thumb-button { cursor: pointer; }
.thumb-button img, .thumb-card img { width: 100%; height: 100px; object-fit: contain; border-radius: 12px; background: #f8fafc; }
.thumb-card.single-logo-card { max-width: 180px; }
.selectable { display: flex; flex-direction: column; gap: 8px; }
.features { padding-left: 18px; line-height: 1.7; }
.footer { padding: 26px 0 36px; color: #64748b; text-align: center; font-weight: 700; }
.login-box { max-width: 440px; margin: 40px auto; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.small { font-size: 13px; }
.max-760 { max-width: 760px; }
.admin-list-thumb, .placeholder-thumb { width: 76px; height: 76px; object-fit: contain; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; display:flex; align-items:center; justify-content:center; }
.product-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.detail-actions { margin-top: 18px; }
.stack-list { display: grid; gap: 14px; }
.user-item-form { padding: 14px; border: 1px solid #e2e8f0; border-radius: 16px; }
.danger-text { color: #b91c1c; }
.cart-drawer { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; z-index: 40; }
.cart-drawer.open { display: block; }
.cart-panel { margin-left: auto; width: min(430px, 100%); height: 100%; background: #fff; padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: -10px 0 30px rgba(15,23,42,.15); }
.cart-header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.cart-items { display:grid; gap:12px; overflow:auto; }
.cart-item { display:grid; grid-template-columns:72px 1fr; gap:12px; border:1px solid #e2e8f0; border-radius:14px; padding:10px; }
.cart-item img { width:72px; height:72px; object-fit:contain; border-radius:12px; background:#f8fafc; }
.cart-item-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.cart-item-actions button { border:1px solid #cbd5e1; background:#fff; border-radius:8px; padding:6px 10px; cursor:pointer; }
.cart-footer-actions { margin-top:auto; display:grid; gap:10px; }
.image-modal { position: fixed; inset: 0; background: rgba(2, 6, 23, .8); display: none; z-index: 60; padding: 20px; }
.image-modal.open { display: flex; align-items: center; justify-content: center; }
.image-modal-content { position: relative; max-width: 1100px; width: 100%; text-align:center; }
.image-modal-content img { max-width: 100%; max-height: 80vh; object-fit: contain; background: #fff; border-radius: 18px; padding: 12px; }
.image-modal-close { position: absolute; top: -12px; right: -12px; width: 42px; height: 42px; border-radius: 999px; border: 0; background: #fff; font-size: 28px; cursor: pointer; }
@media (max-width: 980px) {
  .admin-grid, .users-grid, .product-detail { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .two-col, .product-actions { grid-template-columns: 1fr; }
  .product-card img { height: 220px; }
}
