* { scroll-behavior:smooth; }
body { -webkit-font-smoothing:antialiased; }
button, a, input, select, textarea { transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease, transform .12s ease, opacity .16s ease; }
button:not(:disabled):hover, a:not(.no-hover):hover { transform:translateY(-1px); }
button:disabled { opacity:.58; cursor:not-allowed; transform:none !important; }
input:focus, select:focus, textarea:focus { outline:none; border-color:#0f5132 !important; box-shadow:0 0 0 3px rgba(15,81,50,.12); }
table tbody tr { transition:background-color .14s ease; }
header { position:sticky; top:0; z-index:50; }
header.pf-min-nav-ready { display:flex !important; align-items:center !important; justify-content:space-between !important; gap:12px !important; flex-wrap:wrap; padding:14px 20px !important; background:#0f5132 !important; color:white !important; box-shadow:0 2px 12px rgba(0,0,0,.14); }
header.pf-min-nav-ready .pf-brand-title strong { color:white; font-size:18px; }
header.pf-min-nav-ready .pf-user-label { color:rgba(255,255,255,.78); }
header.pf-min-nav-ready a, header.pf-min-nav-ready .pf-logout-btn { display:none !important; }
header.pf-actions-only-ready { justify-content:flex-end !important; }
header.pf-actions-only-ready .pf-header-actions, .topbar.pf-actions-only-ready .pf-header-actions { display:flex !important; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; margin-left:auto; }
header.pf-actions-only-ready .pf-utility-bar, .topbar.pf-actions-only-ready .pf-utility-bar { order:1; margin-left:0; }
header.pf-actions-only-ready button:not(.pf-utility-btn):not(.pf-pop-close):not(.pf-link-btn), .topbar.pf-actions-only-ready button:not(.pf-utility-btn):not(.pf-pop-close):not(.pf-link-btn) { order:2; }
.topbar.pf-actions-only-ready { justify-content:flex-end !important; }
.topbar.pf-shell-topbar { justify-content:space-between !important; }
.topbar.pf-shell-topbar .pf-utility-bar { order:0; }
.topbar.pf-shell-topbar .pf-utility-btn { height:36px; border:0; background:transparent !important; color:#536a7c !important; }
.topbar.pf-shell-topbar #pfGlobalSearchBtn { width:210px !important; justify-content:flex-start; border-radius:3px; background:#f3f6fc !important; color:#48627a !important; }
.topbar.pf-shell-topbar #pfAlertBtn { width:38px !important; padding:0 !important; }
header.pf-nav-ready { display:flex !important; flex-direction:column; align-items:stretch !important; gap:12px !important; padding:14px 18px !important; background:#0f5132 !important; color:white !important; box-shadow:0 2px 14px rgba(0,0,0,.18); }
header.pf-nav-ready a, header.pf-nav-ready button { transform:none; }
.pf-brand-row { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.pf-brand-title { display:flex; align-items:center; gap:10px; flex-wrap:wrap; color:white; }
.pf-brand-title strong { color:white; font-size:18px; }
.pf-user-label { color:#cbd5cf; font-size:13px; font-weight:700; }
.pf-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.pf-group-nav { display:grid; grid-template-columns:repeat(5, minmax(150px, 1fr)); gap:10px; }
.pf-nav-card { display:grid; gap:5px; min-height:76px; width:100% !important; padding:13px 16px !important; border-radius:8px !important; border:1px solid rgba(255,255,255,.22) !important; color:white !important; text-align:left; cursor:pointer; box-shadow:inset 0 1px 0 rgba(255,255,255,.08); }
.pf-nav-card strong { font-size:16px; line-height:1.15; color:white; }
.pf-nav-card span { color:rgba(255,255,255,.72); font-size:13px; line-height:1.25; }
.pf-nav-card.active { outline:2px solid rgba(255,255,255,.38); box-shadow:0 0 0 3px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.12); }
.pf-dashboard, .pf-sales, .pf-policies, .pf-operations, .pf-admin { background:#17633f !important; }
.pf-subnav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-height:38px; padding:8px; border-radius:8px; background:rgba(255,255,255,.08); }
.pf-subnav a { display:inline-flex; align-items:center; min-height:34px; padding:7px 11px; border-radius:7px; background:rgba(255,255,255,.92) !important; color:#0f5132 !important; text-decoration:none; font-weight:700; }
.pf-subnav a.active { background:#dff4e8 !important; box-shadow:inset 0 0 0 1px #0f5132; }
.pf-logout-btn { width:auto !important; min-width:0 !important; padding:8px 13px !important; border:0 !important; border-radius:8px !important; background:#0f5132 !important; color:white !important; font-weight:700; cursor:pointer; }
.filters { position:sticky; top:0; z-index:45; }
header:not([style*="display: none"]) + .filters { top:64px; }
.pagination-bar, .pager-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:12px 0; }
.pagination-bar button, .pager-bar button { width:auto; min-width:38px; padding:8px 11px; margin:0; }
.pagination-bar button.active, .pager-bar button.active { background:#d9f0e4; color:#0f5132; font-weight:bold; border:1px solid #0f5132; }
.icon-danger { background:#9f1239 !important; color:white !important; }
.modal-head { position:sticky; top:0; z-index:8; background:white; }
.modal-close { background:#777 !important; width:38px !important; min-width:38px !important; padding:8px !important; border-radius:50% !important; font-size:18px !important; line-height:1 !important; }
.card, .lead-tile, .calling-tile, .policy-tile, .report-tile, .dash-tile, .company-tile, .metric, .modal-card { animation:pfFadeIn .18s ease both; }
.lead-tile, .calling-tile, .policy-tile, .report-tile, .dash-tile, .company-tile { transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease, background-color .14s ease; }
.lead-tile:hover, .calling-tile:hover, .policy-tile:hover, .report-tile:hover, .dash-tile:hover, .company-tile:hover { transform:translateY(-2px); box-shadow:0 8px 22px rgba(15,81,50,.12); }
.modal-backdrop { animation:pfBackdrop .14s ease both; }
.pf-busy { position:relative; pointer-events:none; opacity:.72; }
.pf-busy::after { content:""; position:absolute; right:12px; top:50%; width:14px; height:14px; margin-top:-7px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:pfSpin .8s linear infinite; }
.pf-page-busy { cursor:progress; }
.pf-loading-line { position:fixed; left:0; right:0; top:0; height:3px; z-index:2000; background:linear-gradient(90deg,#0f5132,#00a9c7,#0f5132); background-size:200% 100%; animation:pfSlide 1s linear infinite; }
.pf-utility-bar { display:inline-flex; gap:8px; align-items:center; margin-left:8px; }
.pf-utility-btn { position:relative; display:inline-flex !important; align-items:center; justify-content:center; gap:7px; width:auto !important; min-width:0 !important; min-height:38px; padding:8px 12px !important; border:1px solid rgba(15,81,50,.2); border-radius:8px; background:#eef8f2 !important; color:#0f5132 !important; font-weight:700; cursor:pointer; line-height:1; }
.pf-utility-btn svg { width:18px; height:18px; flex:0 0 auto; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.pf-alert-btn { width:40px !important; padding:0 !important; border-radius:50% !important; background:white !important; box-shadow:0 1px 6px rgba(0,0,0,.1); }
.pf-alert-btn:hover { background:#f6fbf8 !important; }
.pf-alert-badge { position:absolute; top:-7px; right:-7px; z-index:2; min-width:19px; height:19px; padding:0 5px; border-radius:999px; background:#9f1239; color:white; font-size:11px; line-height:19px; text-align:center; box-shadow:0 0 0 2px white; }
.pf-pop-panel { position:fixed; top:72px; right:22px; width:min(440px, calc(100vw - 28px)); max-height:70vh; overflow:hidden; display:none; z-index:1200; background:white; color:#17202a; border:1px solid #d6e3da; border-radius:8px; box-shadow:0 18px 45px rgba(0,0,0,.18); }
.pf-pop-panel.open { display:block; animation:pfFadeIn .16s ease both; }
.pf-pop-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid #e5eee8; background:#f7fbf8; color:#0f5132; }
.pf-pop-close { width:30px !important; min-width:30px !important; height:30px; padding:0 !important; border:0; border-radius:50%; background:#e5eee8 !important; color:#0f5132 !important; font-size:16px; line-height:30px; cursor:pointer; }
.pf-pop-body { padding:12px; max-height:calc(70vh - 56px); overflow:auto; }
.pf-search-input { width:100%; height:42px; padding:9px 12px; border:1px solid #cfd8d3; border-radius:6px; font-size:15px; }
.pf-search-results, .pf-alert-list { display:grid; gap:8px; margin-top:10px; }
.pf-search-row, .pf-alert-row { display:grid; gap:4px; width:100%; padding:10px; border:1px solid #e2ebe5; border-radius:7px; background:white; color:#17202a; text-align:left; text-decoration:none; cursor:pointer; }
.pf-search-row:hover, .pf-alert-row:hover { background:#f5fbf7; transform:none !important; }
.pf-alert-row.unread { border-left:4px solid #0f5132; background:#f6fbf8; }
.pf-search-row strong, .pf-alert-row strong { color:#0f5132; font-size:14px; }
.pf-search-row small, .pf-alert-row small, .pf-muted { color:#65746d; font-size:13px; }
.pf-error { color:#9f1239; font-weight:700; }
.pf-pill { width:max-content; padding:2px 7px; border-radius:999px; background:#e8f5ee; color:#0f5132; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0; }
.pf-alert-actions { display:flex; justify-content:flex-end; }
.pf-link-btn { width:auto !important; min-width:0 !important; padding:6px 8px !important; border:0; background:transparent !important; color:#0f5132 !important; font-weight:700; cursor:pointer; }
.search-icon-btn { width:42px !important; min-width:42px !important; height:40px !important; padding:0 !important; display:inline-flex !important; align-items:center; justify-content:center; border:0; border-radius:7px; background:#0f5132 !important; color:white !important; cursor:pointer; }
.search-icon-btn svg { width:20px; height:20px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.pf-success-toast { position:fixed; right:22px; bottom:22px; z-index:2200; display:flex; align-items:center; gap:10px; max-width:min(420px, calc(100vw - 28px)); padding:13px 16px; border-radius:8px; background:#0f5132; color:white; box-shadow:0 18px 45px rgba(0,0,0,.22); opacity:0; transform:translateY(12px) scale(.98); transition:opacity .18s ease, transform .18s ease; }
.pf-success-toast.show { opacity:1; transform:none; }
.pf-success-toast.mail { background:#075985; }
.pf-success-toast.deleted, .pf-success-toast.error { background:#9f1239; }
.pf-success-toast.user { background:#31572c; }
.pf-success-toast.lead { background:#0f766e; }
.pf-success-check { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:white; color:#0f5132; font-weight:900; flex:0 0 auto; }
.pf-success-toast.mail .pf-success-check { color:#075985; }
.pf-success-toast.deleted .pf-success-check, .pf-success-toast.error .pf-success-check { color:#9f1239; }
.pf-success-toast.user .pf-success-check { color:#31572c; }
.pf-success-toast.lead .pf-success-check { color:#0f766e; }
.pf-success-toast.show .pf-success-check { animation:pfPop .28s ease both; }
button.icon-filter::before { content:"▾"; margin-right:6px; }
button.icon-clear::before { content:"×"; margin-right:6px; }
button[title*="Edit"]::before { content:""; }
@keyframes pfFadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
@keyframes pfBackdrop { from { opacity:0; } to { opacity:1; } }
@keyframes pfSpin { to { transform:rotate(360deg); } }
@keyframes pfSlide { to { background-position:-200% 0; } }
@keyframes pfPop { 0% { transform:scale(.6); } 70% { transform:scale(1.15); } 100% { transform:scale(1); } }
@media (max-width:1100px) {
  .pf-group-nav { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns:repeat(2, minmax(0, 1fr)) !important; }
  .chart-grid { grid-template-columns:1fr !important; }
}
@media (max-width:720px) {
  main, .content { padding:14px !important; }
  header { gap:10px; flex-wrap:wrap; }
  header div { display:flex; gap:8px; flex-wrap:wrap; }
  header.pf-nav-ready { padding:12px !important; }
  .pf-brand-row { align-items:stretch; }
  .pf-header-actions { justify-content:flex-start; }
  .pf-group-nav { grid-template-columns:1fr; }
  .pf-nav-card { min-height:62px; }
  .pf-subnav { align-items:stretch; }
  .pf-subnav a { flex:1 1 140px; justify-content:center; text-align:center; }
  .pf-utility-bar { margin-left:0; }
  .pf-pop-panel { top:86px; right:14px; }
  .grid, .tiles-grid, .calling-dashboard, .dashboard, .filters, .modal-grid, .upload-grid { grid-template-columns:1fr !important; }
  .toolbar, .dashboard-toolbar, .section-head { flex-direction:column; align-items:stretch !important; }
  table { min-width:760px; }
}
