:root {
  --brand:#006bb6;
  --accent:#fdb927;
  --bg:#f7fafc;
  --card:#ffffff;
  --muted:#6b7280;
  --success:#2e7d32;
  --danger:#d32f2f;
}

/* ---------- Base Reset (Mobile First) ---------- */

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: #111827;
}

/* ---------- Layout ---------- */

.container {
  max-width: 100%;
  padding: 16px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .container {
    max-width: 900px;
    padding: 20px;
  }
}

/* ---------- Typography ---------- */

h1 {
  font-size: 22px;
  margin-bottom: 6px;
}

h2 {
  font-size: 18px;
  margin: 20px 0 12px;
}

h3 {
  font-size: 16px;
  margin: 16px 0 10px;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
  .card {
    padding: 20px;
  }
}

.action-container {
  margin-top: 24px;
  min-height: 240px;
}

/* ---------- Dashboard (Action Buttons) ---------- */

.dashboard {
  display: grid;
  grid-template-columns: 1fr; /* mobile */
  gap: 12px;
}

@media (min-width: 640px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .dashboard {
    grid-template-columns: repeat(3, 1fr);
  }
}

.action-card {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-card:hover {
  transform: translateY(-2px);
}

.action-card.active {
  background: #f0f7ff;
  border-left: 5px solid var(--accent);
}

/* ---------- Forms (Mobile First) ---------- */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}

/* Inputs, selects, textarea */
.form-group input,
.form-group select,
.form-group textarea,
input,
textarea,
select {
  width: 100%;
  min-height: 44px;             /* tap friendly */
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
}

/* Select arrow styling */
select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6b7280 50%),
    linear-gradient(135deg, #6b7280 50%, transparent 50%);
  background-position:
    calc(100% - 18px) center,
    calc(100% - 12px) center;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

/* ---------- Buttons ---------- */

button {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--brand);
  color: #ffffff;
}

button.secondary {
  background: #6b7280;
}

button.danger {
  background: var(--danger);
  color: #ffffff;
}

/* ---------- Product Block ---------- */

.product-block {
  background: #f9fafb;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.product-block button.danger {
  width: 100%;
  margin-top: 12px;
}

/* ---------- Output / Status ---------- */

.output {
  margin-top: 12px;
  background: #eef2ff;
  padding: 12px;
  font-size: 13px;
  border-radius: 8px;
  word-break: break-word;
}

.status {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

.status.success {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

/* ---------- Utilities ---------- */

.muted {
  color: var(--muted);
  font-size: 14px;
}



.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.filters select,
.filters input {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.ordered { background:#e5f0ff; color:#003c8f; }
.badge.billed { background:#fff7e6; color:#9a6700; }
.badge.dispatched { background:#e6fffa; color:#00695c; }
.badge.delivered { background:#e8f5e9; color:#1b5e20; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal.hidden { display: none; }

.modal-card {
  background: #fff;
  width: 92%;
  max-width: 720px;
  border-radius: 14px;
  padding: 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.inventory-navbar {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.inv-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.inv-title {
  width: 140px;
  font-weight: 600;
  color: #444;
}

.inv-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inv-badge {
  background: #f1f3f6;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
}

.inv-badge span {
  background: #007bff;
  color: #fff;
  border-radius: 12px;
  padding: 2px 8px;
  margin-left: 6px;
  font-size: 12px;
}
