/**
 * ERP Portal styles. Loaded ALONGSIDE account.css (not instead of
 * it) — the sidebar/topbar/shell/guest-gate/dash-* classes are
 * already defined there and reused as-is here, since this is
 * deliberately the same shell pattern the Customer Dashboard proved,
 * not a second one. Only genuinely new pieces (notification bell,
 * widget grid) are defined in this file.
 */

.erp-topbar-title { font-size: 14px; font-weight: 700; color: var(--dark-green); margin-right: 4px; }

.erp-nav-badge { margin-right: auto; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 20px; }

/**
 * Full-bleed takeover mode (erp-portal-app.js's route()) — a module
 * with fullBleed:true hides the standard sidebar/nav chrome and lets
 * its own render() own the entire screen. First real use: Driver
 * Workspace, which is genuinely a different app shape (mobile-card,
 * no sidebar, own bottom nav) — not a restyle of the admin sidebar
 * shell every other module shares.
 */
.account-shell.erp-fullbleed { display: block; }
.account-shell.erp-fullbleed .account-sidebar { display: none; }
.account-shell.erp-fullbleed .account-content { padding: 0; max-width: none; }
#erp-portal-app.erp-fullbleed > .account-topbar,
#erp-portal-app.erp-fullbleed > .erp-notif-panel { display: none; }


/* ---------- Notification bell + dropdown panel (the "notification framework") ---------- */
.erp-notif-bell { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--mint); color: var(--dark-green); font-size: 15px; display: flex; align-items: center; justify-content: center; }
.erp-notif-bell:hover { background: var(--primary); color: #fff; }
.erp-notif-bell .account-nav-badge { position: absolute; top: -3px; left: -3px; }

.erp-notif-panel {
  position: fixed; top: 65px; left: 28px; width: min(360px, 90vw); max-height: 70vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 150;
}
.erp-notif-panel .dash-notif-row { padding: 14px 16px; }
.erp-notif-panel-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.erp-notif-panel-head h4 { font-size: 13.5px; font-weight: 800; color: var(--dark-green); }
.erp-notif-panel-head button { font-size: 11.5px; font-weight: 700; color: var(--primary); }
.erp-notif-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ---------- Widget grid (the "dashboard widget framework") ---------- */
.erp-widget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.erp-widget { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.erp-widget-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.erp-widget-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--mint); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.erp-widget-head h4 { font-size: 13px; font-weight: 800; color: var(--dark-green); }
.erp-widget-body { font-size: 13px; color: var(--text); }
.erp-widget-loading { color: var(--muted); font-size: 12.5px; }
.erp-widget-error { color: var(--danger); font-size: 12px; }

/* ---------- No modules registered yet / no access ---------- */
.erp-no-modules { text-align: center; padding: 70px 20px; }
.erp-no-modules i { font-size: 40px; color: var(--border); margin-bottom: 18px; }
.erp-no-modules h3 { font-size: 17px; font-weight: 800; color: var(--dark-green); margin-bottom: 8px; }
.erp-no-modules p { font-size: 13.5px; color: var(--muted); }

@media (max-width: 900px) {
  .erp-notif-panel { left: 16px; right: 16px; width: auto; }
}
