.orders-app {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --accent: #d4a373;
}

.orders-header {
  background: linear-gradient(135deg, #2d6a4f, #40916c);
}

.orders-tabs {
  grid-template-columns: repeat(3, 1fr);
}

.app-tagline {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-top: 6px;
}

.draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.draft-header h2 { margin-bottom: 0; }

.draft-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.draft-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.draft-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafbfc;
}

.draft-item-main strong { display: block; font-size: 0.92rem; }
.draft-item-meta, .draft-item-jan {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.draft-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.qty-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.qty-input { width: 72px; margin-left: 6px; padding: 6px 8px; }
.btn-sm { padding: 6px 10px; font-size: 0.78rem; }

.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eee;
  color: var(--text-muted);
}

.badge-ok {
  background: rgba(42, 157, 143, 0.15);
  color: var(--success);
}

.badge-sale {
  background: rgba(212, 163, 115, 0.2);
  color: #9a6b2f;
  font-size: 0.68rem;
  vertical-align: middle;
}

.history-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

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

.history-card.review-highlight {
  box-shadow: 0 0 0 2px var(--primary);
}

.app-link {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
}

.app-link:first-of-type { margin-top: 0; }

.notice-card {
  background: rgba(45, 106, 79, 0.08);
  border: 1px solid rgba(45, 106, 79, 0.2);
}

.notice-text {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
  color: var(--primary);
  font-weight: 600;
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.picker-breadcrumb {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
  flex: 1;
}

.item-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.picker-options-scroll {
  max-height: min(50vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  background: #fafbfc;
}

.picker-options-scroll .suggestion-btn {
  width: 100%;
}

.suggestion-btn-recent {
  border-color: var(--primary);
  background: rgba(45, 106, 79, 0.08);
  font-weight: 600;
}

#picker-options .empty-state {
  margin: 0;
  padding: 12px;
  font-size: 0.85rem;
}

.jan-details {
  margin-top: 12px;
  font-size: 0.88rem;
}

.jan-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
}

.jan-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

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

.jan-row .btn {
  flex-shrink: 0;
  align-self: center;
}
