/* Fountain Maintenance Tracker — Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  line-height: 1.5;
  min-height: 100vh;
}

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

.site-header {
  background: #1e3a8a;
  color: #fff;
  padding: 16px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.site-header.admin { background: #0f172a; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-header h1 { font-size: 22px; }
.site-header nav a {
  color: #cbd5e1; text-decoration: none; margin-left: 20px; font-size: 14px;
}
.site-header nav a:hover { color: #fff; }

.site-footer {
  background: #0f172a; color: #94a3b8; padding: 20px 0; margin-top: 60px; text-align: center;
}

main { padding: 30px 0; }

.card {
  background: #fff;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}
.card h2 { color: #1e3a8a; margin-bottom: 4px; font-size: 22px; }
.card h3 { color: #334155; margin: 18px 0 10px; font-size: 16px; }

.muted { color: #64748b; font-size: 14px; }
.req   { color: #ef4444; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 6px; color: #334155; font-size: 14px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1;
  border-radius: 6px; font-size: 15px; font-family: inherit; background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-group textarea { resize: vertical; }

.btn {
  display: inline-block; padding: 10px 18px; border: none; border-radius: 6px;
  font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.btn-primary { background: #1e40af; color: #fff; }
.btn-primary:hover { background: #1e3a8a; }
.btn-secondary { background: #e2e8f0; color: #1e293b; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #991b1b; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-large { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; }

.alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; }
.alert-success { background: #d1fae5; color: #064e3b; border-left: 4px solid #10b981; }
.alert-warning { background: #fef3c7; color: #78350f; border-left: 4px solid #f59e0b; }
.alert-error   { background: #fee2e2; color: #7f1d1d; border-left: 4px solid #ef4444; }
.alert ul { margin: 8px 0 0 20px; }
.alert h3 { margin-bottom: 6px; }

.badge {
  display: inline-block; padding: 3px 10px; color: #fff; border-radius: 12px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}

.image-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.image-preview img {
  width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid #cbd5e1;
}

/* Login */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}
.login-card {
  background: #fff; padding: 40px; border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 100%; max-width: 400px;
}
.login-card h1 { color: #1e3a8a; margin-bottom: 4px; text-align: center; }

/* Admin */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px;
}
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }
.stat-card {
  background: #fff; padding: 20px; border-radius: 8px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-top: 4px solid #3b82f6;
}
.stat-card.critical { border-top-color: #ef4444; }
.stat-num   { font-size: 32px; font-weight: 700; color: #1e3a8a; }
.stat-label { font-size: 13px; color: #64748b; text-transform: uppercase; margin-top: 4px; }

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.filter-bar input[type=text] { flex: 1; min-width: 200px; padding: 9px 12px;
  border: 1px solid #cbd5e1; border-radius: 6px; }
.filter-bar select { padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 6px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.data-table th, .data-table td {
  padding: 12px 10px; text-align: left; border-bottom: 1px solid #e2e8f0; font-size: 14px;
}
.data-table th { background: #f8fafc; color: #475569; font-size: 12px;
                 text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:hover td { background: #f8fafc; }

.issue-header { display: flex; justify-content: space-between; align-items: center;
                flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.issue-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px;
              background: #f8fafc; padding: 16px; border-radius: 6px; font-size: 14px; }
@media (max-width: 600px) { .issue-grid { grid-template-columns: 1fr; } }
.description-box { background: #f8fafc; padding: 16px; border-radius: 6px;
                   border-left: 3px solid #3b82f6; margin: 10px 0; white-space: pre-wrap; }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
              gap: 10px; margin-top: 10px; }
.image-grid img { width: 100%; height: 150px; object-fit: cover;
                  border-radius: 6px; cursor: pointer; transition: transform 0.15s; }
.image-grid img:hover { transform: scale(1.03); }

.danger-zone { border: 1px solid #fecaca; background: #fef2f2; }
.danger-zone h3 { color: #991b1b; }
