* {
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui;
}

body {
  margin: 0;
  background: #f4f6fb;
  display: flex;
  height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #111827, #1f2933);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 30px;
  color: #38bdf8;
}

.nav a {
  display: block;
  padding: 12px 15px;
  margin-bottom: 8px;
  border-radius: 8px;
  color: #e5e7eb;
  text-decoration: none;
  transition: 0.2s;
}

.nav a:hover,
.nav a.active {
  background: #38bdf8;
  color: #020617;
  font-weight: 600;
}

/* ========== MAIN AREA ========== */
.main {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ========== CARDS ========== */
.card {
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

/* ========== FORM ========== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

input, button {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: #38bdf8;
}

button {
  background: #38bdf8;
  border: none;
  color: #020617;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

/* ========== SIZE BOX ========== */
.sizes-box {
  display: none;
  margin-top: 10px;
}

.sizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px,1fr));
  gap: 10px;
}

/* ========== TABLE ========== */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

th {
  background: #f1f5f9;
  font-weight: 600;
}

@media (max-width: 768px) {
  .sidebar {
    width: 190px;
  }
}
.low-stock {
  background: #fff3cd;
}

.badge {
  background: #dc3545;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 5px;
}

.delete-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.delete-btn:hover {
  transform: scale(1.2);
}
.low-stock {
  background: #fff3cd;
}

.badge {
  background: #dc3545;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 5px;
}

.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  margin-right: 6px;
}

.icon-btn:hover {
  transform: scale(1.2);
}

.icon-btn.danger:hover {
  color: red;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-card {
  background: white;
  padding: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
  border-radius: 12px;
}

#qrContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  gap: 15px;
  margin-top: 15px;
  justify-content: center;
}

.qr-box {
  text-align: center;
  font-size: 14px;
}
.qr-box strong {
  font-size: 14px;
}

.qr-box {
  border: 1px dashed #ddd;
  padding: 6px;
  border-radius: 6px;
}
.toolbar {
  display: flex;
  justify-content:center; /* ✅ align left */
}
.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #38bdf8;
  color: #ffffff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;   /* ✅ spacing below */
}

.primary-btn:hover {
  background: #4338ca;
}

.primary-btn:active {
  transform: scale(0.98);
}
.billing-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  padding: 20px;
}

.billing-left, .billing-right {
  background: white;
  padding: 15px;
  border-radius: 10px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th, td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background: #22c55e;
  border: none;
  color: white;
  border-radius: 8px;
  margin-top: 10px;
}
/* ===== AUTOCOMPLETE SUGGESTIONS ===== */
.suggestions {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 15px rgba(0,0,0,.08);
}

.suggestions div {
  padding: 8px 10px;
  cursor: pointer;
}

.suggestions div:hover {
  background: #f1f5f9;
}
