/* Storage Brain Demo - Core Styles */

/* CSS Variables - Design System */
:root {
  /* Dark Theme Colors */
  --bg-primary: #0A1628;
  --bg-secondary: #0F2137;
  --bg-card: #0D1B2A;
  --bg-card-hover: #1A365D;
  --border-dark: #1A365D;
  --border-light: rgba(26, 54, 93, 0.5);

  /* Accent Colors */
  --gold: #D4AF37;
  --gold-light: #FFB800;
  --cyan: #00D2EF;
  --cyan-dark: #0092B5;
  --emerald: #00BB7F;
  --green: #00C758;
  --green-light: #05DF72;
  --red: #FB2C36;
  --red-light: #FF6568;
  --orange: #FE6E00;
  --purple: #AC4BFF;
  --blue: #3080FF;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #CAD5E2;
  --text-muted: #62748E;

  /* Light Theme (Guides) */
  --bg-cream: #F5F0E8;
  --bg-cream-dark: #EBE4D8;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Monaco, monospace;

  /* Spacing */
  --header-height: 64px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

body.light-theme {
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --border-dark: #E2E8F0;
  --border-light: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

body.light-theme .header {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

body.light-theme .nav-link.active {
  color: #6366f1;
}

body.light-theme tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .info-card {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

body.light-theme .info-card-title {
  color: #1E40AF;
}

body.light-theme .info-card-text {
  color: #334155;
}

body.light-theme .warning-card {
  background: #FFF7ED;
  border-color: #FED7AA;
}

body.light-theme .btn-export {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  border-color: rgba(99, 102, 241, 0.3);
}

body.light-theme .facility-link {
  color: #6366f1;
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.font-mono {
  font-family: var(--font-mono);
}

.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-dark);
  height: var(--header-height);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--gold);
}

.nav-link.highlight {
  background: var(--gold);
  color: var(--bg-primary);
}

.nav-link.highlight:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
}

.nav-link.action {
  color: var(--orange);
}

.nav-link.insights {
  color: var(--cyan);
}

/* Facility Insights Bar */
.insights-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-dark);
  padding: 0.75rem 1.5rem;
}

.insights-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.insights-icon {
  width: 24px;
  height: 24px;
  color: var(--cyan);
}

.insights-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.insights-badge {
  background: rgba(251, 44, 54, 0.2);
  color: var(--red);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.insights-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Main Container */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.25rem;
}

.card-dark {
  background: var(--bg-secondary);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.kpi-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
}

.kpi-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.kpi-change {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.kpi-change.positive { color: var(--green); }
.kpi-change.negative { color: var(--red); }

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.kpi-icon.blue { background: rgba(48, 128, 255, 0.15); color: var(--blue); }
.kpi-icon.cyan { background: rgba(0, 210, 239, 0.15); color: var(--cyan); }
.kpi-icon.green { background: rgba(0, 199, 88, 0.15); color: var(--green); }
.kpi-icon.gold { background: rgba(212, 175, 55, 0.15); color: var(--gold); }
.kpi-icon.purple { background: rgba(172, 75, 255, 0.15); color: var(--purple); }
.kpi-icon.red { background: rgba(251, 44, 54, 0.15); color: var(--red); }

/* Charts Container */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.5rem;
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.chart-container {
  height: 250px;
  position: relative;
}

.chart-legend {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Tables */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.table-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.table-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.875rem;
}

th {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-dark);
}

tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

td {
  border-bottom: 1px solid var(--border-light);
}

.facility-link {
  color: var(--cyan);
  text-decoration: none;
}

.facility-link:hover {
  text-decoration: underline;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-critical { background: rgba(251, 44, 54, 0.2); color: var(--red); }
.badge-focus { background: rgba(254, 110, 0, 0.2); color: var(--orange); }
.badge-push { background: rgba(0, 210, 239, 0.2); color: var(--cyan); }
.badge-maximize { background: rgba(0, 187, 127, 0.2); color: var(--emerald); }
.badge-high { background: rgba(251, 44, 54, 0.2); color: var(--red); }
.badge-medium { background: rgba(212, 175, 55, 0.2); color: var(--gold); }
.badge-new { background: rgba(0, 187, 127, 0.2); color: var(--emerald); }
.badge-marketing { background: rgba(0, 210, 239, 0.2); color: var(--cyan); }
.badge-pricing { background: rgba(212, 175, 55, 0.2); color: var(--gold); }
.badge-operations { background: rgba(106, 114, 130, 0.2); color: var(--text-secondary); }
.badge-analytics { background: rgba(172, 75, 255, 0.2); color: var(--purple); }
.badge-ai { background: rgba(0, 187, 127, 0.2); color: var(--emerald); }
.badge-coming-soon { background: rgba(106, 114, 130, 0.15); color: var(--text-muted); }

/* Category Cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.25rem;
}

.category-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.category-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.category-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.category-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.category-critical .category-label { color: var(--red); }
.category-focus .category-label { color: var(--orange); }
.category-push .category-label { color: var(--cyan); }
.category-maximize .category-label { color: var(--emerald); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--gold-light);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-dark);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab:hover {
  background: var(--bg-card-hover);
}

.tab.active {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
}

/* Search Input */
.search-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  width: 200px;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Select Dropdown */
.select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 0.5rem 2rem 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2362748E'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
}

.select:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Facility Dropdown (Action Page) */
.facility-select {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  min-width: 300px;
}

/* Progress Bar */
.progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-fill.green { background: var(--green); }
.progress-fill.red { background: var(--red); }
.progress-fill.orange { background: var(--orange); }
.progress-fill.cyan { background: var(--cyan); }

/* Action Items */
.action-item {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.action-content {
  flex: 1;
}

.action-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.action-impact {
  text-align: right;
  font-weight: 600;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* List Items */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-light);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item-left {
  display: flex;
  flex-direction: column;
}

.list-item-title {
  font-weight: 500;
}

.list-item-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.list-item-right {
  text-align: right;
}

.list-item-value {
  font-weight: 600;
}

.list-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* AI Chat Interface */
.chat-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.chat-message {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--emerald) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-name {
  font-weight: 600;
  color: var(--cyan);
}

.chat-content {
  line-height: 1.7;
}

.chat-content ul {
  list-style: none;
  margin: 1rem 0;
}

.chat-content li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.chat-input-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-dark);
  padding: 1rem 1.5rem;
}

.chat-input-inner {
  max-width: 900px;
  margin: 0 auto;
}

.quick-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-action {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.quick-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.chat-input-wrapper {
  display: flex;
  gap: 0.75rem;
}

.chat-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-input:focus {
  outline: none;
  border-color: var(--cyan);
}

.chat-send {
  background: var(--gold);
  color: var(--bg-primary);
  border: none;
  border-radius: 12px;
  padding: 0 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-send:hover {
  background: var(--gold-light);
}

/* Legacy light theme overrides removed — handled by variable redefinition in body.light-theme */

/* Guide Cards */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.guide-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.guide-card:hover {
  transform: translateY(-2px);
}

.guide-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.guide-icon.green { background: rgba(0, 187, 127, 0.15); color: var(--emerald); }
.guide-icon.cyan { background: rgba(0, 210, 239, 0.15); color: var(--cyan); }
.guide-icon.gold { background: rgba(212, 175, 55, 0.15); color: var(--gold); }
.guide-icon.purple { background: rgba(172, 75, 255, 0.15); color: var(--purple); }
.guide-icon.blue { background: rgba(48, 128, 255, 0.15); color: var(--blue); }

.guide-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.guide-card {
  position: relative;
}

.guide-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.guide-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.guide-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Featured Guide */
.featured-guide {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.featured-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0, 187, 127, 0.15);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.featured-content {
  flex: 1;
}

.featured-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.featured-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.featured-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.featured-link {
  color: var(--emerald);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
}

.featured-link:hover {
  text-decoration: underline;
}

/* Quick Tips */
.quick-tips {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.quick-tips-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tip-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1rem;
}

.tip-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.tip-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Password Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.modal-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.modal-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1rem;
}

.modal-input:focus {
  outline: none;
  border-color: var(--gold);
}

.modal-btn {
  width: 100%;
  padding: 0.875rem;
  background: var(--gold);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.modal-btn:hover {
  background: var(--gold-light);
}

.modal-error {
  color: var(--red);
  font-size: 0.875rem;
  margin-top: 1rem;
  display: none;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-dark);
  padding: 3rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.w-full { width: 100%; }
.rounded-lg { border-radius: 0.5rem; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* Responsive */
@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .featured-guide {
    flex-direction: column;
  }
}

/* =====================================================
   APS Dashboard Extensions
   ===================================================== */

/* Logo image in header */
.logo-img {
  height: 32px;
  width: auto;
  border-radius: 6px;
}

/* KPI grid variants */
.kpi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Occupancy bar (inline visual) */
.occ-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
}

.occ-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.occ-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.occ-bar-label {
  font-size: 0.8125rem;
  font-weight: 600;
  min-width: 45px;
  text-align: right;
}

/* Coming Soon overlay */
.coming-soon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.coming-soon-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  padding: 3rem 4rem;
  max-width: 600px;
}

.coming-soon-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.75rem;
}

.coming-soon-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.coming-soon-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.coming-soon-list {
  text-align: left;
  list-style: none;
  margin: 0;
  padding: 0;
}

.coming-soon-list li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border-light);
}

.coming-soon-list li:last-child {
  border-bottom: none;
}

.coming-soon-list .dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Charts full width */
.chart-card-full {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Info/explainer cards */
.info-card {
  background: rgba(0, 210, 239, 0.05);
  border: 1px solid rgba(0, 210, 239, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.info-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

.info-card-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Warning card */
.warning-card {
  background: rgba(254, 110, 0, 0.05);
  border: 1px solid rgba(254, 110, 0, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.warning-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 0.5rem;
}

/* Summary stat row (used in operations page) */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.stat-row:last-child {
  border-bottom: none;
}

/* Sortable table header */
th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  color: var(--text-primary);
}

th.sortable::after {
  content: ' \25B4\25BE';
  font-size: 0.6rem;
  opacity: 0.4;
}

th.sortable.asc::after {
  content: ' \25B4';
  opacity: 1;
  color: var(--cyan);
}

th.sortable.desc::after {
  content: ' \25BE';
  opacity: 1;
  color: var(--cyan);
}

/* Export button */
.btn-export {
  background: rgba(0, 210, 239, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(0, 210, 239, 0.3);
}

.btn-export:hover {
  background: rgba(0, 210, 239, 0.2);
}

/* Legacy action list light theme overrides removed — handled by variable redefinition */

/* Three column grid */
.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .kpi-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); }
  .three-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .kpi-grid-3 { grid-template-columns: 1fr; }
  .kpi-grid-5 { grid-template-columns: 1fr; }
}
