/* ==========================================================================
   KAAMKAZ INDIA (कामकाज इंडिया) - V7 ENTERPRISE MOBILE & WEB UI/UX SYSTEM
   Brand Promise: "QUICK SERVICE. NEAR YOU."
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Official Kaamkaz V7 Palette */
  --primary-blue: #0F4C81;
  --dark-blue: #0B3C5D;
  --light-blue: #EBF3FA;
  --accent-orange: #E85D04;
  --orange-hover: #D04F00;
  --text-dark: #1F2937;
  --text-muted: #6B7280;
  --bg-light: #F4F6FA;
  --white: #FFFFFF;
  --border-color: #E2E8F0;
  --verified-blue: #2563EB;
  --premium-gold: #D97706;
  --success-green: #16A34A;

  /* Shadows & Elevation */
  --shadow-sm: 0 2px 6px rgba(15, 76, 129, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 76, 129, 0.08);
  --shadow-lg: 0 14px 30px rgba(15, 76, 129, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Fonts */
  --font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout Standards */
  --app-max-width: 480px;
  --bottom-nav-height: 64px;
  --header-height: 62px;
}

/* Reset & Box Model */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: #0A1118;
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Standalone Desktop Outer Shell */
.web-app-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 10%, #0F3A60 0%, #060B12 100%);
  padding: 0;
}

@media (min-width: 540px) {
  .web-app-wrapper {
    padding: 24px 0;
  }
}

/* Smartphone Container */
.app-container {
  width: 100%;
  max-width: var(--app-max-width);
  height: 100vh;
  background-color: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
}

@media (min-width: 540px) {
  .app-container {
    height: 900px;
    max-height: 94vh;
    border-radius: 32px;
    border: 4px solid #1E293B;
  }
}

/* Screen Host & Scrolling */
.screen-host {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-light);
  -webkit-overflow-scrolling: touch;
}

.screen-host::-webkit-scrollbar {
  width: 4px;
}
.screen-host::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.screen {
  display: none;
  width: 100%;
  min-height: 100%;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  animation: fadeIn 0.22s ease-out forwards;
}

.screen.active {
  display: block;
}

.screen.no-nav {
  padding-bottom: 24px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Typography Standards */
h1, h2, h3, h4, h5 {
  font-family: var(--font-family);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
}

p {
  color: #4B5563;
  line-height: 1.45;
  font-size: 13.5px;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  height: var(--header-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brand-logo-img {
  height: 34px;
  object-fit: contain;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--dark-blue);
  line-height: 1;
}

.brand-title .brand-orange {
  color: var(--accent-orange);
}

.brand-title .brand-blue {
  color: var(--primary-blue);
}

.brand-subtitle {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--accent-orange);
  text-transform: uppercase;
}

.location-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--light-blue);
  border: 1px solid #BFDBFE;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-blue);
  cursor: pointer;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: #F1F5F9;
}

.icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent-orange);
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
}

/* ==========================================================================
   PERSISTENT BOTTOM NAVIGATION
   ========================================================================== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border-color);
  z-index: 100;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.04);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-item.active {
  color: var(--primary-blue);
}

.nav-item.active .nav-icon svg {
  stroke: var(--primary-blue);
  fill: rgba(15, 76, 129, 0.12);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
}

/* Role Switch Floating Bar */
.role-switch-floating {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-blue);
  color: var(--white);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  z-index: 150;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.role-pill {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  text-transform: uppercase;
}

.role-pill.consumer {
  background: var(--primary-blue);
}

.role-pill.vendor {
  background: var(--accent-orange);
}

/* ==========================================================================
   V7 BUTTONS & CONTROLS
   ========================================================================== */
.btn-primary {
  width: 100%;
  height: 48px;
  background: var(--primary-blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.25);
  transition: all 0.2s ease;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-orange {
  background: var(--accent-orange);
  box-shadow: 0 4px 12px rgba(232, 93, 4, 0.25);
}

.btn-orange:hover {
  background: var(--orange-hover);
}

.btn-secondary {
  width: 100%;
  height: 48px;
  background: var(--white);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: #F1F5F9;
}

.btn-sm {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   HOME SCREEN - SEARCH & CATEGORIES (V7 Grid)
   ========================================================================== */
.home-hero-search {
  padding: 16px;
  background: linear-gradient(180deg, var(--white) 0%, var(--light-blue) 100%);
  border-bottom: 1px solid var(--border-color);
}

.search-box-trigger {
  width: 100%;
  height: 50px;
  background: var(--white);
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-box-trigger:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.15);
}

.search-icon-svg {
  color: var(--primary-blue);
  flex-shrink: 0;
}

.search-placeholder-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.mic-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--light-blue);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Popular Chips Scroll */
.chips-scroll-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 2px;
  scrollbar-width: none;
}
.chips-scroll-wrap::-webkit-scrollbar {
  display: none;
}

.search-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-chip:hover {
  background: var(--light-blue);
  border-color: #93C5FD;
  color: var(--primary-blue);
}

/* 6-Step Explainer */
.how-it-works-section {
  padding: 16px;
  background: var(--white);
  margin: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--dark-blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-view-all {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-blue);
  cursor: pointer;
}

.steps-carousel-wrap {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.step-card {
  flex: 0 0 128px;
  background: var(--light-blue);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-number-badge {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--primary-blue);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
  font-size: 18px;
}

.step-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--dark-blue);
  line-height: 1.25;
}

/* Master Categories Grid (Symmetrical 4 Columns) */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 100px;
  justify-content: center;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: #93C5FD;
  box-shadow: var(--shadow-sm);
}

.cat-mascot-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

/* "Tell Us Your Need" Banner */
.tell-need-banner {
  margin: 12px 16px 16px;
  background: linear-gradient(135deg, #0B3C5D 0%, #0F4C81 100%);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-md);
}

.tell-need-title {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 2px;
}

.tell-need-desc {
  font-size: 11.5px;
  color: #BFDBFE;
  margin-bottom: 10px;
}

.tell-need-mascot {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

/* ==========================================================================
   MAP VIEW & INTERACTIVE LEAFLET SYSTEM
   ========================================================================== */
.map-screen-wrapper {
  width: 100%;
  height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
  position: relative;
}

#leafletMap, #trackingMap {
  width: 100%;
  height: 100%;
  z-index: 10;
}

.map-top-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.map-filter-chip {
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.map-filter-chip.active {
  background: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

/* Custom Mascot Map Pin */
.custom-map-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transform: translate(-50%, -100%);
}

.pin-bubble {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 3px solid var(--primary-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease;
}

.pin-bubble:hover {
  transform: scale(1.15);
}

.pin-priority .pin-bubble {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.35);
}

.pin-mascot {
  width: 34px;
  height: 34px;
}

.pin-v-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--primary-blue);
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 900;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
}

.pin-label {
  background: var(--dark-blue);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
  white-space: nowrap;
}

/* User Location Pin */
.user-map-pin {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--primary-blue);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 4px rgba(15, 76, 129, 0.4);
}

/* Draggable Map Bottom Sheet */
.map-bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 25px rgba(15, 76, 129, 0.15);
  z-index: 60;
  padding: 16px;
}

.sheet-drag-handle {
  width: 36px;
  height: 4px;
  background: #CBD5E1;
  border-radius: 2px;
  margin: 0 auto 10px;
}

/* ==========================================================================
   PROFESSIONAL CARDS & LIST RESULTS
   ========================================================================== */
.pro-list-container {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.pro-card.priority-card {
  border: 1.5px solid #93C5FD;
  background: linear-gradient(180deg, #F8FAFF 0%, #FFFFFF 100%);
}

.pro-card-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.pro-avatar-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--light-blue);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pro-info {
  flex: 1;
}

.pro-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pro-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--dark-blue);
}

.pro-title-sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}

.pro-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11.5px;
}

.rating-badge {
  background: #FEF3C7;
  color: #92400E;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
}

.distance-badge {
  color: var(--text-muted);
}

.pro-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.skill-tag {
  background: #F1F5F9;
  color: #334155;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
}

.pro-card-actions {
  display: flex;
  gap: 6px;
  border-top: 1px solid #F1F5F9;
  padding-top: 8px;
}

.btn-action-call {
  flex: 1;
  height: 36px;
  background: var(--primary-blue);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.btn-action-chat {
  flex: 1;
  height: 36px;
  background: var(--light-blue);
  color: var(--primary-blue);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.btn-action-ask {
  height: 36px;
  padding: 0 10px;
  background: var(--white);
  color: var(--accent-orange);
  border: 1px solid #FED7AA;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================= */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 60, 93, 0.6);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content-sheet {
  width: 100%;
  max-width: var(--app-max-width);
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding: 20px 16px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
