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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f0f2f5;
  min-height: 100vh;
}

header {
  background-color: #1a1a2e;
  color: #fff;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 1.5rem;
  letter-spacing: 1px;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 40px 20px;
}

.nav-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-card {
  background: #fff;
  border-radius: 16px;
  width: 180px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-decoration: none;
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.nav-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  border-color: #4f46e5;
}

.nav-card .icon {
  font-size: 2.4rem;
}

.nav-card .label {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ── Back button ── */
.back-btn {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.back-btn:hover { opacity: 1; }

/* ── Report / inner page layout ── */
.page-content {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 1.4rem;
  color: #1a1a2e;
}

.btn-add {
  background-color: #4f46e5;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-add:hover { background-color: #3730a3; }

/* ── Table ── */
.table-wrapper {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  overflow-x: auto;
}

#reportTable {
  width: 100%;
  border-collapse: collapse;
}

#reportTable thead {
  background-color: #1a1a2e;
  color: #fff;
}

#reportTable th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#reportTable td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
}

#reportTable tbody tr:last-child td { border-bottom: none; }

#reportTable tbody tr:hover { background-color: #f8f9ff; }

#reportTable input[type="text"],
#reportTable input[type="date"],
#reportTable select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fafafa;
  outline: none;
  transition: border-color 0.2s;
}

#reportTable input:focus,
#reportTable select:focus {
  border-color: #4f46e5;
  background: #fff;
}

.row-num {
  color: #888;
  font-size: 0.85rem;
  width: 36px;
  text-align: center;
}

.btn-delete {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-delete:hover { background: #fecaca; }

/* ── Inventory table ── */
#inventoryTable {
  width: 100%;
  border-collapse: collapse;
}

#inventoryTable thead {
  background-color: #c9184a;
  color: #fff;
}

#inventoryTable th {
  padding: 13px 14px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

#inventoryTable td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
  text-align: center;
}

#inventoryTable tbody tr:last-child td { border-bottom: none; }
#inventoryTable tbody tr:hover { background-color: #fff5f7; }

#inventoryTable input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 0.85rem;
  font-family: inherit;
  background: transparent;
  outline: none;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}
#inventoryTable input:focus {
  border-color: #c9184a;
  background: #fff;
}

.inv-sku  { color: #c9184a; font-weight: 700; text-align: left; }
.inv-wide { text-align: left; min-width: 200px; }
.inv-size { max-width: 70px; }
.inv-num  { max-width: 90px; }

/* Stock color coding */
.stock-0  { background-color: #fca5a5; font-weight: 700; } /* red       — out of stock */
.stock-5  { background-color: #fef08a; font-weight: 700; } /* yellow    — <= 5        */
.stock-10 { background-color: #bae6fd; font-weight: 700; } /* sky blue  — <= 10       */
.stock-20 { background-color: #86efac; font-weight: 700; } /* green     — <= 20       */
.stock-30 { background-color: #93c5fd; font-weight: 700; } /* blue      — <= 30       */
.stock-50 { background-color: #6366f1; color: #fff; font-weight: 700; } /* deep blue — <= 50+ */

.stock-0 input, .stock-5 input, .stock-10 input,
.stock-20 input, .stock-30 input, .stock-50 input {
  background: transparent;
  border-color: transparent;
  font-weight: 700;
  color: inherit;
}

/* Status labels */
.status-in  { color: #16a34a; font-weight: 700; }
.status-out { color: #dc2626; font-weight: 700; }

.btn-save {
  background: #dcfce7;
  color: #16a34a;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-right: 4px;
}
.btn-save:hover { background: #bbf7d0; }
.btn-save:disabled { opacity: 0.6; cursor: not-allowed; }
