@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

/* ==================== Root Variables ==================== */
:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --secondary-color: #3b82f6;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --dark-bg: #1f2937;
  --light-bg: #f9fafb;
  --sidebar-width: 280px;
  --map-sidebar-width: 320px;
  --border-radius: 12px;
  --dashboard-bg: #f3f5ef;
  --dashboard-surface: rgba(255, 255, 255, 0.84);
  --dashboard-ink: #162218;
  --dashboard-muted: #617065;
  --dashboard-border: rgba(22, 34, 24, 0.08);
  --dashboard-shadow: 0 24px 60px rgba(27, 39, 30, 0.10);
  --dashboard-hero: linear-gradient(135deg, #18382f 0%, #28594d 55%, #c8df6d 100%);
  --dashboard-warm: #f4b860;
  --dashboard-accent: #2f7d63;
  --dashboard-danger: #cf5a4a;
  --dashboard-panel-radius: 28px;
}

/* ==================== Base Styles ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--light-bg);
  color: #1f2937;
  line-height: 1.6;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==================== Login Page ==================== */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: bg-scroll 20s linear infinite;
}

@keyframes bg-scroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}

.login-box {
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo i {
  font-size: 3.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.login-logo h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.login-logo p {
  color: #6b7280;
  font-size: 0.95rem;
}

.form-control {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-primary {
  background: var(--primary-color);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ==================== Sidebar Navigation ==================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #1f2937;
}

.sidebar-brand i {
  font-size: 2rem;
  color: var(--primary-color);
}

.sidebar-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
}

.nav-item {
  margin: 0.25rem 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #6b7280;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  background: #f3f4f6;
  color: var(--primary-color);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.nav-link i {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* ==================== Main Content ==================== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--light-bg);
}

.top-bar {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-title h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  color: #1f2937;
}

.page-title p {
  color: #6b7280;
  margin: 0;
  font-size: 0.9rem;
}

.top-bar-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.user-profile:hover {
  background: #f3f4f6;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

/* ==================== Dashboard Cards ==================== */
.content-wrapper {
  padding: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon.primary {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-color);
}

.stat-icon.secondary {
  background: rgba(59, 130, 246, 0.1);
  color: var(--secondary-color);
}

.stat-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.stat-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: #6b7280;
  font-size: 0.9rem;
}

.stat-change {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.stat-change.positive {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-color);
}

.stat-change.negative {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* ==================== Cards and Panels ==================== */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.card-body {
  padding: 1.5rem;
}

/* ==================== Map Page Specific Styles ==================== */
.map-layout {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.map-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--map-sidebar-width);
  height: 100vh;
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  overflow: hidden;
}

.map-sidebar.collapsed {
  width: 0;
}

.map-sidebar.collapsed .map-sidebar-header,
.map-sidebar.collapsed .map-sidebar-content {
  opacity: 0;
  pointer-events: none;
}

.map-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: var(--map-sidebar-width);
  transition: opacity 0.2s ease;
}

.map-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-width: var(--map-sidebar-width);
  transition: opacity 0.2s ease;
}

.map-container {
  position: fixed;
  top: 0;
  left: var(--map-sidebar-width);
  right: 0;
  bottom: 0;
  z-index: 1;
  transition: left 0.3s ease;
}

.map-sidebar.collapsed + .map-container {
  left: 0;
}

/* Floating sidebar toggle button on the map */
.map-toggle-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 600;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #1f2937;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.map-toggle-btn:hover {
  background: white;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

/* Hide hamburger when sidebar is open */
.map-sidebar:not(.collapsed) ~ .map-container .map-toggle-btn {
  display: none;
}

#map {
  width: 100%;
  height: 100%;
}

/* Floating Map Controls */
.floating-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-control-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #10b981; /* Default icon color to green */
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.map-control-btn:hover {
  background: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-control-btn.active {
  background: var(--primary-color);
  color: #10b981; /* Ensure icon stays green in active state */
}

/* Asset List in Sidebar */
.asset-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.asset-item {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.asset-item:hover {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.asset-item.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
  border-color: var(--primary-color);
}

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

.asset-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.asset-status {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.asset-status.online {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-color);
}

.asset-status.offline {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.asset-status.alert {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.asset-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Detail Drawer */
.detail-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.detail-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.telemetry-item {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.telemetry-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.telemetry-label {
  font-size: 0.85rem;
  color: #6b7280;
}

/* ==================== Tables ==================== */
.table-responsive {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
}

tr:hover {
  background: #f9fafb;
}

/* ==================== Buttons ==================== */
.btn {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

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

.btn-success:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

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

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

/* ==================== Badges ==================== */
.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-block;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-color);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
}

/* ==================== Dashboard Utilities ==================== */

.dashboard-primary-btn,
.dashboard-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.92rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.area-card-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--dashboard-border);
    background: #ffffff;
    color: var(--dashboard-ink);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-card-btn:hover {
    background: var(--dashboard-accent);
    color: #ffffff;
    border-color: var(--dashboard-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 125, 99, 0.2);
}

.area-card-btn.danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.dashboard-primary-btn {
    background: var(--dashboard-accent);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(47, 125, 99, 0.20);
}

.dashboard-primary-btn:hover {
    background: #25634d;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(47, 125, 99, 0.30);
}

.dashboard-secondary-btn {
    background: rgba(255, 255, 255, 0.8);
    color: var(--dashboard-ink);
    border: 1px solid var(--dashboard-border);
    backdrop-filter: blur(10px);
}

.dashboard-secondary-btn:hover {
    background: #ffffff;
    border-color: rgba(47, 125, 99, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(18, 28, 22, 0.08);
}

.dashboard-warning-btn {
    appearance: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.4rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff8eb;
    color: #f59e0b;
    border: 1px solid #fee2b3;
}

.dashboard-warning-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.08);
}

/* Base Layout for All Dashboard Pages */
body.dashboard-page {
    background:
        radial-gradient(circle at top right, rgba(200, 223, 109, 0.35), transparent 22%),
        radial-gradient(circle at left 20%, rgba(47, 125, 99, 0.14), transparent 28%),
        var(--dashboard-bg);
    color: var(--dashboard-ink);
    font-family: 'Manrope', sans-serif;
}

body.dashboard-page .sidebar {
    background: rgba(18, 29, 24, 0.94);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 16px 0 40px rgba(9, 16, 12, 0.24);
    backdrop-filter: blur(16px);
}

body.dashboard-page .sidebar-header,
body.dashboard-page .sidebar-footer {
    border-color: rgba(255, 255, 255, 0.08);
}

body.dashboard-page .sidebar-brand,
body.dashboard-page .sidebar-brand h3 {
    color: #f8f8f2;
    font-family: 'Space Grotesk', sans-serif;
}

body.dashboard-page .sidebar-brand i {
    color: #c8df6d;
}

/* Sidebar Nav Links */
body.dashboard-page .nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    color: rgba(242, 246, 241, 0.72);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.94rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 0.35rem;
}

body.dashboard-page .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dashboard-page .nav-link.active {
    background: linear-gradient(135deg, rgba(200, 223, 109, 0.24), rgba(47, 125, 99, 0.45));
    border-color: rgba(200, 223, 109, 0.3);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

body.dashboard-page .main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: margin-left 0.3s ease;
  position: relative;
}

body.dashboard-page .sidebar {
  overflow: hidden;
}

body.dashboard-page .sidebar-nav {
  min-height: 0;
  padding: 0 1rem;
}

body.dashboard-page .nav-label {
    padding: 0 1.25rem;
    margin: 1.25rem 0 0.75rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

body.dashboard-page .nav-label:first-child {
    margin-top: 0.5rem;
}

body.dashboard-page .dashboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 10, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1090;
}

body.dashboard-page .dashboard-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

body.dashboard-page .dashboard-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem 0;
  position: relative;
  z-index: 10;
}

body.dashboard-page .topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

body.dashboard-page .topbar-brand {
    display: grid;
    gap: 0.15rem;
}

body.dashboard-page .topbar-title {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dashboard-ink);
    letter-spacing: -0.02em;
}

body.dashboard-page .topbar-subtitle {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--dashboard-muted);
}

body.dashboard-page .top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: auto;
  flex-wrap: wrap;
}

body.dashboard-page .dashboard-mobile-toggle {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(21, 31, 24, 0.10);
  color: var(--dashboard-ink);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.dashboard-warning-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.4rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
    cursor: pointer;
}

.dashboard-warning-btn:hover {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.16);
}

.dashboard-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.4rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecaca;
    cursor: pointer;
}

.dashboard-danger-btn:hover {
    background: #e11d48;
    color: #ffffff;
    border-color: #e11d48;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(225, 29, 72, 0.16);
}

body.dashboard-page .dashboard-icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: var(--dashboard-ink);
  box-shadow: 0 8px 20px rgba(18, 28, 22, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.dashboard-page .dashboard-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(18, 28, 22, 0.12);
}

body.dashboard-page .notification-bell {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--dashboard-muted);
  box-shadow: 0 8px 20px rgba(18, 28, 22, 0.06);
}

body.dashboard-page .notification-bell:hover {
  color: var(--dashboard-ink);
}

body.dashboard-page .badge-dot {
  top: 10px;
  right: 10px;
}

body.dashboard-page .user-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 24px rgba(18, 28, 22, 0.06);
  transition: background 0.2s ease, transform 0.2s ease;
}

body.dashboard-page .user-profile:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-1px);
}

body.dashboard-page .user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, #163126 0%, #2f7d63 55%, #c8df6d 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(22, 34, 24, 0.14);
}

body.dashboard-page .user-meta {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

body.dashboard-page .user-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--dashboard-ink);
  white-space: nowrap;
}

body.dashboard-page .user-status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dashboard-muted);
}

body.dashboard-page .user-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  width: 220px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(18, 28, 22, 0.14);
  border: 1px solid rgba(22, 34, 24, 0.08);
  display: none;
  z-index: 1110;
  padding: 0.5rem 0;
}

body.dashboard-page .user-profile:hover .user-dropdown,
body.dashboard-page .user-profile:focus-within .user-dropdown {
  display: block;
}

body.dashboard-page .dropdown-item-custom {
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--dashboard-ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

body.dashboard-page .dropdown-item-custom:hover {
  background: #f8fafc;
  color: var(--dashboard-accent);
}

body.dashboard-page .dropdown-divider-custom {
  height: 1px;
  background: #edf1e8;
  margin: 0.45rem 0;
}

body.dashboard-page .dashboard-body {
  flex: 1 0 auto;
  width: 100%;
  padding: 1.5rem 2rem 2rem;
}

body.dashboard-page .dashboard-footer {
  margin-top: auto;
  padding: 1.5rem 2rem 2rem;
  background: transparent !important;
  border-top: 0 !important;
}

body.dashboard-page .dashboard-footer-shell {
  background: rgba(255, 255, 255, 0.84);
  border-radius: 28px;
  border: 1px solid rgba(22, 34, 24, 0.08);
  box-shadow: 0 24px 60px rgba(27, 39, 30, 0.10);
  backdrop-filter: blur(18px);
  padding: 1.5rem;
}

body.dashboard-page .dashboard-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(220px, 1fr));
  gap: 1.25rem;
}

body.dashboard-page .dashboard-footer-section h6 {
  margin: 0 0 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dashboard-ink);
}

body.dashboard-page .dashboard-footer-section p,
body.dashboard-page .dashboard-footer-contact span,
body.dashboard-page .dashboard-footer-location {
  margin: 0;
  color: var(--dashboard-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  font-weight: 600;
}

body.dashboard-page .dashboard-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

body.dashboard-page .dashboard-footer-links a,
body.dashboard-page .dashboard-footer-contact span,
body.dashboard-page .dashboard-footer-location {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

body.dashboard-page .dashboard-footer-links a {
  color: var(--dashboard-accent) !important;
  font-size: 0.88rem;
  font-weight: 700;
}

body.dashboard-page .dashboard-footer-links a:hover {
  color: var(--dashboard-accent) !important;
  opacity: 0.8;
}

body.dashboard-page .dashboard-footer-rule {
  height: 1px;
  background: rgba(22, 34, 24, 0.08);
  margin: 1rem 0 0.85rem;
}

body.dashboard-page .dashboard-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--dashboard-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 991px) {
  body.dashboard-page .sidebar {
    transform: translateX(-100%);
    width: min(86vw, 320px);
    z-index: 1100;
  }

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

  body.dashboard-page .main-content {
    margin-left: 0;
    min-height: 100dvh;
  }

  body.dashboard-page .dashboard-mobile-toggle {
    display: inline-flex;
    position: fixed;
    top: 0.75rem;
    left: 1rem;
    z-index: 1050;
    box-shadow: 0 8px 32px rgba(18, 28, 22, 0.15);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.45);
  }

  body.dashboard-page .dashboard-topbar,
  body.dashboard-page .dashboard-body,
  body.dashboard-page .dashboard-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.dashboard-page .dashboard-footer-grid {
    grid-template-columns: 1fr;
  }

  body.dashboard-page .user-meta {
    display: none;
  }
}

@media (max-width: 768px) {
  body.dashboard-page .dashboard-topbar {
    padding-top: 1rem;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  /* Tags page filter/search spacing */
  .dashboard-page .input-group[style*="min-width: 280px"] {
    margin-top: 0.5rem;
  }

  body.dashboard-page .topbar-left {
    flex: 1;
    gap: 0.75rem;
    padding-left: 3.8rem;
  }

  body.dashboard-page .topbar-title {
    font-size: 1.25rem;
    white-space: nowrap;
  }

  body.dashboard-page .top-bar-actions {
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  body.dashboard-page .dashboard-body {
    padding-top: 1rem;
  }

  body.dashboard-page .dashboard-footer-shell {
    border-radius: 24px;
    padding: 1.2rem;
  }

  body.dashboard-page .dashboard-footer-section h6 {
    font-size: 0.8rem;
  }

  body.dashboard-page .dashboard-footer-section p,
  body.dashboard-page .dashboard-footer-contact span,
  body.dashboard-page .dashboard-footer-location,
  body.dashboard-page .dashboard-footer-links a {
    font-size: 0.68rem;
  }


  body.dashboard-page .dashboard-footer-contact .last {
    margin-left: 1.5rem;
  }

  body.dashboard-page .dashboard-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  body.dashboard-page .dashboard-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.68rem;
  }

  /* Responsive Table: Only show TAG REFERENCE and ACTION on small screens */
  .dashboard-page table th:not(:first-child):not(:last-child),
  .dashboard-page table td:not(:first-child):not(:last-child) {
    display: none;
  }

  .dashboard-page .filter-chip {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Wide panels for mobile */

  .page-hero {
    margin: 0rem 0rem !important;
  }

  .page-hero,
  .hero-panel {
    border-radius: 18px !important;
  }

  .page-hero,
  .surface-panel,
  .hero-side {
    padding: 1.15rem 1.15rem !important;
    /* margin: 0rem 0rem !important; */
    border-radius: 18px !important;
  }


  .page-hero,
  .surface-panel {
    padding: 1.15rem 1.15rem !important;
    margin: 0 0.75rem 1.5rem !important;
    border-radius: 18px !important;
  }

  .hero-side h2 {
    font-size: 1.25rem !important;
  }

  .hero-panel p {
    font-size: 0.85rem !important;
    margin-bottom: 1.25rem !important;
  }

  .hero-panel h1 {
    font-size: 1.75rem !important;
  }
}

@media (max-height: 740px) and (max-width: 991px) {
  body.dashboard-page .sidebar-nav {
    padding-bottom: 6rem;
  }
}

/* Global Dashboard Components */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid var(--dashboard-border);
    background: rgba(255, 255, 255, 0.76);
    cursor: pointer;
    color: var(--dashboard-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
}

.filter-chip:hover {
    background: #ffffff;
    color: var(--dashboard-ink);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(18, 28, 22, 0.08);
}

.filter-chip.active {
    background: var(--dashboard-accent);
    color: #ffffff !important;
    border-color: var(--dashboard-accent);
    box-shadow: 0 10px 24px rgba(47, 125, 99, 0.24);
}

.filter-chip.active strong,
.filter-chip.active i {
    color: #ffffff !important;
}

.search-shell .input-group-text {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--dashboard-border);
    border-right: none;
    border-radius: 14px 0 0 14px !important;
    color: var(--dashboard-muted);
}

.search-shell .form-control {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--dashboard-border);
    border-left: none;
    border-radius: 0 14px 14px 0 !important;
    font-weight: 600;
    font-size: 0.92rem;
}

.search-shell .form-control:focus {
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(18, 28, 22, 0.06);
    border-color: rgba(47, 125, 99, 0.25);
}

.tag-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eef7f2 !important;
    color: #2f7d63 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    font-size: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.badge {
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-success {
    background: rgba(16, 185, 129, 0.10);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.10);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.10);
    color: #ef4444;
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.10);
    color: #6b7280;
}

/* Area Card Buttons */
.area-card-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(22, 34, 24, 0.08);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.84);
    color: var(--dashboard-ink);
    box-shadow: 0 4px 10px rgba(18, 28, 22, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.area-card-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(18, 28, 22, 0.08);
}

.area-card-btn.danger {
    color: var(--dashboard-danger);
}

.area-card-btn.danger:hover {
    background: #fff1f2;
    border-color: #fecaca;
}

/* ==================== Dashboard Page Hero & Layout ==================== */

.page-hero {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    align-items: stretch;
}

.hero-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 2rem 2.5rem;
    border-radius: 40px;
    box-shadow: 0 40px 100px rgba(18, 28, 22, 0.08);
    position: relative;
    overflow: hidden;
}

.hero-panel h1 {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    color: var(--dashboard-ink);
}

.hero-panel p {
    font-size: 1rem;
    color: var(--dashboard-muted);
    max-width: 580px;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.8rem;
    background: rgba(47, 125, 99, 0.1);
    color: var(--dashboard-accent);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-chip {
    padding: 0.6rem 1rem;
    background: #ffffff;
    border: 1px solid var(--dashboard-border);
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dashboard-ink);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(18, 28, 22, 0.04);
}

.hero-side {
    width: 320px;
    background: #163126;
    border-radius: 40px;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    color: #ffffff;
    box-shadow: 20px 40px 80px rgba(18, 28, 22, 0.3);
}

.hero-side h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.hero-side p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

/* Surface Panel */
.surface-panel {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
    padding: 2.25rem;
    margin: 0 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(18, 28, 22, 0.04);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--dashboard-ink);
    margin: 0;
}

.section-head p {
     margin: 0.35rem 0 0;
    font-size: 0.92rem;
    color: var(--dashboard-muted);
    font-weight: 600;
}

@media (max-width: 1200px) {
  .page-hero {
    flex-direction: column;
  }
  .hero-side {
    width: 100%;
    min-height: auto;
  }
}

/* ==================== Dashboard Specific Layout ==================== */
.dashboard-body {
    padding: 1rem 2rem 3rem;
}

.dashboard-header {
    margin: 0 0 2rem;
    background: var(--dashboard-hero);
    border-radius: 40px;
    padding: 3rem;
    color: white;
    box-shadow: 20px 40px 80px rgba(18, 28, 22, 0.15);
    position: relative;
    overflow: hidden;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200, 223, 109, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.dashboard-header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    /* letter-spacing: -0.04em; */
    color: white;
}

.welcome-text {
    font-size: 0.95rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 650px;
    line-height: 1.5;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

.dashboard-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-panel {
    background: white;
    border-radius: 32px;
    padding: 2.25rem;
    border: 1px solid var(--dashboard-border);
    box-shadow: 0 10px 30px rgba(18, 28, 22, 0.04);
}

.dashboard-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-section-title h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--dashboard-ink);
}

.dashboard-section-title p {
    margin: 0.35rem 0 0;
    color: var(--dashboard-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

/* ==================== KPI Cards ==================== */
.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.dashboard-mini-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(18, 28, 22, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.dashboard-mini-card:hover {
    transform: translateY(-5px);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(18, 28, 22, 0.08);
}

.dashboard-mini-card .card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-mini-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

[data-tone="forest"] .dashboard-mini-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
[data-tone="ocean"] .dashboard-mini-icon { background: rgba(29, 78, 216, 0.1); color: #1d4ed8; }
[data-tone="sun"] .dashboard-mini-icon { background: rgba(244, 184, 96, 0.1); color: #f4b860; }
[data-tone="coral"] .dashboard-mini-icon { background: rgba(207, 90, 74, 0.1); color: #cf5a4a; }

.dashboard-mini-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--dashboard-ink);
}

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

.kpi-trend-pill {
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.kpi-trend-pill.up { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.kpi-trend-pill.down { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* ==================== Map Container ==================== */
.dashboard-map-panel {
    background: white;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid var(--dashboard-border);
    box-shadow: 0 20px 50px rgba(18, 28, 22, 0.04);
}

.dashboard-map-head {
    padding: 1.75rem 2.25rem;
    background: #ffffff;
}

.dashboard-map-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--dashboard-ink);
}

.dashboard-map-head p {
     margin: 0.35rem 0 0;
    font-size: 0.95rem;
    color: var(--dashboard-muted);
    font-weight: 600;
}

#overviewMap {
    height: 520px;
    width: 100%;
}

.dashboard-map-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    padding: 1.5rem 2.25rem;
    background: #f8faf9;
    border-top: 1px solid var(--dashboard-border);
    gap: 1.5rem;
}

.dashboard-map-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dashboard-map-stat span {
    font-size: 0.72rem;
    font-weight: 800;
    color: #617065;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-map-stat strong {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    color: var(--dashboard-ink);
    font-weight: 700;
}

/* ==================== Quick Action Box ==================== */
.dashboard-side-card {
    background: white;
    border-radius: 32px;
    padding: 2.25rem;
    border: 1px solid var(--dashboard-border);
    box-shadow: 0 15px 40px rgba(18, 28, 22, 0.04);
    height: 100%;
}

.dashboard-side-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--dashboard-ink);
}

.dashboard-side-card p {
    margin: 0.35rem 0 1.5rem;
    font-size: 0.92rem;
    color: var(--dashboard-muted);
    font-weight: 600;
}

.dashboard-task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dashboard-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--dashboard-border);
}

.dashboard-task-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dashboard-task-item strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dashboard-ink);
}

.dashboard-task-item span {
    display: block;
    font-size: 0.82rem;
    color: var(--dashboard-muted);
    margin-top: 0.15rem;
    line-height: 1.4;
    font-weight: 500;
}

.dashboard-action-link {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--dashboard-accent);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    background: rgba(47, 125, 99, 0.08);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dashboard-action-link:hover {
    background: var(--dashboard-accent);
    color: white !important;
    transform: translateX(3px);
}

/* ==================== Responsive Fixes ==================== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-body {
        padding: 1rem;
    }
    .dashboard-header {
        padding: 2rem;
        border-radius: 28px;
    }
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    .dashboard-panel, .dashboard-map-panel, .dashboard-side-card {
        padding: 1.5rem;
        border-radius: 24px;
    }
    .dashboard-metric-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .dashboard-mini-card {
        padding: 1rem !important;
    }
    .dashboard-mini-value {
        font-size: 1.5rem !important;
    }
    .dashboard-mini-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.1rem !important;
    }
}
