/* Dashboard styles — extends theme.css design tokens */

.app-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 48px 80px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.app-title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 36px;
  color: var(--navy);
  letter-spacing: -0.5px;
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.filter-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  transition: color 0.15s, border-color 0.15s;
}

.filter-btn:hover { color: var(--navy); }
.filter-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── JOB LIST ── */
.job-list { display: flex; flex-direction: column; gap: 16px; }

.job-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: box-shadow 0.15s;
}
.job-card:hover { box-shadow: 0 4px 20px rgba(27,42,74,0.08); }

.job-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.job-info { flex: 1; min-width: 0; }
.job-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-customer {
  font-size: 13px;
  color: var(--fg-muted);
}
.job-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg-muted);
  transition: background 0.15s, color 0.15s;
}
.btn-icon:hover { background: var(--bg-alt); color: var(--navy); }
.btn-delete:hover { background: #fef2f2; color: #c0392b; border-color: #fecaca; }

.job-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.status-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
}
.status-lead    { background: #fef9ec; color: #b7791f; border: 1px solid #fde68a; }
.status-progress { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.status-done    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.meta-item {
  font-size: 13px;
  color: var(--fg-muted);
}

.job-address {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 4px;
}
.job-notes {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  transition: background 0.15s;
}
.btn-primary:hover { background: #a34d26; }

.btn-secondary {
  background: white;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--bg-alt); }

/* ── EMPTY / LOADING ── */
.empty-state, .loading-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--fg-muted);
  font-size: 15px;
}

/* ── MODAL ── */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27,42,74,0.35);
}
.modal-card {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(27,42,74,0.2);
  margin: 16px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--navy);
}
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover { color: var(--navy); }

/* ── FORM ── */
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: 'Work Sans', sans-serif;
  color: var(--fg);
  background: white;
  transition: border-color 0.15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row textarea { resize: vertical; }
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── NAV LINKS ── */
.nav-links { margin-left: auto; }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 14px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--accent); color: white; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .app-wrap { padding: 32px 24px 60px; }
  .app-title { font-size: 28px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .modal-card { padding: 24px 20px; }
}
@media (max-width: 480px) {
  .app-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .filter-bar { overflow-x: auto; }
}