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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f3;
  color: #1a1a1a;
  font-size: 14px;
}

#root { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  background: white;
  border-bottom: 1px solid #e5e5e3;
  padding: 0 1.25rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1D9E75;
}

.tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid #e5e5e3;
  padding: 0 1.25rem;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab.active {
  color: #1a1a1a;
  border-bottom-color: #1D9E75;
  font-weight: 500;
}

.body { padding: 16px; flex: 1; }

.card {
  background: white;
  border: 1px solid #e5e5e3;
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e5e3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}

.btn-primary {
  background: #1D9E75;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #e5e5e3;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
}

.pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.pill-scheduled { background: #E6F1FB; color: #0C447C; }
.pill-transit    { background: #FAEEDA; color: #633806; }
.pill-delivered  { background: #E1F5EE; color: #085041; }
.pill-issue      { background: #FCEBEB; color: #791F1F; }
.pill-ready      { background: #EAF3DE; color: #27500A; }
.pill-pickedup   { background: #E1F5EE; color: #085041; }
.pill-pending    { background: #F1EFE8; color: #5F5E5A; }

.order-card {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0ee;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.order-card:last-child { border-bottom: none; }
.order-name { font-weight: 500; font-size: 14px; }
.order-meta { font-size: 12px; color: #888; }

.order-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.sbtn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid;
}

.sbtn-way    { border-color: #EF9F27; color: #633806; background: #FAEEDA; }
.sbtn-done   { border-color: #1D9E75; color: #085041; background: #E1F5EE; }
.sbtn-issue  { border-color: #E24B4A; color: #791F1F; background: #FCEBEB; }
.sbtn-ready  { border-color: #639922; color: #27500A; background: #EAF3DE; }

.map-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #E6F1FB;
  color: #0C447C;
  border: 1px solid #85B7EB;
  text-decoration: none;
  cursor: pointer;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f3;
}

.login-card {
  background: white;
  border: 1px solid #e5e5e3;
  border-radius: 16px;
  padding: 32px 28px;
  width: 340px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.login-brand-name { font-size: 17px; font-weight: 600; }

.form-group { margin-bottom: 14px; }
.form-group label { font-size: 12px; color: #888; display: block; margin-bottom: 5px; }
.form-group input {
  width: 100%;
  font-size: 14px;
  border: 1px solid #e5e5e3;
  border-radius: 8px;
  padding: 9px 11px;
}

.form-group input:focus { outline: none; border-color: #1D9E75; }

.error-msg {
  background: #FCEBEB;
  color: #791F1F;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  margin-bottom: 12px;
  display: none;
}

.info-msg {
  background: #E6F1FB;
  color: #0C447C;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  margin-bottom: 14px;
}

.hint { font-size: 11px; color: #aaa; text-align: center; margin-top: 10px; }

.stats-row { display: flex; gap: 8px; margin-bottom: 12px; }
.stat {
  flex: 1;
  background: #f5f5f3;
  border-radius: 8px;
  padding: 10px 12px;
}
.stat-n { font-size: 22px; font-weight: 600; }
.stat-l { font-size: 11px; color: #888; margin-top: 2px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.otp-input {
  letter-spacing: 0.3em;
  font-size: 22px;
  text-align: center;
}

select {
  font-size: 13px;
  border: 1px solid #e5e5e3;
  border-radius: 8px;
  padding: 5px 8px;
  background: white;
  color: #1a1a1a;
}

.role-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 500;
}