/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: #1a1a2e; background: #f8fafc; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
input, textarea, select { font-family: inherit; }

:root {
  --green: #1b5e20;
  --green-mid: #2e7d32;
  --green-light: #4caf50;
  --green-pale: #e8f5e9;
  --orange: #e65100;
  --orange-light: #f57c00;
  --border: #e5e7eb;
  --muted: #6b7280;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 6%;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green-pale); }
.brand-name { font-size: 1.3rem; font-weight: 900; color: var(--green-mid); display: block; line-height: 1.1; }
.brand-sub { font-size: 0.62rem; font-weight: 700; color: var(--orange-light); text-transform: uppercase; letter-spacing: 0.8px; display: block; }
.nav-right { display: flex; gap: 10px; align-items: center; }
.nav-seller { display: flex; gap: 10px; align-items: center; font-size: 0.88rem; font-weight: 700; color: var(--green-mid); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: #fff; padding: 10px 22px; border-radius: 25px;
  font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(46,125,50,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(46,125,50,0.4); }
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary.lg { padding: 14px 30px; font-size: 1rem; }
.btn-primary.sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-primary.full { width: 100%; justify-content: center; margin-top: 6px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--green-mid);
  border: 1.5px solid var(--green-light); border-radius: 25px;
  padding: 10px 22px; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--green-pale); }
.btn-outline.lg { padding: 14px 30px; font-size: 1rem; }
.btn-outline.sm { padding: 7px 16px; font-size: 0.82rem; }

/* ===== HERO ===== */
.hero {
  min-height: 88vh;
  background: linear-gradient(160deg, #f0fdf4 0%, #fafff5 50%, #fffbf0 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 60px 6%; gap: 48px;
}
.hero-content { flex: 1; max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: var(--green-mid); font-size: 0.78rem; font-weight: 800;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 20px;
  text-transform: uppercase; letter-spacing: 1px;
  border: 1px solid rgba(46,125,50,0.15);
}
.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900;
  line-height: 1.15; color: #0f172a; margin-bottom: 16px;
}
.hero-content h1 span {
  color: transparent;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  -webkit-background-clip: text; background-clip: text;
}
.hero-content p { font-size: 1rem; color: var(--muted); line-height: 1.8; margin-bottom: 20px; }
.hero-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.feature-item {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  font-size: 0.82rem; font-weight: 600; color: #0f172a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.hero-circle {
  width: 220px; height: 220px; border-radius: 50%;
  background: conic-gradient(from 180deg, #a5d6a7, #c8e6c9, #81c784, #a5d6a7);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 60px rgba(46,125,50,0.2);
  animation: float 5s ease-in-out infinite;
}
.hero-circle img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.hero-stats { display: flex; gap: 14px; }
.stat-card {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 16px; padding: 16px 20px; text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 1.6rem; font-weight: 900; color: var(--green-mid); }
.stat-label { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ===== FORM SECTION ===== */
.form-section {
  min-height: 100vh; padding: 40px 6%;
  background: linear-gradient(160deg, #f0fdf4, #fafff5);
  display: flex; align-items: flex-start; justify-content: center;
}
.form-card {
  background: #fff; border-radius: 24px;
  width: 100%; max-width: 680px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  padding: 36px 40px;
  animation: slideUp 0.4s ease;
}
.form-card.narrow { max-width: 440px; }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.form-header { text-align: center; margin-bottom: 28px; }
.form-icon { font-size: 2.8rem; margin-bottom: 10px; }
.form-header h2 { font-size: 1.6rem; font-weight: 900; color: #0f172a; margin-bottom: 6px; }
.form-header p { font-size: 0.88rem; color: var(--muted); }
.form-link { text-align: center; font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.form-link a { color: var(--green-mid); font-weight: 700; }

/* Step bar */
.step-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 6px; }
.step-bar { height: 4px; background: #e5e7eb; border-radius: 4px; margin-bottom: 24px; overflow: hidden; }
.step-fill { height: 100%; background: linear-gradient(90deg, var(--green-mid), var(--green-light)); border-radius: 4px; transition: width 0.4s ease; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 0.74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.field input, .field textarea, .field select {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 0.92rem; outline: none;
  transition: border 0.2s, box-shadow 0.2s; background: #fafafa;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green-light); background: #fff;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.1);
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.step-nav { display: flex; gap: 12px; margin-top: 8px; }
.step-nav .btn-primary, .step-nav .btn-outline { flex: 1; justify-content: center; }

/* ===== CATEGORIES ===== */
.cat-hint { font-size: 0.84rem; color: var(--muted); margin-bottom: 16px; line-height: 1.6; }
.cat-site-group { margin-bottom: 20px; }
.cat-site-label {
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--green-mid);
  background: var(--green-pale); border-radius: 8px;
  padding: 6px 12px; margin-bottom: 10px; display: inline-block;
}
.cat-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cat-card {
  border: 2px solid var(--border); border-radius: 14px;
  padding: 14px 10px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: #fafafa; user-select: none;
}
.cat-card:hover { border-color: var(--green-light); background: #f0fdf4; transform: translateY(-2px); }
.cat-card.selected {
  border-color: var(--green-mid); background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.15);
}
.cat-emoji { font-size: 1.8rem; margin-bottom: 6px; }
.cat-name { font-size: 0.8rem; font-weight: 800; color: #0f172a; margin-bottom: 3px; }
.cat-desc { font-size: 0.66rem; color: var(--muted); line-height: 1.4; margin-bottom: 6px; }
.cat-check {
  width: 20px; height: 20px; border-radius: 50%;
  background: #e5e7eb; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; transition: all 0.2s;
}
.cat-card.selected .cat-check { background: var(--green-mid); color: #fff; }
.cat-selected-label { font-size: 0.84rem; font-weight: 700; color: var(--green-mid); margin: 10px 0 16px; }

/* ===== DASHBOARD ===== */
.dashboard { padding: 40px 6%; max-width: 900px; margin: 0 auto; }

/* Partner Card */
.partner-card {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
  border-radius: 24px; padding: 28px;
  color: #fff; box-shadow: 0 20px 60px rgba(27,94,32,0.4);
  margin-bottom: 20px; position: relative; overflow: hidden;
}
.partner-card::before {
  content: ''; position: absolute; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  top: -80px; right: -60px; border-radius: 50%; pointer-events: none;
}
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.card-logo { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,0.4); flex-shrink: 0; }
.card-logo img { width: 100%; height: 100%; object-fit: cover; }
.card-brand-name { font-size: 1rem; font-weight: 900; color: #fff; }
.card-brand-sub { font-size: 0.65rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.8px; }
.card-badge {
  margin-left: auto; background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4); border-radius: 20px;
  padding: 4px 14px; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.5px; color: #fff;
}
.card-badge.pending { background: rgba(251,191,36,0.25); border-color: rgba(251,191,36,0.5); color: #fde68a; }
.card-body { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.card-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: 3px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 900; color: #fff; flex-shrink: 0;
}
.card-name { font-size: 1.2rem; font-weight: 900; color: #fff; margin-bottom: 2px; }
.card-shop { font-size: 0.82rem; color: rgba(255,255,255,0.85); margin-bottom: 2px; }
.card-area { font-size: 0.78rem; color: rgba(255,255,255,0.7); margin-bottom: 2px; }
.card-phone { font-size: 0.82rem; color: rgba(255,255,255,0.85); }
.card-cats-label { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.6); margin-bottom: 8px; }
.card-cats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.card-cat-tag {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px; padding: 4px 12px; font-size: 0.72rem; font-weight: 700; color: #fff;
}
.card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.2); }
.card-id { font-size: 0.72rem; color: rgba(255,255,255,0.6); font-family: monospace; }
.card-since { font-size: 0.72rem; color: rgba(255,255,255,0.6); }

/* Info banner */
.info-banner {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fffbeb; border: 1.5px solid #fde68a;
  border-radius: 14px; padding: 14px 16px; margin-bottom: 20px;
  font-size: 0.84rem; color: #78350f; line-height: 1.6;
}
.info-icon { font-size: 1.2rem; flex-shrink: 0; }
.info-text strong { color: #92400e; }

/* Dashboard actions */
.dash-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.dash-btn {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px 20px;
  font-size: 0.88rem; font-weight: 700; color: #0f172a;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.dash-btn:hover { border-color: var(--green-light); background: var(--green-pale); color: var(--green-mid); transform: translateY(-2px); }
.dash-btn svg { width: 16px; height: 16px; }
.dash-btn.highlight {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: var(--green-light); color: var(--green-mid);
}
.dash-btn.highlight:hover { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }

/* Edit panels */
.edit-panel {
  background: #fff; border-radius: 20px; padding: 28px;
  box-shadow: var(--shadow); margin-bottom: 24px;
  border: 1.5px solid var(--border);
  animation: slideUp 0.3s ease;
}
.edit-panel h3 { font-size: 1.1rem; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.edit-panel > p { font-size: 0.84rem; color: var(--muted); margin-bottom: 16px; line-height: 1.6; }

/* Product request panel */
.request-panel { border-color: var(--green-light); }
.request-note {
  display: flex; align-items: flex-start; gap: 10px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 10px; padding: 12px 14px;
  font-size: 0.8rem; color: #166534; line-height: 1.6;
  margin: 12px 0 16px;
}
.request-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; stroke: #16a34a; }

/* ===== ASSIGNED ORDERS ===== */
.orders-section {
  background: #fff; border-radius: 20px; padding: 24px 28px;
  box-shadow: var(--shadow); margin-bottom: 24px;
  border: 1.5px solid var(--border);
}
.orders-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.orders-header h3 { font-size: 1.1rem; font-weight: 800; color: #0f172a; }
.orders-hint { font-size: 0.82rem; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.orders-empty, .orders-loading {
  text-align: center; padding: 32px 20px;
  font-size: 0.88rem; color: var(--muted);
  background: #fafafa; border-radius: 12px;
  border: 1.5px dashed var(--border);
}
.order-card {
  border: 1.5px solid var(--border); border-radius: 16px;
  padding: 16px; margin-bottom: 14px;
  background: #fafafa; transition: box-shadow 0.2s;
}
.order-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.order-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.order-source {
  color: #fff; font-size: 0.65rem; font-weight: 800;
  padding: 2px 8px; border-radius: 8px; text-transform: uppercase;
  letter-spacing: 0.4px; margin-right: 6px;
}
.order-id { font-size: 0.82rem; font-weight: 800; color: #0f172a; margin-right: 8px; }
.order-date { font-size: 0.74rem; color: var(--muted); }
.order-status {
  font-size: 0.72rem; font-weight: 800; padding: 3px 10px;
  border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.order-items { font-size: 0.8rem; color: #374151; margin-bottom: 6px; line-height: 1.5; }
.order-total { font-size: 0.84rem; color: var(--green-mid); margin-bottom: 8px; }
.order-customer {
  background: #f0fdf4; border-radius: 10px; padding: 8px 12px;
  font-size: 0.8rem; color: #374151; line-height: 1.7; margin-bottom: 12px;
}
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.status-btn {
  padding: 7px 14px; border-radius: 20px; font-size: 0.78rem;
  font-weight: 700; border: none; cursor: pointer; transition: all 0.2s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.status-btn.accept  { background: #dbeafe; color: #1e40af; }
.status-btn.pickup  { background: #fef9c3; color: #854d0e; }
.status-btn.deliver { background: #dcfce7; color: #15803d; }
.status-btn.call    { background: #f3f4f6; color: #374151; }
.status-btn:hover   { opacity: 0.8; transform: translateY(-1px); }
.status-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.delivered-badge {
  background: #dcfce7; color: #15803d;
  padding: 7px 14px; border-radius: 20px;
  font-size: 0.78rem; font-weight: 700;
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  color: #fff; padding: 12px 24px; border-radius: 25px;
  font-size: 0.88rem; font-weight: 600; z-index: 9999;
  opacity: 0; transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== PRINT ===== */
@media print {
  body > *:not(.dashboard) { display: none !important; }
  .dashboard > *:not(.partner-card) { display: none !important; }
  .partner-card { box-shadow: none; margin: 0; max-width: 400px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 40px 5%; min-height: auto; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-features { justify-content: center; }
  .hero-visual { width: 100%; }
  .form-card { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .cat-site-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard { padding: 24px 4%; }
  .dash-actions { flex-direction: column; }
  .dash-btn { width: 100%; }
  .card-body { flex-direction: column; text-align: center; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 480px) {
  .navbar { padding: 10px 4%; }
  .brand-name { font-size: 1.1rem; }
  .cat-site-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
