/* ============================================
   Satellite Home Watch — App / Dashboard Styles
   ============================================ */

/* ── App Layout ── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--color-bg-primary);
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--navy-900);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition-slow), width var(--transition-slow);
  overflow: hidden;
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

/* No icon wrapper box — logo renders as a plain image */
.sidebar-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(10,22,40,0.25));
  transition: opacity var(--transition-fast);
}

.sidebar-logo:hover .sidebar-logo-img {
  opacity: 0.9;
}

.sidebar-logo-text {
  overflow: hidden;
}

.sidebar-logo-primary {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: white;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logo-sub {
  font-size: 0.6rem;
  font-weight: var(--weight-semibold);
  color: var(--navy-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Sidebar Nav ── */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-3);
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-500);
  padding: var(--space-4) var(--space-3) var(--space-2);
  margin-bottom: 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.5625rem var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--navy-300);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  position: relative;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
}

.sidebar-nav-item.active {
  background: rgba(100,140,220,0.18);
  color: white;
  font-weight: var(--weight-semibold);
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--navy-300);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.sidebar-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.sidebar-nav-item.active .sidebar-nav-icon,
.sidebar-nav-item:hover .sidebar-nav-icon { opacity: 1; }

.sidebar-nav-badge {
  margin-left: auto;
  background: #dc2626;
  color: white;
  font-size: 0.65rem;
  font-weight: var(--weight-bold);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.sidebar-nav-badge.amber {
  background: #d97706;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: var(--space-4) var(--space-3);
  flex-shrink: 0;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
  margin-bottom: var(--space-2);
}

.sidebar-profile:hover { background: rgba(255,255,255,0.06); }

.sidebar-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(100,140,220,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: white;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.15);
}

.sidebar-profile-info {
  overflow: hidden;
}

.sidebar-profile-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sidebar-profile-role {
  font-size: var(--text-xs);
  color: var(--navy-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.4375rem var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--navy-400);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sidebar-footer-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--navy-200);
}

.sidebar-footer-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Main Content Area ── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
}

/* ── Top Bar ── */
.topbar {
  height: var(--topbar-height);
  background: white;
  border-bottom: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex: 1;
  min-width: 0;
}

.topbar-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.topbar-menu-btn:hover { background: var(--blue-gray-50); }

.topbar-page-title {
  display: flex;
  flex-direction: column;
}

.topbar-title-text {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.topbar-welcome {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--weight-normal);
}

/* ── Property Selector ── */
.property-selector-wrap {
  position: relative;
}

.property-selector {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.4375rem var(--space-4);
  background: var(--blue-gray-50);
  border: 1.5px solid var(--blue-gray-200);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 200px;
}

.property-selector:hover {
  border-color: var(--navy-300);
  background: white;
}

.property-selector-icon {
  width: 28px;
  height: 28px;
  background: var(--navy-100);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.property-selector-icon svg {
  width: 14px;
  height: 14px;
  color: var(--navy-600);
}

.property-selector-text {
  flex: 1;
}

.property-selector-label {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}

.property-selector-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
  line-height: 1.3;
}

.property-selector-chevron {
  width: 14px;
  height: 14px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.property-selector.open .property-selector-chevron {
  transform: rotate(180deg);
}

.property-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  min-width: 240px;
  display: none;
}

.property-dropdown.open { display: block; }

.property-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: var(--border-light);
}

.property-dropdown-item:last-child { border-bottom: none; }

.property-dropdown-item:hover { background: var(--blue-gray-50); }

.property-dropdown-item.selected {
  background: var(--navy-50);
}

.property-dropdown-icon {
  width: 32px;
  height: 32px;
  background: var(--navy-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.property-dropdown-icon svg {
  width: 15px;
  height: 15px;
  color: var(--navy-600);
}

.property-dropdown-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
}

.property-dropdown-addr {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.property-dropdown-check {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--navy-500);
}

/* ── Topbar Right ── */
.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.topbar-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: transparent;
}

.topbar-icon-btn:hover {
  background: var(--blue-gray-50);
  color: var(--navy-800);
}

.topbar-icon-btn svg {
  width: 20px;
  height: 20px;
  /* Keep SVG below the badge bubble */
  position: relative;
  z-index: 0;
}

.topbar-notif-badge {
  /* ── Badge bubble sitting on the top-right of the icon ── */
  position: absolute;
  top: -4px;
  right: -4px;

  /* ── Size: dot when empty, pill when a number is shown ── */
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  box-sizing: border-box;

  /* ── Red bubble ── */
  background: #ef4444;
  border-radius: 9999px;
  border: 2px solid white;

  /* ── Number centering ── */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* ── Typography ── */
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  white-space: nowrap;
  font-family: inherit;

  /* ── Always on top of the SVG icon ── */
  z-index: 2;

  /* ── Smooth entry when count changes ── */
  transition: transform 0.15s ease, opacity 0.15s ease;
}

/* When the badge has no text (empty dot indicator) shrink to a small dot */
.topbar-notif-badge:empty {
  min-width: 8px;
  height: 8px;
  padding: 0;
  top: 2px;
  right: 2px;
}

/* Amber/orange variant — used on the Messages icon badge */
.topbar-notif-badge.amber {
  background: #f59e0b;
}

/* ── Ensure the badge is never clipped by the button's border-radius ── */
.topbar-icon-btn {
  overflow: visible;
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: white;
  cursor: pointer;
  border: 2px solid var(--blue-gray-200);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.topbar-avatar:hover {
  border-color: var(--navy-300);
  transform: scale(1.05);
}

/* ── Dashboard Content ── */
.dashboard-content {
  flex: 1;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  overflow-y: auto;
}

/* ── Summary Stats Row ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.stat-card {
  background: white;
  border-radius: var(--radius-2xl);
  border: var(--border-light);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-color, var(--navy-300));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-card:hover::after { opacity: 1; }

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon svg {
  width: 22px;
  height: 22px;
}

.stat-card-icon.alerts    { background: #fef2f2; }
.stat-card-icon.alerts svg  { color: #dc2626; }
.stat-card-icon.visits    { background: #eff6ff; }
.stat-card-icon.visits svg  { color: #2563eb; }
.stat-card-icon.reports   { background: #f0fdf4; }
.stat-card-icon.reports svg { color: #16a34a; }
.stat-card-icon.documents { background: #fffbeb; }
.stat-card-icon.documents svg { color: #d97706; }

.stat-card-trend {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.stat-card-trend.up   { background: #f0fdf4; color: #16a34a; }
.stat-card-trend.down { background: #fef2f2; color: #dc2626; }
.stat-card-trend.neutral { background: var(--blue-gray-50); color: var(--blue-gray-600); }

.stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  color: var(--navy-900);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
}

.stat-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.stat-cta {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--navy-500);
  margin-top: var(--space-4);
  transition: gap var(--transition-fast);
}

.stat-cta svg {
  width: 12px;
  height: 12px;
}

.stat-card:hover .stat-cta { gap: var(--space-2); }

/* ── Dashboard Grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.col-span-2 { grid-column: span 2; }

/* ── Panel / Section Card ── */
.panel {
  background: white;
  border-radius: var(--radius-2xl);
  border: var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: var(--border-light);
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.panel-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-icon svg {
  width: 18px;
  height: 18px;
}

.panel-icon.blue   { background: #eff6ff; }
.panel-icon.blue svg { color: #2563eb; }
.panel-icon.red    { background: #fef2f2; }
.panel-icon.red svg  { color: #dc2626; }
.panel-icon.green  { background: #f0fdf4; }
.panel-icon.green svg { color: #16a34a; }
.panel-icon.amber  { background: #fffbeb; }
.panel-icon.amber svg { color: #d97706; }
.panel-icon.navy   { background: var(--navy-50); }
.panel-icon.navy svg  { color: var(--navy-600); }
.panel-icon.purple { background: #faf5ff; }
.panel-icon.purple svg { color: #7c3aed; }

.panel-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  letter-spacing: -0.01em;
}

.panel-subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 1px;
}

.panel-action {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--navy-500);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.panel-action:hover {
  background: var(--navy-50);
  color: var(--navy-700);
  text-decoration: none;
}

.panel-action svg {
  width: 12px;
  height: 12px;
}

.panel-body {
  padding: var(--space-5) var(--space-6);
}

.panel-body-no-pad {
  padding: 0;
}

/* ── Data Table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  background: var(--blue-gray-50);
  border-bottom: var(--border-light);
}

.data-table th:first-child { border-radius: 0; }

.data-table td {
  padding: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  border-bottom: var(--border-light);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover { background: var(--blue-gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .td-primary {
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
}

/* ── Property Cards ── */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.property-card {
  background: white;
  border-radius: var(--radius-2xl);
  border: var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
}

.property-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
  border-color: rgba(10,22,40,0.12);
}

.property-card-img {
  height: 140px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-card-img svg {
  width: 48px;
  height: 48px;
  color: rgba(255,255,255,0.2);
}

.property-card-img-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}

.property-card-body {
  padding: var(--space-5);
}

.property-card-name {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}

.property-card-addr {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.property-card-addr svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.property-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.property-card-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.property-meta-label {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.property-meta-value {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--navy-700);
}

.property-card-footer {
  padding: var(--space-4) var(--space-5);
  border-top: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-card-cta {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--navy-500);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--transition-fast);
}

.property-card:hover .property-card-cta { gap: var(--space-2); }

.property-card-cta svg { width: 12px; height: 12px; }

/* ── Activity Timeline ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: var(--space-4);
  position: relative;
  padding-bottom: var(--space-5);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-line-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 36px;
}

.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
}

.timeline-dot svg {
  width: 16px;
  height: 16px;
}

.timeline-dot.visit  { background: #eff6ff; }
.timeline-dot.visit svg { color: #2563eb; }
.timeline-dot.alert  { background: #fef2f2; }
.timeline-dot.alert svg { color: #dc2626; }
.timeline-dot.report { background: #f0fdf4; }
.timeline-dot.report svg { color: #16a34a; }
.timeline-dot.message { background: #faf5ff; }
.timeline-dot.message svg { color: #7c3aed; }
.timeline-dot.document { background: #fffbeb; }
.timeline-dot.document svg { color: #d97706; }

.timeline-connector {
  flex: 1;
  width: 2px;
  background: var(--blue-gray-100);
  margin-top: 4px;
  min-height: var(--space-5);
}

.timeline-item:last-child .timeline-connector { display: none; }

.timeline-body {
  flex: 1;
  padding-top: 6px;
}

.timeline-event-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
  margin-bottom: 2px;
}

.timeline-event-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

.timeline-tag {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  color: var(--navy-500);
  background: var(--navy-50);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.timeline-time {
  font-size: 0.65rem;
  color: var(--color-text-light);
  font-weight: var(--weight-medium);
}

/* ── Alerts Preview ── */
.alert-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-light);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.alert-row:last-child { border-bottom: none; }
.alert-row:hover { background: var(--blue-gray-50); }

.alert-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alert-icon-wrap svg {
  width: 18px;
  height: 18px;
}

.alert-icon-wrap.urgent { background: #fef2f2; }
.alert-icon-wrap.urgent svg { color: #dc2626; }
.alert-icon-wrap.high   { background: #fff7ed; }
.alert-icon-wrap.high svg   { color: #c2410c; }
.alert-icon-wrap.medium { background: #fffbeb; }
.alert-icon-wrap.medium svg { color: #b45309; }
.alert-icon-wrap.low    { background: #f0fdf4; }
.alert-icon-wrap.low svg    { color: #16a34a; }

.alert-row-body { flex: 1; min-width: 0; }

.alert-row-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-row-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.alert-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ── Visit Rows ── */
.visit-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-light);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.visit-row:last-child { border-bottom: none; }
.visit-row:hover { background: var(--blue-gray-50); }

.visit-date-col {
  width: 50px;
  flex-shrink: 0;
  text-align: center;
}

.visit-date-month {
  font-size: 0.65rem;
  font-weight: var(--weight-bold);
  color: var(--navy-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.visit-date-day {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  color: var(--navy-800);
  line-height: 1;
  letter-spacing: -0.04em;
}

.visit-row-body { flex: 1; min-width: 0; }

.visit-row-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
}

.visit-row-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.visit-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ── Reports and Documents ── */
.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-light);
  transition: background var(--transition-fast);
}

.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--blue-gray-50); }

.list-row-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-row-icon svg {
  width: 18px;
  height: 18px;
}

.list-row-icon.report   { background: #f0fdf4; }
.list-row-icon.report svg { color: #16a34a; }
.list-row-icon.document { background: #fffbeb; }
.list-row-icon.document svg { color: #d97706; }

.list-row-body { flex: 1; min-width: 0; }

.list-row-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.list-row-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* ── Quick Contact ── */
.quick-contact-card {
  background: var(--navy-800);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.quick-contact-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.quick-contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: white;
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.quick-contact-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: white;
  letter-spacing: -0.01em;
}

.quick-contact-sub {
  font-size: var(--text-xs);
  color: var(--navy-300);
  margin-top: 2px;
}

.quick-contact-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.quick-contact-status-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.quick-contact-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.quick-contact-btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  color: white;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.quick-contact-btn:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.2);
  color: white;
  transform: translateX(2px);
}

.quick-contact-btn svg {
  width: 16px;
  height: 16px;
  color: var(--navy-200);
  flex-shrink: 0;
}

/* ── Track Visit Card ── */
.track-visit-card {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-navy);
  overflow: hidden;
  position: relative;
}

.track-visit-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(100,140,220,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.track-visit-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-300);
  margin-bottom: var(--space-3);
}

.track-visit-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: white;
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.track-visit-sub {
  font-size: var(--text-sm);
  color: var(--navy-200);
  margin-bottom: var(--space-6);
}

.track-progress {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 1;
}

.track-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.track-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}

.track-step-dot.done {
  background: #22c55e;
  border-color: #22c55e;
}

.track-step-dot.active {
  background: var(--navy-500);
  border-color: var(--navy-300);
  animation: pulse-dot 2s infinite;
}

.track-step-dot.pending {
  background: rgba(255,255,255,0.06);
}

.track-step-dot svg {
  width: 12px;
  height: 12px;
  color: white;
}

.track-step-text {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.9);
}

.track-step-text.pending { color: var(--navy-400); }

.track-step-time {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--navy-400);
}

.track-map-preview {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.track-map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.track-map-pin {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.track-map-pin-icon {
  width: 32px;
  height: 32px;
  background: var(--navy-400);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  border: 2px solid white;
}

.track-map-pin-icon svg {
  transform: rotate(45deg);
  width: 14px;
  height: 14px;
  color: white;
}

.track-map-label {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: var(--text-xs);
  color: white;
  font-weight: var(--weight-semibold);
}

/* ── Notifications Panel ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-light);
  transition: background var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--blue-gray-50); }

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--navy-500);
  border-radius: 0 2px 2px 0;
}

.notif-dot-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-dot-icon svg {
  width: 16px;
  height: 16px;
}

.notif-dot-icon.report   { background: #f0fdf4; }
.notif-dot-icon.report svg { color: #16a34a; }
.notif-dot-icon.alert    { background: #fef2f2; }
.notif-dot-icon.alert svg  { color: #dc2626; }
.notif-dot-icon.message  { background: #faf5ff; }
.notif-dot-icon.message svg { color: #7c3aed; }
.notif-dot-icon.visit    { background: #eff6ff; }
.notif-dot-icon.visit svg  { color: #2563eb; }

.notif-body { flex: 1; }

.notif-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-800);
  line-height: var(--leading-snug);
}

.notif-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: var(--leading-relaxed);
}

.notif-time {
  font-size: 0.65rem;
  color: var(--color-text-light);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── Overlay / Backdrop ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.open { display: block; }

/* ══════════════════════════════════════════════
   NEW COMPONENTS — Phase 1 UX Enhancements
   ══════════════════════════════════════════════ */

/* ── Property Health Status Card ── */
.property-health-card {
  background: white;
  border-radius: var(--radius-2xl);
  border: var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.property-health-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--health-bar-color, #16a34a);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.property-health-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.property-health-left {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.property-health-status-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.property-health-status-icon.status-green {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
}

.property-health-status-icon.status-yellow {
  background: #fffbeb;
  border: 2px solid #fde68a;
}

.property-health-status-icon.status-red {
  background: #fef2f2;
  border: 2px solid #fecaca;
}

.property-health-status-icon svg {
  width: 26px;
  height: 26px;
}

.property-health-status-icon.status-green svg { color: #16a34a; }
.property-health-status-icon.status-yellow svg { color: #d97706; }
.property-health-status-icon.status-red svg { color: #dc2626; }

.property-health-text {
  flex: 1;
  min-width: 0;
}

.property-health-label {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.property-health-property-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
  color: var(--navy-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.property-health-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: -0.01em;
}

.property-health-status-badge.status-green {
  background: #f0fdf4;
  color: #15803d;
  border: 1.5px solid #bbf7d0;
}

.property-health-status-badge.status-yellow {
  background: #fffbeb;
  color: #b45309;
  border: 1.5px solid #fde68a;
}

.property-health-status-badge.status-red {
  background: #fef2f2;
  color: #b91c1c;
  border: 1.5px solid #fecaca;
}

.property-health-status-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-green .property-health-status-badge-dot { background: #16a34a; }
.status-yellow .property-health-status-badge-dot { background: #d97706; animation: pulse-dot 2s infinite; }
.status-red .property-health-status-badge-dot { background: #dc2626; animation: pulse-dot 1.5s infinite; }

.property-health-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.property-health-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.property-health-meta-label {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.property-health-meta-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--navy-700);
}

.property-health-meta-value.value-green { color: #15803d; }
.property-health-meta-value.value-yellow { color: #b45309; }
.property-health-meta-value.value-red { color: #b91c1c; }

.property-health-right {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-shrink: 0;
}

.property-health-divider {
  width: 1px;
  height: 72px;
  background: var(--blue-gray-100);
}

.property-health-alerts-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  text-align: center;
  min-width: 72px;
}

.property-health-alerts-count {
  font-size: 2.25rem;
  font-weight: var(--weight-extrabold);
  color: #16a34a;
  letter-spacing: -0.05em;
  line-height: 1;
}

.property-health-alerts-count.has-alerts { color: #dc2626; }

.property-health-alerts-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--weight-medium);
  text-align: center;
  line-height: 1.2;
}

/* ── Last Inspection Summary Card ── */
.inspection-summary-card {
  background: white;
  border-radius: var(--radius-2xl);
  border: var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.inspection-summary-header {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 100%);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspection-summary-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inspection-summary-eyebrow {
  font-size: 0.65rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-300);
}

.inspection-summary-title {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: white;
  letter-spacing: -0.01em;
}

.inspection-summary-date {
  font-size: var(--text-xs);
  color: var(--navy-300);
  margin-top: 2px;
}

.inspection-summary-overall-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(74,222,128,0.15);
  border: 1.5px solid rgba(74,222,128,0.3);
  border-radius: var(--radius-full);
  padding: 5px 13px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: #4ade80;
}

.inspection-summary-overall-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
}

.inspection-summary-body {
  padding: var(--space-5) var(--space-6);
}

.inspection-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.inspection-check-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  background: var(--blue-gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.inspection-check-item:hover {
  background: white;
  border-color: var(--blue-gray-200);
  box-shadow: var(--shadow-sm);
}

.inspection-check-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inspection-check-icon.check-pass { background: #f0fdf4; }
.inspection-check-icon.check-pass svg { color: #16a34a; width: 14px; height: 14px; }
.inspection-check-icon.check-warn { background: #fffbeb; }
.inspection-check-icon.check-warn svg { color: #d97706; width: 14px; height: 14px; }
.inspection-check-icon.check-fail { background: #fef2f2; }
.inspection-check-icon.check-fail svg { color: #dc2626; width: 14px; height: 14px; }

.inspection-check-text {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--navy-700);
  line-height: var(--leading-snug);
}

.inspection-check-status-text {
  font-size: 0.6rem;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  display: block;
  margin-top: 1px;
}

.inspection-summary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: var(--border-light);
}

.inspection-summary-inspector {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.inspection-summary-inspector-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--navy-600);
}

.inspection-summary-inspector-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.inspection-summary-inspector-name {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--navy-700);
}

.inspection-summary-inspector-role {
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

/* ── Live Visit Tracking — Enhanced Status Bar ── */
.track-visit-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
}

.track-visit-status-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.track-visit-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.track-visit-status-dot.status-scheduled {
  background: #60a5fa;
  animation: pulse-dot 3s infinite;
}

.track-visit-status-dot.status-en-route {
  background: #facc15;
  animation: pulse-dot 1.5s infinite;
}

.track-visit-status-dot.status-active {
  background: #4ade80;
  animation: pulse-dot 1s infinite;
}

.track-visit-status-dot.status-normal {
  background: #4ade80;
  animation: pulse-dot 2s infinite;
}

.track-visit-status-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-300);
}

.track-visit-status-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: white;
  margin-top: 1px;
}

.track-visit-eta {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(250,204,21,0.12);
  border: 1px solid rgba(250,204,21,0.2);
  border-radius: var(--radius-lg);
  padding: 4px 10px;
}

.track-visit-eta svg {
  width: 13px;
  height: 13px;
  color: #facc15;
  flex-shrink: 0;
}

.track-visit-eta-text {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: #facc15;
}

/* Active step highlight */
.track-step.step-active .track-step-dot {
  background: rgba(250,204,21,0.15);
  border-color: rgba(250,204,21,0.6) !important;
  box-shadow: 0 0 12px rgba(250,204,21,0.25);
}

.track-step.step-active .track-step-text {
  color: #facc15 !important;
  font-weight: var(--weight-semibold) !important;
}

.track-step.step-active .track-step-dot::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #facc15;
  border-radius: 50%;
}

/* ── Weather Watch Card ── */
.weather-watch-card {
  background: linear-gradient(145deg, #0c1f3a 0%, #1a3a6b 65%, #0f2c55 100%);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-navy);
  overflow: hidden;
  position: relative;
}

.weather-watch-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59,130,246,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.weather-watch-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(239,68,68,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.weather-watch-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.weather-watch-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.weather-watch-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-watch-icon svg {
  width: 20px;
  height: 20px;
  color: #93c5fd;
}

.weather-watch-title-text {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: white;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.weather-watch-location {
  font-size: var(--text-xs);
  color: var(--navy-300);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.weather-watch-location svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.weather-watch-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239,68,68,0.15);
  border: 1.5px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: #fca5a5;
}

.weather-watch-alert-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
  flex-shrink: 0;
}

.weather-watch-body {
  padding: var(--space-5) var(--space-6);
  position: relative;
  z-index: 1;
}

.weather-watch-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.weather-watch-condition-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  color: white;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 3px;
}

.weather-watch-condition-desc {
  font-size: var(--text-xs);
  color: var(--navy-300);
}

.weather-watch-icon-large {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.35));
}

.weather-watch-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.weather-stat-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.weather-stat-item svg {
  width: 14px;
  height: 14px;
  color: var(--navy-400);
  margin-bottom: 1px;
}

.weather-stat-label {
  font-size: 0.6rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-400);
}

.weather-stat-value {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: white;
  line-height: 1.2;
}

.weather-watch-footer {
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.weather-inspection-label {
  font-size: 0.6rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-400);
  display: block;
  margin-bottom: 2px;
}

.weather-inspection-value {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: #fca5a5;
}

.weather-watch-pending-badge {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: #fca5a5;
}

/* ── Alert Action Button ── */
.alert-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--navy-500);
  background: var(--navy-50);
  border: 1.5px solid var(--navy-100);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.alert-action-btn:hover {
  background: var(--navy-100);
  color: var(--navy-700);
  border-color: var(--navy-200);
  gap: 6px;
  text-decoration: none;
}

.alert-action-btn svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.alert-action-btn:hover svg {
  transform: translateX(2px);
}

/* ── Icon size bumps for quick-scan sections ── */
.panel-icon svg {
  width: 20px;
  height: 20px;
}

.notif-dot-icon {
  width: 36px;
  height: 36px;
}

.notif-dot-icon svg {
  width: 18px;
  height: 18px;
}

.alert-icon-wrap {
  width: 38px;
  height: 38px;
}

.alert-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.list-row-icon {
  width: 40px;
  height: 40px;
}

.list-row-icon svg {
  width: 20px;
  height: 20px;
}

/* ── Responsive Dashboard ── */
@media (max-width: 1280px) {
  .property-health-card {
    grid-template-columns: 1fr;
  }
  .property-health-right {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-4);
  }
  .property-health-divider {
    width: 80px;
    height: 1px;
  }
  .inspection-checklist {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
  .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 100%; }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-2xl);
  }

  .sidebar.mobile-open { transform: translateX(0); }

  .main-content { margin-left: 0; }

  /* White .topbar hidden at ≤1024px — no need to show menu btn or adjust padding */
  
  .property-selector { min-width: unset; }
  
  .dashboard-content { padding: var(--space-5) var(--space-4); gap: var(--space-5); }
  
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  
  .properties-grid { grid-template-columns: 1fr; }
  
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  
  .topbar-page-title .topbar-welcome { display: none; }

  .property-health-left {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .property-health-meta-row {
    gap: var(--space-3);
  }
  .weather-watch-stats {
    grid-template-columns: 1fr 1fr;
  }
  .inspection-checklist {
    grid-template-columns: 1fr;
  }
  .track-visit-status-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: var(--text-2xl); }
}

/* ════════════════════════════════════════════
   DASHBOARD — FULL RESPONSIVE OVERRIDES
   ════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px): Drawer navigation ── */
@media (max-width: 1024px) {
  /* Sidebar becomes off-screen drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 301;
    transform: translateX(calc(-1 * var(--sidebar-width)));
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-2xl);
    width: var(--sidebar-width);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* Overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.6);
    z-index: 299;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity var(--transition-slow);
  }

  .sidebar-overlay.open {
    display: block;
    opacity: 1;
  }

  /* Full-width main */
  .main-content {
    margin-left: 0 !important;
    padding-top: 56px; /* mobile topbar */
  }

  /* White desktop topbar is hidden on tablet/mobile — handled by responsive.css.
     The dark blue .mobile-topbar is the ONLY header at this breakpoint. */
  .topbar {
    display: none !important;
  }

  /* Stats 2-col on tablet */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Dashboard grid collapses */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  .dashboard-grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .col-span-2 {
    grid-column: span 1 !important;
  }

  /* Property health card stacks */
  .property-health-card {
    grid-template-columns: 1fr !important;
  }

  .property-health-right {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-3);
  }
}

/* ── Mobile (≤ 768px): Full stack layout ── */
@media (max-width: 768px) {
  /* Dashboard content tighter padding */
  .dashboard-content {
    padding: var(--space-4) !important;
    gap: var(--space-4) !important;
  }

  /* White desktop topbar is display:none at ≤1024px.
     No further adjustments needed. */
  .property-selector-wrap {
    display: none !important;
  }

  /* Stats go single col on mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-3) !important;
  }

  .stat-card {
    padding: var(--space-4) !important;
  }

  .stat-card-top {
    margin-bottom: var(--space-3) !important;
  }

  .stat-card-icon {
    width: 36px;
    height: 36px;
  }

  .stat-card-icon svg {
    width: 18px;
    height: 18px;
  }

  .stat-value {
    font-size: var(--text-2xl) !important;
  }

  .stat-cta {
    display: none;
  }

  /* Dashboard grid single col */
  .dashboard-grid,
  .dashboard-grid-3 {
    grid-template-columns: 1fr !important;
    gap: var(--space-4) !important;
  }

  /* Panel headers compact */
  .panel-header {
    padding: var(--space-4) var(--space-4) !important;
  }

  .panel-title {
    font-size: var(--text-sm) !important;
  }

  /* Property health card mobile */
  .property-health-card {
    grid-template-columns: 1fr !important;
    padding: var(--space-4) !important;
  }

  .property-health-right {
    flex-direction: column !important;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .property-health-divider {
    display: none;
  }

  /* Weather card compact */
  .weather-watch-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Inspection checklist single col */
  .inspection-checklist {
    grid-template-columns: 1fr !important;
  }

  /* Notif items smaller */
  .notif-item {
    padding: var(--space-3) var(--space-4) !important;
  }

  /* Visit tracking status bar */
  .track-visit-status-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* ── Mobile SM (≤ 480px) ── */
@media (max-width: 480px) {
  .dashboard-content {
    padding: var(--space-3) !important;
    gap: var(--space-3) !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: var(--space-2) !important;
  }

  .stat-card {
    padding: var(--space-3) !important;
  }

  .stat-value {
    font-size: var(--text-xl) !important;
  }

  .stat-label {
    font-size: var(--text-xs) !important;
  }
}
