/* ===== Dashboard Styles (dark theme, matches landing page tokens) ===== */

/* Header */
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.dash-title { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--fg); margin: 0 0 4px; letter-spacing: -0.02em; }
.dash-sub { color: var(--fg-muted); font-size: 14px; margin: 0; }
.dash-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Filter bar */
.filter-bar { margin-bottom: 20px; }
.filter-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-select, .filter-input {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--fg);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.filter-select:focus, .filter-input:focus { border-color: var(--accent); }
.filter-input { min-width: 220px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--surface-border); }
.stat-card--green::before { background: linear-gradient(90deg, #00C9A7, #00e5be); }
.stat-card--amber::before { background: linear-gradient(90deg, #FF8F6B, #ffaa8a); }
.stat-card--red::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-value { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--fg); line-height: 1; }
.stat-label { font-size: 12px; color: var(--fg-muted); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

/* Section card */
.section-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.section-title { font-size: 15px; font-weight: 700; color: var(--fg); margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 11px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 0 12px 10px; text-align: left; border-bottom: 1px solid var(--surface-border); }
.data-table td { padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 14px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }

/* Progress bar */
.progress-bar { background: var(--bg); border-radius: 4px; height: 6px; width: 120px; overflow: hidden; flex-shrink: 0; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.progress-fill--green { background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); }
.progress-fill--amber { background: var(--accent-warm); }
.progress-fill--red { background: #ef4444; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 600; text-transform: capitalize; }
.badge--nurse { background: rgba(0,133,255,0.15); color: #60a5fa; border: 1px solid rgba(0,133,255,0.2); }
.badge--midwife { background: rgba(255,143,107,0.15); color: var(--accent-warm); border: 1px solid rgba(255,143,107,0.2); }

/* Status badges */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: capitalize; letter-spacing: 0.02em; }
.status-badge--compliant { background: rgba(0,201,167,0.15); color: var(--accent); border: 1px solid rgba(0,201,167,0.25); }
.status-badge--expiring { background: rgba(255,143,107,0.15); color: var(--accent-warm); border: 1px solid rgba(255,143,107,0.25); }
.status-badge--expired { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.status-badge--in_progress { background: rgba(96,165,250,0.15); color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.status-badge--at_risk { background: rgba(251,146,60,0.15); color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }

/* Category chip */
.category-chip { display: inline-block; padding: 2px 8px; background: rgba(255,255,255,0.06); border: 1px solid var(--surface-border); border-radius: 4px; font-size: 11px; color: var(--fg-muted); }

/* Links */
.pro-name { color: var(--fg); font-weight: 600; text-decoration: none; }
.pro-name:hover { color: var(--accent); }

/* Action buttons */
.action-btn { padding: 4px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; border: 1px solid var(--surface-border); background: transparent; color: var(--fg-muted); cursor: pointer; text-decoration: none; display: inline-block; transition: all 0.15s; }
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn--danger:hover { border-color: #ef4444; color: #ef4444; }

/* Buttons */
.btn { padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s; text-decoration: none; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color: #fff; }
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-secondary { background: var(--surface); border: 1px solid var(--surface-border); color: var(--fg); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--fg-muted); }
.btn-ghost:hover { color: var(--fg); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--fg-muted); }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.modal-content { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; padding: 32px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h2 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; margin: 0; }
.modal-close { background: none; border: none; color: var(--fg-muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--fg); }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 500px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg);
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--fg);
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group select option { background: var(--surface); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #ef4444; }

/* Profile */
.profile-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.profile-avatar { width: 60px; height: 60px; border-radius: 12px; background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 20px; color: #fff; flex-shrink: 0; }
.profile-info { flex: 1; }

/* Nav link in landing page */
.nav-cta { display: inline-block; padding: 8px 20px; background: var(--accent-glow); border: 1px solid rgba(0,201,167,0.25); color: var(--accent); border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 14px; transition: all 0.15s; }
.nav-cta:hover { background: rgba(0,201,167,0.2); }

/* Responsive */
@media (max-width: 768px) {
  .main-content { margin-left: 0; padding: 16px; }
  .sidebar { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
