/* ErpCore app styles – all scoped under .erpc-root */
.erpc-root{--bg:#f7f8fb;--card:#fff;--ink:#0f172a;--muted:#64748b;--line:#e8ebf1;--side:#0f172a;--side2:#1e1b4b;--acc:#4f46e5;--acc2:#6366f1;--accs:#eef2ff;--ok:#059669;--oks:#ecfdf5;--bad:#e11d48;--bads:#fff1f2;--warn:#d97706;--warns:#fffbeb;--r:16px;
font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--ink);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased;box-sizing:border-box}
.erpc-root *,.erpc-root *::before,.erpc-root *::after{box-sizing:border-box}
.erpc-root button,.erpc-root input,.erpc-root select,.erpc-root textarea{font-family:inherit;font-size:14px;color:inherit}
.erpc-root.erpc-standalone{position:fixed;inset:0;background:var(--bg);height:100vh;height:100dvh}
.erpc-root.erpc-embedded{position:relative;height:85vh;min-height:560px;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:var(--bg)}
.erpc-boot{display:flex;align-items:center;justify-content:center;height:100%;min-height:300px}
.erpc-spinner{width:36px;height:36px;border:3px solid #e2e8f0;border-top-color:var(--acc);border-radius:50%;animation:erpcspin .8s linear infinite;display:inline-block}
@keyframes erpcspin{to{transform:rotate(360deg)}}

/* layout */
.erpc-app{display:flex;height:100%;overflow:hidden}
.erpc-side{width:250px;flex:none;background:var(--side);color:#cbd5e1;display:flex;flex-direction:column}
.erpc-logo{display:flex;align-items:center;gap:12px;padding:22px 22px;border-bottom:1px solid rgba(255,255,255,.07)}
.erpc-logo b{width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,var(--acc2),var(--acc));display:grid;place-items:center;color:#fff;font-weight:800;font-size:17px}
.erpc-logo span{font-size:21px;font-weight:800;color:#fff;letter-spacing:-.02em}.erpc-logo span i{font-style:normal;color:#818cf8}
.erpc-nav{padding:16px 12px;display:flex;flex-direction:column;gap:3px}
.erpc-nav a{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:11px;color:#cbd5e1;text-decoration:none;font-weight:500;font-size:14.5px;transition:.15s}
.erpc-nav a:hover{background:rgba(255,255,255,.05);color:#fff}
.erpc-nav a.on{background:var(--side2);color:#a5b4fc}
.erpc-nav svg{width:18px;height:18px;flex:none}
.erpc-nav .erpc-badge{margin-left:auto}
.erpc-quota{margin:10px 16px;padding:14px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);font-size:11.5px}
.erpc-quota .t{display:flex;justify-content:space-between;align-items:center;color:#e2e8f0;font-weight:600;font-size:12px;margin-bottom:8px}
.erpc-quota .bar{height:5px;border-radius:5px;background:#020617;overflow:hidden;margin-bottom:8px}.erpc-quota .bar i{display:block;height:100%;background:#34d399;min-width:2px}
.erpc-quota .row{display:flex;justify-content:space-between;color:#94a3b8}
.erpc-user{margin-top:auto;border-top:1px solid rgba(255,255,255,.07);padding:16px 20px}
.erpc-user .u{display:flex;gap:11px;align-items:center}
.erpc-av{width:38px;height:38px;border-radius:50%;background:var(--acc2);color:#fff;display:grid;place-items:center;font-weight:700;flex:none}
.erpc-user .n{color:#fff;font-weight:600;font-size:13.5px}.erpc-user .e{color:#94a3b8;font-size:12px;overflow:hidden;text-overflow:ellipsis;max-width:150px;white-space:nowrap}
.erpc-user a{display:flex;justify-content:center;gap:6px;color:#cbd5e1;text-decoration:none;margin-top:14px;font-size:13.5px}
.erpc-main{flex:1;display:flex;flex-direction:column;min-width:0}
.erpc-top{height:74px;flex:none;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:14px;padding:0 30px}
.erpc-burger{display:none;background:none;border:0;padding:6px;cursor:pointer}
.erpc-search{position:relative;width:380px;max-width:100%}
.erpc-search input{width:100%;height:40px;border-radius:12px;border:1px solid transparent;background:#f1f5f9;padding:0 14px 0 40px;outline:none}
.erpc-search input:focus{border-color:#c7d2fe;background:#fff}
.erpc-search svg{position:absolute;left:14px;top:12px;width:16px;height:16px;color:#94a3b8}
.erpc-sres{position:absolute;top:46px;left:0;right:0;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 40px rgba(15,23,42,.12);max-height:380px;overflow:auto;z-index:50;padding:6px}
.erpc-sres a{display:flex;justify-content:space-between;gap:10px;padding:9px 12px;border-radius:9px;text-decoration:none;color:var(--ink)}
.erpc-sres a:hover{background:#f8fafc}.erpc-sres small{color:var(--muted)}
.erpc-bell{margin-left:auto;position:relative;background:none;border:0;cursor:pointer;color:#475569;padding:6px}
.erpc-bell i{position:absolute;top:5px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--bad);border:2px solid #fff}
.erpc-view{flex:1;overflow:auto;padding:30px}
.erpc-view-in{max-width:1280px;margin:0 auto}

/* headings */
.erpc-h{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.erpc-h h1{font-size:30px;line-height:1.1;margin:0 0 6px;font-weight:800;letter-spacing:-.02em;color:var(--ink)}
.erpc-h p{margin:0;color:var(--muted);font-size:15px}
.erpc-h .act{display:flex;gap:10px;flex-wrap:wrap}

/* buttons */
.erpc-btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 18px;border-radius:11px;border:1px solid var(--line);background:#fff;font-weight:600;cursor:pointer;color:var(--ink);text-decoration:none;white-space:nowrap;transition:.15s}
.erpc-btn:hover{background:#f8fafc}
.erpc-btn svg{width:16px;height:16px}
.erpc-btn.p{background:var(--acc);border-color:var(--acc);color:#fff;box-shadow:0 6px 16px rgba(79,70,229,.28)}.erpc-btn.p:hover{background:#4338ca}
.erpc-btn.d{color:var(--bad);border-color:#fecdd3}.erpc-btn.d:hover{background:var(--bads)}
.erpc-btn.g{border-color:transparent;background:transparent}
.erpc-btn.sm{height:32px;padding:0 12px;font-size:13px;border-radius:9px}
.erpc-btn[disabled]{opacity:.55;pointer-events:none}
.erpc-ico{width:32px;height:32px;display:inline-grid;place-items:center;border-radius:9px;border:0;background:transparent;cursor:pointer;color:#64748b}
.erpc-ico:hover{background:#f1f5f9;color:var(--ink)}.erpc-ico svg{width:16px;height:16px}
.erpc-ico.d:hover{background:var(--bads);color:var(--bad)}

/* cards */
.erpc-card{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 1px 2px rgba(15,23,42,.03)}
.erpc-card.pad{padding:24px}
.erpc-card h3{margin:0 0 4px;font-size:18px;font-weight:700;display:flex;align-items:center;gap:10px}
.erpc-card .sub{color:var(--muted);font-size:13px;margin:0 0 18px}
.erpc-grid{display:grid;gap:18px}
.erpc-kpis{grid-template-columns:repeat(5,1fr);margin-bottom:22px}
.erpc-kpi{padding:20px 22px;position:relative;overflow:hidden}
.erpc-kpi .l{font-size:11.5px;font-weight:700;letter-spacing:.07em;color:var(--muted);text-transform:uppercase;display:flex;gap:6px;align-items:center}
.erpc-kpi .v{font-size:27px;font-weight:800;margin-top:8px;letter-spacing:-.02em}
.erpc-kpi .v small{font-size:13px;font-weight:500;color:var(--muted);margin-left:4px}
.erpc-kpi .deco{position:absolute;right:16px;top:28px;width:34px;height:34px;opacity:.25}
.erpc-kpi.hl{background:linear-gradient(135deg,var(--acc2),var(--acc));color:#fff;border:0}
.erpc-kpi.hl .l,.erpc-kpi.hl .v small{color:#e0e7ff}
.erpc-kpi a{color:inherit;text-decoration:none}
.erpc-banner{background:linear-gradient(110deg,#0f172a 0%,#1e1b4b 60%,#312e81 100%);color:#e2e8f0;border-radius:var(--r);padding:22px 24px;display:flex;gap:18px;align-items:center;margin-bottom:22px;flex-wrap:wrap}
.erpc-banner .ic{width:46px;height:46px;border-radius:12px;background:rgba(99,102,241,.25);display:grid;place-items:center;color:#a5b4fc;flex:none}
.erpc-banner h4{margin:0 0 4px;color:#fff;font-size:16px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.erpc-banner p{margin:0;font-size:13px;color:#cbd5e1}
.erpc-banner .r{margin-left:auto;min-width:240px;font-size:12px}
.erpc-banner .r .bar{height:6px;border-radius:6px;background:#020617;margin:8px 0 6px;overflow:hidden}.erpc-banner .r .bar i{display:block;height:100%;background:#34d399;min-width:3px}
.erpc-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:999px;font-size:11.5px;font-weight:700;white-space:nowrap}
.erpc-pill.ok{background:var(--oks);color:var(--ok)}.erpc-pill.bad{background:var(--bads);color:var(--bad)}.erpc-pill.warn{background:var(--warns);color:var(--warn)}.erpc-pill.acc{background:var(--accs);color:var(--acc)}.erpc-pill.mut{background:#f1f5f9;color:#475569}
.erpc-banner .erpc-pill.ok{background:rgba(52,211,153,.15);color:#34d399}.erpc-banner .erpc-pill.acc{background:rgba(129,140,248,.2);color:#a5b4fc}
.erpc-badge{background:var(--bad);color:#fff;font-size:10.5px;font-weight:700;border-radius:999px;padding:1px 7px}
.erpc-two{grid-template-columns:2fr 1fr}
.erpc-three{grid-template-columns:repeat(3,1fr)}

/* chart */
.erpc-chart{width:100%;height:280px}
.erpc-chart text{font-size:11px;fill:#94a3b8;font-family:inherit}
.erpc-legend{display:flex;gap:16px;font-size:12.5px;color:#475569;font-weight:500}
.erpc-legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px}

/* activity */
.erpc-act{list-style:none;margin:0;padding:0}
.erpc-act li{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid #f1f5f9}
.erpc-act li:last-child{border:0}
.erpc-act .dot{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--accs);color:var(--acc)}
.erpc-act .dot svg{width:15px;height:15px}
.erpc-act .m{font-size:13.5px;font-weight:500}.erpc-act .w{font-size:12px;color:var(--muted)}

/* empty state */
.erpc-empty{text-align:center;padding:56px 20px;color:var(--muted)}
.erpc-empty .c{width:62px;height:62px;border-radius:50%;background:#f8fafc;display:grid;place-items:center;margin:0 auto 16px;color:#cbd5e1}
.erpc-empty .c svg{width:22px;height:22px}
.erpc-empty b{display:block;font-size:17px;color:#475569;font-weight:600;margin-bottom:5px}

/* tables */
.erpc-tbl-wrap{overflow:auto}
.erpc-tbl{width:100%;border-collapse:collapse;font-size:13.5px}
.erpc-tbl th{text-align:left;padding:13px 16px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;background:#fafbfc;border-bottom:1px solid var(--line);white-space:nowrap}
.erpc-tbl td{padding:13px 16px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
.erpc-tbl tr:last-child td{border-bottom:0}
.erpc-tbl tbody tr{transition:.1s}.erpc-tbl tbody tr.clk{cursor:pointer}.erpc-tbl tbody tr.clk:hover{background:#fafaff}
.erpc-tbl .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.erpc-tbl .acts{text-align:right;white-space:nowrap}
.erpc-tbl .nm{font-weight:600}.erpc-tbl .mut{color:var(--muted);font-size:12.5px}
.erpc-pos{color:var(--bad);font-weight:600}.erpc-zero{color:var(--muted)}.erpc-okc{color:var(--ok);font-weight:600}

/* filters */
.erpc-filters{display:flex;gap:10px;padding:14px;flex-wrap:wrap;margin-bottom:18px}
.erpc-filters .s{position:relative;flex:1;min-width:220px}
.erpc-filters .s svg{position:absolute;left:13px;top:12px;width:16px;height:16px;color:#94a3b8}
.erpc-in,.erpc-filters input,.erpc-filters select{height:40px;border:1px solid var(--line);border-radius:11px;background:#f8fafc;padding:0 12px;outline:none;width:100%}
.erpc-filters .s input{padding-left:38px}
.erpc-filters input[type=date],.erpc-filters select{width:auto}
.erpc-tabs{display:inline-flex;background:#f1f5f9;border-radius:11px;padding:4px;gap:2px}
.erpc-tabs button{border:0;background:transparent;padding:7px 14px;border-radius:8px;font-weight:600;color:#64748b;cursor:pointer;font-size:13px}
.erpc-tabs button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}

/* forms / modal */
.erpc-modal-bg{position:fixed;inset:0;background:rgba(15,23,42,.45);backdrop-filter:blur(3px);z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px;animation:erpcfade .15s}
@keyframes erpcfade{from{opacity:0}}
.erpc-modal{background:#fff;border-radius:22px;width:100%;max-width:480px;max-height:calc(100vh - 40px);display:flex;flex-direction:column;box-shadow:0 30px 80px rgba(15,23,42,.35);animation:erpcpop .18s}
.erpc-modal.wide{max-width:820px}
@keyframes erpcpop{from{transform:translateY(8px) scale(.98);opacity:0}}
.erpc-modal .hd{display:flex;justify-content:space-between;align-items:center;padding:22px 30px;border-bottom:1px solid var(--line)}
.erpc-modal .hd h2{margin:0;font-size:19px;font-weight:700}
.erpc-modal .bd{padding:24px 30px;overflow:auto}
.erpc-modal .ft{display:flex;justify-content:flex-end;gap:10px;padding:18px 30px;border-top:1px solid var(--line)}
.erpc-f{margin-bottom:16px}
.erpc-f label{display:block;font-size:11.5px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin-bottom:7px}
.erpc-f input,.erpc-f select,.erpc-f textarea{width:100%;height:42px;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc;padding:0 13px;outline:none;transition:.15s}
.erpc-f textarea{height:auto;min-height:80px;padding:11px 13px;resize:vertical}
.erpc-f input:focus,.erpc-f select:focus,.erpc-f textarea:focus,.erpc-in:focus{border-color:#a5b4fc;background:#fff;box-shadow:0 0 0 3px rgba(99,102,241,.12)}
.erpc-f .hint{font-size:12px;color:var(--muted);margin-top:5px}
.erpc-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.erpc-row3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.erpc-items{width:100%;border-collapse:collapse;margin-bottom:8px}
.erpc-items th{font-size:11px;text-transform:uppercase;color:var(--muted);text-align:left;padding:6px 6px;letter-spacing:.05em}
.erpc-items td{padding:4px 6px}
.erpc-items input,.erpc-items select{width:100%;height:38px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc;padding:0 10px;outline:none}
.erpc-items .tot{text-align:right;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.erpc-totline{display:flex;justify-content:flex-end;gap:20px;font-size:16px;font-weight:700;padding:10px 6px;border-top:1px dashed var(--line)}
.erpc-sect{font-size:12px;font-weight:700;color:var(--acc);text-transform:uppercase;letter-spacing:.06em;margin:6px 0 10px}
.erpc-alert{padding:12px 16px;border-radius:12px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13.5px}
.erpc-alert.bad{background:var(--bads);color:#9f1239;border:1px solid #fecdd3}
.erpc-alert.warn{background:var(--warns);color:#92400e;border:1px solid #fde68a}
.erpc-alert.info{background:var(--accs);color:#3730a3;border:1px solid #c7d2fe}

/* FAB */
.erpc-fab{position:absolute;right:30px;bottom:30px;z-index:40}
.erpc-fab>button{width:54px;height:54px;border-radius:50%;background:var(--acc);border:0;color:#fff;box-shadow:0 10px 26px rgba(79,70,229,.45);cursor:pointer;display:grid;place-items:center;transition:.2s}
.erpc-fab>button svg{width:24px;height:24px;transition:.2s}
.erpc-fab.open>button{background:#0f172a}.erpc-fab.open>button svg{transform:rotate(45deg)}
.erpc-fab .menu{position:absolute;bottom:66px;right:0;display:none;flex-direction:column;gap:10px;align-items:flex-end}
.erpc-fab.open .menu{display:flex}
.erpc-fab .menu button{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:8px 8px 8px 18px;font-weight:600;cursor:pointer;box-shadow:0 8px 20px rgba(15,23,42,.1);white-space:nowrap}
.erpc-fab .menu button span{width:30px;height:30px;border-radius:50%;background:var(--accs);color:var(--acc);display:grid;place-items:center}
.erpc-fab .menu button svg{width:15px;height:15px}

/* toast */
.erpc-toasts{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:100000;display:flex;flex-direction:column;gap:8px;align-items:center}
.erpc-toast{background:#0f172a;color:#fff;padding:11px 18px;border-radius:12px;font-weight:500;box-shadow:0 12px 30px rgba(0,0,0,.2);animation:erpcpop .2s;font-family:Inter,system-ui,sans-serif;font-size:14px}
.erpc-toast.bad{background:var(--bad)}

/* detail */
.erpc-back{display:inline-flex;align-items:center;gap:6px;color:var(--muted);text-decoration:none;font-weight:500;margin-bottom:14px;cursor:pointer;background:none;border:0;padding:0}
.erpc-back:hover{color:var(--acc)}
.erpc-kv{display:grid;grid-template-columns:120px 1fr;gap:9px 12px;font-size:13.5px}
.erpc-kv dt{color:var(--muted)}.erpc-kv dd{margin:0;font-weight:500;word-break:break-word}
.erpc-access-hero{background:linear-gradient(110deg,#312e81,#1e1b4b);color:#e0e7ff;border-radius:var(--r);padding:22px;display:flex;gap:16px;margin-bottom:20px}
.erpc-access-hero h4{margin:0 0 5px;color:#fff;font-size:15px}.erpc-access-hero p{margin:0;font-size:13px;line-height:1.55}
.erpc-stat{display:flex;gap:14px;align-items:center;padding:20px}
.erpc-stat .i{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;flex:none}
.erpc-stat .i svg{width:20px;height:20px}
.erpc-stat .l{font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--muted);text-transform:uppercase}.erpc-stat .v{font-size:24px;font-weight:800}
.erpc-dm .erpc-card{padding:20px}.erpc-dm h5{margin:0 0 4px;font-size:15px}.erpc-dm p{margin:0 0 16px;color:var(--muted);font-size:13px}
.erpc-dm .b{display:flex;gap:10px;border-top:1px solid #f1f5f9;padding-top:14px}.erpc-dm .b .erpc-btn{flex:1;justify-content:center}
.erpc-pager{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}
.erpc-overlay{display:none}

/* responsive */
@media (max-width:1200px){.erpc-kpis{grid-template-columns:repeat(3,1fr)}}
@media (max-width:980px){
 .erpc-two,.erpc-three{grid-template-columns:1fr}
 .erpc-side{position:absolute;left:0;top:0;bottom:0;z-index:60;transform:translateX(-100%);transition:.25s}
 .erpc-app.nav-open .erpc-side{transform:none}
 .erpc-app.nav-open .erpc-overlay{display:block;position:absolute;inset:0;background:rgba(15,23,42,.4);z-index:55}
 .erpc-burger{display:block}
 .erpc-app{position:relative}
}
@media (max-width:640px){
 .erpc-kpis{grid-template-columns:1fr 1fr}
 .erpc-view{padding:18px}.erpc-top{padding:0 16px}
 .erpc-row,.erpc-row3{grid-template-columns:1fr}
 .erpc-h h1{font-size:24px}
 .erpc-modal .hd,.erpc-modal .bd,.erpc-modal .ft{padding-left:18px;padding-right:18px}
 .erpc-fab{right:18px;bottom:18px}
}

/* print invoice window */
@media print{.erpc-noprint{display:none!important}}
.erpc-user a svg,.erpc-bell svg,.erpc-burger svg{width:19px;height:19px;flex:none}
.erpc-bell,.erpc-burger{color:#475569;line-height:0}
.erpc-mform{display:flex;flex-direction:column;min-height:0;flex:1}
.erpc-mform .bd{flex:1;min-height:0}
.erpc-fo{display:grid;gap:18px;grid-template-columns:1fr 260px;align-items:center}
@media (max-width:640px){.erpc-fo{grid-template-columns:1fr}.erpc-items{min-width:560px}.erpc-modal .bd{overflow-x:auto}}

/* ---------- v1.1: PWA / mobile ---------- */
.erpc-standalone .erpc-side{padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left)}
.erpc-standalone .erpc-top{padding-top:env(safe-area-inset-top);height:calc(74px + env(safe-area-inset-top))}
.erpc-install{margin:0 16px 10px;display:flex;align-items:center;justify-content:center;gap:8px;height:40px;border-radius:11px;border:1px dashed rgba(165,180,252,.5);background:rgba(99,102,241,.12);color:#c7d2fe;font-weight:600;cursor:pointer}
.erpc-install svg{width:16px;height:16px}
.erpc-inst-top{display:none}
.erpc-offline{align-items:center;gap:10px;padding:9px 30px;background:#fffbeb;color:#92400e;border-bottom:1px solid #fde68a;font-size:13px;font-weight:500}
.erpc-offline svg{width:16px;height:16px;flex:none}
.erpc-is-offline .erpc-fab{display:none}
.erpc-tabbar{display:none}
.erpc-steps{padding-left:20px;line-height:1.9;margin-top:0}
.erpc-f input[type=color]{padding:4px;cursor:pointer}

/* login / access screens */
.erpc-auth{min-height:100%;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(1200px 600px at 10% -10%,#312e81 0,transparent 60%),linear-gradient(160deg,#0f172a,#1e1b4b);box-sizing:border-box}
.erpc-standalone .erpc-auth{position:absolute;inset:0;overflow:auto}
.erpc-auth-card{background:#fff;border-radius:22px;padding:34px 30px;width:100%;max-width:400px;box-shadow:0 30px 80px rgba(0,0,0,.35);text-align:center}
.erpc-auth-card img{border-radius:16px;margin-bottom:12px}
.erpc-auth-card h1{margin:0 0 4px;font-size:24px;font-weight:800;color:var(--ink)}
.erpc-auth-card>p{margin:0 0 22px;color:var(--muted)}
.erpc-auth-card form{text-align:left}
.erpc-auth-card form p{margin:0 0 14px}
.erpc-auth-card label{display:block;font-size:12px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px}
.erpc-auth-card input[type=text],.erpc-auth-card input[type=password]{width:100%;height:46px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;padding:0 14px;font-size:16px;outline:none;box-sizing:border-box}
.erpc-auth-card input[type=text]:focus,.erpc-auth-card input[type=password]:focus{border-color:#a5b4fc;background:#fff;box-shadow:0 0 0 3px rgba(99,102,241,.15)}
.erpc-auth-card .login-remember label{display:flex;align-items:center;gap:8px;text-transform:none;letter-spacing:0;font-weight:500;font-size:14px;color:#475569}
.erpc-auth-card input[type=submit],.erpc-auth-btn{width:100%;height:48px;border:0;border-radius:12px;background:#4f46e5;color:#fff;font-weight:700;font-size:15px;cursor:pointer;box-shadow:0 8px 20px rgba(79,70,229,.35);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.erpc-auth-link{display:inline-block;margin-top:6px;color:#4f46e5;font-size:13.5px;text-decoration:none}

/* tablet */
@media (max-width:980px){
 .erpc-inst-top{display:block}
 .erpc-side .erpc-install{display:none!important}
}
/* phone */
@media (max-width:760px){
 .erpc-root{font-size:15px}
 .erpc-top{height:62px;gap:8px;padding:0 12px}
 .erpc-standalone .erpc-top{height:calc(62px + env(safe-area-inset-top))}
 .erpc-search{flex:1;width:auto}
 .erpc-search input{font-size:16px}
 .erpc-view{padding:16px 14px calc(90px + env(safe-area-inset-bottom))}
 .erpc-offline{padding:8px 14px}
 .erpc-h{margin-bottom:16px}
 .erpc-h .act{width:100%}
 .erpc-h .act .erpc-btn{flex:1;justify-content:center}
 .erpc-kpis,.erpc-kpis[style]{grid-template-columns:1fr 1fr!important;gap:10px}
 .erpc-kpi{padding:14px 16px}.erpc-kpi .v{font-size:21px}
 .erpc-kpi.hl{grid-column:1/-1}
 .erpc-banner .r{display:none}
 .erpc-card.pad{padding:18px}
 .erpc-filters input[type=date],.erpc-filters select{flex:1;min-width:0}
 .erpc-grid.erpc-two[style]{grid-template-columns:1fr!important}
 .erpc-chart{height:220px!important}
 .erpc-fab{bottom:calc(78px + env(safe-area-inset-bottom));right:16px}
 .erpc-toasts{bottom:calc(84px + env(safe-area-inset-bottom))}
 .erpc-tabbar{display:flex;position:absolute;left:0;right:0;bottom:0;z-index:45;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
 .erpc-tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 0;color:#64748b;text-decoration:none;font-size:11px;font-weight:600;border-radius:10px}
 .erpc-tabbar a svg{width:21px;height:21px}
 .erpc-tabbar a.on{color:var(--acc)}
 .erpc-main{position:relative}
 /* tables → cards */
 .erpc-tbl thead{display:none}
 .erpc-tbl,.erpc-tbl tbody,.erpc-tbl tr,.erpc-tbl td{display:block;width:100%}
 .erpc-tbl tr{padding:12px 16px;border-bottom:1px solid var(--line)}
 .erpc-tbl tbody tr:last-child{border-bottom:0}
 .erpc-tbl td{border:0;padding:3px 0;display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:right!important}
 .erpc-tbl td[data-label]::before{content:attr(data-label);font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;text-align:left;flex:none}
 .erpc-tbl td:first-child{display:block;text-align:left!important;padding-bottom:6px}
 .erpc-tbl td:first-child::before{display:none}
 .erpc-tbl td.acts{justify-content:flex-end;padding-top:6px}
 .erpc-tbl td.acts::before,.erpc-tbl td:empty{display:none}
 .erpc-tbl td.acts .erpc-ico{width:38px;height:38px}
 .erpc-tbl td>div{text-align:right}
 .erpc-tbl td:first-child>div{text-align:left}
 /* modal → bottom sheet */
 .erpc-modal-bg{align-items:flex-end;padding:0}
 .erpc-modal,.erpc-modal.wide{max-width:none;border-radius:22px 22px 0 0;max-height:94vh;max-height:94dvh;animation:erpcsheet .22s}
 .erpc-modal .ft{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
 .erpc-modal .ft .erpc-btn{flex:1;justify-content:center;height:46px}
 .erpc-f input,.erpc-f select,.erpc-f textarea,.erpc-items input,.erpc-items select{font-size:16px}
 .erpc-dm .b{flex-direction:column}
 .erpc-access-hero{flex-direction:column}
}
@keyframes erpcsheet{from{transform:translateY(40px);opacity:.4}}
/* line items on phones: stacked rows */
@media (max-width:640px){
 .erpc-items,.erpc-items tbody,.erpc-items tr{display:block;min-width:0!important;width:100%}
 .erpc-items thead{display:none}
 .erpc-items tr{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:6px;padding:10px;border:1px solid var(--line);border-radius:12px;margin-bottom:8px}
 .erpc-items td{padding:0}
 .erpc-items td:nth-child(1),.erpc-items td:nth-child(2){grid-column:1/-1}
 .erpc-items td.tot{align-self:center}
 .erpc-modal .bd{overflow-x:hidden}
}
.erpc-is-app .erpc-user a[data-logout]{margin-bottom:env(safe-area-inset-bottom)}
.erpc-side{overflow-y:auto;-webkit-overflow-scrolling:touch}
@media (max-width:760px){
 .erpc-filters .s{flex:1 1 100%}
 .erpc-filters input[type=date],.erpc-filters select{flex:1 1 40%}
 .erpc-side{padding-bottom:env(safe-area-inset-bottom)}
}
/* ---------- v1.2: import wizard ---------- */
.erpc-imp-file{display:flex;gap:12px;align-items:center;padding:12px 14px;background:#f8fafc;border:1px solid var(--line);border-radius:12px;margin-bottom:16px}
.erpc-imp-file svg{width:22px;height:22px;color:var(--acc);flex:none}
.erpc-imp-file .mut{color:var(--muted);font-size:12.5px}
.erpc-map{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px}
.erpc-map-row{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.erpc-map-row.req{border-color:#fecdd3;background:#fff7f8}
.erpc-map-l{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13.5px}
.erpc-map-l .erpc-pill{font-size:10.5px;padding:2px 8px}
.erpc-map select{width:100%;height:40px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;padding:0 10px;outline:none}
.erpc-map select:focus{border-color:#a5b4fc;background:#fff}
.erpc-pv{border:1px solid var(--line);border-radius:12px;max-height:240px}
.erpc-pv .erpc-tbl td{white-space:nowrap;font-size:12.5px;padding:9px 12px}
.erpc-imp-opts{display:flex;flex-direction:column;gap:8px;margin-top:14px;font-size:13.5px;color:#475569}
.erpc-imp-opts label{display:flex;gap:8px;align-items:center;cursor:pointer}
@media (max-width:760px){
 .erpc-map{grid-template-columns:1fr}
 .erpc-map select{font-size:16px}
 .erpc-pv .erpc-tbl tr{padding:10px 12px}
}
/* ---------- v1.3 ---------- */
.erpc-spin-sm{width:15px;height:15px;border-width:2px;vertical-align:-2px;border-top-color:#fff;border-color:rgba(255,255,255,.35);border-top-color:#fff}
.erpc-modal .ft{flex-wrap:wrap;align-items:center}
.erpc-ferr{flex:1 1 100%;order:-1;background:var(--bads);color:#9f1239;border:1px solid #fecdd3;border-radius:10px;padding:9px 12px;font-size:13px;margin-bottom:6px}
.erpc-cats{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px}
.erpc-cat{padding:18px 20px;position:relative;cursor:pointer;transition:.15s;border-top:4px solid var(--cc,#6366f1)}
.erpc-cat:hover{box-shadow:0 10px 28px rgba(15,23,42,.08);transform:translateY(-1px)}
.erpc-cat h4{margin:0 0 4px;font-size:16.5px;display:flex;align-items:center;gap:8px}
.erpc-cat h4 i{width:10px;height:10px;border-radius:50%;background:var(--cc,#6366f1);flex:none}
.erpc-cat p{margin:0 0 14px;color:var(--muted);font-size:13px;min-height:18px}
.erpc-cat dl{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
.erpc-cat dt{font-size:10.5px;font-weight:700;letter-spacing:.06em;color:var(--muted);text-transform:uppercase}
.erpc-cat dd{margin:2px 0 0;font-weight:700;font-size:15px}
.erpc-cat .acts{position:absolute;top:12px;right:10px;display:flex;gap:2px}
.erpc-cat.unc{border-top-color:#cbd5e1;background:#fbfcfd}
.erpc-bar2{height:6px;border-radius:6px;background:#f1f5f9;overflow:hidden;margin-top:14px}.erpc-bar2 i{display:block;height:100%;background:var(--cc,#6366f1)}
.erpc-checks li{display:flex;gap:10px;align-items:flex-start;padding:9px 0;border-bottom:1px solid #f1f5f9;list-style:none}
.erpc-checks{padding:0;margin:0}
.erpc-swatches{display:flex;gap:10px;flex-wrap:wrap}
.erpc-swatches label{cursor:pointer;margin:0}
.erpc-swatches input{position:absolute;opacity:0;pointer-events:none}
.erpc-swatches span{display:block;width:30px;height:30px;border-radius:50%;background:var(--cc);border:3px solid #fff;box-shadow:0 0 0 1px #e2e8f0}
.erpc-swatches input:checked+span{box-shadow:0 0 0 2px var(--cc)}
@media (max-width:760px){.erpc-cats{grid-template-columns:1fr}}
.erpc-toasts{top:calc(16px + env(safe-area-inset-top));bottom:auto!important}
