/* Home dashboard, laid out as the owner's picture (2 Oct 2026). */
.apd{--g:#16a34a;--line:#e6ebe8;--ink:#111827;--muted:#6b7280;font-family:var(--ap-font,"Inter","Segoe UI",Roboto,Arial,sans-serif)}
/* The page's old header pieces are covered by the cards below. */
html.ap-theme .mn > .tb,#roleBanner,#kpiStrip{display:none!important}
.apd-row{display:grid;gap:16px;margin-bottom:16px}
.apd-head{grid-template-columns:minmax(0,1.55fr) minmax(0,.6fr) minmax(0,2fr)}
.apd-3{grid-template-columns:minmax(0,1.12fr) minmax(0,1fr) minmax(0,1fr)}
.apd-card{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
  min-width:0;display:flex;flex-direction:column}
.apd-h{display:flex;align-items:center;gap:.55rem;padding:14px 16px 6px}
.apd-h>i{font-size:1.15rem;color:var(--ink)}
.apd-h h3{font-size:1.02rem;font-weight:700;color:var(--ink);margin:0;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apd-sel{width:auto!important;flex:0 0 auto;max-width:150px;border:1px solid var(--line);border-radius:8px;padding:.32rem 1.6rem .32rem .6rem;font:500 .78rem inherit;color:#374151;background:#fff;cursor:pointer}
.apd-tag{border:1px solid var(--line);border-radius:8px;padding:.3rem .6rem;font-size:.76rem;color:#374151}
.apd-va{font-size:.8rem;font-weight:600;color:#2563eb;text-decoration:none}
.apd-b{padding:6px 16px 14px;flex:1;min-width:0}
.apd-foot{padding:0 16px 12px;font-size:.72rem;color:var(--muted)}
.apd-foot:empty{display:none}
.apd-legend{display:flex;align-items:center;gap:.35rem;font-size:.74rem;color:#4b5563;margin-right:.4rem;white-space:nowrap}
.apd-legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-left:.45rem}
.apd-legend i.ln{width:14px;height:2px;background:#16a34a;border-radius:1px}
.apd-empty{padding:1.2rem .4rem;text-align:center;color:var(--muted);font-size:.82rem;line-height:1.5}
.apd-empty a{color:var(--g);font-weight:600}

/* Greeting row */
.apd-hello{flex-direction:row;align-items:center;gap:14px;padding:10px}
.apd-hello-img{width:120px;height:96px;border-radius:10px;overflow:hidden;flex-shrink:0}
.apd-hi{font-size:1rem;font-weight:600;color:var(--ink)}
.apd-name{font-size:1.55rem;font-weight:800;color:var(--ink);letter-spacing:-.4px;line-height:1.2}
.apd-sub{font-size:.88rem;color:#374151;margin-top:.25rem}
.apd-date{flex-direction:row;align-items:center;gap:.8rem;padding:14px 16px;align-self:start;margin-top:6px}
.apd-date>i{font-size:1.6rem;color:#374151}
.apd-date b{display:block;font-size:.95rem;font-weight:600;color:var(--ink)}
.apd-date span{display:block;font-size:.85rem;color:var(--muted)}
.apd-ask{flex-direction:row;align-items:center;gap:14px;padding:14px 16px;cursor:pointer;text-align:left;font:inherit;
  border:1.5px solid #bbf7d0;background:linear-gradient(90deg,#f0fdf4,#fff);box-shadow:0 0 0 4px rgba(22,163,74,.06);align-self:start;margin-top:6px}
.apd-ask:hover{border-color:#86efac}
.apd-ask-ic{width:48px;height:48px;border-radius:12px;background:#15803d;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.35rem;flex-shrink:0}
.apd-ask-t{flex:1;min-width:0}
.apd-ask-t b{display:block;font-size:1.05rem;color:var(--ink)}
.apd-ask-t small{display:block;font-size:.8rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apd-ask-go{width:40px;height:40px;border-radius:10px;background:#14532d;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.1rem;flex-shrink:0}

/* KPI cards */
.apd-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin-bottom:16px}
.apd-kpi{display:flex;gap:12px;padding:14px;text-decoration:none;color:inherit;flex-direction:row;align-items:flex-start;transition:box-shadow .15s,transform .15s}
.apd-kpi:hover{box-shadow:0 6px 18px rgba(16,24,40,.08);transform:translateY(-1px)}
.apd-kic{width:46px;height:46px;border-radius:12px;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.3rem;flex-shrink:0}
.apd-kv{font-size:1.45rem;font-weight:800;color:var(--ink);letter-spacing:-.4px;line-height:1.1;white-space:nowrap}
.apd-kl{font-size:.85rem;color:#374151;margin-top:.15rem}
.apd-kd{font-size:.95rem;font-weight:700;margin-top:.45rem;display:flex;align-items:center;gap:.25rem}
.apd-kd.up{color:#16a34a}.apd-kd.dn{color:#dc2626}.apd-kd.na{color:var(--muted);font-weight:500;font-size:.78rem}
.apd-kc{font-size:.72rem;color:var(--muted)}
.apd-bar{height:8px;border-radius:6px;background:#e5e7eb;margin-top:.7rem;overflow:hidden}
.apd-bar i{display:block;height:100%;background:#16a34a;border-radius:6px}

/* Charts */
.apd-chart{height:230px;position:relative}
.apd-coll{display:flex;align-items:center;gap:16px}
.apd-donut{position:relative;width:150px;height:150px;flex-shrink:0}
.apd-donut-c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}
.apd-donut-c b{font-size:1.05rem;font-weight:800;color:var(--ink)}
.apd-donut-c span{font-size:.72rem;color:var(--muted)}
.apd-coll-l{flex:1;min-width:0}
.apd-coll-l div,.apd-coll-l a{display:grid;grid-template-columns:14px 1fr auto 40px;gap:.5rem;align-items:center;font-size:.82rem;padding:.42rem 0;color:#374151}
.apd-coll-l i{width:12px;height:12px;border-radius:3px;display:block}
.apd-coll-l b{font-weight:700;color:var(--ink);text-align:right}
.apd-coll-l em{font-style:normal;color:var(--muted);text-align:right;font-size:.76rem}

/* Funnel */
.apd-fun{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) 54px;gap:6px 12px;align-items:center}
.apd-fun .fs{height:34px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:.92rem;margin:0 auto}
.apd-fun .nm{font-size:.86rem;color:#374151}
.apd-fun .pc{font-size:.84rem;color:#374151;text-align:right}

/* Maps */
.apd-map-wrap{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:12px}
.apd-map{height:230px;border-radius:10px;overflow:hidden;background:#e8eef0;border:1px solid var(--line)}
.apd-dl{display:flex;flex-direction:column;gap:8px}
.apd-dl .it{display:flex;align-items:center;gap:.6rem;border:1px solid var(--line);border-radius:10px;padding:.45rem .6rem}
.apd-dl .it i.dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}
.apd-dl .it .ic{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:1rem;flex-shrink:0}
.apd-dl .it span{display:block;font-size:.74rem;color:#374151;line-height:1.15}
.apd-dl .it b{display:block;font-size:.95rem;color:var(--ink)}
.apd-pin{width:12px;height:12px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.35)}
.apd-who{background:#fff;border-radius:10px;padding:.3rem .55rem;font-size:.72rem;box-shadow:0 2px 8px rgba(0,0,0,.18);white-space:nowrap}
.apd-who b{display:block;font-size:.76rem}
.apd-note{position:absolute;left:10px;right:10px;bottom:10px;z-index:500;background:rgba(255,255,255,.94);border-radius:8px;padding:.45rem .6rem;font-size:.74rem;color:#374151}

/* Products */
.apd-prod{display:grid;grid-template-columns:22px minmax(0,1.3fr) minmax(0,1fr) 70px;gap:10px;align-items:center;padding:.42rem 0;font-size:.84rem;color:#374151}
.apd-prod>i{color:#16a34a;font-size:1rem}
.apd-prod .bar{height:16px;border-radius:2px}
.apd-prod b{text-align:right;color:var(--ink);font-weight:700;white-space:nowrap}
.apd-prod span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Lists */
.apd-list{display:flex;flex-direction:column}
.apd-li{display:flex;gap:.7rem;align-items:flex-start;padding:.5rem 0;border-bottom:1px solid #f1f4f2;min-width:0}
.apd-li:last-child{border-bottom:0}
.apd-li .ci{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:.95rem;flex-shrink:0}
.apd-li .tx{flex:1;min-width:0;font-size:.84rem;color:#374151;line-height:1.35}
.apd-li .tx b{color:var(--ink)}
.apd-li .tx .am{display:block;color:#15803d;font-weight:700}
.apd-li .tm{font-size:.74rem;color:var(--muted);white-space:nowrap}
.apd-task{display:grid;grid-template-columns:20px minmax(0,1fr) auto 70px;gap:.6rem;align-items:center;padding:.5rem 0;border-bottom:1px solid #f1f4f2;font-size:.84rem;color:#374151}
.apd-task:last-child{border-bottom:0}
.apd-task input{width:16px;height:16px;accent-color:#16a34a;cursor:pointer}
.apd-task span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apd-task .tm{font-size:.76rem;color:var(--muted);text-align:right;white-space:nowrap}
.apd-pr{font-size:.7rem;font-weight:600;padding:.18rem .5rem;border-radius:4px;color:#fff;white-space:nowrap}
.apd-pr.high{background:#ef4444}.apd-pr.medium,.apd-pr.normal{background:#f59e0b}.apd-pr.low{background:#bbf7d0;color:#166534}
.apd-al{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:.6rem;align-items:center;padding:.5rem 0;border-bottom:1px solid #f1f4f2;font-size:.84rem;color:#374151;text-decoration:none}
.apd-al:last-child{border-bottom:0}
.apd-al i{font-size:1.05rem}
.apd-al .mt{font-size:.76rem;color:var(--muted);white-space:nowrap}
.apd-yw{font-size:1.05rem;font-weight:700;color:var(--ink);margin:8px 0 12px}

/* Responsive */
@media(max-width:1400px){.apd-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1200px){
  .apd-head{grid-template-columns:minmax(0,1fr) auto}
  .apd-ask{grid-column:1 / -1;margin-top:0}
  .apd-3{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:780px){
  .apd-head,.apd-3{grid-template-columns:minmax(0,1fr)}
  .apd-date{margin-top:0}
  .apd-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .apd-kpi{padding:12px;gap:10px}
  .apd-kic{width:38px;height:38px;font-size:1.1rem}
  .apd-kv{font-size:1.15rem}
  .apd-hello-img{width:84px;height:72px}
  .apd-name{font-size:1.2rem}
  .apd-map-wrap{grid-template-columns:minmax(0,1fr)}
  .apd-dl{flex-direction:row;flex-wrap:wrap}
  .apd-dl .it{flex:1 1 40%}
  .apd-coll{flex-direction:column}
  .apd-legend{display:none}
  .apd-task{grid-template-columns:20px minmax(0,1fr) auto}
  .apd-task .tm{display:none}
}
.apd-h h3{flex:1 0 auto}
.apd-legend{flex:0 1 auto;min-width:0;overflow:hidden}
@media(max-width:1500px){.apd-legend{font-size:.68rem}}
.apd-seg{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden;flex-shrink:0}
.apd-seg button{border:0;background:#fff;padding:.3rem .6rem;font:600 .75rem inherit;color:#374151;cursor:pointer}
.apd-seg button.on{background:#16a34a;color:#fff}
.apd-map .leaflet-container,.apd-map{background:#f8fbfd}
.apd-map .leaflet-control-attribution{font-size:9px;max-width:100%;white-space:normal}
/* Command Center */
.apd-cc{grid-template-columns:repeat(3,minmax(0,.8fr)) minmax(0,1.6fr)}
.apd-ccs{padding:12px 14px}
.apd-cch{display:flex;align-items:baseline;gap:.45rem;margin-bottom:.4rem}
.apd-cch .dot{font-size:.8rem}
.apd-cch b{font-size:1.5rem;font-weight:800;color:#111827}
.apd-cch span:last-child{font-size:.88rem;font-weight:600;color:#374151}
.apd-cch.red b{color:#dc2626}.apd-cch.amber b{color:#d97706}.apd-cch.green b{color:#16a34a}
.apd-cci{display:flex;justify-content:space-between;gap:.5rem;padding:.35rem 0;border-top:1px solid #f1f4f2;font-size:.8rem;color:#374151;text-decoration:none}
.apd-cci:hover{color:#15803d}
.apd-cci b{white-space:nowrap;color:#111827}
.apd-brief .apd-h h3{flex:1}
.apd-bl{margin:0;padding-left:1.1rem;font-size:.86rem;line-height:1.6;color:#1f2937}
@media(max-width:1200px){.apd-cc{grid-template-columns:repeat(3,minmax(0,1fr))}.apd-brief{grid-column:1/-1}}
@media(max-width:780px){.apd-cc{grid-template-columns:minmax(0,1fr)}}
.apd-legend{overflow:visible}
#apdState{max-width:120px}

/* Every figure opens the rows behind it (2 Oct 2026). */
a.apd-go{color:inherit;text-decoration:none;cursor:pointer}
a.apd-go:hover{background:#f3faf5}
a.apd-go:hover b,a.apd-go:hover .nm{color:#15803d}
.apd-fun a.apd-go:hover .fs{filter:brightness(1.08)}
.apd-dl a.it:hover{border-color:#16a34a}
.leaflet-interactive{cursor:pointer}
