/* ─── RESET & VARIABLES ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #07070a;
  --surface:   #0f0f14;
  --surface2:  #161620;
  --surface3:  #1d1d2a;
  --border:    #1f1f2e;
  --border2:   #2a2a3a;
  --text:      #e8e8f0;
  --text-muted:#7070a0;
  --white:     #ffffff;
  --red:       #e53e3e;
  --green:     #38a169;
  --radius:    8px;
  --radius-lg: 14px;
  --transition:0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── OVERLAY ────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 300;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.overlay.open { opacity: 1; pointer-events: all; }

/* ─── NAVIGATION ─────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; gap: 16px;
  height: 60px; padding: 0 24px;
  background: rgba(7,7,10,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.nav-logo img {
  width: 32px; height: 32px;
  border-radius: 8px; object-fit: cover;
}
.nav-logo-text {
  font-size: 15px; font-weight: 700;
  color: var(--white); white-space: nowrap;
}

.nav-search-wrap { flex: 1; display: flex; justify-content: center; }
.nav-search-container {
  position: relative; width: 100%; max-width: 400px;
}
.nav-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px; pointer-events: none;
}
.nav-search {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 13px;
  padding: 8px 12px 8px 34px;
  transition: border-color var(--transition);
  outline: none;
}
.nav-search:focus { border-color: var(--border2); }
.nav-search::placeholder { color: var(--text-muted); }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ─── BUTTONS ────────────────────────────────────────── */
.btn-ghost {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: none;
  color: var(--text-muted); font-size: 13px;
  padding: 7px 12px; border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.btn-ghost:hover { color: var(--white); background: var(--surface2); }

.btn-primary {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--white); font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition);
}
.btn-primary:hover { background: var(--surface3); border-color: var(--text-muted); }

.cart-badge {
  background: var(--white); color: var(--bg);
  font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
  min-width: 18px; text-align: center;
}

.btn-white {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--white); color: var(--bg);
  font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--radius);
  border: none; transition: opacity var(--transition);
}
.btn-white:hover { opacity: 0.88; }
.btn-white:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text);
  font-size: 13px; font-weight: 500;
  padding: 10px 20px; border-radius: var(--radius);
  border: 1px solid var(--border2);
  transition: border-color var(--transition), background var(--transition);
}
.btn-outline:hover { border-color: var(--text-muted); background: var(--surface2); }

.btn-block { width: 100%; }

.btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; font-size: 12px; font-weight: 500;
  border-radius: var(--radius); border: none;
}

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.icon-btn:hover { color: var(--white); border-color: var(--border2); background: var(--surface2); }

/* ─── CATEGORY TABS ──────────────────────────────────── */
.cat-tabs {
  display: flex; align-items: center;
  gap: 2px; padding: 0 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.active { color: var(--white); border-bottom-color: var(--white); }

/* ─── MAIN ───────────────────────────────────────────── */
#main {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  text-align: center; padding: 64px 24px 48px;
}
.hero-logo {
  width: 80px; height: 80px;
  border-radius: 20px; object-fit: cover;
  margin-bottom: 24px;
  box-shadow: 0 0 0 1px var(--border);
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900; letter-spacing: -0.03em;
  color: var(--white); line-height: 1.1;
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 16px; color: var(--text-muted);
  max-width: 480px; margin: 0 auto 28px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── STATS ──────────────────────────────────────────── */
.stats-row {
  display: flex; gap: 1px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin: 0 0 48px;
}
.stat-item {
  flex: 1; text-align: center; padding: 20px 16px;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--white); display: block; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── STAR SELECTOR ──────────────────────────────────── */
.star-selector {
  display: flex; gap: 6px; margin-top: 4px;
}
.star-btn {
  font-size: 28px; cursor: pointer; color: var(--border2);
  transition: color 0.15s, transform 0.1s; user-select: none; line-height: 1;
}
.star-btn:hover, .star-btn.active { color: #f5c518; transform: scale(1.15); }

/* ─── SECTION HEADERS ────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.section-header-left { display: flex; align-items: center; gap: 12px; }
.section-title { font-size: 18px; font-weight: 700; color: var(--white); }
.section-sub { font-size: 13px; color: var(--text-muted); }
.product-count-badge {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
}

.sort-select {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 12px;
  padding: 6px 10px; border-radius: var(--radius);
  outline: none; cursor: pointer;
}
.sort-select:focus { border-color: var(--border2); }

/* ─── PRODUCT GRID ───────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ─── PRODUCT CARD ───────────────────────────────────── */
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--border2);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

.product-thumb {
  position: relative;
  height: 160px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--border2) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
}
.product-thumb-icon {
  position: relative; z-index: 1;
  font-size: 40px; color: var(--border2);
  transition: color var(--transition), transform var(--transition);
}
.product-card:hover .product-thumb-icon {
  color: var(--text-muted); transform: scale(1.08);
}

.pill {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase;
}
.pill-new { background: var(--white); color: var(--bg); }
.pill-hot { background: rgba(200,40,40,0.85); color: #fff; border: 1px solid rgba(255,80,80,0.3); }
.pill-sale { background: transparent; color: var(--white); border: 1px solid var(--border2); }

.btn-add-quick {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px;
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 6px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer;
  opacity: 0; transform: scale(0.85);
  transition: opacity var(--transition), transform var(--transition), color var(--transition);
}
.product-card:hover .btn-add-quick { opacity: 1; transform: scale(1); }
.btn-add-quick:hover { color: var(--white); border-color: var(--text-muted); }

.product-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; flex: 1;
  gap: 6px;
}
.product-cat {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase;
}
.product-name {
  font-size: 14px; font-weight: 600; color: var(--white);
  line-height: 1.35;
}
.product-desc {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.55; flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 8px;
}
.price-wrap { display: flex; align-items: baseline; gap: 6px; }
.price { font-size: 17px; font-weight: 700; color: var(--white); }
.price-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.btn-add {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--text); font-size: 11px; font-weight: 500;
  padding: 6px 10px; border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn-add:hover { background: var(--white); color: var(--bg); border-color: var(--white); }
.btn-add:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 40px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 15px; }

/* ─── CATEGORY GRID ──────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 16px;
}
.cat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px; text-align: center; cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.cat-card:hover {
  background: var(--surface2); border-color: var(--border2);
  transform: translateY(-2px);
}
.cat-card-icon { font-size: 28px; color: var(--text-muted); margin-bottom: 10px; }
.cat-card-name { font-size: 13px; font-weight: 600; color: var(--white); }
.cat-card-count { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ─── CART DRAWER ────────────────────────────────────── */
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 380px; z-index: 400;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-title { font-size: 15px; font-weight: 600; color: var(--white); }

.drawer-body {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.drawer-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 10px;
}

.cart-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.cart-item-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--surface3); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 15px;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 12px; font-weight: 500; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-price { font-size: 11px; color: var(--text-muted); }
.cart-item-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.qty-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.qty-btn {
  width: 24px; height: 24px;
  background: transparent; border: none;
  color: var(--text-muted); font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition), color var(--transition);
}
.qty-btn:hover { background: var(--surface3); color: var(--white); }
.qty-num {
  min-width: 24px; text-align: center;
  font-size: 12px; color: var(--white); padding: 0 4px;
}
.cart-item-remove {
  background: transparent; border: none;
  color: var(--text-muted); font-size: 11px; cursor: pointer;
  padding: 4px; border-radius: 4px;
  transition: color var(--transition);
}
.cart-item-remove:hover { color: var(--red); }

.cart-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; color: var(--text-muted); text-align: center;
  padding: 40px 20px;
}
.cart-empty i { font-size: 36px; }
.cart-empty p { font-size: 13px; }

.promo-row { display: flex; gap: 8px; }
.promo-row .field-input { flex: 1; font-size: 12px; }
.promo-msg { font-size: 11px; min-height: 16px; }
.promo-msg.ok { color: var(--green); }
.promo-msg.err { color: var(--red); }

.cart-totals { display: flex; flex-direction: column; gap: 6px; }
.total-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--text-muted);
}
.total-final {
  font-size: 15px; font-weight: 700; color: var(--white);
  padding-top: 8px; border-top: 1px solid var(--border);
}
.discount-val { color: var(--green); }

/* ─── FORM ELEMENTS ──────────────────────────────────── */
.field-input {
  width: 100%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 13px;
  padding: 9px 12px; border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition);
}
.field-input:focus { border-color: var(--text-muted); }
.field-input::placeholder { color: var(--text-muted); }
.field-textarea { resize: vertical; min-height: 100px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.req { color: var(--red); }

/* ─── MODALS ─────────────────────────────────────────── */
.modal-wrap {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  max-height: 90vh; overflow-y: auto;
  position: relative; width: 100%;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-product { max-width: 640px; }
.modal-ticket  { max-width: 560px; }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--white); }
.modal-close {
  position: absolute; top: 14px; right: 14px;
}

/* Product modal internals */
.pm-thumb {
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  height: 200px; position: relative; overflow: hidden;
}
.pm-thumb::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--border2) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
}
.pm-thumb i { font-size: 60px; color: var(--border2); position: relative; z-index: 1; }
.pm-body { padding: 20px; }
.pm-cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.pm-name { font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.pm-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.pm-price-wrap { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.pm-price { font-size: 24px; font-weight: 800; color: var(--white); }
.pm-old-price { font-size: 14px; color: var(--text-muted); text-decoration: line-through; }

/* ─── TICKET MODAL ───────────────────────────────────── */
.ticket-tabs {
  display: flex; border-bottom: 1px solid var(--border);
}
.ticket-tab {
  padding: 12px 20px; background: none; border: none;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}
.ticket-tab:hover { color: var(--text); }
.ticket-tab.active { color: var(--white); border-bottom-color: var(--white); }

.ticket-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }

.ticket-success {
  padding: 40px 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.success-icon { font-size: 48px; color: var(--green); }
.ticket-success h3 { font-size: 18px; font-weight: 700; color: var(--white); }
.ticket-success p { font-size: 13px; color: var(--text-muted); }
.ticket-id-box {
  font-family: 'Courier New', monospace;
  font-size: 22px; font-weight: 700; color: var(--white);
  border: 2px solid var(--border2);
  border-radius: var(--radius); padding: 10px 24px;
  letter-spacing: 0.1em;
}
.success-sub { font-size: 12px; color: var(--text-muted); }

.lookup-wrap { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.lookup-row { display: flex; gap: 8px; }
.lookup-row .field-input { flex: 1; }

.ticket-view { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.ticket-info-box {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.ticket-info-row { display: flex; gap: 8px; font-size: 12px; }
.ticket-info-label { color: var(--text-muted); min-width: 80px; }
.ticket-info-value { color: var(--white); font-weight: 500; }

.message-bubble {
  max-width: 85%; padding: 10px 14px;
  border-radius: 10px; font-size: 13px; line-height: 1.5;
}
.message-bubble.customer {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.message-bubble.staff {
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--white); align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.bubble-meta {
  font-size: 10px; color: var(--text-muted);
  margin-bottom: 4px; font-weight: 600; letter-spacing: 0.04em;
}
.chat-thread { display: flex; flex-direction: column; gap: 8px; }

/* ─── STATUS BADGES ──────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  white-space: nowrap;
}
.status-open { border: 1px solid rgba(255,255,255,0.2); color: var(--white); }
.status-in   { border: 1px solid var(--border2); color: var(--text-muted); }
.status-gesloten { border: 1px solid var(--border); color: var(--text-muted); opacity: 0.6; }

/* ─── TOAST ──────────────────────────────────────────── */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 240px; max-width: 320px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideIn 0.25s ease;
  pointer-events: all;
}
.toast i { flex-shrink: 0; }
.toast-success i { color: var(--green); }
.toast-error i   { color: var(--red); }
.toast-info i    { color: var(--text-muted); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(16px); }
}

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; flex-wrap: wrap; gap: 12px;
  max-width: 1280px; margin: 0 auto;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-logo-img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.footer-brand-name { font-size: 13px; font-weight: 600; color: var(--white); }
.footer-copy { font-size: 12px; color: var(--text-muted); }
.footer-links { display: flex; gap: 16px; }
.footer-link {
  font-size: 12px; color: var(--text-muted);
  text-decoration: none; display: flex; align-items: center; gap: 5px;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--white); }

/* ─── SUPPORT TAB ────────────────────────────────────── */
.cat-tab-divider {
  width: 1px; background: var(--border2);
  margin: 10px 8px; flex-shrink: 0;
}
.cat-tab-support { margin-left: auto; }

.support-page-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.support-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.support-panel-title {
  font-size: 15px; font-weight: 700;
  color: var(--white);
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.support-form { display: flex; flex-direction: column; gap: 14px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.support-success {
  text-align: center;
  padding: 16px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.support-success-icon { font-size: 40px; color: var(--white); }
.support-success h3   { font-size: 17px; font-weight: 700; }
.support-success p    { font-size: 13px; color: var(--text-muted); }
.support-success-sub  { font-size: 12px; color: var(--text-muted); }

.ticket-id-display {
  font-family: 'Courier New', monospace;
  font-size: 22px; font-weight: 800;
  letter-spacing: 3px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 20px;
  color: var(--white);
  margin: 4px 0;
}

/* Lookup */
.support-lookup-row {
  display: flex; gap: 8px;
}
.support-lookup-row .field-input { flex: 1; font-family: monospace; letter-spacing: 1px; }
.support-lookup-hint { font-size: 12px; color: var(--text-muted); margin-top: -8px; }
.support-loading {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 13px;
  padding: 20px 0;
}
.support-not-found {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 28px 0;
  color: var(--text-muted); font-size: 13px; text-align: center;
}
.support-not-found i { font-size: 28px; }
.text-muted-sm { font-size: 12px; color: var(--text-muted); }

/* Ticket meta */
.ticket-meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  margin-top: 12px;
}
.ticket-meta-left  { display: flex; align-items: center; gap: 10px; }
.ticket-meta-right { display: flex; align-items: center; gap: 12px; }
.ticket-meta-id {
  font-family: monospace; font-weight: 700; font-size: 14px;
  color: var(--white);
}
.ticket-meta-info { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.ticket-subject-bar {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); margin-top: 8px;
}

/* Chat thread */
.chat-thread {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 380px; overflow-y: auto;
  padding: 14px 0; margin-top: 4px;
  scrollbar-width: thin; scrollbar-color: var(--border2) transparent;
}
.chat-empty { font-size: 12px; color: var(--text-muted); text-align: center; padding: 20px 0; }

.chat-bubble {
  display: flex; flex-direction: column;
  max-width: 82%; padding: 10px 14px;
  border-radius: 10px; font-size: 13px; line-height: 1.55;
}
.chat-customer {
  align-self: flex-start;
  background: var(--surface2); border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
}
.chat-staff {
  align-self: flex-end;
  background: var(--surface3); border: 1px solid var(--border2);
  border-bottom-right-radius: 3px;
}
.chat-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.chat-sender {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.chat-staff .chat-sender { color: var(--white); }
.chat-time   { font-size: 10px; color: var(--text-muted); }
.chat-text   { color: var(--text); white-space: pre-wrap; word-break: break-word; }

/* Reply form */
.chat-reply-form {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px; margin-top: 4px;
}
.reply-textarea { resize: none; min-height: 80px; }
.chat-reply-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.chat-reply-hint { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

.ticket-closed-notice {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-top: 8px;
}

/* ─── AUTH PAGINA ────────────────────────────────────── */
.auth-wrap {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px 80px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: 20px;
  animation: modalIn 0.2s ease;
}

.auth-logo-wrap {
  display: flex; justify-content: center;
  margin-bottom: -4px;
}
.auth-logo {
  width: 52px; height: 52px;
  border-radius: 12px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--border);
}

.auth-title {
  font-size: 20px; font-weight: 800;
  color: var(--white); text-align: center;
  letter-spacing: -0.02em; margin-top: -8px;
}
.auth-sub {
  font-size: 13px; color: var(--text-muted);
  text-align: center; line-height: 1.55;
  margin-top: -12px;
}

.auth-tabs {
  display: flex; gap: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px; overflow: hidden;
}
.auth-tab {
  flex: 1; padding: 7px 12px;
  background: transparent; border: none;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  border-radius: 6px; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.auth-tab.active {
  background: var(--surface3);
  color: var(--white);
  border: 1px solid var(--border2);
}

.auth-form {
  display: flex; flex-direction: column; gap: 14px;
}

.auth-err {
  font-size: 12px; color: var(--red);
  background: rgba(229,62,62,0.08);
  border: 1px solid rgba(229,62,62,0.2);
  border-radius: var(--radius); padding: 8px 12px;
}

.auth-switch {
  font-size: 12px; color: var(--text-muted);
  text-align: center; margin-top: -4px;
}
.auth-switch a {
  color: var(--white); text-decoration: underline;
  cursor: pointer;
}

.form-hint-inline {
  font-size: 11px; color: var(--text-muted);
  font-weight: 400;
}

/* ─── NAV ACCOUNT ────────────────────────────────────── */
.nav-account { position: relative; display: flex; align-items: center; }
.nav-user {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 12px; font-weight: 500; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.nav-user:hover { border-color: var(--border2); background: var(--surface3); }
.nav-user .nav-chevron { font-size: 10px; color: var(--text-muted); transition: transform 0.2s; }
.nav-account.open .nav-chevron { transform: rotate(180deg); }
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius); min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 200; overflow: hidden;
}
.nav-account.open .nav-dropdown { display: block; }
.nav-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px; background: none; border: none;
  color: var(--text); font-size: 13px; cursor: pointer; text-align: left;
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown-item:hover { background: var(--surface3); color: var(--white); }
.nav-dropdown-item i { width: 14px; text-align: center; color: var(--text-muted); }
.nav-dropdown-item:hover i { color: var(--white); }
.nav-dropdown-sep { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.nav-dropdown-item.danger { color: #e05c5c; }
.nav-dropdown-item.danger i { color: #e05c5c; }
.nav-dropdown-item.danger:hover { background: rgba(224,92,92,0.1); color: #e05c5c; }

/* ─── ACCOUNT BAR ────────────────────────────────────── */
.account-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.account-bar-user {
  display: flex; align-items: center; gap: 12px;
}
.account-avatar {
  font-size: 28px; color: var(--text-muted);
  flex-shrink: 0;
}
.account-name {
  font-size: 14px; font-weight: 600; color: var(--white);
}
.account-email {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}

/* ─── TICKET LIJST ───────────────────────────────────── */
.tickets-list {
  display: flex; flex-direction: column; gap: 6px;
}
.ticket-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.ticket-row:hover {
  border-color: var(--border2);
  background: var(--surface2);
  transform: translateY(-1px);
}
.ticket-row-unread {
  border-color: var(--border2);
  background: var(--surface2);
}

.ticket-row-left  { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ticket-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.ticket-row-id {
  font-family: 'Courier New', monospace;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.06em;
}
.ticket-row-subject {
  font-size: 13px; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticket-row-meta {
  font-size: 11px; color: var(--text-muted);
}
.ticket-row-msgs {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.ticket-row-arrow {
  font-size: 12px; color: var(--text-muted);
}
.ticket-unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--white); flex-shrink: 0;
}
.tickets-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 60px 20px;
  color: var(--text-muted); text-align: center;
}
.tickets-empty i { font-size: 36px; }
.tickets-empty p { font-size: 14px; }

/* ─── NIEUW TICKET ───────────────────────────────────── */
.new-ticket-wrap { max-width: 680px; }

.account-info-notice {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 12px; color: var(--text-muted);
}
.account-info-notice i { color: var(--white); flex-shrink: 0; }
.account-info-notice strong { color: var(--white); }

.form-row-btns {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; margin-top: 4px;
}

/* ─── CHAT PAGINA ────────────────────────────────────── */
.chat-page {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 760px;
}

.chat-ticket-info {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
}
.chat-info-item {
  display: flex; flex-direction: column; gap: 1px;
}
.chat-info-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted); font-weight: 600;
}
.chat-info-val {
  font-size: 13px; color: var(--white); font-weight: 500;
}

.mono {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.chat-refresh-btn { margin-left: auto; }

.chat-thread-full {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  min-height: 240px;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.chat-reply-box {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

/* ─── STATUS CLOSED FIX ──────────────────────────────── */
.status-closed { border: 1px solid var(--border); color: var(--text-muted); opacity: 0.6; }

/* ─── BESTELTICKET OVERZICHT ─────────────────────────── */
.order-summary-box {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.order-summary-title {
  font-size: 13px; font-weight: 700; color: var(--white);
  display: flex; align-items: center; gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.order-summary-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.order-item-name  { flex: 1; color: var(--text); }
.order-item-qty   { color: var(--text-muted); font-size: 12px; min-width: 30px; text-align: right; }
.order-item-price { font-weight: 600; color: var(--white); min-width: 70px; text-align: right; }
.order-summary-total {
  display: flex; justify-content: space-between;
  font-size: 14px; font-weight: 700; color: var(--white);
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.order-promo-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-muted);
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  align-self: flex-start;
}

/* Checkout knop: ingelogd vs niet ingelogd */
#checkoutBtn.needs-login::before {
  content: '';
}
.checkout-login-hint {
  font-size: 11px; color: var(--text-muted);
  text-align: center; margin-top: -4px;
}

/* ─── UTILITIES ──────────────────────────────────────── */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-search-wrap { display: none; }
  .nav-logo-text { display: none; }

  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .cat-tab-support { margin-left: 0; }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

  .drawer { width: 100%; max-width: 400px; }

  .stats-row { flex-wrap: wrap; }
  .stat-item { flex-basis: calc(50% - 1px); }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-copy { order: 3; }
}

@media (max-width: 480px) {
  #main { padding: 20px 16px 60px; }
  .hero { padding: 40px 16px 32px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
