/* Modern, Mobile-First Design System for KopiOTH */
:root {
  --primary: #d97706;
  --primary-dark: #b45309;
  --primary-light: #fef3c7;
  --accent: #059669;
  --accent-light: #d1fae5;
  --bg: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 15% 15%, rgba(217, 119, 6, 0.12) 0%, transparent 40%),
                    radial-gradient(circle at 85% 85%, rgba(5, 150, 105, 0.1) 0%, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  padding: 16px 16px 120px 16px;
  line-height: 1.5;
}

.container {
  max-width: 520px;
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 4px 0;
}

.header h1 {
  font-size: 1.45rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  line-height: 1.2;
}

.pipeline-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  flex-wrap: nowrap;
}

.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.pill-vd {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}

.pill-oth {
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #fbbf24;
}

.pill-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.refresh-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.refresh-btn:hover, .refresh-btn:active {
  background: rgba(255, 255, 255, 0.16);
}

/* Summary Banner */
.stats-banner {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.stat-item .value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
}

.stat-item .value.accent {
  color: #34d399;
}

/* Section Title */
.section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
}

.section-link {
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: background 0.15s ease;
}

.section-link:active {
  background: rgba(56, 189, 248, 0.2);
}

/* Order List */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.order-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.order-card:active {
  transform: scale(0.99);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.drink-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.drink-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
  margin-top: 3px;
}

.drink-qty {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.drink-price {
  font-size: 0.9rem;
  color: #34d399;
  font-weight: 600;
  text-align: right;
  margin-top: 4px;
}

/* Names tags */
.names-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.name-chip {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.name-chip.checked {
  text-decoration: line-through;
  opacity: 0.4;
  background: rgba(255, 255, 255, 0.02);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px dashed var(--card-border);
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Floating Action Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--card-border);
  z-index: 100;
}

.bottom-bar-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.primary-btn {
  flex: 1;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  padding: 15px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.primary-btn:active {
  transform: scale(0.98);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary Button / Alternative options */
.secondary-actions {
  margin-top: 24px;
  text-align: center;
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #34d399;
  color: #34d399;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(5px);
}
