/* EBIF-CALC Dashboard — EID Branding */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=DM+Sans:wght@400;500;700&family=DM+Mono:wght@400;500&family=Gowun+Batang:wght@400;700&display=swap');

:root {
  --olive: #868C54;
  --olive-dark: #6B7043;
  --sage: #C2C8A2;
  --sage-light: #E8EBD8;
  --warm-gray: #737569;
  --warm-gray-light: #A5A89C;
  --bg: #FAFAF7;
  --card-bg: #FFFFFF;
  --text: #2C2C2C;
  --text-light: #666;
  --border: #E0E2D4;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --radius: 8px;
}

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

body {
  font-family: 'DM Sans', 'Arial Narrow', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
.site-header {
  background: var(--olive);
  color: white;
  padding: 2rem 0;
}
.site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.site-header h1 {
  font-family: 'Gowun Batang', serif;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.site-header .subtitle {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  opacity: 0.85;
}
.site-header .meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card h2 {
  font-family: 'Lato', sans-serif;
  color: var(--olive);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--sage);
  padding-bottom: 0.5rem;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card .stat-value {
  font-family: 'DM Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--olive);
}
.stat-card .stat-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  color: var(--warm-gray);
  margin-top: 0.25rem;
}

/* Schedule grid (home page) */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.project-card h3 {
  font-family: 'Lato', sans-serif;
  color: var(--olive);
  margin-bottom: 0.5rem;
}
.project-card .project-meta {
  font-size: 0.85rem;
  color: var(--warm-gray);
}

/* Tables */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.schedule-table thead th {
  background: var(--olive);
  color: white;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
}
.schedule-table tbody tr:nth-child(even) {
  background: var(--sage-light);
}
.schedule-table tbody tr:hover {
  background: var(--sage);
}
.schedule-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
}

/* Schedule tabs */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.tab-btn {
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--warm-gray);
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover {
  border-color: var(--olive);
  color: var(--olive);
}
.tab-btn.active {
  background: var(--olive);
  color: white;
  border-color: var(--olive);
}
.tab-btn .badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  margin-left: 0.3rem;
}
.tab-btn.active .badge {
  background: rgba(255,255,255,0.3);
}

/* Search */
.search-bar {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.search-bar:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(134,140,84,0.15);
}

/* Chart container */
.chart-container {
  max-width: 400px;
  margin: 0 auto;
}

/* QC flags */
.qc-warning {
  background: #FFF3CD;
  border-left: 4px solid #FFA000;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
}
.qc-info {
  background: #E3F2FD;
  border-left: 4px solid #42A5F5;
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.85rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--warm-gray-light);
  font-size: 0.8rem;
  font-family: 'DM Mono', monospace;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--olive); text-decoration: none; }

/* Responsive */
@media (max-width: 768px) {
  .site-header h1 { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 1rem; }
  .tab-nav { gap: 0.3rem; }
  .tab-btn { font-size: 0.75rem; padding: 0.4rem 0.75rem; }
}
