/* ================================================================
   pp-override.css — clean rewrite
   ================================================================ */

/* ── Tokens ── */
:root {
  --pp-bg:#fff; --pp-w:#fff; --pp-s1:#fafafa; --pp-s2:#f4f4f5;
  --pp-bd:#e4e4e7; --pp-t0:#09090b; --pp-t1:#18181b; --pp-t2:#52525b;
  --pp-t3:#71717a; --pp-t4:#a1a1aa;
  --pp-p:#2563eb; --pp-ph:#1d4ed8; --pp-pl:#eff6ff;
  --pp-red:#dc2626; --pp-rl:#fef2f2;
}

/* ── Font ── */
html, body, button, input, optgroup, select, textarea,
.pp-hdr, .pp-hdr-btn, .pp-hdr-title,
.pp-nav, .pp-nav-item, .pp-nav-label, .pp-nav-hdr {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* ── Global bg ── */
body, #layout, #layout-content, #layout-list, #layout-sidebar {
  background: #fff !important;
}

/* ── Desktop sidebar ── */
#layout-menu {
  background: #fff !important;
  border-right: 1px solid #e4e4e7 !important;
}
@media (min-width: 1025px) {
  #layout-menu {
    display: flex !important;
    flex-direction: column !important;
    width: 240px !important;
  }
}

/* ================================================================
   MOBILE — html.pp-mobile (set by pp-mobile.js)
   ================================================================ */

html.pp-mobile .pp-hdr {
  height: 56px; min-height: 56px;
  background: #fff; border-bottom: 1px solid #e4e4e7;
  display: flex; align-items: center; padding: 0 4px; box-sizing: border-box;
}
html.pp-mobile .pp-hdr-title {
  font-size: 15px; font-weight: 600; color: #09090b;
  flex: 1; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; padding: 0 4px;
}
html.pp-mobile .pp-hdr-btn {
  width: 40px; height: 40px; min-width: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: transparent; border: none;
  color: #71717a; padding: 0; margin: 0 2px; cursor: pointer;
  text-decoration: none; box-shadow: none;
}
html.pp-mobile .pp-hdr-btn::before {
  float: none !important; font-size: 16px; width: auto;
  height: auto; margin: 0; line-height: 1; color: inherit;
}
html.pp-mobile .pp-hdr-btn:hover { background: #f4f4f5; color: #09090b; }
html.pp-mobile .pp-hdr-lbl { display: none; }

html.pp-mobile .pp-nav-hdr {
  height: 56px; min-height: 56px; background: #fff;
  border-bottom: 1px solid #e4e4e7; padding: 0 12px 0 16px;
  display: flex; align-items: center; gap: 8px;
  color: #09090b; box-sizing: border-box;
}
html.pp-mobile .pp-nav-hdr::before { display: none !important; }

html.pp-mobile .pp-nav-close {
  all: unset; display: inline-flex; align-items: center;
  justify-content: center; width: 28px; height: 28px; min-width: 28px;
  margin-left: auto; border-radius: 6px; cursor: pointer;
  color: #71717a; flex-shrink: 0;
}
html.pp-mobile .pp-nav-close::before { font-size: 15px; line-height: 1; color: inherit; }
html.pp-mobile .pp-nav-close-lbl { display: none; }
html.pp-mobile .pp-nav-close:hover { background: #f4f4f5; color: #09090b; }

html.pp-mobile .pp-nav {
  padding: 8px; display: flex; flex-direction: column;
  gap: 2px; background: #fff;
}
html.pp-mobile .pp-nav-item {
  height: 36px; min-height: 36px; padding: 0 10px;
  border-radius: 6px; border: none; margin: 0;
  display: flex; flex-direction: row; align-items: center;
  gap: 8px; font-size: 13px; font-weight: 400; color: #52525b;
  background: transparent; text-decoration: none; line-height: 1;
  box-shadow: none; white-space: nowrap;
}
html.pp-mobile .pp-nav-item::before {
  float: none !important; position: static !important;
  display: inline-block; width: 16px; min-width: 16px;
  font-size: 13px; line-height: 1; color: #a1a1aa;
  margin: 0; text-align: center; flex-shrink: 0;
}
html.pp-mobile .pp-nav-label { display: inline; font-size: 13px; line-height: 1; color: inherit; }
html.pp-mobile .pp-nav-item:hover { background: #f4f4f5; color: #09090b; }
html.pp-mobile .pp-nav-item:hover::before { color: #71717a; }
html.pp-mobile .pp-nav-item.selected { background: #eff6ff; color: #2563eb; font-weight: 500; }
html.pp-mobile .pp-nav-item.selected::before { color: #2563eb; }

html.pp-mobile .pp-nav-compose,
html.pp-mobile .pp-nav-compose.pp-nav-item {
  background: #2563eb; color: #fff; border-radius: 6px;
  justify-content: center; font-weight: 500; margin-bottom: 4px;
}
html.pp-mobile .pp-nav-compose::before { color: #fff !important; }
html.pp-mobile .pp-nav-compose .pp-nav-label { color: #fff; }
html.pp-mobile .pp-nav-compose:hover { background: #1d4ed8; color: #fff; }
html.pp-mobile #taskmenu .action-buttons {
  padding-bottom: 8px; border-bottom: 1px solid #e4e4e7; margin-bottom: 4px;
}

html.pp-mobile .pp-nav-logout,
html.pp-mobile .pp-nav-logout.pp-nav-item { color: #dc2626; }
html.pp-mobile .pp-nav-logout::before { color: #dc2626 !important; }
html.pp-mobile .pp-nav-logout:hover { background: #fef2f2; color: #dc2626; }
html.pp-mobile #taskmenu .special-buttons {
  border-top: 1px solid #e4e4e7; padding-top: 8px; margin-top: auto;
}

html.pp-mobile .messagelist tr { background: #fff; border-bottom: 1px solid #e4e4e7; }
html.pp-mobile .messagelist td { color: #52525b; background: transparent; }
html.pp-mobile .messagelist tr.unread td { color: #09090b; }
html.pp-mobile .messagelist td.date { color: #a1a1aa; font-size: 11.5px; }
html.pp-mobile .popover:not(.select-menu) {
  background: #fff !important; border-right: 1px solid #e4e4e7 !important;
  box-shadow: 4px 0 24px rgba(0,0,0,.08) !important;
}
html.pp-mobile .popover-overlay { background: rgba(9,9,11,.4) !important; }
html.pp-mobile #layout > div > .footer {
  background: #fff !important; border-top: 1px solid #e4e4e7 !important;
}

/* ================================================================
   TOAST — compact, bottom-right, admin style
   ================================================================ */

@keyframes pp-toast-in {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

#messagestack {
  position: fixed !important;
  bottom: 20px !important; right: 20px !important;
  top: auto !important; left: auto !important;
  z-index: 99999 !important;
  display: flex !important; flex-direction: column !important;
  gap: 6px !important; max-width: 260px !important;
  pointer-events: none !important;
}

#messagestack .ui.alert {
  pointer-events: all !important;
  background: #fff !important;
  border: 1px solid #e4e4e7 !important;
  border-left: 3px solid #a1a1aa !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.10) !important;
  padding: 10px 12px !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #09090b !important;
  display: flex !important; align-items: center !important;
  gap: 8px !important;
  animation: pp-toast-in .2s ease forwards !important;
  margin: 0 !important;
}

#messagestack .ui.alert.error,
#messagestack .ui.alert.alert-danger  { border-left-color: #dc2626 !important; }
#messagestack .ui.alert.confirmation,
#messagestack .ui.alert.alert-success { border-left-color: #16a34a !important; }
#messagestack .ui.alert.warning,
#messagestack .ui.alert.alert-warning { border-left-color: #d97706 !important; }
#messagestack .ui.alert.info,
#messagestack .ui.alert.alert-info    { border-left-color: #2563eb !important; }

#messagestack .ui.alert .alert-text,
#messagestack .ui.alert > span:not(.alert-close) {
  flex: 1 !important; font-size: 13px !important; line-height: 1.4 !important;
  color: #09090b !important;
}
#messagestack .ui.alert .alert-close,
#messagestack .ui.alert a.close {
  width: 18px !important; height: 18px !important; min-width: 18px !important;
  display: inline-flex !important; align-items: center !important;
  justify-content: center !important; color: #a1a1aa !important;
  border-radius: 4px !important; cursor: pointer !important;
  font-size: 13px !important; flex-shrink: 0 !important;
  background: transparent !important; border: none !important;
  text-decoration: none !important;
}
#messagestack .ui.alert .alert-close:hover { background:#f4f4f5!important; color:#09090b!important; }

@media (max-width: 480px) {
  #messagestack {
    right: 12px !important; bottom: 14px !important;
    max-width: calc(100vw - 24px) !important;
  }
}
