/* =====================================================================
   DESIGN WALLS — ZOHO-STYLE COMPACT ADMIN PORTAL
   Aesthetics: High-density, Clean SaaS, Ultra-Crisp Borders, No Bloat
   ===================================================================== */

:root {
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sidebar-bg: #1E3228;
  --sidebar-hover: #274033;
  --sidebar-active: #2F4A3C;
  --sidebar-text: #A5ABA3;
  --sidebar-text-active: #FFFFFF;
  
  --bg-main: #F4F2EE;
  --bg-surface: #FFFFFF;
  --border-color: #E6E2DB;
  --border-light: #F0ECE6;

  --text-main: #1D211E;
  --text-secondary: #6E726C;
  --text-muted: #8F938D;

  --primary: #2F4A3C;
  --primary-hover: #1E3228;
  --primary-light: #E9EFEA;

  --success: #2E7D5B;
  --success-bg: #E6F4EA;
  --warning: #A8680F;
  --warning-bg: #FEF7E0;
  --danger: #B3382C;
  --danger-bg: #FCE8E6;
  --info: #426A8A;
  --info-bg: #E8F0FE;

  --shadow-sm: 0 1px 3px 0 rgba(47, 74, 60, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(47, 74, 60, 0.08), 0 2px 4px -1px rgba(47, 74, 60, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =====================================================================
   LEFT SIDEBAR (Zoho Style - Compact 200px Width & Original Logo)
   ===================================================================== */
.sidebar {
  width: 200px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid #283C31;
  user-select: none;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 100;
}

.sidebar-header {
  height: 58px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  border-bottom: 1px solid #283C31;
}

.sidebar-logo-container {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-logo-card {
  display: inline-flex;
  align-items: center;
  background: #FFFFFF;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.sidebar-logo-img {
  height: 28px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
  filter: none !important; /* Original authentic Design Walls colors: Crimson red DW icon and black lettering */
}

.sidebar-mini-logo {
  display: none;
  width: 34px;
  height: 34px;
  background: #E5232A; /* Design Walls Brand Crimson Red */
  color: #FFFFFF;
  font-weight: 800;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(229, 35, 42, 0.35);
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  margin: 0 auto;
}

.sidebar-collapse-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #A5ABA3;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.btn-sidebar-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-sidebar-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* MINIMIZED SIDEBAR STATE */
.sidebar.minimized {
  width: 60px;
}

.sidebar.minimized .sidebar-logo-card,
.sidebar.minimized .sidebar-logo-img,
.sidebar.minimized .sidebar-collapse-btn,
.sidebar.minimized .nav-section-title,
.sidebar.minimized .nav-item span:not(.nav-icon),
.sidebar.minimized .badge-count,
.sidebar.minimized .user-meta {
  display: none !important;
}

.sidebar.minimized .sidebar-mini-logo {
  display: flex !important;
}

.sidebar.minimized .sidebar-header {
  padding: 0;
  justify-content: center;
}

.sidebar.minimized .nav-menu {
  padding: 10px 4px;
}

.sidebar.minimized .nav-item {
  justify-content: center;
  padding: 10px 0;
  position: relative;
}

.sidebar.minimized .nav-icon {
  margin: 0;
  width: 18px;
  height: 18px;
}

.sidebar.minimized .sidebar-footer {
  padding: 10px 4px;
  display: flex;
  justify-content: center;
}

.sidebar.minimized .avatar-circle {
  margin: 0 auto;
}

/* Hover Floating Tooltip on Minimized Nav Items */
.sidebar.minimized .nav-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 66px;
  top: 50%;
  transform: translateY(-50%);
  background: #1E3228;
  color: #FFFFFF;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid #3F6352;
  pointer-events: none;
  z-index: 9999;
}

.nav-menu {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 1px;
  padding: 12px 10px 4px;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--sidebar-text);
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  transition: all 0.15s ease;
  text-align: left;
}

.nav-item:hover {
  background-color: var(--sidebar-hover);
  color: #FFFFFF;
}

.nav-item.active {
  background-color: var(--sidebar-active);
  color: #FFFFFF;
  font-weight: 600;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.badge-count {
  margin-left: auto;
  background-color: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid #283C31;
  background-color: #16261E;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2F4A3C, #3F6352);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11.5px;
  border: 1px solid #3F6352;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
}

.user-role {
  color: #64748B;
  font-size: 11px;
}

/* =====================================================================
   MAIN CONTENT & TOPBAR
   ===================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-main);
}

.topbar {
  height: 60px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.live-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.live-dot {
  width: 7px;
  height: 7px;
  background-color: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.date-selector input[type="date"] {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-main);
  background: transparent;
}

/* =====================================================================
   BUTTONS & CONTROLS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-icon {
  width: 14px;
  height: 14px;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
}

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

.btn-secondary {
  background-color: #FFFFFF;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background-color: #F1F5F9;
  color: var(--text-main);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11.5px;
}

.btn-outline-success {
  background: #FFFFFF;
  border-color: #86EFAC;
  color: #16A34A;
}
.btn-outline-success:hover { background: #DCFCE7; }

.btn-outline-warning {
  background: #FFFFFF;
  border-color: #FDE68A;
  color: #D97706;
}
.btn-outline-warning:hover { background: #FEF3C7; }

.btn-outline-info {
  background: #FFFFFF;
  border-color: #BAE6FD;
  color: #0284C7;
}
.btn-outline-info:hover { background: #E0F2FE; }

.btn-outline-danger {
  background: #FFFFFF;
  border-color: #FECACA;
  color: #DC2626;
}
.btn-outline-danger:hover { background: #FEE2E2; }

/* =====================================================================
   VIEW CONTAINERS
   ===================================================================== */
.view-container {
  flex: 1;
  padding: 18px 24px;
  overflow-y: auto;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* =====================================================================
   SECTION HEADERS (Zoho Style Clean Headings)
   ===================================================================== */
.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.25;
}

.section-desc {
  font-size: 13px;
  color: #64748B;
  margin: 0;
  line-height: 1.4;
}

/* =====================================================================
   COMPACT ZOHO KPI STRIP (No Extra Large Cards)
   ===================================================================== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-chip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.kpi-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.kpi-num {
  font-size: 20px;
  font-weight: 700;
}

.text-slate { color: #0F172A; }
.text-emerald { color: #16A34A; }
.text-blue { color: #2563EB; }
.text-amber { color: #D97706; }
.text-rose { color: #DC2626; }
.text-slate-muted { color: #94A3B8; }

/* =====================================================================
   ZOHO DATA TABLES & TOOLBAR
   ===================================================================== */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.toolbar-search {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 12px;
  width: 320px;
}

.search-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  margin-right: 8px;
}

.toolbar-search input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 12.5px;
  width: 100%;
}

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

/* =====================================================================
   UNIVERSAL FORM CONTROLS & GRID SYSTEM (Zoho SaaS High-Density)
   ===================================================================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 16px;
  width: 100%;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  line-height: 1.2;
}

.form-input,
.form-select {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  background-color: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus,
.form-select:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-input[readonly] {
  background-color: #F8FAFC;
  color: #64748B;
  cursor: not-allowed;
  border-color: #E2E8F0;
}

.form-input::placeholder {
  color: #94A3B8;
  font-size: 12.5px;
}

.input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.input-with-action .form-input {
  flex: 1;
  min-width: 0;
}

.input-with-action .btn {
  height: 38px;
  padding: 0 16px;
  white-space: nowrap;
}

.form-group-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-group-inline label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.form-group-inline .form-input {
  width: auto;
}

.toolbar-actions .form-select {
  height: 32px;
  padding: 4px 10px;
  font-size: 12px;
  width: auto;
}

.table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.zoho-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
  min-width: 880px;
}

.zoho-table thead th {
  background-color: #F4F2EE;
  color: #1D211E;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.zoho-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.zoho-table tbody tr:hover {
  background-color: #F9F8F6;
}

/* Sticky Action Column across all tables for full accessibility on all screen sizes */
.zoho-table th:last-child,
.zoho-table td:last-child {
  position: sticky;
  right: 0;
  background: #FFFFFF;
  z-index: 5;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  min-width: 130px;
  text-align: right;
}

.zoho-table thead th:last-child {
  background: #F4F2EE;
  z-index: 6;
}

.zoho-table tbody tr:hover td:last-child {
  background: #F9F8F6;
}

.emp-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emp-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #E2E8F0;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emp-info {
  display: flex;
  flex-direction: column;
}

.emp-name {
  font-weight: 600;
  color: var(--text-main);
}

.emp-code {
  font-size: 11px;
  color: var(--text-muted);
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.status-working {
  background-color: #DCFCE7;
  color: #15803D;
}

.status-break {
  background-color: #FEF3C7;
  color: #B45309;
}

.status-out {
  background-color: #F1F5F9;
  color: #475569;
}

.status-absent {
  background-color: #FEE2E2;
  color: #B91C1C;
}

.status-late {
  display: inline-block;
  background-color: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #E11D48;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
}

.accuracy-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #F1F5F9;
  color: #475569;
}

.loading-cell {
  text-align: center;
  padding: 30px !important;
  color: var(--text-muted);
  font-style: italic;
}

/* =====================================================================
   LIVE ATTENDANCE: CLEAN ZOHO TOOLBAR & OPEN MAP VIEW
   ===================================================================== */
.attendance-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  gap: 12px;
  flex-wrap: wrap;
}

.attendance-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attendance-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-mode-switcher {
  display: inline-flex;
  align-items: center;
  background-color: #F1F5F9;
  padding: 3px;
  border-radius: 6px;
  gap: 3px;
  border: 1px solid #E2E8F0;
  width: fit-content;
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mode-btn:hover {
  color: #0F172A;
  background-color: rgba(255, 255, 255, 0.6);
}

.mode-btn.active {
  background-color: #FFFFFF;
  color: #2563EB;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.map-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.geofence-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #1E40AF;
  white-space: nowrap;
}

.map-layout-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  height: 540px;
  margin-bottom: 14px;
}

.map-canvas-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.attendance-map {
  width: 100%;
  height: 100%;
  min-height: 480px;
  background: #E2E8F0;
}

.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  gap: 12px;
  z-index: 999;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  border: 1px solid var(--border-color);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-circle {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.bg-green { background-color: #16A34A; }
.bg-amber { background-color: #D97706; }
.bg-blue { background-color: #2563EB; }
.bg-red { background-color: #DC2626; }

.direct-location-sidebar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sidebar-card-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: #F8FAFC;
}

.sidebar-card-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.sidebar-card-header .subtext {
  font-size: 11px;
  color: var(--text-muted);
}

.location-cards-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.location-item-card {
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.location-item-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.location-item-card.selected {
  border-color: var(--primary);
  background-color: #EFF6FF;
}

.loc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.loc-emp-name {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-main);
}

.loc-badge-geofence {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.geofence-ok {
  background: #DCFCE7;
  color: #15803D;
}

.geofence-warn {
  background: #FEF3C7;
  color: #B45309;
}

.loc-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.loc-coords {
  font-family: monospace;
  font-size: 10.5px;
  color: #64748B;
}

.btn-focus-map {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Custom Leaflet Marker Popup */
.custom-map-popup {
  font-family: var(--font-family);
  font-size: 12px;
}

.popup-title {
  font-weight: 700;
  font-size: 13px;
  color: #0F172A;
  margin-bottom: 2px;
}

.popup-dept {
  font-size: 11px;
  color: #64748B;
  margin-bottom: 6px;
}

.popup-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-size: 11.5px;
}

.popup-row .k { color: #64748B; }
.popup-row .v { font-weight: 600; color: #0F172A; }

.popup-btn {
  margin-top: 8px;
  display: block;
  text-align: center;
  padding: 4px 8px;
  background: #2563EB;
  color: #FFFFFF !important;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
}

/* =====================================================================
   EMPLOYEE ONBOARDING WIZARD STYLING (Zoho Step Process)
   ===================================================================== */
.onboarding-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.step-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #E2E8F0;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.2s ease;
}

.step-text {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.step-bubble.active .step-num {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.step-bubble.active .step-text {
  color: var(--text-main);
  font-weight: 700;
}

.step-bubble.completed .step-num {
  background-color: #16A34A;
  color: #FFFFFF;
}

.step-line {
  flex: 1;
  height: 2px;
  background-color: var(--border-color);
  margin: 0 12px;
}

.step-line.active {
  background-color: var(--primary);
}

.onboarding-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  max-width: 900px;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

.step-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.step-subheading {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.input-hint {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.wizard-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

.credential-info-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 14px 18px;
  border-radius: 8px;
  margin-top: 14px;
}

.qr-placeholder {
  width: 60px;
  height: 60px;
  background: #FFFFFF;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.review-summary-card {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
}

.summary-section {
  margin-bottom: 16px;
}

.summary-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  font-size: 12.5px;
}

.summary-grid .lbl {
  color: var(--text-muted);
}

.verification-checks {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #15803D;
  font-weight: 500;
}

.check-icon {
  font-weight: 900;
  font-size: 13px;
}

.onboard-success-card {
  text-align: center;
  padding: 24px 18px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  margin-top: 20px;
}

.success-icon-box {
  width: 48px;
  height: 48px;
  background: #16A34A;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 10px;
}

.credential-slip {
  background: #FFFFFF;
  border: 1px dashed #86EFAC;
  border-radius: 6px;
  padding: 12px 16px;
  display: inline-block;
  text-align: left;
  font-size: 12px;
  min-width: 320px;
}

.slip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* =====================================================================
   SETTINGS & CONFIGURATION PANEL
   ===================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 980px;
}

.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

/* =====================================================================
   MODAL DIALOGS (Zoho SaaS Overlay)
   ===================================================================== */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(19, 23, 20, 0.65);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.modal-overlay.active,
.modal-overlay.open,
.modal-backdrop.active,
.modal-backdrop.open {
  display: flex !important;
}

.modal-box,
.modal-card {
  background: #FFFFFF;
  border-radius: 10px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 24px;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* =====================================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ===================================================================== */
@media (max-width: 900px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .onboarding-steps-bar {
    overflow-x: auto;
  }

  .attendance-toolbar-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .attendance-toolbar-left,
  .attendance-toolbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

/* =====================================================================
   ZOHO-STYLE QUOTATION VIEW & DP PRICING MODAL STYLES
   ===================================================================== */
.zoho-quote-modal-dialog {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  max-width: 1320px !important;
  width: 96% !important;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}

.zoho-quote-sheet {
  background: #FFFFFF;
  color: #1E293B;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.zoho-quote-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 24px;
}

.company-brand .brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #0F172A;
  line-height: 1.2;
}

.company-brand .brand-subtitle {
  font-size: 11.5px;
  font-weight: 700;
  color: #2563EB;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 3px;
}

.company-brand .brand-address {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 6px;
  line-height: 1.6;
}

.estimate-meta {
  text-align: right;
}

.estimate-meta .estimate-title {
  font-size: 26px;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: 1px;
}

.estimate-meta .estimate-num {
  font-size: 15px;
  font-weight: 700;
  color: #2563EB;
  margin-top: 2px;
}

.estimate-meta .zoho-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1D4ED8;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 6px;
}

.estimate-meta .zoho-id-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563EB;
}

.estimate-meta .meta-row {
  font-size: 12px;
  color: #64748B;
  margin-top: 6px;
}

.zoho-quote-addresses {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.addr-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 16px;
}

.addr-box .addr-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748B;
  margin-bottom: 8px;
}

.addr-box .addr-name {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}

.addr-box .addr-text {
  font-size: 12px;
  color: #475569;
  margin-top: 4px;
  line-height: 1.5;
}

.addr-box .addr-gstin {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0369A1;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}

.meta-grid span {
  color: #64748B;
  font-size: 11.5px;
}

.zoho-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  margin-bottom: 24px;
  background: #FFFFFF;
}

.zoho-quote-table {
  width: 100%;
  min-width: 1200px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  text-align: left;
}

.zoho-quote-table th {
  background: #F8FAFC;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 10px;
  border-bottom: 2px solid #CBD5E1;
  white-space: nowrap;
}

.zoho-quote-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #E2E8F0;
  vertical-align: middle;
  color: #1E293B;
}

.zoho-quote-table tbody tr:hover {
  background: #F8FAFC;
}

.zoho-quote-table .text-right {
  text-align: right;
}

.zoho-quote-table th.col-dp-price,
.zoho-quote-table td.col-dp-price {
  border-left: 1px solid #BBF7D0;
  min-width: 100px;
}

.zoho-quote-table th.col-dp-amount,
.zoho-quote-table td.col-dp-amount {
  min-width: 105px;
}

.zoho-quote-table .highlight-dp {
  background: #F0FDF4;
  color: #15803D;
  font-weight: 700;
}

.zoho-quote-table th.highlight-dp {
  background: #DCFCE7;
  color: #14532D;
  font-weight: 700;
}

.zoho-quote-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

/* Dual Independent Summary Tables Side By Side - Compact Zoho Style */
.quote-dual-tables-container {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  width: 100%;
}

@media (max-width: 768px) {
  .quote-dual-tables-container {
    flex-direction: column;
    align-items: stretch;
  }
}

.totals-table-card {
  width: 310px;
  max-width: 100%;
  background: #FFFFFF;
  border: 1px solid #E2DDD5;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(47, 74, 60, 0.04);
  overflow: hidden;
  align-self: flex-start;
}

.totals-table-card.customer-card {
  border-color: #E2DDD5;
}

.totals-table-card.dp-card {
  border: 1px solid #A3D9B5;
  background: #FAFCFA;
}

.card-table-header {
  background: #F7F5F1;
  padding: 6px 12px;
  font-size: 10.5px;
  font-weight: 700;
  color: #2F3330;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E6E2DB;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.card-table-header svg {
  color: var(--primary);
}

.card-table-header.dp-header {
  background: #EEF8F1;
  color: #1E3228;
  border-bottom: 1px solid #C9E8D2;
}

.card-table-header.dp-header svg {
  color: #2E7D5B;
}

.totals-kv-table {
  width: 100%;
  border-collapse: collapse;
}

.totals-kv-table td {
  padding: 5px 12px;
  font-size: 11.5px;
  line-height: 1.35;
  border-bottom: 1px solid #F3EFEA;
}

.totals-kv-table tr:last-child td {
  border-bottom: none;
}

.totals-kv-table .kv-label {
  color: #555A54;
  font-weight: 500;
}

.totals-kv-table .kv-value {
  text-align: right;
  font-weight: 600;
  color: #1D211E;
}

.totals-kv-table .kv-grand-row td {
  background: #EBF3ED;
  border-top: 1px solid #C4DEC9;
  font-weight: 700;
  padding: 7px 12px;
}

.totals-kv-table .kv-grand-row .kv-label {
  color: #1E3228;
  font-size: 12px;
  font-weight: 700;
}

.totals-kv-table .kv-grand-val {
  color: #1E3228;
  font-size: 13.5px;
  font-weight: 800;
}

.totals-kv-table .kv-profit-row td {
  background: #EDF7F0;
  border-top: 1px solid #C9E8D2;
  font-weight: 600;
  padding: 5px 12px;
}

.totals-kv-table .kv-profit-row .kv-label {
  color: #1E3228;
  font-weight: 600;
}

.totals-kv-table .kv-profit-val {
  color: #2E7D5B;
  font-size: 12px;
  font-weight: 700;
}

.totals-kv-table .kv-margin-pct-row td {
  background: #E2F3E7;
  border-top: 1px solid #C3E6CB;
  font-weight: 700;
  padding: 7px 12px;
}

.totals-kv-table .kv-margin-pct-row .kv-label {
  color: #1E3228;
  font-size: 12px;
  font-weight: 700;
}

.totals-kv-table .kv-margin-pct-val {
  color: #2E7D5B;
  font-size: 13.5px;
  font-weight: 800;
}

.text-dp-green {
  color: #2E7D5B !important;
}

.profit-badge-pill {
  background: #2E7D5B;
  color: #FFFFFF;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: none;
}

.profit-tag-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.25;
}

.profit-pos {
  background: #E6F4EA;
  color: #2E7D5B;
  border: 1px solid #C3E6CB;
}

.profit-neg {
  background: #FCE8E6;
  color: #B3382C;
  border: 1px solid #F8B4AF;
}

.dp-empty-notice {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #8F938D;
}

/* Print Optimization */
@media print {
  body * {
    visibility: hidden;
  }
  #quotationModal, #quotationModal * {
    visibility: visible;
  }
  #quotationModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
    display: block !important;
  }
  .modal-dialog {
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
  }
  .modal-header, .modal-close, button {
    display: none !important;
  }
  .modal-body {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }
}

/* =====================================================================
   PRODUCTION ONBOARDING MANAGEMENT SYSTEM STYLES
   ===================================================================== */
.onb-subnav-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.onb-subnav-btn {
  padding: 6px 14px;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.onb-subnav-btn:hover {
  background: var(--bg-main);
  color: var(--text-main);
}

.onb-subnav-btn.active {
  background: var(--primary);
  color: #FFFFFF;
}

.onb-subnav-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}
.onb-subnav-btn:not(.active) .onb-subnav-badge {
  background: #E2E8F0;
  color: #475569;
}

/* 8 Summary Cards Grid */
.onb-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) {
  .onb-dashboard-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .onb-dashboard-kpis {
    grid-template-columns: 1fr;
  }
}

.onb-kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.onb-kpi-card:hover {
  transform: translateY(-1px);
  border-color: #C5A059;
}
.onb-kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.onb-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

/* Status Badges */
.badge-onb-pending { background: #F1F5F9; color: #475569; border: 1px solid #CBD5E1; }
.badge-onb-progress { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.badge-onb-submitted { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }
.badge-onb-corrections { background: #FCE8E6; color: #B3382C; border: 1px solid #F8B4AF; }
.badge-onb-approved { background: #E6F4EA; color: #2E7D5B; border: 1px solid #A7F3D0; }
.badge-onb-rejected { background: #F1F5F9; color: #64748B; border: 1px solid #E2E8F0; }
.badge-onb-revoked { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* Checklist interactive items */
.chk-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid #F0ECE6;
  font-size: 12.5px;
}
.chk-row-item:last-child {
  border-bottom: none;
}
.chk-status-btn {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: #FFFFFF;
  cursor: pointer;
}
.chk-status-btn.completed {
  background: #E6F4EA;
  color: #2E7D5B;
  border-color: #A7F3D0;
}
.chk-status-btn.na {
  background: #F1F5F9;
  color: #64748B;
  border-color: #CBD5E1;
}

/* Review Split View */
.review-split-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .review-split-layout {
    grid-template-columns: 1fr;
  }
}
.review-doc-preview-pane {
  background: #F8FAF9;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.preview-pane-header {
  padding: 8px 12px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.preview-pane-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.preview-pane-body iframe, .preview-pane-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
}



/* =====================================================================
   UBER/SWIGGY-STYLE LIVE TRACKING ANIMATIONS & ENHANCEMENTS
   ===================================================================== */

/* Pulsing ring animation for active employees */
@keyframes dw-pulse {
  0%   { transform: scale(0.95); opacity: 0.8; }
  50%  { transform: scale(1.6);  opacity: 0.3; }
  100% { transform: scale(0.95); opacity: 0; }
}

@keyframes dw-pulse-small {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Live marker container – no default Leaflet background */
.dw-live-marker {
  background: transparent !important;
  border: none !important;
}

/* Smooth CSS transition for marker movement (complements JS animation) */
.emp-map-pin {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced popup styling */
.custom-map-popup {
  min-width: 240px;
  padding: 4px 0;
  font-family: 'Inter', sans-serif;
}

.popup-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: #2F4A3C;
  color: #FFF;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.popup-btn:hover {
  background: #3D6352;
}

/* Live indicator dot in location cards */
.loc-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
  margin-right: 5px;
  animation: dw-pulse-small 1.5s infinite;
}

/* Enhanced location card with selected state */
.location-item-card.focused {
  background: #EEF2FF;
  border-color: #6366F1;
}

/* Trail polyline animation hint */
.leaflet-interactive {
  transition: stroke-opacity 0.3s;
}

/* Employee directory extended fields styling */
.emp-ext-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #E9EFEA;
  color: #2F4A3C;
  font-weight: 600;
  margin: 1px;
}

.emp-row-details {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

/* ==========================================================================
   SWIGGY / ZOMATO FLEET TRACKING COMMAND CENTER STYLES
   ========================================================================== */
.swiggy-fleet-ribbon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.fleet-stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.fleet-stat-pill:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.fleet-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fleet-indicator-dot.online {
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: fleet-pulse 2s infinite;
}

.fleet-indicator-dot.geofence-in {
  background: #059669;
}

.fleet-indicator-dot.geofence-out {
  background: #F59E0B;
}

.fleet-stat-meta {
  display: flex;
  flex-direction: column;
}

.fleet-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
}

.fleet-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.1;
}

.text-green { color: #059669 !important; }
.text-amber { color: #D97706 !important; }
.text-live {
  color: #10B981 !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 1px;
}

.live-stream-pill {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.live-radar-ping {
  position: relative;
  width: 14px;
  height: 14px;
}

.live-radar-ping .ping-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #10B981;
  opacity: 0.75;
  animation: radar-ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.live-radar-ping .ping-core {
  position: relative;
  width: 8px;
  height: 8px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #059669;
}

@keyframes radar-ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@keyframes fleet-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

/* Floating Map Control Pills */
.map-floating-controls {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 8px;
  z-index: 1000;
}

.map-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #1E293B;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-pill-btn:hover {
  background: #FFFFFF;
  color: #2F4A3C;
  border-color: #2F4A3C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Fleet Card Filter Pills */
.fleet-filter-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fleet-filter-btn:hover {
  border-color: #CBD5E1;
  color: #1E293B;
}

.fleet-filter-btn.active {
  background: #2F4A3C;
  color: #FFFFFF;
  border-color: #2F4A3C;
}

.form-input-sm {
  padding: 6px 10px;
  font-size: 12px;
  height: 32px;
}
