/* ============================================
   BENTO LAUNDRY UI - MODERN SOFT MINIMAL
   Style: Bento Grid, Pastel Colors, Squircles
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
}

:root {
  /* Brand Colors (Light Minimalist) */
  --primary: #9ce25a;
  /* Vivid light green from reference */
  --primary-bg: #E6F8CE;

  /* Reference Semantic Colors */
  --bg-bento-blue: #F0FBFA;
  /* Very light cyan/blue */
  --text-bento-blue: #1C79A7;

  --bg-bento-orange: #FFF0E0;
  /* Peach from reference */
  --text-bento-orange: #E66A23;

  --bg-bento-green: #E8FCE1;
  --text-bento-green: #2B7A42;

  --bg-bento-purple: #F6F0FF;
  /* Light purple from reference */
  --text-bento-purple: #743BA6;

  /* Default Status Colors */
  --bg-success: #E8FCE1;
  --text-success: #2B7A42;

  --bg-warning: #FFF0E0;
  --text-warning: #E66A23;

  --bg-danger: #fee2e2;
  --text-danger: #991b1b;

  --bg-info: #F0FBFA;
  --text-info: #1C79A7;

  --bg-purple: #F6F0FF;
  --text-purple: #743BA6;

  /* Neutrals */
  --bg-app: #F5F6FA;
  /* slightly greyish background */
  --bg-card: #ffffff;
  /* pure white cards */
  --text-main: #1D2330;
  /* Very dark slate */
  --text-muted: #8AA0A3;
  /* Lighter grey for subtitles */
  --border: #F1F4F9;

  /* Shapes & Shadows */
  --radius-sm: 16px;
  --radius-md: 28px;
  /* Slightly rounder cards */
  --radius-lg: 32px;

  --shadow-soft: 0 16px 32px -12px rgba(0, 0, 0, 0.04);
  /* very soft shadow */
  --shadow-card: 0 8px 20px -8px rgba(0, 0, 0, 0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  padding-bottom: 100px;
}

/* ============================================
   FILTER PILLS (Horizontal Scroll)
   ============================================ */
.filter-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 4px 4px 16px 4px;
  /* Space for shadow */
  margin-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  /* Pill shape */
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.filter-pill .icon {
  font-size: 1.1rem;
}

.filter-pill.active {
  background: var(--text-main);
  /* Black/Dark active like reference or Primary */
  color: white;
  border-color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-pill:active {
  transform: scale(0.95);
}

/* Badge on Pill */
.filter-pill .count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--bg-app);
  /* Match background to cutout */
}

/* ============================================
   HEADER (Polos Minimalis)
   ============================================ */
/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.app-header {
  padding: 24px 24px 0 24px;
  background: transparent;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* Align top for better multiline handling */
  margin-bottom: 24px;
}

.header-content {
  flex: 1;
}

.app-header .greeting,
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.app-header .subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.profile-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 16px;
}

.back-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-card);
  margin-right: 16px;
  /* Space between back btn and title if inline */
}

/* ============================================
   BENTO GRID SYSTEM
   ============================================ */
.app-main {
  padding: 0 24px 120px 24px;
  max-width: 600px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* 2 Column Grid */
  gap: 16px;
  margin-bottom: 32px;
}

/* Base Bento Card */
.bento-card {
  padding: 20px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  /* Uniform height */
  transition: transform 0.2s;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.bento-card:active {
  transform: scale(0.96);
}

/* Color Variations */
.bento-card.primary {
  background: var(--bg-bento-blue);
  color: var(--text-bento-blue);
}

.bento-card.warning {
  background: var(--bg-bento-orange);
  color: var(--text-bento-orange);
}

.bento-card.success {
  background: var(--bg-bento-green);
  color: var(--text-bento-green);
}

.bento-card.danger {
  background: var(--bg-danger);
  color: var(--text-danger);
}

.bento-card.purple {
  background: var(--bg-bento-purple);
  color: var(--text-bento-purple);
}

.bento-card .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.bento-card .label {
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 4px;
}

.bento-card .value {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
}

/* ============================================
   ORDER LIST CARDS (Clean List)
   ============================================ */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-action {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.order-card,
.card,
.card-section {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.card-header {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-section h3,
.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
}

.timeline {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.timeline-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
}

.timeline-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.order-card:active {
  transform: scale(0.98);
  background: #fafafa;
}

.order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-code {
  font-weight: 700;
  color: var(--text-main);
  font-size: 1rem;
}

.order-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.customer-name {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.customer-phone {
  display: none;
}

/* Hide phone in list to keep clean */

.order-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Modern Pills for Status */
.status-badge {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Re-map old status classes to new vars */
.status-new {
  background: var(--bg-purple);
  color: var(--text-purple);
}

.status-washing {
  background: var(--bg-info);
  color: var(--text-info);
}

.status-picked_up {
  background: var(--bg-warning);
  color: var(--text-warning);
}

.status-ready {
  background: var(--bg-success);
  color: var(--text-success);
}

.status-delivered {
  background: #e2e8f0;
  color: #475569;
}

/* ============================================
   BOTTOM NAV (Clean Minimalist - Reference Style)
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 10px 8px 18px 8px;
  border-top: 1px solid #f0f0f0;
  border-radius: 24px 24px 0 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  max-width: 600px;
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #aab0be;
  gap: 4px;
  transition: all 0.2s;
  flex: 1;
  padding: 4px 0;
}

.nav-item .nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

/* Icon wrapper — grey by default, green circle when active */
.nav-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.nav-item .nav-icon {
  transition: stroke 0.2s;
}

/* Active state: light green circle bg + green icon + green label */
.nav-item.active .nav-icon-wrapper {
  background: var(--primary-bg);
}

.nav-item.active .nav-icon {
  stroke: var(--primary);
}

.nav-item.active .nav-label {
  color: #4a7c2e;
  font-weight: 700;
}

.nav-item:active {
  transform: scale(0.92);
}

/* Center Scan Button */
.nav-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scan-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  /* Full circle! */
  background: var(--primary);
  /* Vibrant green */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(156, 226, 90, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  transform: translateY(-10px);
  /* Slightly raised */
}

.scan-wrapper svg {
  stroke: #3a6e10;
  /* Dark green so it contrasts with light-green bg */
}

.nav-center:active .scan-wrapper {
  transform: translateY(-8px) scale(0.94);
  box-shadow: 0 3px 10px rgba(156, 226, 90, 0.3);
}

/* Add Order button in nav (admin) */
.add-nav-btn {
  background: #1D2330;
  /* Dark circle */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.add-nav-btn:hover {
  background: #343e52;
}


/* ============================================
   SCANNER SPECIFIC
   ============================================ */
#step-1 .status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.status-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-card);
}

.status-btn:active {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   BUTTONS & INPUTS
   ============================================ */
.btn {
  padding: 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--text-main);
  /* Black/Dark Button */
  color: white;
  box-shadow: var(--shadow-card);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-main);
}

.form-select,
.form-input {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 16px;
  font-family: inherit;
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
  display: none !important;
}

.fab {
  position: fixed;
  bottom: 84px;
  right: 20px;
  width: 64px;
  height: 64px;
  background: #6366f1;
  /* purple-blue */
  color: white;
  border-radius: 50%;
  border: none;
  font-size: 32px;
  font-weight: 300;
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  /* Ensure above bottom nav */
}

.btn-circle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
}

/* ============================================
   HORIZONTAL SCROLL & BENTO UTILS (APPENDED)
   ============================================ */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 4px 4px 20px 4px;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap !important;
  /* Force nowrap */
  width: 100%;
  /* Force full width */
  overflow-y: hidden;
  /* Prevent vertical scroll */
  white-space: nowrap;
  /* Fallback */
}

/* Ensure direct children don't shrink */
.horizontal-scroll>* {
  flex-shrink: 0;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.horizontal-scroll .order-card {
  min-width: 280px;
  max-width: 280px;
  /* Fixed width */
  margin-bottom: 0;
}

.bento-grid-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 3 Columns for compact look */
  gap: 12px;
  margin-bottom: 24px;
}

.bento-nav-item {
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid transparent;
  box-shadow: var(--shadow-card);
  transition: all 0.2s;
  cursor: pointer;
}

.bento-nav-item:active {
  transform: scale(0.98);
}

.bento-nav-item.active {
  border-color: var(--primary);
  background: var(--bg-info);
  box-shadow: 0 0 0 2px var(--primary-bg);
}

.bento-nav-icon {
  font-size: 1.25rem;
  margin-bottom: 4px;
  display: block;
}

.bento-nav-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-main);
}

/* Notification Badges (Appended) */
.count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  /* Red-500 */
  color: white;
  font-size: 10px;
  font-weight: bold;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 10;
  padding: 0 6px;
}

.bento-nav-item {
  position: relative;
  /* Ensure badge positions relative to this */
}