/* ═══════════════════════════════════════════
   LAWNMOWER REPAIR — SHOP AESTHETIC
   Earthy greens, warm wood tones, industrial feel
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --green-900: #1a2e1a;
  --green-800: #2d4a2d;
  --green-700: #3d6b3d;
  --green-600: #4a8c4a;
  --green-500: #5ba65b;
  --green-400: #7bc07b;
  --green-100: #e8f5e8;
  --green-50:  #f4faf4;

  --earth-900: #3a2a1a;
  --earth-700: #6b4c2a;
  --earth-500: #a67c52;
  --earth-300: #d4b896;
  --earth-100: #f5ede3;

  --red-600: #c0392b;
  --red-100: #fde8e5;
  --amber-600: #d4860a;
  --amber-100: #fef3d6;
  --blue-600: #2471a3;
  --blue-100: #dbeef9;

  --text: #1a1a1a;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --bg: #faf9f7;
  --bg-card: #ffffff;
  --border: #e0ddd8;
  --border-light: #eeebe6;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── HEADER / NAV ────────────────────────── */

.site-header {
  background: var(--green-900);
  color: #fff;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--green-400);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--green-600);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-links .active {
  color: var(--green-400);
  background: rgba(91,166,91,0.12);
}

.nav-user {
  font-size: 0.8rem;
  color: var(--green-400);
  padding: 0.25rem 0.75rem;
  background: rgba(91,166,91,0.1);
  border-radius: 20px;
}

/* ─── MAIN CONTENT ───────────────────────── */

.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ─── PAGE HEADER ────────────────────────── */

.page-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green-900);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  width: 100%;
}

/* ─── CARDS ──────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--green-900);
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: var(--green-50);
}

/* ─── STATS GRID ─────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--green-800);
  line-height: 1.1;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ─── TABLES ─────────────────────────────── */

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--green-50);
  color: var(--green-900);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--green-100);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

tr:hover td { background: var(--green-50); }

td a { color: var(--green-700); font-weight: 500; }
td a:hover { color: var(--green-900); }

/* ─── STATUS BADGES ──────────────────────── */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-pending { background: var(--amber-100); color: var(--amber-600); }
.badge-in-progress { background: var(--blue-100); color: var(--blue-600); }
.badge-completed { background: var(--green-100); color: var(--green-700); }
.badge-cancelled { background: var(--red-100); color: var(--red-600); }

/* ─── BUTTONS ────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--green-700);
  color: #fff;
}
.btn-primary:hover { background: var(--green-800); }

.btn-secondary {
  background: var(--earth-100);
  color: var(--earth-700);
  border: 1px solid var(--earth-300);
}
.btn-secondary:hover { background: var(--earth-300); }

.btn-danger {
  background: var(--red-100);
  color: var(--red-600);
  border: 1px solid #f0b4ad;
}
.btn-danger:hover { background: #f9d0cb; }

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--green-600);
  color: var(--green-700);
}

/* ─── FORMS ──────────────────────────────── */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.form-group .hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(91,166,91,0.15);
}

textarea { resize: vertical; min-height: 100px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a5a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

/* ─── ALERTS ─────────────────────────────── */

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.alert-success {
  background: var(--green-100);
  color: var(--green-800);
  border: 1px solid var(--green-400);
}

.alert-error {
  background: var(--red-100);
  color: var(--red-600);
  border: 1px solid #e8a29b;
}

/* ─── MOWER CARDS GRID ───────────────────── */

.mower-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.mower-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.mower-card:hover { box-shadow: var(--shadow); }

.mower-card .mower-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--green-900);
}

.mower-card .mower-model {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.mower-card .mower-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mower-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--earth-100);
  color: var(--earth-700);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* ─── REPAIR TIMELINE ────────────────────── */

.timeline {
  position: relative;
  padding-left: 1.5rem;
  margin-top: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--green-100);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  background: var(--green-600);
  border-radius: 50%;
  border: 2px solid var(--bg);
  transform: translateX(-4px);
}

.timeline-item .log-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.timeline-item .log-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-item .log-admin {
  font-weight: 600;
  font-size: 0.85rem;
}

.timeline-item .log-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.timeline-item .log-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.log-detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ─── DETAIL GRID ────────────────────────── */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.detail-item label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-item .value {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

.detail-item .value-mono {
  font-family: var(--font-mono);
}

/* ─── HOME / AUTH PAGES ──────────────────── */

.hero {
  text-align: center;
  padding: 4rem 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--green-900);
  line-height: 1.2;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 0.75rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.auth-container {
  max-width: 440px;
  margin: 2rem auto;
}

.auth-container .card-body {
  padding: 2rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a { color: var(--green-700); font-weight: 500; }

/* ─── FILTER PILLS ───────────────────────── */

.filter-pills {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.filter-pill:hover { border-color: var(--green-500); color: var(--green-700); }
.filter-pill.active {
  background: var(--green-700);
  color: #fff;
  border-color: var(--green-700);
}

/* ─── EMPTY STATE ────────────────────────── */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.empty-state p { margin-bottom: 1rem; }

/* ─── INLINE STATUS FORM ─────────────────── */

.status-form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-form select {
  width: auto;
  padding: 0.35rem 2rem 0.35rem 0.65rem;
  font-size: 0.85rem;
}

/* ─── FOOTER ─────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

/* ─── RESPONSIVE ─────────────────────────── */

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 0.75rem 0; }
  .nav-links { width: 100%; justify-content: flex-start; overflow-x: auto; }
  .hero h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mower-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
}
