/* FilterTrack - Appliance Filter Replacement Schedule */
:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --red-500: #ef4444;
  --red-100: #fee2e2;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--slate-800);
  background: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-700); text-decoration: underline; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--slate-800);
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--teal-600); }
.nav { display: flex; gap: 24px; }
.nav a { font-size: 0.9rem; font-weight: 500; color: var(--slate-600); }
.nav a:hover { color: var(--teal-600); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal-600) 50%, var(--teal-500) 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero-sub { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto 32px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--amber-500); color: var(--slate-900); border-color: var(--amber-500); }
.btn-primary:hover { background: var(--amber-400); border-color: var(--amber-400); color: var(--slate-900); }
.btn-secondary { background: #fff; color: var(--slate-700); border-color: var(--slate-300); }
.btn-secondary:hover { border-color: var(--teal-500); color: var(--teal-600); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn-danger { background: var(--red-100); color: var(--red-500); border-color: var(--red-100); }
.btn-danger:hover { background: var(--red-500); color: #fff; border-color: var(--red-500); }

/* Dashboard */
.dashboard-section { padding: 48px 0; }
.dashboard-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

.panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.panel h2 { font-size: 1.2rem; margin-bottom: 20px; color: var(--slate-800); }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 4px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--slate-800);
  background: #fff;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Timeline */
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.timeline-actions { display: flex; gap: 8px; }

.summary-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--teal-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--teal-100);
}
.summary-item { text-align: center; }
.summary-label { display: block; font-size: 0.75rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: 0.5px; }
.summary-value { display: block; font-size: 1.4rem; font-weight: 700; color: var(--teal-700); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--slate-400);
}
.empty-state svg { margin-bottom: 16px; }

.timeline-list { display: flex; flex-direction: column; gap: 12px; }

.timeline-card {
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  transition: border-color 0.15s;
}
.timeline-card:hover { border-color: var(--teal-500); }
.timeline-card.overdue { border-color: var(--red-500); background: var(--red-100); }
.timeline-card.due-soon { border-color: var(--amber-500); background: #fffbeb; }

.card-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.card-info .filter-type { font-size: 0.85rem; color: var(--slate-500); }
.card-info .next-date { font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.card-info .next-date.overdue { color: var(--red-500); }
.card-info .next-date.due-soon { color: var(--amber-500); }
.card-info .next-date.ok { color: var(--teal-600); }

.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.card-cost { font-size: 0.85rem; color: var(--slate-500); }

/* Guide */
.guide-section { padding: 48px 0; background: #fff; }
.guide-section h2 { text-align: center; font-size: 1.8rem; margin-bottom: 32px; }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.guide-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 24px;
}
.guide-card h3 { font-size: 1.05rem; margin-bottom: 10px; color: var(--teal-700); }
.guide-card p { font-size: 0.9rem; color: var(--slate-600); line-height: 1.7; }

/* About */
.about-section { padding: 48px 0; }
.about-section h2 { font-size: 1.8rem; margin-bottom: 20px; }
.about-content p { margin-bottom: 16px; color: var(--slate-600); max-width: 700px; }
.version-note { font-size: 0.85rem; color: var(--slate-400); margin-top: 24px; }

/* Footer */
.site-footer {
  background: var(--slate-800);
  color: var(--slate-400);
  padding: 32px 0;
  margin-top: 48px;
}
.footer-links { display: flex; gap: 20px; margin-bottom: 12px; }
.footer-links a { color: var(--slate-300); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 0.85rem; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--slate-800);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Print */
@media print {
  .site-header, .hero, .panel-add, .timeline-actions, .card-actions, .site-footer, .guide-section, .about-section { display: none !important; }
  .dashboard-layout { display: block; }
  .panel-timeline { box-shadow: none; padding: 0; }
  .timeline-card { break-inside: avoid; border: 1px solid #ccc; }
}

/* Responsive */
@media (max-width: 900px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 48px 0; }
  .summary-bar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .summary-bar { grid-template-columns: 1fr; gap: 8px; }
  .timeline-card { grid-template-columns: 1fr; }
  .card-actions { justify-content: flex-start; }
  .nav { gap: 12px; }
  .nav a { font-size: 0.8rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-sub { font-size: 1rem; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
