@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #f1f5f9; /* Slate 100 */
  --card-bg: #ffffff;
  --card-border: #e2e8f0; /* Slate 200 */
  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #64748b; /* Slate 500 */
  
  --status-no-traffic: #94a3b8;
  --status-light: #059669; /* Emerald 600 */
  --status-light-mod: #65a30d; /* Lime 600 */
  --status-moderate: #d97706; /* Amber 600 */
  --status-mod-heavy: #ea580c; /* Orange 600 */
  --status-heavy: #dc2626; /* Red 600 */
  --status-not-moving: #991b1b; /* Red 800 */
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 1.5rem;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.03), transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(37, 99, 235, 0.03), transparent 30%);
  background-attachment: fixed;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  animation: fadeInDown 0.6s ease-out;
}

.header-left h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #1e3a8a; /* Blue 900 */
  margin-bottom: 0.15rem;
}

.header-left p {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
}

.header-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.date-display {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 500;
}

.clock-display {
  color: #1e3a8a;
  font-size: 1.75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.dashboard-container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.category-section {
  animation: fadeIn 0.8s ease-out;
}

.category-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: #2563eb; /* Blue 600 */
  border-radius: 4px;
}

.barangay-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Professional Card Row */
.barangay-row {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.barangay-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.barangay-name {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.4rem;
}

.traffic-info {
  display: grid;
  grid-template-columns: 20% auto 20% auto 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.divider {
  color: #e2e8f0;
  font-weight: 300;
}

.dir-indicator {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.remarks {
  color: #475569;
  font-size: 0.85rem;
  font-weight: 500;
  flex: 1;
}

.direction-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Status Variations */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.no-traffic, .status-dot.no-traffic {
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.status-dot.no-traffic { background-color: #64748b; }

.status-badge.light, .status-dot.light {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.status-dot.light { background-color: #059669; }

.status-badge.light-to-moderate, .status-dot.light-to-moderate {
  color: #3f6212;
  background: #f7fee7;
  border: 1px solid #d9f99d;
}
.status-dot.light-to-moderate { background-color: #65a30d; }

.status-badge.moderate, .status-dot.moderate {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.status-dot.moderate { background-color: #d97706; }

.status-badge.moderate-to-heavy, .status-dot.moderate-to-heavy {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.status-dot.moderate-to-heavy { background-color: #ea580c; }

.status-badge.heavy, .status-dot.heavy {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.status-dot.heavy { background-color: #dc2626; }

.status-badge.not-moving, .status-dot.not-moving {
  color: #ffffff;
  background: #7f1d1d;
  border: 1px solid #991b1b;
}
.status-dot.not-moving { background-color: #ffffff; }

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .traffic-info {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Wide screen 1080p Layout */
@media (min-width: 1200px) {
  .dashboard-container {
    flex-direction: row;
    align-items: flex-start;
  }
  .category-section {
    flex: 1;
    min-width: 0;
  }
}

.dashboard-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.project-title {
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.maintenance-tag {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
}

/* 4K and TV Layout (No Scrolling) */
@media (min-width: 1920px) {
  body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 2rem;
  }
  .header {
    margin-bottom: 1.25rem;
  }
  .header-left h1 {
    font-size: 1.9rem;
  }
  .header-left p {
    font-size: 0.95rem;
  }
  .dashboard-container {
    flex: 1;
    margin-bottom: auto;
    gap: 2.5rem;
  }
  .dashboard-footer {
    margin-top: auto;
    padding: 0.75rem 0;
  }
  .category-title {
    margin-bottom: 0.75rem;
  }
  .barangay-list {
    flex: 1;
    justify-content: space-around;
  }
  .barangay-row {
    padding: 0.65rem 1.25rem;
  }
  .barangay-name {
    font-size: 1.15rem;
  }
  .direction-label {
    font-size: 0.8rem;
  }
  .status-badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
  }
}
