/* ===== APP SHELL ===== */
.app-shell {
  min-height: 100vh;
  background: var(--bg);
}
.app-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fg);
  text-decoration: none;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-link {
  font-size: 0.9rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover, .nav-link--active { color: var(--fg); }
.nav-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 20px;
}
.app-content {
  padding: 48px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { background: #143020; }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--fg); }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: none;
}
.btn-ghost:hover { color: var(--fg); background: var(--bg-alt); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 6px; }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

/* ===== AUTH CARD ===== */
.auth-card {
  max-width: 520px;
  margin: 60px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
}
.auth-header { margin-bottom: 32px; }
.auth-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.auth-header p { font-size: 0.95rem; color: var(--fg-muted); }
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--fg-muted);
}
.auth-footer a { color: var(--fg); font-weight: 500; }

/* ===== FORMS ===== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-section-title {
  font-family: 'Fraunces', serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }

/* ===== DASHBOARD ===== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}
.dashboard-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}
.dashboard-address { font-size: 0.95rem; color: var(--fg-muted); }
.dashboard-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-badge {
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  color: var(--fg-muted);
}
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.dashboard-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}
.section-link { font-size: 0.85rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.section-link:hover { text-decoration: underline; }

/* ===== TASK LIST ===== */
.task-list { display: flex; flex-direction: column; gap: 0; }
.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.task-item:last-child { border-bottom: none; }
.task-info { display: flex; flex-direction: column; gap: 2px; }
.task-name { font-size: 0.9rem; font-weight: 600; color: var(--fg); }
.task-desc { font-size: 0.8rem; color: var(--fg-muted); }
.task-due { font-size: 0.8rem; font-weight: 500; color: var(--fg-muted); white-space: nowrap; }
.task-due--overdue { color: #C05621; }
.task-due--unscheduled { color: #A0AEC0; }

/* ===== REQUEST LIST ===== */
.request-list { display: flex; flex-direction: column; gap: 0; }
.request-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.request-item:last-child { border-bottom: none; }
.request-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.request-desc { font-size: 0.9rem; color: var(--fg); line-height: 1.4; }
.request-meta { font-size: 0.78rem; color: var(--fg-muted); }

/* ===== STATUS BADGES ===== */
.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-badge--pending { background: #FEF3C7; color: #92400E; }
.status-badge--assigned { background: #DBEAFE; color: #1E40AF; }
.status-badge--completed { background: #D1FAE5; color: #065F46; }

/* ===== EMPTY STATE ===== */
.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
.empty-state a { color: var(--accent); }

/* ===== REQUEST CARD ===== */
.request-card {
  max-width: 640px;
  margin: 0 auto;
}
.request-header { margin-bottom: 32px; }
.back-link { font-size: 0.875rem; color: var(--fg-muted); text-decoration: none; display: inline-block; margin-bottom: 16px; }
.back-link:hover { color: var(--fg); }
.request-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.request-header p { font-size: 0.95rem; color: var(--fg-muted); }

/* ===== OPS DASHBOARD ===== */
.ops-header { margin-bottom: 32px; }
.ops-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}
.ops-header p { font-size: 0.95rem; color: var(--fg-muted); }
.ops-table-wrap { overflow-x: auto; }
.ops-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.875rem;
}
.ops-table th {
  background: var(--bg-alt);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
}
.ops-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ops-table tr:last-child td { border-bottom: none; }
.ops-table tr:hover td { background: #FAFAF8; }
.td-id { color: var(--fg-muted); font-size: 0.78rem; }
.td-desc { max-width: 220px; color: var(--fg); line-height: 1.4; }
.member-name { font-weight: 600; color: var(--fg); display: block; }
.member-email { font-size: 0.78rem; color: var(--fg-muted); }
.contractor-name { font-weight: 500; color: var(--fg); }
.unassigned { color: #A0AEC0; font-style: italic; }
.assign-form { display: flex; gap: 8px; align-items: center; }
.assign-form select {
  font-size: 0.8rem;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
.close-form { display: flex; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .app-content { padding: 24px; }
  .app-nav { padding: 0 24px; }
}
@media (max-width: 600px) {
  .dashboard-header { flex-direction: column; }
  .ops-table { font-size: 0.8rem; }
  .ops-table th, .ops-table td { padding: 10px 8px; }
}