/* ==========================================================================
   Warehouse Logistics & Distribution (WLD) KPI Portal - Main Styles
   ========================================================================== */

:root {
  /* Brand & Operational Color Palette */
  --primary-navy: #0f172a;
  --primary-blue: #1e3a8a;
  --accent-blue: #2563eb;
  --accent-blue-subtle: #eff6ff;
  
  /* Status Colors */
  --status-success: #10b981;
  --status-success-bg: #ecfdf5;
  --status-success-border: #a7f3d0;
  
  --status-warning: #f59e0b;
  --status-warning-bg: #fffbeb;
  --status-warning-border: #fde68a;
  
  --status-danger: #ef4444;
  --status-danger-bg: #fef2f2;
  --status-danger-border: #fecaca;

  /* Neutral Surface & Borders */
  --bg-app: #f8fafc;
  --surface-card: #ffffff;
  --surface-card-hover: #f1f5f9;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  
  /* Typography Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);

  /* Radius & Transitions */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: all 0.2s ease-in-out;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navigation Bar */
.top-nav {
  background-color: var(--primary-navy);
  color: var(--text-inverse);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-badge {
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-inverse);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pilot-badge {
  background-color: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pilot-dot {
  width: 6px;
  height: 6px;
  background-color: #60a5fa;
  border-radius: 50%;
}

/* Department Navigation Tabs */
.dept-nav-wrapper {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 0 1.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.dept-nav-tabs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  max-width: 1440px;
  margin: 0 auto;
}

.dept-tab-btn {
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  font-family: inherit;
}

.dept-tab-btn:hover {
  color: var(--primary-navy);
  background-color: var(--bg-app);
}

.dept-tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.dept-tab-btn.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.tag-coming-soon {
  font-size: 0.65rem;
  background-color: #f1f5f9;
  color: #64748b;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: 1px solid var(--border-light);
}

/* Main Dashboard Wrapper */
.dashboard-main {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Footer */
.app-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}
