:root {
  --orange: #E87722;
  --black: #1A1A1A;
  --charcoal: #2C2C2C;
  --grey: #777777;
  --cream: #FAFAF7;
  --ltgrey: #EEEEEE;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
}

header.brand {
  background: var(--black);
  color: var(--white);
  padding: 18px 24px;
  border-bottom: 3px solid var(--orange);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

header.brand .brand-name {
  color: var(--orange);
  font-weight: bold;
  letter-spacing: 2px;
  font-size: 13px;
  text-transform: uppercase;
}

header.brand h1 {
  margin: 2px 0 0;
  font-size: 22px;
}

header.brand .tagline {
  color: var(--grey);
  font-style: italic;
  font-size: 13px;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar input[type="text"],
.toolbar select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.spacer { flex: 1; }

button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: bold;
}

button.primary {
  background: var(--orange);
  color: var(--white);
}

button.primary:hover { background: #cf6710; }

button.secondary {
  background: var(--white);
  color: var(--charcoal);
  border: 1px solid #ccc;
}

button.secondary:hover { background: var(--ltgrey); }

button.danger {
  background: var(--white);
  color: #b3261e;
  border: 1px solid #e5b6b2;
  padding: 6px 10px;
  font-size: 12px;
}

button.link {
  background: transparent;
  color: var(--orange);
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid var(--orange);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 13px;
}

thead th {
  background: var(--black);
  color: var(--white);
  text-align: left;
  padding: 10px 8px;
  position: sticky;
  top: 0;
}

tbody td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--ltgrey);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: var(--ltgrey); }
tbody tr:nth-child(odd) { background: var(--cream); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
}

.pill.pickup { background: #e6f2e6; color: #2e7d32; }
.pill.delivered { background: #fff2e0; color: var(--orange); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--grey);
}

.row-actions {
  display: flex;
  gap: 6px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal {
  background: var(--white);
  border-radius: 6px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-top: 4px solid var(--orange);
}

.modal h2 {
  margin-top: 0;
  font-size: 18px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
  color: var(--charcoal);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .field { flex: 1; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.hidden { display: none !important; }

.status-msg {
  font-size: 13px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 4px;
}

.status-msg.error { background: #fdecea; color: #b3261e; }
.status-msg.success { background: #e6f2e6; color: #2e7d32; }

footer.brand {
  text-align: center;
  color: var(--grey);
  font-size: 12px;
  padding: 20px;
}
