/*
 * ═══════════════════════════════════════════════════════════════════════════
 * MFUMO WA STOO - dashboard.css  (cards, menus, modals, toasts, charts)
 * ───────────────────────────────────────────────────────────────────────────
 * Components that sit on top of / beside the page content, loaded on every page:
 *   6.  Stat cards (.stat-card / .web-top-card), clickable stat cards
 *   10. Dropdown & floating action menus
 *   11. Modals (action, detail, delete) + mobile fit
 *   12. Summary / filter cards
 *   17. Toast notifications (components/feedback)
 *   20. Dashboard pages (admin / operations)
 *   21. Progress bars & meters (.fill-0 ... .fill-100 set the width)
 *   22. Charts (Mwenendo wa item)
 *
 * Load order (partials/portal/head.blade.php, partials/auth/head.blade.php):
 *   Bootstrap -> icons -> AOS -> main.css -> layout.css -> dashboard.css -> pwa.css
 *   -> forms.css (every portal page) -> tables.css (pages with tables)
 *   -> auth.css (login / register / reset) or welcome.css (welcome page).
 * No page carries its own <style> block or style="" attribute any more -
 * page-specific rules live in the matching file under a 'PAGE:' heading.
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   6. STAT CARDS  (.stat-card / legacy .web-top-card)
   ═══════════════════════════════════════════════════════════════ */
.stat-card,
.web-top-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--t-base),
    box-shadow var(--t-base),
    transform var(--t-base);
  overflow: hidden;
}

.stat-card::before,
.web-top-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 3px;
  border-radius: 0 0 var(--r-pill) var(--r-pill);
  background: linear-gradient(90deg, var(--brand), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
}

.stat-card:hover,
.web-top-card:hover {
  border-color: var(--brand-ring);
  box-shadow:
    var(--shadow-md),
    0 0 0 3px var(--brand-soft);
  transform: translateY(-2px);
}

.stat-card:hover::before,
.web-top-card:hover::before {
  opacity: 1;
}

.stat-card--danger,
.web-top-card-danger-soft {
  border-color: rgba(239, 68, 68, 0.18);
}

.stat-card--danger::before,
.web-top-card-danger-soft::before {
  background: linear-gradient(90deg, var(--red), transparent);
}

.stat-card-icon,
.web-top-card-icon,
.web-table-title-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand-text);
  font-size: 1.15rem;
  border: 1px solid var(--brand-200);
}

.stat-card-icon--success,
.web-top-card-success {
  background: var(--green-50);
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.2);
}

.stat-card-icon--danger,
.web-top-card-danger {
  background: var(--red-50);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.2);
}

.stat-card-body,
.web-top-card-content {
  flex: 1 1 auto;
  min-width: 0;
}

.stat-card-body h4,
.web-top-card-content h4 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-card-value,
.web-top-card-value {
  margin-bottom: 6px;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-head);
  line-height: 1;
}

.stat-card-body p,
.web-top-card-content p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-faint);
}


/* stat cards used as links / filters (Pokea oda: click a card to filter) */
a.web-top-card {
  display: flex;
  text-decoration: none;
  color: inherit;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}

a.web-top-card:hover {
  transform: translateY(-2px);
}

a.web-top-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-ring);
}

/* ═══════════════════════════════════════════════════════════════
   10. DROPDOWN & FLOATING ACTION MENUS
   ═══════════════════════════════════════════════════════════════ */
.portal-dropdown-menu {
  z-index: 9999;
  min-width: 220px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.portal-dropdown-menu .dropdown-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--r-md);
  color: var(--text-head);
  font-size: 0.86rem;
  font-weight: 600;
}

.portal-dropdown-menu .dropdown-item i {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}

.portal-dropdown-menu .dropdown-item:hover {
  background: var(--n-100);
  color: var(--text-head);
}

.portal-dropdown-menu .dropdown-item:hover i {
  color: var(--brand-text);
}

.portal-dropdown-menu .dropdown-item.text-danger:hover {
  /* PHASE 3: dropped the forced override here - this selector (3 classes
     + :hover) already beats Bootstrap's own .dropdown-item:hover (1
     class + :hover) on specificity, and loads after it, so it wins the
     cascade on its own. */
  background: var(--red-50);
  color: #b91c1c;
}

.portal-dropdown-menu .dropdown-item.text-danger:hover i {
  color: var(--red-dark);
}

.portal-dropdown-menu .dropdown-divider {
  margin: 0.45rem 0;
}

/* let dropdowns overflow their table card */
.web-table-card,
.portal-table-inner {
  overflow: visible;
}

/* JS-positioned floating menu (fixed to viewport) */
.floating-action-menu {
  position: fixed;
  z-index: 999999;
  display: none;
  width: 220px;
  padding: 8px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
  border: 1px solid var(--border);
}

.floating-action-menu.show {
  display: grid;
  gap: 6px;
}

.floating-action-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-head);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.floating-action-item i {
  color: var(--brand-text);
}

.floating-action-item:hover {
  background: var(--brand-50);
  color: var(--brand-deeper);
}

.floating-action-danger,
.floating-action-danger i {
  color: var(--red-dark);
}

.floating-action-danger:hover {
  background: var(--red-50);
  color: var(--red-dark);
}

/* ═══════════════════════════════════════════════════════════════
   11. MODALS  (global - used on both table & form pages)
   ───────────────────────────────────────────────────────────────
   A. Portal action modal   .portal-modal (SMS / WhatsApp / preview)
   B. Detail / view modal   .detail-modal / .supplier-view-modal
   C. Delete modal          .delete-modal / .supplier-delete-* / .portal-delete-*
   ═══════════════════════════════════════════════════════════════ */

/* ---- A. Portal action modal ---- */
.portal-modal .modal-dialog {
  max-width: 840px;
  margin: 1.25rem auto;
}

.portal-modal.portal-modal-wide .modal-dialog {
  max-width: 940px;
}

.portal-modal.portal-modal-small .modal-dialog {
  max-width: 640px;
}

.portal-modal .modal-content {
  border: 0;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.portal-modal .modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(var(--brand-rgb), 0.18), transparent 34%),
    linear-gradient(180deg, var(--brand-wash, #f8fbfd) 0%, #ffffff 100%);
}

.portal-modal .modal-body {
  padding: 28px;
}

.portal-modal .modal-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--brand-wash, #fbfdff);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-modal .modal-title {
  margin: 0;
  color: var(--text-head);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.portal-modal-subtitle {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.portal-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 6px 12px;
  margin-bottom: 8px;
  border-radius: var(--r-pill);
  background: rgba(var(--brand-rgb), 0.12);
  border: 1px solid rgba(var(--brand-rgb), 0.18);
  color: var(--brand-ink, #1b5878);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-info-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-xl);
  background: rgba(var(--brand-rgb), 0.08);
  border: 1px solid rgba(var(--brand-rgb), 0.16);
  margin-bottom: 22px;
}

.portal-info-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--brand-rgb), 0.14);
  color: var(--brand-text);
  font-size: 1.1rem;
}

.portal-info-box h6 {
  margin: 0 0 5px;
  color: var(--text-head);
  font-size: 0.96rem;
  font-weight: 800;
}

.portal-info-box p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* summary grid inside modals (2-col default) */
.portal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.portal-summary-card {
  min-width: 0;
  padding: 16px;
  border-radius: var(--r-xl);
  background: var(--brand-wash, #f8fbfd);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.portal-summary-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-summary-card strong {
  display: block;
  color: var(--text-head);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.portal-preview {
  margin-top: 10px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 18px;
  min-height: 190px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.75;
  color: var(--text);
}

.portal-modal .form-btn {
  min-width: 165px;
  justify-content: center;
}

/* ---- B. Detail / view modal ---- */
.detail-modal .modal-content,
.supplier-view-modal .modal-content {
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-hero-header,
.supplier-view-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--n-50) 0%, var(--brand-50) 100%);
}

.modal-kicker,
.supplier-modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  margin-bottom: 8px;
  border-radius: var(--r-pill);
  background: var(--brand-100);
  border: 1px solid var(--brand-200);
  color: var(--brand-deeper);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.modal-hero-header .modal-title,
.supplier-view-header .modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-head);
  font-family: var(--font-display);
}

.modal-detail-body,
.supplier-view-body {
  padding: 22px 24px;
  background: var(--n-50);
}

.modal-entity-card,
.supplier-modal-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}

.modal-entity-icon,
.supplier-modal-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand-text);
  border: 1px solid var(--brand-200);
  font-size: 1.2rem;
}

/* components/user-profile.blade.php - clips a profile photo <img> to the
   icon's rounded shape instead of showing initials. */
.modal-entity-icon--photo {
  overflow: hidden;
}

.modal-entity-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.modal-entity-card h6,
.supplier-modal-summary h6 {
  margin: 0 0 3px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-head);
}

.modal-entity-card p,
.supplier-modal-summary p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.detail-grid,
.supplier-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-item,
.supplier-detail-item {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.detail-item--full,
.supplier-detail-full {
  grid-column: 1 / -1;
}

.detail-item span,
.supplier-detail-item span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.detail-item strong,
.supplier-detail-item strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-head);
  line-height: 1.65;
  overflow-wrap: break-word;
}

.modal-detail-footer,
.supplier-view-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---- C. Delete modal (.delete-modal / .supplier-delete-* / .portal-delete-*) ---- */
.delete-modal .modal-content,
.supplier-delete-modal .modal-content,
.portal-delete-modal .modal-content {
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.delete-modal-top,
.supplier-delete-top,
.portal-delete-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 0;
  background: var(--surface);
}

.delete-modal-icon,
.supplier-delete-icon,
.portal-delete-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--r-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, 0.22);
  color: var(--red-dark);
  font-size: 1.1rem;
}

.delete-modal-body,
.supplier-delete-body,
.portal-delete-body {
  padding: 16px 24px;
  background: var(--surface);
}

.delete-modal-body h5,
.supplier-delete-body h5,
.portal-delete-body h5 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-head);
}

.delete-modal-body p,
.supplier-delete-body p,
.portal-delete-body p {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.delete-modal-card,
.supplier-delete-card {
  margin: 14px 0;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: var(--n-50);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.delete-modal-card span,
.supplier-delete-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.delete-modal-card strong,
.supplier-delete-card strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-head);
  overflow-wrap: break-word;
}

.delete-modal-warning,
.supplier-delete-warning,
.portal-delete-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--red-text);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.55;
}

.delete-modal-footer,
.supplier-delete-footer,
.portal-delete-footer {
  padding: 14px 24px 22px;
  border-top: 0;
  background: var(--surface);
}

/* ═══════════════════════════════════════════════════════════════
   12. SUMMARY / FILTER CARDS  (shared notice card)
   ═══════════════════════════════════════════════════════════════ */
.filter-summary-card,
.form-summary-card {
  padding: 12px 16px;
  border-radius: var(--r-xl);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  margin-bottom: 16px;
  font-size: 0.84rem;
  color: var(--brand-deeper);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - stat cards, summary cards, modals
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {
  .stat-card,
  .web-top-card {
    padding: 18px;
  }

  .stat-card-value,
  .web-top-card-value {
    font-size: 1.55rem;
  }

  .stat-card-icon,
  .web-top-card-icon,
  .web-table-title-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  /* modals go edge-to-edge on phones */
  .portal-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 575.98px) {
  .stat-card,
  .web-top-card {
    gap: 14px;
    border-radius: var(--r-lg);
  }
}

/* ---- Mobile modal fit (portal-modal) ---- */
@media (max-width: 768px) {
  .portal-modal .modal-dialog,
  .portal-modal.portal-modal-wide .modal-dialog,
  .portal-modal.portal-modal-small .modal-dialog {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    margin: 10px auto;
    height: calc(100dvh - 20px);
    display: flex;
    align-items: center;
  }

  .portal-modal .modal-content {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: column;
  }

  .portal-modal .modal-header {
    padding: 15px 16px;
    flex: 0 0 auto;
  }

  .portal-modal .modal-title {
    font-size: 1.02rem;
    line-height: 1.3;
  }

  .portal-modal-subtitle {
    font-size: 0.8rem;
    line-height: 1.35;
    margin-top: 4px;
  }

  .portal-modal .modal-body {
    padding: 15px 16px;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
  }

  .portal-info-box {
    padding: 12px;
    gap: 10px;
    border-radius: var(--r-lg);
    margin-bottom: 14px;
  }

  .portal-info-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 11px;
    font-size: 0.9rem;
  }

  .portal-info-box h6 {
    font-size: 0.84rem;
    margin-bottom: 3px;
  }

  .portal-info-box p {
    font-size: 0.76rem;
    line-height: 1.45;
  }

  .portal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 14px;
  }

  .portal-summary-card {
    padding: 12px;
    border-radius: 13px;
  }

  .portal-summary-card strong {
    font-size: 0.9rem;
  }

  .portal-preview {
    min-height: 105px;
    max-height: 150px;
    padding: 12px;
    border-radius: var(--r-lg);
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .portal-modal .modal-footer {
    padding: 12px 16px 14px;
    flex: 0 0 auto;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 9px;
  }

  .portal-modal .form-btn {
    width: 100%;
    min-width: unset;
    min-height: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   17. TOAST / NOTIFICATION SYSTEM (site-wide)
   Migrated from components/feedback.blade.php's embedded <style> block.
   The 3 fixed per-severity autohide durations (previously 3 separate
   inline style="animation-duration:...ms" attributes in the Blade file)
   are now folded directly into the existing severity-specific
   .notify-bar rules below, so no new class was needed.
   ═══════════════════════════════════════════════════════════════ */
.notify-region {
  position: fixed;
  top: 96px;
  right: 18px;
  z-index: 1085;
  width: min(420px, calc(100vw - 36px));
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.notify {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(var(--brand-wash-rgb, 251, 253, 255), 0.98) 100%);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 84%);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(14px);
  animation: notifyIn 0.35s ease forwards;
}

@keyframes notifyIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notifyOut {
  to {
    opacity: 0;
    transform: translateX(14px);
  }
}

.notify-out {
  animation: notifyOut 0.25s ease forwards;
}

.notify::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--accent-color);
}

.notify.success::before {
  background: #22c55e;
}

.notify.error::before {
  background: #ef4444;
}

.notify.warn::before {
  background: #f59e0b;
}

.notify-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notify-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--heading-color);
  font-size: 1rem;
}

.notify.success .notify-icon {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  color: #15803d;
}

.notify.error .notify-icon {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
  color: #b91c1c;
}

.notify.warn .notify-icon {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
  color: #b45309;
}

.notify-content {
  min-width: 0;
  flex: 1 1 auto;
}

.notify-title {
  margin: 2px 0 4px;
  color: var(--heading-color);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.notify-text {
  margin: 0;
  color: color-mix(in srgb, var(--default-color), transparent 15%);
  font-size: 0.92rem;
  line-height: 1.65;
  word-break: break-word;
}

.notify-list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: color-mix(in srgb, var(--default-color), transparent 12%);
  font-size: 0.91rem;
  line-height: 1.6;
  max-height: 132px;
  overflow: auto;
}

.notify-list li + li {
  margin-top: 4px;
}

.notify-close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
}

.notify-close:hover {
  background: color-mix(in srgb, var(--default-color), transparent 92%);
  color: var(--heading-color);
}

.notify-close:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(var(--brand-alt-rgb, 86, 182, 233), 0.18);
}

.notify-progress {
  height: 4px;
  margin-top: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--default-color), transparent 92%);
  overflow: hidden;
}

.notify-bar {
  width: 100%;
  height: 100%;
  transform-origin: left;
  background: var(--accent-color);
  animation: notifyBar linear forwards;
}

/* Fixed per-severity autohide duration - matches the timings each
   notify type has always used (was inline style="animation-duration"
   on the .notify-bar element in feedback.blade.php). */
.notify.success .notify-bar {
  background: #22c55e;
  animation-duration: 4500ms;
}

.notify.error .notify-bar {
  background: #ef4444;
  animation-duration: 6500ms;
}

.notify.warn .notify-bar {
  background: #f59e0b;
  animation-duration: 9000ms;
}

.notify.is-paused .notify-bar {
  animation-play-state: paused;
}

@keyframes notifyBar {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@media (max-width: 767.98px) {
  .notify-region {
    top: 88px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .notify {
    border-radius: 16px;
    padding: 13px 13px 11px;
  }

  .notify-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 11px;
  }

  .notify-title {
    font-size: 0.97rem;
  }

  .notify-text,
  .notify-list {
    font-size: 0.89rem;
  }
}

@media (max-width: 479.98px) {
  .notify-region {
    top: 82px;
    right: 12px;
    left: 12px;
  }

  .notify-head {
    gap: 10px;
  }

  .notify-close {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .notify-list {
    max-height: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notify,
  .notify-out,
  .notify-bar {
    animation: none !important;
    transition: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════════
   20. DASHBOARD PAGES  (dashboard/admin, dashboard/operations - was portal/dashboard.css)
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   1. DASHBOARD HERO
   ═══════════════════════════════════════════════════════════════ */
.dash-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 72px;
  background: linear-gradient(160deg, var(--nav-bg) 0%, var(--nav-bg-secondary) 100%);
}

.dash-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.dash-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.dash-hero-bg img.active {
  opacity: 0.26;
}

.dash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top right, rgba(var(--brand-rgb), 0.18), transparent 42%),
    linear-gradient(180deg, rgba(var(--nav-bg-rgb, 12, 22, 48), 0.74), rgba(var(--nav-bg-rgb, 12, 22, 48), 0.92));
}

.dash-hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dash-hero .web-hero-badge {
  margin-left: auto;
  margin-right: auto;
}

.dash-hero h1 {
  max-width: 840px;
  margin: 0 auto 14px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.dash-hero p {
  max-width: 720px;
  margin: 0 auto 22px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
  line-height: 1.75;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 26px;
}

/* ═══════════════════════════════════════════════════════════════
   2. LOGGED-IN USER CARD
   ═══════════════════════════════════════════════════════════════ */
.dash-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  padding: 15px 18px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dash-user-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--brand-rgb), 0.16);
  border: 1px solid rgba(var(--brand-rgb), 0.3);
  color: var(--brand);
  font-size: 1.5rem;
}

.dash-user-meta {
  min-width: 0;
}

.dash-user-meta span {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-user-meta h3 {
  margin: 2px 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}

.dash-user-meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8rem;
}

.dash-user-card .form-btn {
  flex: 0 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   3. RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 575.98px) {
  .dash-hero {
    padding: 46px 0 50px;
  }

  .dash-hero-actions .form-btn {
    width: 100%;
    justify-content: center;
  }

  .dash-user-card {
    flex-wrap: wrap;
  }
}

/* "Hali ya stoo" meter in a table cell (number + % + thin bar) */
.dash-meter {
  flex-grow: 1;
  max-width: 220px;
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════
   21. PROGRESS BARS & METERS
   ═══════════════════════════════════════════════════════════════ */
/* thin Bootstrap progress (dashboard meters) */
.progress.progress-thin {
  height: 6px;
}

/* Madeni: share of a debt that is paid */
.md-progress {
  height: 6px;
  min-width: 90px;
  max-width: 120px;
  border-radius: 9999px;
  background: var(--surface-2, #f1f5f9);
  overflow: hidden;
}

.md-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.md-progress.is-danger > span {
  background: #ef4444;
}

.md-progress.is-warning > span {
  background: #f59e0b;
}

/* width of a bar / meter fill: class="fill-{0..100}" (whole percent) */
.fill-0 { width: 0%; }
.fill-1 { width: 1%; }
.fill-2 { width: 2%; }
.fill-3 { width: 3%; }
.fill-4 { width: 4%; }
.fill-5 { width: 5%; }
.fill-6 { width: 6%; }
.fill-7 { width: 7%; }
.fill-8 { width: 8%; }
.fill-9 { width: 9%; }
.fill-10 { width: 10%; }
.fill-11 { width: 11%; }
.fill-12 { width: 12%; }
.fill-13 { width: 13%; }
.fill-14 { width: 14%; }
.fill-15 { width: 15%; }
.fill-16 { width: 16%; }
.fill-17 { width: 17%; }
.fill-18 { width: 18%; }
.fill-19 { width: 19%; }
.fill-20 { width: 20%; }
.fill-21 { width: 21%; }
.fill-22 { width: 22%; }
.fill-23 { width: 23%; }
.fill-24 { width: 24%; }
.fill-25 { width: 25%; }
.fill-26 { width: 26%; }
.fill-27 { width: 27%; }
.fill-28 { width: 28%; }
.fill-29 { width: 29%; }
.fill-30 { width: 30%; }
.fill-31 { width: 31%; }
.fill-32 { width: 32%; }
.fill-33 { width: 33%; }
.fill-34 { width: 34%; }
.fill-35 { width: 35%; }
.fill-36 { width: 36%; }
.fill-37 { width: 37%; }
.fill-38 { width: 38%; }
.fill-39 { width: 39%; }
.fill-40 { width: 40%; }
.fill-41 { width: 41%; }
.fill-42 { width: 42%; }
.fill-43 { width: 43%; }
.fill-44 { width: 44%; }
.fill-45 { width: 45%; }
.fill-46 { width: 46%; }
.fill-47 { width: 47%; }
.fill-48 { width: 48%; }
.fill-49 { width: 49%; }
.fill-50 { width: 50%; }
.fill-51 { width: 51%; }
.fill-52 { width: 52%; }
.fill-53 { width: 53%; }
.fill-54 { width: 54%; }
.fill-55 { width: 55%; }
.fill-56 { width: 56%; }
.fill-57 { width: 57%; }
.fill-58 { width: 58%; }
.fill-59 { width: 59%; }
.fill-60 { width: 60%; }
.fill-61 { width: 61%; }
.fill-62 { width: 62%; }
.fill-63 { width: 63%; }
.fill-64 { width: 64%; }
.fill-65 { width: 65%; }
.fill-66 { width: 66%; }
.fill-67 { width: 67%; }
.fill-68 { width: 68%; }
.fill-69 { width: 69%; }
.fill-70 { width: 70%; }
.fill-71 { width: 71%; }
.fill-72 { width: 72%; }
.fill-73 { width: 73%; }
.fill-74 { width: 74%; }
.fill-75 { width: 75%; }
.fill-76 { width: 76%; }
.fill-77 { width: 77%; }
.fill-78 { width: 78%; }
.fill-79 { width: 79%; }
.fill-80 { width: 80%; }
.fill-81 { width: 81%; }
.fill-82 { width: 82%; }
.fill-83 { width: 83%; }
.fill-84 { width: 84%; }
.fill-85 { width: 85%; }
.fill-86 { width: 86%; }
.fill-87 { width: 87%; }
.fill-88 { width: 88%; }
.fill-89 { width: 89%; }
.fill-90 { width: 90%; }
.fill-91 { width: 91%; }
.fill-92 { width: 92%; }
.fill-93 { width: 93%; }
.fill-94 { width: 94%; }
.fill-95 { width: 95%; }
.fill-96 { width: 96%; }
.fill-97 { width: 97%; }
.fill-98 { width: 98%; }
.fill-99 { width: 99%; }
.fill-100 { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   22. CHARTS  (stock/trend: Mwenendo wa item - SVG line chart + tooltip)
   ═══════════════════════════════════════════════════════════════ */
.tr-chart-wrap { position: relative; flex: 1 1 auto; min-height: 320px; }
#trChart { display: flex; flex-direction: column; height: 100%; }
.tr-chart { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tr-chart .grid line { stroke: var(--n-100, #eef2f6); stroke-width: 1; }
.tr-chart .axis text { fill: var(--text-muted); font-size: 11px; }
.tr-chart .ref line { stroke: #b45309; stroke-width: 1; stroke-dasharray: 4 4; }
.tr-chart .ref text { fill: #b45309; font-size: 11px; font-weight: 600; }
.tr-chart .line { fill: none; stroke: var(--brand-deeper); stroke-width: 2; stroke-linejoin: round; }
.tr-chart .area { fill: var(--brand-text); opacity: .08; }
.tr-chart .cross { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tr-chart .dot { fill: var(--brand-deeper); stroke: var(--surface, #fff); stroke-width: 2; }
.tr-tip { position: absolute; pointer-events: none; min-width: 150px; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface, #fff); border: 1px solid var(--border); box-shadow: var(--shadow-md, 0 8px 24px rgba(15, 23, 42, .12)); font-size: .78rem; color: var(--text-head); opacity: 0; transition: opacity .1s; z-index: 2; }
.tr-tip.show { opacity: 1; }
.tr-tip strong { display: block; font-size: .95rem; }
.tr-tip span { color: var(--text-muted); }
