/* DockSync Professional Design System */
:root {
  --primary: #1E40AF;
  --primary-light: #3B82F6;
  --primary-dark: #1E3A8A;
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --accent-50: #FFF7ED;
  --bg: #F1F5F9;
  --bg-subtle: #F8FAFC;
  --surface: #ffffff;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --text: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --success: #059669;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --warning-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --sidebar-width: 272px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* Icons */
.icon { display: block; flex-shrink: 0; }
.logo-svg { color: #fff; stroke: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #FB923C 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}
.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-50);
  text-decoration: none;
}

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8125rem; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.icon-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ===== LANDING PAGE ===== */
.landing { background: #fff; }

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.landing-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent) 0%, #FB923C 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.landing-nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.landing-nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.landing-nav-links a:hover { color: var(--text); text-decoration: none; }

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  padding: 5rem 2.5rem 4rem;
  max-width: 1240px;
  margin: 0 auto;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: var(--primary-50);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid var(--primary-100);
}

.hero h1 {
  font-size: 3.25rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, #FB923C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-visual {
  background: linear-gradient(145deg, var(--primary-50) 0%, var(--accent-50) 50%, #fff 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-visual::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.iso-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  position: relative;
  z-index: 1;
}

.iso-card {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all var(--transition);
}

.iso-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.iso-card .icon-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
}

.iso-card:nth-child(2) .icon-wrap { background: var(--accent-50); color: var(--accent); }
.iso-card:nth-child(4) .icon-wrap { background: #F0FDF4; color: var(--success); }
.iso-card:nth-child(5) .icon-wrap { background: #FDF4FF; color: #9333EA; }

.iso-card .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stats-section {
  background: var(--bg-subtle);
  padding: 4rem 2.5rem;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card .icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
}

.stat-card .number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 0.35rem;
  font-weight: 500;
}

.features-section {
  padding: 5rem 2.5rem;
  max-width: 1140px;
  margin: 0 auto;
}

.features-section h2 {
  text-align: center;
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.features-section .section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: all var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-100);
  transform: translateY(-3px);
}

.feature-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.feature-card:nth-child(3) .icon-wrap { background: #F0FDF4; color: var(--success); }
.feature-card:nth-child(4) .icon-wrap { background: var(--accent-50); color: var(--accent); }
.feature-card:nth-child(5) .icon-wrap { background: #FDF4FF; color: #9333EA; }
.feature-card:nth-child(6) .icon-wrap { background: #ECFEFF; color: #0891B2; }

.feature-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.landing-footer {
  background: var(--text);
  color: #94A3B8;
  padding: 2.5rem;
  font-size: 0.875rem;
}

.landing-logo {
  text-decoration: none;
  color: var(--text);
}

.landing-nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.landing-nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
}

.hero-proof li {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.hero-visual__caption {
  position: relative;
  z-index: 1;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ds-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 4.5rem 2.5rem 1.5rem;
}

.ds-eyebrow {
  margin: 0 0 0.4rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.ds-section h2,
.ds-cta h2 {
  text-align: center;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 0.6rem;
  color: var(--text);
}

.ds-section .section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto 2.25rem;
  max-width: 42rem;
}

.ds-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.ds-steps article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.25rem;
}

.ds-steps span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.55rem;
}

.ds-steps h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.ds-steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.ds-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
}

.ds-price {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ds-price--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.ds-price__badge,
.ds-price__trial {
  width: fit-content;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}

.ds-price__badge { background: var(--accent); color: #fff; }
.ds-price__trial { background: #FEF3C7; color: #92400E; }

.ds-price h3 { margin: 0.4rem 0 0; font-size: 1.2rem; }

.ds-price__amount {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ds-price__amount span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ds-price__desc {
  margin: 0 0 0.35rem;
  color: var(--text-muted);
  min-height: 2.6rem;
  font-size: 0.92rem;
}

.ds-price ul {
  margin: 0 0 1rem;
  padding: 0 0 0 1.1rem;
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.ds-price .btn { width: 100%; }

.ds-cta {
  max-width: 1140px;
  margin: 2rem auto 0;
  padding: 2rem 2rem 2.1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.ds-cta h2 {
  text-align: left;
  color: #fff;
  margin: 0 0 0.4rem;
  font-size: 1.45rem;
}

.ds-cta p { margin: 0; color: #CBD5E1; max-width: 40rem; }

.ds-cta__actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.btn-on-dark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

.landing-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 1140px;
  margin: 0 auto;
  text-align: left;
}

.landing-footer strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.landing-footer p { margin: 0; max-width: 36ch; }

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
}

.landing-footer nav a {
  color: #E2E8F0;
  font-weight: 600;
}

.landing-footer nav a:hover { color: #fff; }

.landing-footer__copy {
  max-width: 1140px;
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid #334155;
  text-align: center;
}

.stat-card .icon-wrap {
  background: var(--accent-50);
  color: var(--accent);
}

@media (max-width: 900px) {
  .ds-steps { grid-template-columns: 1fr; }
  .ds-cta { margin: 1.5rem 1.25rem 0; }
}

@media (max-width: 768px) {
  .landing-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .landing-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: var(--shadow-lg);
  }
  .landing-nav-links.is-open { display: flex; }
  .landing-nav { position: sticky; }
}

/* ===== APP LAYOUT ===== */
.app-layout {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.sidebar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #FB923C 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.sidebar-search {
  padding: 1rem 1.25rem;
  position: relative;
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.35rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-family: inherit;
  background: var(--bg-subtle);
  color: var(--text);
  transition: all var(--transition);
}

.sidebar-search input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.search-icon-wrap {
  position: absolute;
  left: 1.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}

.nav-section { padding: 0.25rem 0; }

.nav-section-title {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.75rem 0.75rem 0.35rem;
  font-weight: 700;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-link-subtle { font-size: 0.8125rem; color: var(--text-muted); }
.nav-link .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: inherit;
}

.sidebar-footer {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sidebar-user {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.user-info .name { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.user-info .email { font-size: 0.75rem; color: var(--text-muted); }

.main-content {
  flex: 1;
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.breadcrumb span:last-child { color: var(--text); font-weight: 600; }
.breadcrumb-sep { display: flex; color: var(--border); }

.topbar-actions { display: flex; gap: 0.65rem; align-items: center; }

.page-content,
.page-body {
  padding: 1.15rem 1.35rem 0.5rem;
  flex: 1;
}

.page-header {
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.page-header .subtitle {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: 0.35rem;
}

/* Summary bar */
.summary-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-xs);
}

.summary-stat {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-left: 1.5rem;
  border-left: 1px solid var(--border);
}

.summary-stat:first-of-type { border-left: none; padding-left: 0; }
.summary-stat strong { font-weight: 700; color: var(--text); font-size: 0.9375rem; }

.search-bar {
  flex: 1;
  min-width: 240px;
  max-width: 420px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--bg-subtle);
  transition: all var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.search-bar .search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
}

.filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Inventory cards */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.item-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary-100);
}

.item-card-header {
  padding: 0.85rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.warehouse-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-in-stock { background: var(--success-bg); color: var(--success); }
.badge-low-stock { background: var(--danger-bg); color: var(--danger); }
.badge-out-of-stock { background: #F1F5F9; color: var(--text-muted); }

.item-card-image {
  height: 150px;
  background: linear-gradient(160deg, var(--primary-50) 0%, var(--bg-subtle) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}

.item-card-image img {
  max-height: 120px;
  max-width: 90%;
  object-fit: contain;
}

.item-card-body { padding: 1.1rem; }

.item-sku {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-family: ui-monospace, monospace;
}

.item-name {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  color: var(--text);
}

.item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 0.75rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}

.item-meta .label {
  color: var(--text-muted);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.item-meta .value { font-weight: 700; color: var(--text); font-size: 0.9375rem; }

.item-card-footer {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border-light);
}

.item-card-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
}

.item-card-footer a:hover { color: var(--primary-dark); text-decoration: none; }

/* Dashboard cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-light);
  opacity: 0;
  transition: opacity var(--transition);
}

.dash-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dash-card:hover::before { opacity: 1; }

.dash-card.accent::before { background: var(--accent); }
.dash-card.success::before { background: var(--success); }
.dash-card.danger::before { background: var(--danger); }

.dash-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dash-card .dash-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
}

.dash-card.accent .dash-icon { background: var(--accent-50); color: var(--accent); }
.dash-card.success .dash-icon { background: var(--success-bg); color: var(--success); }
.dash-card.danger .dash-icon { background: var(--danger-bg); color: var(--danger); }

.dash-card .dash-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.dash-card .dash-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dash-card.accent .dash-value { color: var(--accent); }
.dash-card.success .dash-value { color: var(--success); }
.dash-card.danger .dash-value { color: var(--danger); }

.dash-sub {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 550;
}

a.dash-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.dash-card--link:hover {
  text-decoration: none;
  color: inherit;
}

.dashboard-grid--six {
  grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 1280px) {
  .dashboard-grid--six {
    grid-template-columns: repeat(6, 1fr);
  }
  .dashboard-grid--six .dash-value {
    font-size: 1.35rem;
  }
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.ops-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.5rem 0 1.35rem;
}
.ops-actions a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 650;
  text-decoration: none;
}
.ops-actions a:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-50);
}

.wh-attention {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
}
.wh-attention a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-50);
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: none;
}
.wh-attention strong { font-size: 0.95rem; color: var(--text); }
.wh-dash-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.wh-adj-health {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 1.25fr);
  gap: 1rem;
  margin: 0 0 1rem;
}
.wh-adj-health__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.wh-adj-health__head h2 { margin: 0; }
.wh-adj-scan {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.35rem 0 0.65rem;
}
.wh-adj-scan input,
.wh-adj-scan select {
  min-height: 2.35rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 0.4rem 0.7rem;
  font: inherit;
  background: var(--surface);
}
.wh-xfer-sites {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.wh-adj-warn {
  margin: 0.35rem 0 0.65rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.8rem;
  font-weight: 650;
}
.wh-adj-attn { font-size: 0.82rem; }
input.is-warn { border-color: #dc2626 !important; }
.wh-dash .page-header { margin-bottom: 0.85rem; }
.wh-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: var(--shadow-xs);
}
.wh-panel h2, .wh-panel .sc-toolbar h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}
.wh-empty {
  margin: 1.25rem 0;
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle, #f8fafc);
  padding: 2.25rem 1.5rem;
}
.pos-filter-bar {
  display: flex;
  gap: 0.65rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}
.pos-filter-bar select,
.pos-filter-bar input[type="search"] {
  min-height: 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 0.45rem 0.75rem;
  font: inherit;
  background: var(--surface);
}
.pos-filter-bar input[type="search"] { flex: 1; min-width: 12rem; }
.pos-checkout-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0 1.15rem;
}
.pos-checkout-fields label,
.sc-cart label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-secondary, #475569);
}
.sc-cart { gap: 0.85rem; }

.sc-cart h2 { font-size: 1rem; margin: 0 0 0.75rem; }
.pos-product-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
}
.pos-product-btn strong { font-size: 0.9rem; color: var(--text); }
.pos-product-btn span, .pos-product-btn small { color: var(--text-muted); font-size: 0.75rem; }
.pos-product-btn em { font-style: normal; font-weight: 800; color: var(--accent); }
.pos-product-btn:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}
.pos-product-btn.is-in-cart {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.16);
}
.pos-complete-btn:not(:disabled) {
  background: linear-gradient(135deg, var(--accent) 0%, #FB923C 100%);
  color: #fff;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}
.wh-pos-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: -0.35rem 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text-muted);
}
.wh-pos-meta strong { color: var(--text); }
.wh-pos-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.wh-pos-qty button {
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}
.wh-pos-totals {
  margin: 0.45rem 1.15rem 0.35rem;
  display: grid;
  gap: 0.28rem;
  font-size: 0.85rem;
}
.wh-pos-totals div { display: flex; justify-content: space-between; }
.wh-pos-totals .is-grand { font-size: 1.15rem; font-weight: 800; }
.wh-pos-change { color: var(--success); font-weight: 800; }
.wh-pos-ticket-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0 1.15rem 0.5rem;
}
.wh-pos-tax {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.ops-attention {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.35rem;
  padding: 0.85rem 1.15rem;
  background: var(--accent-50, #fff7ed);
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
}
.ops-attention strong {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a3412;
}
.ops-attention__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.ops-attention__chips a {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}
.ops-attention__chips a:hover {
  background: #fff7ed;
}

.wh-dash { display: grid; gap: 1.15rem; }
.wh-dash__hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.wh-dash__hero h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.wh-dash__hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}
.wh-status {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wh-status--ok { background: var(--success-bg); color: var(--success); }
.wh-status--warn { background: var(--warning-bg); color: var(--warning); }
.wh-status--setup { background: var(--accent-50); color: #c2410c; }
.wh-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.wh-kpi {
  display: grid;
  gap: 0.35rem;
  padding: 1.2rem 1.25rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.wh-kpi::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-light);
}
.wh-kpi--sales::after { background: var(--success); }
.wh-kpi--alert::after { background: var(--danger); }
.wh-kpi--work::after { background: var(--accent); }
.wh-kpi:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}
.wh-kpi__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.wh-kpi strong {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}
.wh-kpi--alert strong { color: var(--danger); }
.wh-kpi--work strong { color: var(--accent); }
.wh-kpi__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 550;
}
.wh-quick {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}
.wh-quick a {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
}
.wh-quick a:hover {
  border-color: var(--primary-light);
  background: var(--primary-50);
  text-decoration: none;
  color: inherit;
}
.wh-quick strong { font-size: 0.88rem; color: var(--text); }
.wh-quick small { font-size: 0.72rem; color: var(--text-muted); }
.wh-pipeline {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.wh-pipeline__step {
  flex: 1;
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  text-decoration: none;
  color: inherit;
  text-align: center;
}
.wh-pipeline__step.is-hot { background: var(--accent-50); }
.wh-pipeline__step span {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.wh-pipeline__step.is-hot span { color: var(--accent); }
.wh-pipeline__step strong { font-size: 0.8rem; }
.wh-pipeline__step small { font-size: 0.7rem; color: var(--text-muted); }
.wh-pipeline__arrow {
  width: 12px;
  align-self: center;
  height: 2px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
}
.wh-pipeline__arrow::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  border: 4px solid transparent;
  border-left-color: var(--border);
}
.wh-spark {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 140px;
  padding: 0.25rem 0.15rem 0;
}
.wh-spark__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 0.35rem;
}
.wh-spark__bar {
  width: 100%;
  max-width: 28px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent) 0%, #fb923c 100%);
  min-height: 8px;
}
.wh-spark__bar.is-empty { background: var(--border); }
.wh-spark__col small { font-size: 0.68rem; color: var(--text-muted); font-weight: 650; }
.wh-mix { list-style: none; display: grid; gap: 0.65rem; margin: 0.35rem 0 0; }
.wh-mix li { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 0.65rem; align-items: center; }
.wh-mix__label { font-size: 0.8rem; font-weight: 650; text-transform: capitalize; color: var(--text-secondary); }
.wh-mix__track { height: 8px; background: var(--bg-subtle); border-radius: 999px; overflow: hidden; }
.wh-mix__fill { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.wh-mix__n { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); }
.wh-panel__lead { margin: 0 0 0.85rem; font-size: 0.85rem; color: var(--text-muted); }
.wh-panel__empty {
  margin: 0.5rem 0 0;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}
.wh-placeholder {
  display: grid;
  gap: 0.2rem;
  margin: 0.35rem 0 0.5rem;
  padding: 0.9rem 1rem;
  text-align: left;
  background: var(--bg-subtle, #f8fafc);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm, 8px);
}
.wh-placeholder__kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.wh-placeholder strong {
  font-size: 0.9rem;
  color: var(--text);
}
.wh-placeholder p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.wh-adj-scan label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-secondary, #475569);
}
.wh-table-wrap { overflow: auto; }
.wh-pill {
  display: inline-flex;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
}
.wh-pill--muted { background: var(--primary-50); color: var(--primary); }
.wh-setup-banner {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(20rem, 1.3fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(135deg, #fff 0%, var(--accent-50) 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
}
.wh-setup-banner__copy { display: grid; gap: 0.3rem; }
.wh-setup-banner__copy strong { font-size: 1.05rem; }
.wh-setup-banner__copy p { margin: 0; font-size: 0.85rem; color: var(--text-secondary); }
.wh-setup-banner__form {
  display: grid;
  grid-template-columns: 1fr 7rem 7rem auto auto;
  gap: 0.55rem;
  align-items: end;
}
.wh-setup-banner__form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wh-setup-banner__form input {
  min-height: 2.45rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font: inherit;
  background: #fff;
}
tr.is-out td { color: var(--danger); }
.wh-pill--alert { background: var(--danger-bg); color: var(--danger); }
.wh-pill--warn { background: var(--warning-bg); color: var(--warning); }

.wh-filter-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.wh-filter-bar input[type="search"] {
  flex: 1;
  min-height: 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font: inherit;
  background: var(--surface);
}
.wh-filter-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.wh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.wh-chips button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  text-transform: capitalize;
}
.wh-chips button.is-on,
.wh-chips button:hover { border-color: var(--primary); color: var(--primary); }
.wh-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 4px;
  vertical-align: middle;
  border: 1px solid var(--border);
}
.wh-row-actions { white-space: nowrap; }
.wh-row-actions .sc-btn { margin-right: 0.25rem; }
.wh-charts--mix { grid-template-columns: minmax(0, 28rem); }
#whListTable, #whCatTable { overflow: auto; }

.wh-app-footer {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.65rem 1rem;
  flex-wrap: nowrap;
  background: var(--text);
  color: #94A3B8;
  padding: 0 1rem;
  height: 1.85rem;
  min-height: 1.85rem;
  max-height: 1.85rem;
  font-size: 0.7rem;
  overflow: hidden;
}
.wh-app-footer strong {
  display: inline;
  color: #fff;
  font-size: 0.82rem;
  margin: 0;
  letter-spacing: -0.02em;
}
.wh-app-footer nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 0.9rem;
  align-items: center;
  margin-left: auto;
}
.wh-app-footer nav a {
  color: #E2E8F0;
  font-weight: 600;
  font-size: 0.75rem;
}
.wh-app-footer nav a:hover { color: #fff; }
.wh-app-footer__copy {
  margin: 0;
  padding: 0;
  border: 0;
  color: #64748B;
}

.wh-insight-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}
.wh-insight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-xs);
  display: grid;
  gap: 0.2rem;
}
.wh-insight span,
.wh-insight small {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wh-insight strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.wh-trend { font-size: 0.75rem; font-weight: 700; }
.wh-trend.is-up { color: var(--success); }
.wh-trend.is-down { color: var(--danger); }
.wh-trend.is-flat { color: var(--text-muted); font-weight: 600; }

.wh-charts-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.wh-charts-toolbar h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.wh-period {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem;
  gap: 0.15rem;
}
.wh-period button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  color: var(--text-muted);
  cursor: pointer;
}
.wh-period button.is-on {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.wh-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.wh-charts__wide { grid-column: 1 / -1; }
.wh-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 100%;
}
.wh-chart-card__head {
  padding: 0.95rem 1.15rem 0.7rem;
  border-bottom: 1px solid var(--border);
}
.wh-chart-card__head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.wh-chart-card__head p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.wh-chart-wrap {
  position: relative;
  width: 100%;
  height: 300px;
  max-height: 300px;
  padding: 0.85rem 1rem 1rem;
}
.wh-chart-wrap--sm { height: 240px; max-height: 240px; }
.wh-chart-wrap canvas { display: block; width: 100% !important; height: 100% !important; }

.scan-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0 0 1.15rem;
  padding: 0.9rem 1.1rem;
  background: var(--primary-50, #eef2ff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.scan-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}
.scan-bar__input {
  flex: 1 1 16rem;
  min-width: 12rem;
}
.scan-bar__status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.scan-bar__status.is-ok { color: var(--success); }
.scan-bar__status.is-err { color: var(--danger); }
tr.scan-hit {
  outline: 2px solid var(--accent);
  background: var(--accent-50);
}
.qty-over { border-color: var(--danger) !important; }

.stuck-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--danger-bg, #fee2e2);
  color: var(--danger);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.abc-pill {
  display: inline-flex;
  min-width: 1.35rem;
  justify-content: center;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
}
.abc-a { background: #dcfce7; color: #166534; }
.abc-b { background: #fef3c7; color: #92400e; }
.abc-c { background: #e5e7eb; color: #374151; }

.brand-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.brand-org {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.panel-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--bg-subtle);
}

.panel-header > span,
.panel-header > div:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-body { padding: 0; }
.panel-body.padded { padding: 1.25rem 1.5rem; }
.panel-body.form-legacy { padding: 1.25rem 1.5rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-subtle); }
.data-table td strong, .data-table td a { color: var(--text); font-weight: 600; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: all var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Professional form layout */
.form-page {
  max-width: 880px;
}

.form-page--wide {
  max-width: 1040px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.form-card + .form-card {
  margin-top: 1.25rem;
}

.form-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--surface) 100%);
}

.form-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  flex-shrink: 0;
}

.form-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.form-card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
  line-height: 1.45;
}

.form-card-body {
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.form-field {
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.form-required {
  color: var(--danger);
  text-decoration: none;
  margin-left: 0.15rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: -0.15rem 0 0.45rem;
  line-height: 1.4;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin: 0.35rem 0 0;
}

.form-control::placeholder {
  color: #94a3b8;
}

select.form-control,
.form-control[type="date"] {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.form-control[type="date"] {
  background-position: right 0.65rem center;
}

textarea.form-control {
  resize: vertical;
  min-height: 5rem;
}

input[type="file"].form-control {
  padding: 0.5rem 0.75rem;
  background: var(--bg-subtle);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.form-actions .btn-primary {
  min-width: 8.5rem;
}

.stock-context {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.line-items-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.line-items-card .data-table th {
  background: var(--bg-subtle);
}

.line-items-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}

.line-items-toolbar .btn-icon-remove {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.25);
}

@media (max-width: 768px) {
  .form-grid,
  .form-grid-3,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* POS — Stockly-style checkout */
.pos-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1.25rem;
  align-items: start;
  min-height: calc(100vh - 8rem);
}

.pos-main {
  min-width: 0;
}

.pos-page-header {
  margin-bottom: 1rem;
}

.card-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.pos-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.pos-toolbar-grid .form-field { margin: 0; }
.pos-toolbar-grid .form-label { font-size: 0.75rem; margin-bottom: 0.3rem; }

.pos-summary-bar { margin-bottom: 1rem; }

.pos-search-bar {
  max-width: none;
  position: relative;
}

.pos-search-bar input {
  padding-right: 3rem;
}

.pos-scan-btn {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.pos-scan-btn:hover {
  background: var(--primary);
  color: #fff;
}

.pos-category-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.pos-category-pill {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.pos-category-pill:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.pos-category-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
  padding-bottom: 0.5rem;
}

.pos-item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  font-family: inherit;
  width: 100%;
}

.pos-item-card:hover:not(.is-disabled) {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary-100);
}

.pos-item-card.in-cart {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.pos-item-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pos-item-card-header {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.pos-qty-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.pos-price { color: var(--primary); }

.pos-empty-catalog {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 0.875rem;
}

/* Checkout panel */
.pos-checkout {
  position: sticky;
  top: 4.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 6.5rem);
  min-height: 0;
  align-self: start;
}

.pos-checkout form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.pos-checkout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--surface) 100%);
}

.pos-checkout-header h2 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.wh-till-ticket {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.wh-till-foot {
  flex-shrink: 0;
  padding: 0.35rem 0 0.85rem;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}
.wh-till-foot .wh-till-last {
  margin: 0 1.15rem 0.35rem;
}
.wh-till-foot .pos-complete-btn {
  margin: 0 1.15rem 0;
  width: calc(100% - 2.3rem);
}
.wh-till-foot .sc-note { padding: 0 1.15rem; margin: 0 0 0.35rem; }
.wh-receipt-bar {
  margin: 0 0.85rem 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  display: grid;
  gap: 0.45rem;
}
.wh-receipt-bar strong {
  display: block;
  font-size: 0.78rem;
  color: #065f46;
}
.wh-receipt-bar span {
  display: block;
  font-size: 0.72rem;
  color: #047857;
  font-weight: 650;
}
.wh-receipt-bar__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.wh-receipt-bar__btns .btn {
  min-height: 2.15rem;
  font-size: 0.75rem;
  padding: 0.35rem 0.45rem;
}

.pos-cart-lines {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1rem;
  min-height: 7rem;
  max-height: 220px;
}

.pos-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.15rem;
  margin: 0.4rem 1rem 0.2rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm, 8px);
  color: var(--text-muted);
  text-align: left;
  font-size: 0.8125rem;
}
.pos-cart-empty .wh-placeholder__kicker { color: var(--text-muted); }
.pos-cart-empty strong { font-size: 0.9rem; color: var(--text); }
.pos-cart-empty p { margin: 0; font-size: 0.8rem; line-height: 1.4; }

.pos-cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-light);
}

.pos-cart-line:last-child { border-bottom: none; }

.pos-cart-line-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.pos-cart-line-sku {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.pos-cart-line-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pos-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}

.pos-qty-control button {
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.pos-qty-control button:hover { background: var(--primary-50); }

.pos-qty-control span {
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
}

.pos-cart-line-total {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text);
  min-width: 3.5rem;
  text-align: right;
}

.pos-cart-remove {
  border: none;
  background: none;
  color: var(--danger);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.15rem;
}

.pos-checkout-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.pos-checkout-row label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.pos-checkout-row .form-control {
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
}

.pos-totals {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-light);
}

.pos-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 0.3rem 0;
  color: var(--text);
}

.pos-total-row.muted { color: var(--text-muted); }

.pos-total-row.grand {
  font-size: 1.125rem;
  font-weight: 800;
  padding-top: 0.65rem;
  margin-top: 0.35rem;
  border-top: 1px dashed var(--border);
  color: var(--text);
}

.pos-total-row.grand span:last-child { color: var(--primary); }

.pos-complete-btn {
  margin: 0 1.25rem 1.25rem;
  width: calc(100% - 2.5rem);
  padding: 0.85rem 1rem;
  font-size: 0.9375rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pos-complete-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pos-checkout-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.5rem;
  padding: 0 1.25rem 1.25rem;
}

.pos-checkout-actions .pos-complete-btn {
  margin: 0;
  width: 100%;
}

.pos-park-btn { width: 100%; }

.pos-checkout-row--full { grid-column: 1 / -1; }

.pos-cash-panel {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: #FFFBEB;
}

.pos-change-due {
  font-size: 1rem;
  font-weight: 800;
  color: var(--success);
  margin-top: 0.35rem;
}

.pos-split-panel {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
}

.pos-split-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.pos-split-rows { margin-top: 0.75rem; }

.pos-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pos-split-remaining {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.pos-inline-field {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}

.pos-inline-field .form-control { flex: 1; }

.pos-shortcuts-list {
  list-style: none;
  padding: 0;
}

.pos-shortcuts-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
}

.pos-shortcuts-list kbd {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  font-family: inherit;
}

.pos-parked-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
}

.pos-parked-row:last-child { border-bottom: none; }

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

/* POS home dashboard */
.pos-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.pos-stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-xs);
}

.pos-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pos-stat-icon.revenue { background: #ECFDF5; color: var(--success); }
.pos-stat-icon.sales { background: var(--primary-50); color: var(--primary); }
.pos-stat-icon.ticket { background: #FFF7ED; color: var(--accent); }
.pos-stat-icon.customers { background: #F5F3FF; color: #7C3AED; }

.pos-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pos-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pos-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.pos-side-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pos-rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
}

.pos-rank-row:last-child { border-bottom: none; }

.pos-rank-name {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
}

.pos-rank-sku {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.pos-rank-value {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.pos-launch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.pos-launch-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* Legacy POS (kept for compatibility) */
.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(20rem, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.pos-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.85rem;
  max-height: 520px;
  overflow-y: auto;
  padding: 0.25rem;
}

.pos-product-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 0.75rem;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}

.cart-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 5rem;
  box-shadow: var(--shadow-md);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8125rem;
}

.cart-total {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 1.25rem 0;
  text-align: right;
  letter-spacing: -0.02em;
}

.cart-total span { color: var(--primary); }

.empty-state {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem;
}

.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  min-height: 140px;
  padding: 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty-card strong {
  color: var(--text);
  font-size: 0.95rem;
}

.empty-card p {
  margin: 0;
  max-width: 20rem;
}

/* Messages */
.messages { padding: 0 2rem; margin-top: 0.75rem; }

.alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert-success { background: var(--success-bg); color: #065F46; border-color: #A7F3D0; }
.alert-error { background: var(--danger-bg); color: #991B1B; border-color: #FECACA; }

/* Login */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--primary-50) 0%, #fff 40%, var(--accent-50) 100%);
  padding: 2rem;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
}

.auth-card .auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.auth-card .auth-logo .logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, #FB923C 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 0.35rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.auth-demo {
  text-align: center;
  margin-top: 1.5rem;
  padding: 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pending, .status-draft, .status-picking, .status-packed { background: var(--warning-bg); color: #92400E; }
.status-completed, .status-received, .status-shipped, .status-delivered { background: var(--success-bg); color: #065F46; }
.status-cancelled, .status-void { background: #F1F5F9; color: var(--text-muted); }
.status-partial, .status-ordered { background: var(--primary-50); color: var(--primary); }
.status-approved { background: var(--success-bg); color: #065F46; }
.status-available, .status-active { background: var(--success-bg); color: #065F46; }

.workflow-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.workflow-step {
  flex: 1;
  min-width: 100px;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}
.workflow-step.active {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
}
.workflow-step.done {
  border-color: var(--success);
  background: var(--success-bg);
  color: #065F46;
}
.workflow-step .step-num {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: currentColor;
  color: #fff;
  font-size: 0.6875rem;
  margin-right: 0.35rem;
  opacity: 0.9;
}

.status-in_use, .status-in_progress, .status-planned { background: var(--primary-50); color: var(--primary); }
.status-maintenance, .status-on_leave { background: var(--warning-bg); color: #92400E; }
.status-retired, .status-inactive { background: #F1F5F9; color: var(--text-muted); }

/* ===== TRACKING PAGE ===== */
.tracking-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tracking-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-xs);
}

.tracking-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tracking-stat-icon.online { background: var(--success-bg); color: var(--success); }
.tracking-stat-icon.pending { background: var(--warning-bg); color: var(--warning); }
.tracking-stat-icon.shipment { background: var(--primary-50); color: var(--primary); }
.tracking-stat-icon.total { background: var(--accent-50); color: var(--accent); }

.tracking-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.tracking-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tracking-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  width: fit-content;
}

.tracking-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
}

.tracking-tab:hover {
  color: var(--text);
  background: var(--bg-subtle);
  text-decoration: none;
}

.tracking-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.tab-badge {
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  font-size: 0.7rem;
}

.tracking-tab:not(.active) .tab-badge {
  background: var(--bg);
  color: var(--text-muted);
}

.tracking-map-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.25rem;
  min-height: 560px;
}

.map-container { margin-bottom: 0; overflow: hidden; }

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.map-legend {
  display: flex;
  gap: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.warehouse { background: var(--primary); }
.legend-dot.device-online { background: var(--success); }
.legend-dot.device-offline { background: #94A3B8; }

.legend-line {
  width: 18px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

#tracking-map {
  height: 500px;
  width: 100%;
  z-index: 1;
}

.map-sidebar .panel { margin-bottom: 0; height: 100%; }

.device-list {
  max-height: 500px;
  overflow-y: auto;
}

.device-list-item {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.device-list-item .wh-row-actions { margin-left: auto; }
.tracking-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  gap: 1rem;
  min-height: 420px;
  margin-top: 0.75rem;
}
#tracking-map {
  height: 420px;
  width: 100%;
  z-index: 1;
  background: #e2e8f0;
}

.device-list-item:hover,
.device-list-item.active {
  background: var(--primary-50);
}

.device-list-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  color: var(--primary);
  flex-shrink: 0;
}

.device-list-item.online .device-list-icon {
  background: var(--success-bg);
  color: var(--success);
}

.device-list-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.device-list-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.device-status-pill {
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.device-status-pill.status-online { background: var(--success-bg); color: var(--success); }
.device-status-pill.status-pending { background: var(--warning-bg); color: #92400E; }
.device-status-pill.status-offline { background: #F1F5F9; color: var(--text-muted); }
.device-status-pill.status-disconnected { background: var(--danger-bg); color: var(--danger); }

/* Leaflet markers */
.map-marker { background: none !important; border: none !important; }

.marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 2px solid #fff;
}

.marker-pin svg { transform: rotate(45deg); }

.marker-pin.warehouse {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
}

.marker-pin.device.online {
  background: linear-gradient(135deg, var(--success) 0%, #34D399 100%);
  color: #fff;
}

.marker-pin.device.offline {
  background: #94A3B8;
  color: #fff;
}

/* Device cards grid */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.device-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}

.device-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-100);
}

.device-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.device-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-50);
  color: var(--primary);
}

.device-card-icon.type-vehicle_unit,
.device-card-icon.type-gps_tracker { background: #F0FDF4; color: var(--success); }

.device-card-icon.type-rfid_reader { background: var(--accent-50); color: var(--accent); }

.device-card-icon.type-ble_beacon { background: #FDF4FF; color: #9333EA; }

.device-card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.device-card-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
  margin-bottom: 1rem;
}

.device-card-details {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
}

.device-card-details > div {
  display: flex;
  justify-content: space-between;
}

.device-card-details .label {
  color: var(--text-muted);
  font-weight: 500;
}

.device-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.device-token-box {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  font-size: 0.75rem;
}

.device-token-box .label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.625rem;
}

.device-token-box code {
  font-family: ui-monospace, monospace;
  color: var(--primary);
  word-break: break-all;
}

.devices-empty {
  grid-column: 1 / -1;
  padding: 3rem;
}

.devices-empty .empty-icon {
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.devices-empty h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* Movement types */
.movement-type {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.movement-type.type-receive { background: var(--success-bg); color: var(--success); }
.movement-type.type-dispatch,
.movement-type.type-sale { background: var(--danger-bg); color: var(--danger); }
.movement-type.type-transfer { background: var(--primary-50); color: var(--primary); }
.movement-type.type-restock { background: var(--accent-50); color: var(--accent); }
.movement-type.type-adjust { background: #F1F5F9; color: var(--text-muted); }

.qty-cell.positive { color: var(--success); font-weight: 700; }
.qty-cell.negative { color: var(--danger); font-weight: 700; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  padding: 1.5rem;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Integrations & Providers */
.integrations-section { margin-bottom: 2rem; }

.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.section-header-row h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-header-row p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.integrations-active-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.integration-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-xs);
}

.integration-card.inactive { opacity: 0.7; }

.integration-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.integration-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.integration-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.integration-provider {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.integration-meta {
  display: grid;
  gap: 0.4rem;
  font-size: 0.8125rem;
  margin-bottom: 1rem;
}

.integration-meta > div {
  display: flex;
  justify-content: space-between;
}

.providers-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.providers-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.provider-category { margin-bottom: 2rem; }

.provider-category-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.provider-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.provider-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.provider-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.provider-info { flex: 1; min-width: 0; }

.provider-info h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.provider-info p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.provider-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.provider-tag {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.provider-tag.sync {
  background: var(--success-bg);
  color: var(--success);
}

.provider-connect-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-copy {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
}

/* Connect modal steps */
.modal-card-lg { max-width: 680px; }

.connect-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.connect-type-card {
  text-align: left;
  padding: 1.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.connect-type-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.connect-type-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.connect-type-icon.app { background: var(--primary-50); color: var(--primary); }
.connect-type-icon.device { background: var(--accent-50); color: var(--accent); }

.connect-type-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.connect-type-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.connect-type-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.back-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.75rem;
  padding: 0;
  font-family: inherit;
}

.provider-picker {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.picker-category {
  padding: 0.5rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background var(--transition);
}

.picker-item:hover { background: var(--primary-50); }

.picker-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.picker-name {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.picker-type {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.api-docs-box {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.8125rem;
}

.api-docs-box strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.api-docs-box code {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--primary);
  word-break: break-all;
  margin-bottom: 0.5rem;
}

.api-docs-box p {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.status-active { background: var(--success-bg); color: var(--success); }
.status-inactive { background: #F1F5F9; color: var(--text-muted); }
.status-error { background: var(--danger-bg); color: var(--danger); }

.dash-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.5rem 0;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-link.nav-alert {
  color: #92400E;
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 90;
}

.notification-count {
  width: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
}

.notification-wrap {
  position: relative;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.notification-dropdown-header .btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8125rem;
}

.notification-item a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.notification-item:hover {
  background: var(--bg-subtle);
}

.notification-title {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.notification-msg {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.notification-time {
  color: var(--text-muted);
  font-size: 0.6875rem;
  margin-top: 0.25rem;
}

.notification-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.notification-alerts {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  background: var(--bg-subtle);
}

.notification-alerts a {
  color: var(--accent);
  text-decoration: none;
}

/* ===== FLEET LIVE MAP ===== */
.fleet-map-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fleet-map-page--full {
  flex: 1;
  min-height: calc(100vh - 8rem);
  --fleet-map-h: clamp(560px, calc(100vh - 22rem), 820px);
}

.fleet-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.fleet-map-header h1 {
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
}

.fleet-map-header .subtitle {
  margin: 0;
  font-size: 0.85rem;
}

.fleet-map-kpis {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.fleet-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.5rem;
  padding: 0.55rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}

.fleet-kpi--live {
  border-color: #FED7AA;
  background: linear-gradient(180deg, #FFF7ED 0%, #fff 100%);
}

.fleet-kpi--muted .fleet-kpi-value { color: var(--text-muted); }

.fleet-kpi-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.fleet-kpi--live .fleet-kpi-value { color: var(--accent); }

.fleet-kpi-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fleet-map-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 1rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: var(--fleet-map-h, 680px);
  height: var(--fleet-map-h, 680px);
}

.fleet-map-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  height: 100%;
  min-height: 0;
}

.fleet-map-canvas {
  height: 100%;
  width: 100%;
  min-height: 620px;
  z-index: 1;
}

.fleet-map-overlay {
  position: absolute;
  z-index: 500;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
}

.fleet-map-legend {
  bottom: 14px;
  left: 14px;
  display: flex;
  gap: 0.85rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.fleet-map-updated {
  top: 14px;
  left: 14px;
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.fleet-map-tiles {
  filter: grayscale(0.18) saturate(0.78) contrast(0.96);
}

.fleet-map-empty {
  position: absolute;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.18) 0%, rgba(248, 250, 252, 0.55) 100%);
  pointer-events: none;
}

.fleet-map-empty[hidden] {
  display: none !important;
}

.fleet-map-empty-card {
  pointer-events: auto;
  max-width: 22rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  padding: 1.35rem 1.4rem 1.25rem;
}

.fleet-map-empty-card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.fleet-map-empty-card p {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.fleet-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  min-height: 180px;
  padding: 1.5rem 1.25rem;
}

.fleet-empty-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 18rem;
}

.fleet-empty-card strong {
  font-size: 0.95rem;
  color: var(--text);
}

.fleet-fx {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.fleet-fx select {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 0.28rem 0.5rem;
}

.fleet-selected-trip[hidden],
.fleet-detail-link[hidden] {
  display: none !important;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.legend-dot--online { background: #22C55E; }
.legend-dot--offline { background: #94A3B8; }
.legend-dot--warehouse { background: #3B82F6; }

.fleet-map-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.fleet-selected-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: var(--shadow-xs);
  flex: 0 0 auto;
}

.fleet-selected-top {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.fleet-selected-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border: 1px solid #FED7AA;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.fleet-selected-thumb .icon {
  width: 22px;
  height: 22px;
}

.fleet-selected-info {
  flex: 1;
  min-width: 0;
}

.fleet-selected-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.fleet-selected-head h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

.fleet-selected-plate {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.fleet-selected-driver {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0.1rem 0 0;
}

.fleet-status-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.fleet-status-badge--available { background: var(--success-bg); color: var(--success); }
.fleet-status-badge--in-use { background: var(--accent-50); color: #C2410C; }
.fleet-status-badge--maintenance { background: var(--warning-bg); color: #92400E; }
.fleet-status-badge--retired { background: #F1F5F9; color: var(--text-muted); }

.fleet-selected-nav {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.fleet-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  transition: all 0.15s;
}

.fleet-nav-btn:hover {
  background: var(--accent-50);
  color: var(--accent);
  border-color: #FDBA74;
}

.fleet-selected-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.fleet-stat-pill {
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.35rem;
  text-align: center;
  border: 1px solid var(--border-light);
}

.fleet-stat-pill .label {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.1rem;
}

.fleet-stat-pill .value {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.fleet-selected-trip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.fleet-trip-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  color: #C2410C;
  text-transform: uppercase;
  font-weight: 700;
}

.fleet-trip-route { font-weight: 600; color: var(--text); }

.fleet-detail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 0.35rem;
  border-radius: 6px;
  transition: background 0.15s;
}

.fleet-detail-link:hover {
  background: var(--primary-50);
  text-decoration: none;
}

.fleet-live-panel {
  flex: 1 1 0;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.fleet-live-header {
  padding: 0.75rem 0.85rem 0.5rem;
  flex-shrink: 0;
}

.fleet-live-header h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.fleet-live-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.fleet-live-search {
  position: relative;
  padding: 0 0.65rem 0.5rem;
  flex-shrink: 0;
}

.fleet-live-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.fleet-live-search input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: inherit;
  background: var(--bg-subtle);
  transition: border-color 0.15s;
}

.fleet-live-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

.fleet-live-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0.25rem 0.5rem 0.5rem;
  overscroll-behavior: contain;
}

.fleet-live-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fleet-live-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fleet-spin 0.7s linear infinite;
}

@keyframes fleet-spin { to { transform: rotate(360deg); } }

.fleet-live-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.65rem;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  margin-bottom: 0.2rem;
}

.fleet-live-item:hover {
  background: var(--bg-subtle);
  border-color: var(--border-light);
}

.fleet-live-item.active {
  background: linear-gradient(90deg, #FFF7ED 0%, #fff 100%);
  border-color: #FDBA74;
  box-shadow: 0 1px 4px rgba(249, 115, 22, 0.12);
}

.fleet-live-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.fleet-live-thumb .icon {
  width: 18px;
  height: 18px;
}

.fleet-live-item.active .fleet-live-thumb {
  background: #FFEDD5;
}

.fleet-live-info {
  flex: 1;
  min-width: 0;
}

.fleet-live-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.fleet-live-meta {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fleet-live-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}

.fleet-live-gps {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.fleet-live-gps.is-online { background: var(--success-bg); color: var(--success); }
.fleet-live-gps.is-offline { background: #F1F5F9; color: var(--text-muted); }
.fleet-live-gps.is-none { background: #FEF3C7; color: #92400E; }

.fleet-live-speed {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

.fleet-live-empty {
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.fleet-marker-pin {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  background: #fff;
  transition: transform 0.15s;
  color: var(--text-secondary);
}

.fleet-marker-pin .icon {
  width: 18px;
  height: 18px;
}

.fleet-marker-pin.online { border-color: #22C55E; }
.fleet-marker-pin.offline { border-color: #94A3B8; opacity: 0.9; }
.fleet-marker-pin.warehouse { border-color: #3B82F6; background: #EFF6FF; color: #2563EB; }
.fleet-marker-pin.selected {
  border-color: #F97316;
  box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.25), 0 2px 10px rgba(0, 0, 0, 0.2);
  transform: scale(1.12);
}

.fleet-map-bottom {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  flex-shrink: 0;
  min-height: 300px;
}

.fleet-map-bottom .panel {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  margin-bottom: 0;
}

.fleet-expenses-panel .panel-header {
  font-size: 1rem;
  padding: 1rem 1.15rem;
}

.fleet-map-bottom .panel-header {
  flex-shrink: 0;
}

.fleet-trips-timeline {
  padding: 0.75rem 1rem 1rem;
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
}

.fleet-expense-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  flex: 1;
  align-content: stretch;
}

.fleet-expenses-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.fleet-expenses-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.fleet-expenses-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.fleet-expenses-body {
  padding: 0 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.fleet-expense-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fleet-expense-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.fleet-expense-total-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fleet-expense-total-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
}

.fleet-expense-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.fleet-expense-bar-seg { min-width: 0; }
.fleet-expense-bar-seg--fuel { background: #3B82F6; }
.fleet-expense-bar-seg--oil { background: #10B981; }
.fleet-expense-bar-seg--maint { background: #8B5CF6; }
.fleet-expense-bar-seg--tires { background: #F97316; }

.fleet-expense-card {
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.fleet-expense-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.fleet-expense-card--fuel { background: linear-gradient(135deg, #DBEAFE 0%, #EFF6FF 100%); }
.fleet-expense-card--oil { background: linear-gradient(135deg, #D1FAE5 0%, #ECFDF5 100%); }
.fleet-expense-card--maint { background: linear-gradient(135deg, #EDE9FE 0%, #F5F3FF 100%); }
.fleet-expense-card--tires { background: linear-gradient(135deg, #FFEDD5 0%, #FFF7ED 100%); }

.fleet-expense-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.72);
}

.fleet-expense-icon-wrap .icon {
  width: 28px;
  height: 28px;
}

.fleet-expense-icon-wrap--fuel { color: #2563EB; }
.fleet-expense-icon-wrap--oil { color: #059669; }
.fleet-expense-icon-wrap--maint { color: #7C3AED; }
.fleet-expense-icon-wrap--tires { color: #EA580C; }

.fleet-expense-card-body { min-width: 0; }

.fleet-expense-label { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.fleet-expense-value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }

.fleet-trip-row {
  display: flex;
  gap: 0.85rem;
  padding: 0.65rem 0;
  position: relative;
}

.fleet-trip-row:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5rem;
  bottom: -0.25rem;
  width: 2px;
  background: var(--border);
}

.fleet-trip-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #FFEDD5;
  flex-shrink: 0;
  margin-top: 0.2rem;
  z-index: 1;
}

.fleet-trip-content { flex: 1; min-width: 0; }

.fleet-trip-time {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.fleet-trip-arrow { color: var(--text-muted); margin: 0 0.15rem; }

.fleet-trip-route {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  line-height: 1.35;
}

.fleet-trip-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.fleet-trip-distance {
  font-weight: 600;
  color: var(--text-secondary);
}

.wh-till-keys {
  margin-left: auto;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.wh-till-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
  gap: 0.75rem !important;
}
.wh-till-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.8rem 0.8rem;
  cursor: pointer;
  min-height: 8.4rem;
  font: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.wh-till-card:hover:not(.is-disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-100);
}
.wh-till-card.is-in-cart {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.14);
}
.wh-till-card.is-last { outline: 2px solid rgba(249, 115, 22, 0.45); }
.wh-till-card.is-disabled { opacity: 0.5; cursor: not-allowed; }
.wh-till-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 0.4rem;
}
.wh-till-card__mark {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--primary-50);
  color: var(--primary-dark);
}
.wh-till-card__stock {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--success);
}
.wh-till-card.is-low .wh-till-card__stock { color: var(--warning); }
.wh-till-card.is-out .wh-till-card__stock { color: var(--danger); }
.wh-till-card strong {
  font-size: 0.84rem;
  line-height: 1.25;
  color: var(--text);
}
.wh-till-card__sku { font-size: 0.7rem; color: var(--text-muted); font-weight: 650; }
.wh-till-card em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
  font-size: 0.95rem;
  margin-top: auto;
}
.wh-till-card small { font-size: 0.68rem; color: var(--text-muted); }
.wh-till-lines {
  padding: 0.35rem 0.85rem 0.15rem;
  max-height: 210px;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}
.wh-till-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.2rem;
  border-bottom: 1px solid var(--border-light);
}
.wh-till-line strong { display: block; font-size: 0.8rem; }
.wh-till-line span { font-size: 0.7rem; color: var(--text-muted); }
.wh-till-line b { font-size: 0.82rem; }
.wh-till-remove {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.2rem;
}
.wh-pos-qty input {
  width: 2.4rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-height: 1.65rem;
  font: inherit;
}
.wh-till-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.wh-till-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}
.wh-till-chip:hover { border-color: var(--accent); color: var(--accent); }
.wh-till-last {
  margin: 0 1.15rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--success);
}
.wh-till-pay-label {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.4rem;
}
.wh-till-pay {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}
.wh-till-pay__opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.04rem;
  min-height: 0;
  padding: 0.45rem 0.5rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}
.wh-till-pay__opt strong { font-size: 0.82rem; font-weight: 800; }
.wh-till-pay__opt em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 650;
  color: var(--text-muted);
}
.wh-till-pay__mark {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.wh-till-pay__opt.is-on {
  border-color: var(--accent);
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.16);
}
.wh-till-pay__opt.is-on .wh-till-pay__mark,
.wh-till-pay__opt.is-on strong { color: #9a3412; }
.wh-till-paypanel {
  margin: 0 1.15rem 0.35rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.wh-till-paypanel.is-cash { background: #fffbeb; border-color: #fde68a; }
.wh-till-paypanel.is-card { background: #eff6ff; border-color: #bfdbfe; }
.wh-till-paypanel.is-momo { background: #ecfdf5; border-color: #a7f3d0; }
.wh-till-paypanel label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.wh-till-paypanel input,
.pos-checkout-fields input,
.pos-checkout-fields select {
  min-height: 2.35rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font: inherit;
  background: #fff;
  width: 100%;
}
.wh-till-paypanel input:focus,
.pos-checkout-fields input:focus,
.pos-checkout-fields select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.wh-till-paypanel__lead,
.wh-till-paypanel__hint {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
  font-weight: 600;
}
.wh-till-paypanel__hint { margin: 0.45rem 0 0; font-weight: 550; color: var(--text-muted); }
.wh-till-paypanel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.wh-till-nets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.wh-till-net {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  min-height: 2.1rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
}
.wh-till-net.is-on {
  border-color: #059669;
  background: #d1fae5;
  color: #065f46;
}
.wh-till-change {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
}
.wh-till-change strong { font-size: 1.05rem; }
.wh-till-change.is-short { background: #fef2f2; color: #991b1b; }
.pos-checkout-fields {
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  padding-top: 0.85rem;
  padding-bottom: 0.75rem;
}

.wh-dash .sc-billing.qb-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.wh-dash .sc-plan-card--current {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
  background: linear-gradient(180deg, var(--primary-50) 0%, #fff 46%);
}
.wh-dash .sc-plan-card__pill { background: var(--primary); }
.wh-dash .sc-plan-card__features li::before { border-color: var(--primary); }
.wh-dash .sc-plan-card__cta { background: var(--primary); }
.wh-dash .sc-plan-card__cta--ghost { color: var(--primary); border-color: var(--primary-100); }
.wh-dash .sc-plan-card__cta--current { background: var(--primary-50); color: var(--text-muted); }
.wh-dash .sc-billing__toggle-btn.is-active { color: var(--primary-dark); }

@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .wh-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .wh-quick { grid-template-columns: repeat(3, 1fr); }
  .wh-setup-banner,
  .wh-setup-banner__form { grid-template-columns: 1fr; }
  .wh-pipeline { flex-wrap: wrap; }
  .wh-pipeline__arrow { display: none; }
  .wh-pipeline__step { min-width: 28%; flex: 1 1 28%; }
  .tracking-stats { grid-template-columns: repeat(2, 1fr); }
  .tracking-map-layout { grid-template-columns: 1fr; }
  .sc-billing__grid { grid-template-columns: 1fr; }
  .fleet-map-page--full { --fleet-map-h: clamp(480px, 55vh, 700px); min-height: auto; }
  .fleet-map-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .fleet-map-bottom { grid-template-columns: 1fr; min-height: 0; }
  .fleet-map-bottom .panel { min-height: 260px; }
  .fleet-map-sidebar { height: auto; max-height: none; }
  .fleet-map-main { min-height: 480px; height: 480px; }
  .fleet-map-canvas { min-height: 480px; height: 100%; }
  .fleet-live-list { min-height: 220px; max-height: 320px; }
  .fleet-expense-grid { grid-template-columns: repeat(2, 1fr); }
  .fleet-expense-card { min-height: 120px; }
  .connect-type-grid { grid-template-columns: 1fr; }
  .map-sidebar { order: -1; }
  .device-list { max-height: 200px; }
  .wh-insight-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-layout { margin-left: 0; }
  .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem; }
  .hero h1 { font-size: 2.25rem; }
  .stats-grid, .features-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: inline-flex; }
  .topbar { gap: 0.75rem; }
  .two-col, .pos-layout, .pos-screen, .pos-home-grid, .pos-stats-grid, .pos-toolbar-grid,
  .wh-dash-split {
    grid-template-columns: 1fr;
  }
  .wh-kpi-row,
  .wh-quick { grid-template-columns: 1fr 1fr; }
  .wh-insight-strip,
  .wh-charts { grid-template-columns: 1fr; }
  .wh-charts__wide { grid-column: auto; }
  .wh-dash__hero-meta { align-items: stretch; width: 100%; }
  .wh-dash__hero-meta .page-actions { justify-content: flex-start; }
  .wh-app-footer { padding: 0 0.75rem; height: 1.75rem; min-height: 1.75rem; max-height: 1.75rem; }
  .wh-adj-health,
  .wh-xfer-sites,
  .wh-adj-scan { grid-template-columns: 1fr; }
  .page-body { padding: 1.15rem 1.15rem 0.65rem; }

  .pos-checkout {
    position: static;
    max-height: none;
  }
  .wh-till-ticket { overflow: visible; }

  .pos-product-grid,
  .wh-till-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  }
  .wh-till-paypanel__grid,
  .wh-till-nets { grid-template-columns: 1fr; }
  .wh-till-keys { display: none; }
  .landing-nav { padding: 1rem 1.25rem; }
  .landing-nav-links { display: none; }
  .landing-nav-links.is-open { display: flex; }
  .landing-nav-toggle { display: inline-flex; }
  body.sidebar-open { overflow: hidden; }
}
