/* ═══════════════════════════════════════════════════════════
   Nigerian Solar Portal — Shared Dashboard Components
   (used in both admin & public portals)
   ═══════════════════════════════════════════════════════════ */

/* ── Alerts ── */
.nsp-alert {
  padding: 12px 16px; border-radius: 8px; font-size: 13px; line-height: 1.5;
  border-left: 4px solid transparent; margin-bottom: 16px;
}
.nsp-alert-success { background: #f0fdf4; border-color: #10b981; color: #065f46; }
.nsp-alert-danger  { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.nsp-alert-warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.nsp-alert-info    { background: #eff6ff; border-color: #3b82f6; color: #1e3a5f; }
.nsp-alert-dismissible { position: relative; }
.nsp-alert a { color: inherit; font-weight: 600; }

/* ── Links ── */
.nsp-link { color: var(--nsp-primary, #f97316); text-decoration: none; font-weight: 500; background: none; border: none; padding: 0; cursor: pointer; font: inherit; }
.nsp-link:hover { text-decoration: underline; }
.nsp-whatsapp-link { color: #25d366 !important; }

/* ── Form Helpers ── */
.nsp-form-group { display: flex; flex-direction: column; gap: 6px; }
.nsp-form-group label { font-size: 13px; font-weight: 600; }
.nsp-form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.nsp-form-row .nsp-form-group { flex: 1; min-width: 160px; }
.nsp-justify-between { justify-content: space-between; align-items: center; }
.nsp-input, .nsp-select, .nsp-textarea {
  padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 14px; width: 100%; transition: border-color 0.2s;
  background: #fff; color: #1e293b;
}
.nsp-input:focus, .nsp-select:focus, .nsp-textarea:focus {
  outline: none; border-color: var(--nsp-primary, #f97316);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.nsp-textarea { resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.5; }

/* ── Buttons ── */
.nsp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; border: none; line-height: 1;
  transition: all 0.15s; white-space: nowrap;
}
.nsp-btn:focus { outline: 2px solid var(--nsp-primary, #f97316); outline-offset: 2px; }
.nsp-btn-primary  { background: var(--nsp-primary, #f97316); color: #fff; }
.nsp-btn-primary:hover  { background: var(--nsp-primary-dark, #ea580c); color: #fff; }
.nsp-btn-secondary{ background: #e2e8f0; color: #1e293b; }
.nsp-btn-secondary:hover { background: #cbd5e1; }
.nsp-btn-success  { background: #10b981; color: #fff; }
.nsp-btn-success:hover  { background: #059669; }
.nsp-btn-ghost    { background: transparent; color: #64748b; border: 1px solid #e2e8f0; }
.nsp-btn-ghost:hover    { background: #f8fafc; color: #1e293b; }
.nsp-btn-warning  { background: #f59e0b; color: #fff; }
.nsp-btn-info     { background: #3b82f6; color: #fff; }
.nsp-btn-light    { background: rgba(255,255,255,0.9); color: #1e293b; }
.nsp-btn-danger   { background: #ef4444; color: #fff; }
.nsp-btn-full     { width: 100%; }
.nsp-btn-sm       { padding: 7px 14px; font-size: 13px; }
.nsp-btn-lg       { padding: 14px 28px; font-size: 16px; }
.nsp-btn-xs       { padding: 4px 10px; font-size: 11px; border-radius: 5px; }
.nsp-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.nsp-mt-2 { margin-top: 10px; }
.nsp-mt-3 { margin-top: 16px; }

/* ── Badges ── */
.nsp-badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 99px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap;
}
.nsp-badge-primary   { background: #dbeafe; color: #1d4ed8; }
.nsp-badge-success   { background: #d1fae5; color: #065f46; }
.nsp-badge-warning   { background: #fef3c7; color: #92400e; }
.nsp-badge-danger    { background: #fee2e2; color: #991b1b; }
.nsp-badge-info      { background: #e0f2fe; color: #0c4a6e; }
.nsp-badge-secondary { background: #f1f5f9; color: #475569; }
.nsp-badge-dark      { background: #1e293b; color: #fff; }

/* ── Tables ── */
.nsp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.nsp-table th { padding: 10px 14px; background: #f8fafc; font-weight: 600; text-align: left; border-bottom: 2px solid #e2e8f0; white-space: nowrap; }
.nsp-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.nsp-table tbody tr:hover { background: #fafafa; }
.nsp-table a { color: var(--nsp-primary, #f97316); text-decoration: none; }
.nsp-table a:hover { text-decoration: underline; }

/* ── Empty State ── */
.nsp-empty { text-align: center; color: #64748b; padding: 24px !important; }
.nsp-empty-state { text-align: center; padding: 40px 20px; color: #64748b; }
.nsp-empty-state .nsp-empty-icon { font-size: 48px; margin-bottom: 12px; }
.nsp-empty-state h3 { font-size: 18px; color: #1e293b; margin-bottom: 8px; }
.nsp-empty-state p { font-size: 14px; margin-bottom: 16px; }
.nsp-empty-hero { padding: 60px 40px; }

/* ── Toggle Switch ── */
.nsp-toggle-label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.nsp-toggle { display: inline-block; width: 44px; height: 24px; background: #cbd5e1; border-radius: 99px; position: relative; transition: background 0.2s; vertical-align: middle; }
.nsp-toggle::after { content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: transform 0.2s; }
.nsp-toggle-label input { display: none; }
.nsp-toggle-label input:checked + .nsp-toggle { background: var(--nsp-primary, #f97316); }
.nsp-toggle-label input:checked + .nsp-toggle::after { transform: translateX(20px); }

/* ── Text colours ── */
.nsp-text-success { color: #10b981; font-weight: 600; }
.nsp-text-danger  { color: #ef4444; font-weight: 600; }
.nsp-text-warning { color: #f59e0b; font-weight: 600; }
.nsp-text-primary { color: var(--nsp-primary, #f97316); font-weight: 600; }
.nsp-text-muted   { color: #64748b; }
