/* ===== Fonts ===== */
@font-face{font-family:Inter;font-weight:400;src:url('fonts/d9401374db.woff2') format("woff2");font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-weight:500;src:url('fonts/e29f8be039.woff2') format("woff2");font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-weight:600;src:url('fonts/b5c6b808c5.woff2') format("woff2");font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-weight:700;src:url('fonts/0fc7fdb804.woff2') format("woff2");font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-weight:800;src:url('fonts/b5147d4cbc.woff2') format("woff2");font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Inter;font-weight:400;src:url('fonts/68f645c6b6.woff2') format("woff2");font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-weight:500;src:url('fonts/6b66c741bf.woff2') format("woff2");font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-weight:600;src:url('fonts/e0d61f6dc5.woff2') format("woff2");font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-weight:700;src:url('fonts/5197a7aeb2.woff2') format("woff2");font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-weight:800;src:url('fonts/207ec5e15f.woff2') format("woff2");font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ===== Tokens ===== */
:root{
  --bg:#fdfaf8;--panel:#fff;--panel2:#f8f5f3;--bd:#eee7e3;--bd2:#e8dbd3;--bd3:#ead4c8;
  --tx:#4a3817;--tx2:#5d524b;--tx3:#8b827d;--tx4:#a79f9a;
  --teal:#b3862f;--teal-d:#9a6f22;--green:#009966;--green2:#10b981;--red:#e11d48;--red2:#ef4444;--amber:#d97706;--blue:#2563eb;
  --thead:#f3f0ee;--hover:#faf6f3;
  --grad:linear-gradient(90deg,#c9a04e,#a9762f);
  --shadow:0 1px 3px rgba(104,79,33,.06),0 4px 14px rgba(104,79,33,.05);
  --scrollthumb:#e6d2c7;
}
[data-theme=dark]{
  --bg:#493817;--panel:#1f1611;--panel2:#5f481e;--bd:#38281f;--bd2:#84652a;--bd3:#8a692c;
  --tx:#f2eae6;--tx2:#bdb0a8;--tx3:#95877f;--tx4:#786961;--thead:#5e481e;--hover:#5e471e;
  --shadow:0 1px 3px rgba(0,0,0,.4);--scrollthumb:#8b6a2c;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font:400 14px/1.4 Inter,"Segoe UI",Tahoma,Arial,sans-serif;color:var(--tx);background:var(--bg);overflow:hidden;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
a{color:inherit;text-decoration:none}
svg.i{width:16px;height:16px;flex:none;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:var(--scrollthumb);border-radius:8px}
::-webkit-scrollbar-track{background:transparent}

/* ===== Shell ===== */
#app{display:grid;grid-template-columns:256px 1fr;grid-template-rows:64px 1fr;height:100vh}
#app.collapsed{grid-template-columns:72px 1fr}
.hdr{grid-column:1/3;display:flex;align-items:center;background:var(--panel);border-bottom:1px solid var(--bd);position:relative;z-index:20}
.brand{width:256px;display:flex;align-items:center;gap:12px;padding-left:17px;flex:none}
#app.collapsed .brand{width:72px;padding-left:16px}
#app.collapsed .brand .bt{display:none}
.logo{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#ae8437,#c79c4c);display:grid;place-items:center;box-shadow:0 6px 14px rgba(176,134,55,.28);flex:none}
.bt{min-width:0}
.bt b{display:block;font-size:14.5px;font-weight:700;letter-spacing:.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:172px;line-height:1.25}
.bt span{display:block;font-size:10px;color:var(--tx3);line-height:1.2;margin-top:1px}
.page-title{font-size:14px;font-weight:700;margin-left:16px;flex:1;white-space:nowrap}
.hr{display:flex;align-items:center;height:100%;padding-right:18px}
.hbtn{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;color:var(--tx2);position:relative}
.hbtn:hover{background:var(--hover)}
.hbtn .i{width:20px;height:20px}
.lang{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--tx2);margin:0 20px 0 18px;padding:6px 0;position:relative}
.lang .i{width:19px;height:19px}.lang .i.s{width:11px;height:11px}
.aa{font-weight:700;font-size:13px;margin:0 14px 0 0;letter-spacing:-.5px;width:34px;text-align:center;color:var(--tx2)}
.aa small{font-size:9px}
.badge-n{position:absolute;top:-2px;right:-6px;background:#ee0033;color:#fff;font-size:8px;font-weight:700;border-radius:8px;padding:1px 4px;line-height:1.3}
.user{display:flex;align-items:center;gap:8px;margin-left:15px}
.avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#a67e34,#b78b3a);color:#fff;display:grid;place-items:center;font-weight:700;font-size:13px;box-shadow:0 0 0 2px #fff,0 0 0 3px #cca55c}
.uname{text-align:right;line-height:1.2}
.uname b{display:block;font-size:12px;font-weight:500}
.uname span{font-size:9.5px;color:var(--tx3)}
.logout{color:#e11d48;margin-left:16px;width:34px;height:34px}
.logout .i{width:19px;height:19px}

.side{background:var(--panel);display:flex;flex-direction:column;min-height:0;position:relative;border-right:1px solid transparent}
.navs{flex:1;overflow-y:auto;padding:8px 13px 8px 13px;margin-right:0;scrollbar-width:thin}
.navs::-webkit-scrollbar{width:6px}
.navs::-webkit-scrollbar-thumb{background:#e0c3b2;border-radius:6px}
.navs{scrollbar-color:#e0c3b2 transparent}
.nav-i{display:flex;align-items:center;gap:10px;height:40px;margin-bottom:4px;padding:0 12px;border-radius:12px;font-size:14px;width:100%;text-align:left;white-space:nowrap;position:relative}
.nav-i .i{width:20px;height:20px;margin-right:2px}
.nav-i:hover{background:var(--hover)}
.nav-i .lb{flex:1;overflow:hidden;text-overflow:ellipsis}
.nav-i .chev{width:15px;height:15px;color:var(--tx3);margin-right:4px}
.nav-i.on{background:var(--grad);color:#fff;box-shadow:0 5px 14px rgba(191,145,60,.28)}
.nav-i.on .chev{color:#fff}
.nav-i.grp.act{color:#a17a33}
.nav-i.grp.act .i{color:#a17a33}
.nav-sub{margin:0 0 2px 30px;padding-left:0}
.nav-sub .nav-i{height:36px;margin-bottom:2px;padding:0 10px 0 12px;width:204px;font-size:14px}
.nav-sub .nav-i .i{width:20px;height:20px}
.nav-i.on.sub{box-shadow:0 4px 12px rgba(191,145,60,.25)}
.collapse-btn{height:49px;border-top:1px solid var(--bd);display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px;color:var(--tx2);width:100%}
.collapse-btn .i{width:14px;height:14px}
#app.collapsed .nav-i .lb,#app.collapsed .nav-i .chev,#app.collapsed .collapse-btn span{display:none}
#app.collapsed .nav-sub{margin-left:0}
#app.collapsed .nav-sub .nav-i{width:100%}
#app.collapsed .nav-i{padding:0 14px}
.main{overflow-y:auto;background:var(--bg);position:relative}
.pg{padding:20px 16px 28px 16px;min-height:100%}
.pg.p24{padding:24px 24px 28px 24px}
.pg.c{margin:0 auto}

/* ===== Page header ===== */
.ph{display:flex;align-items:flex-start;gap:12px;margin-bottom:20px;min-height:48px}
.ph-ic{width:40px;height:40px;border-radius:12px;background:#e6f8f1;color:#10a574;display:grid;place-items:center;flex:none;margin-top:0}
.ph-ic .i{width:20px;height:20px}
.ph-t{font-size:24px;font-weight:700;letter-spacing:.1px;line-height:32px;color:var(--tx)}
.ph-s{font-size:14px;color:var(--tx2);line-height:20px;margin-top:2px}
.ph-a{margin-left:auto;display:flex;gap:8px;align-items:center;padding-top:0}
[data-theme=dark] .ph-ic{background:#5f481e}

/* ===== Buttons ===== */
.btn{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;border:1px solid var(--bd);border-radius:10px;background:var(--panel);font-size:14px;font-weight:500;box-shadow:0 1px 2px rgba(0,0,0,.04);white-space:nowrap}
.btn:hover{background:var(--hover)}
.btn .i{width:16px;height:16px}
.btn-g{background:#009966;border-color:#009966;color:#fff;font-weight:500}
.btn-g:hover{background:#008a5c}
.btn-t{background:#a07932;border-color:#a07932;color:#fff}
.btn-t:hover{background:#94712f}
.btn-s{height:30px;padding:0 10px;font-size:12.5px;border-radius:9px}
.btn-red{color:#e11d48;border-color:#fbc9d3;background:#fff}
.btn-dash{border-style:dashed;border-color:#fbb6c3;color:#e11d48}
.btn[disabled]{opacity:.55;cursor:not-allowed}

/* ===== Tabs / chips ===== */
.ptabs{display:flex;gap:8px;flex-wrap:nowrap;margin-bottom:16px}
.ptab{display:inline-flex;align-items:center;gap:8px;height:38px;padding:0 16px;border:1px solid var(--bd);border-radius:20px;background:var(--panel);font-size:14px;white-space:nowrap;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.ptab:hover{background:var(--hover)}
.ptab .i{width:15px;height:15px;color:#a07932}
.ptab.on{background:var(--grad);color:#fff;border-color:transparent;box-shadow:0 6px 16px rgba(183,139,58,.3)}
.ptab.on .i{color:#fff}
.cnt{display:inline-grid;place-items:center;min-width:20px;height:18px;padding:0 6px;border-radius:9px;background:#f5ebe5;color:#95712f;font-size:10.5px;font-weight:600}
.ptab.on .cnt{background:rgba(255,255,255,.28);color:#fff}
.chips{display:flex;gap:8px;margin-bottom:16px}
.chip{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border:1px solid var(--bd);border-radius:15px;background:var(--panel);font-size:12px;color:var(--tx2)}
.chip .i{width:12px;height:12px}
.chip.on{background:#d3f3ea;border-color:#8fd9c3;color:#8a692c;font-weight:500}
.seg{display:inline-flex;gap:2px;background:#f6f2f0;border:1px solid var(--bd);border-radius:12px;padding:5px}
[data-theme=dark] .seg{background:#5d471d}
.seg button{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 13px;border-radius:9px;font-size:14px;color:var(--tx);white-space:nowrap}
.seg button .i{width:15px;height:15px}
.seg button.on{background:var(--panel);box-shadow:0 1px 4px rgba(92,70,29,.12)}
.search{position:relative;width:320px;margin-bottom:16px}
.search input{width:100%;height:36px;border:1px solid var(--bd2);border-radius:10px;background:var(--panel);padding:0 38px 0 12px;font-size:14px;outline:0}
.search input::placeholder{color:var(--tx4)}
.search input:focus{border-color:#a07a33;box-shadow:0 0 0 3px rgba(160,122,51,.12)}
.search .i{position:absolute;right:12px;top:10px;width:16px;height:16px;color:var(--tx3)}
.search.w{width:100%}
.search.l .i{left:12px;right:auto}.search.l input{padding:0 12px 0 38px}

/* ===== Cards & tables ===== */
.card{background:var(--panel);border:1px solid var(--bd);border-radius:16px;box-shadow:var(--shadow)}
.card.t{border-color:var(--bd3)}
.tw{background:var(--panel);border:1px solid var(--bd);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;padding-top:8px;position:relative}
table{width:100%;border-collapse:collapse}
th{background:var(--thead);text-align:left;font-size:12px;font-weight:700;color:#4d423c;padding:0 16px;height:44px;white-space:nowrap}
[data-theme=dark] th{color:var(--tx2)}
td{padding:0 16px;height:60px;border-top:1px solid var(--bd);font-size:13px;vertical-align:middle}
tr:hover td{background:var(--hover)}
td.sm{font-size:12px}
.name{font-size:13px;color:var(--tx);display:flex;align-items:center;gap:8px}
.name small{display:block;font-size:9.5px;color:var(--tx3);margin-top:3px}
.dot{width:12px;height:12px;border-radius:50%;flex:none;display:inline-block}
.dot.g{background:#10b981}.dot.r{background:#ef2f5b}.dot.y{background:#9ca3af}
.ph-link{color:#a37c33;font-size:10.5px;display:inline-flex;align-items:center;gap:4px;font-weight:500}
.ph-link .i{width:12px;height:12px}
.code{color:#59504a;font-size:10.5px}
.svc{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--bd);background:var(--panel);border-radius:12px;padding:3px 9px;font-size:9.5px;font-weight:600}
.svc .i{width:11px;height:11px}
.act{display:inline-flex;align-items:center;gap:6px;border:1px solid #cca55c;color:#9f7932;background:#fcf7f4;border-radius:12px;padding:2px 9px;font-size:9px;white-space:nowrap}
.act.r{border-color:#fb7185;color:#e11d48;background:#fff5f6}
.act .i{width:9px;height:9px}
.bg{display:inline-flex;align-items:center;gap:4px;border-radius:12px;padding:3px 10px;font-size:9.5px;font-weight:500;border:1px solid;white-space:nowrap}
.bg.gray{background:#f3f4f6;color:#6b7280;border-color:#d1d5db}
.bg.green{background:#e8faf3;color:#0a9d72;border-color:#7fe0bd}
.bg.red{background:#fff0f2;color:#e11d48;border-color:#fda4af}
.bg.amber{background:#fff8e6;color:#c2740c;border-color:#fcd34d}
.bg.blue{background:#eef5ff;color:#2563eb;border-color:#e6c0aa}
.bg.violet{background:#f4efff;color:#7c3aed;border-color:#c4b5fd}
.bg.cyan{background:#fbf4f0;color:#9f7932;border-color:#cca55c}
.bg.l{font-size:11px;padding:3px 11px}
.bg.xl{font-size:12px;padding:5px 12px}
.eye{color:#111;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px}
.eye:hover{background:var(--hover)}
.eye .i{width:17px;height:17px}
.nodata{text-align:center;padding:48px 16px}
.nodata b{display:block;font-size:17px;font-weight:500;margin-bottom:8px}
.nodata span{color:var(--tx3);font-size:14px}
.empty-ok{display:grid;place-items:center;padding:80px 0 76px;color:var(--tx2);gap:14px;font-size:14px}
.empty-ok .circ{width:44px;height:44px;border-radius:50%;border:2.5px solid #86e0c7;display:grid;place-items:center;color:#10b981}

/* ===== KPI ===== */
.kpis{display:grid;gap:16px;margin-bottom:16px}
.kpi{background:var(--panel);border:1px solid var(--bd);border-radius:18px;box-shadow:var(--shadow);padding:20px;position:relative;text-align:left;width:100%}
.kpi.sel{border:2px solid #2dd4a7}
.kpi small{display:block;font-size:12px;color:var(--tx2)}
.kpi b{display:block;font-size:22px;font-weight:700;margin-top:6px}
.kpi .ico{position:absolute;right:16px;top:16px;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:#e6f8f1;color:#10a574}
.kpi .ico .i{width:16px;height:16px}

/* ===== Forms ===== */
.fld{display:flex;flex-direction:column;gap:6px}
.fld label{font-size:12px;color:var(--tx2)}
.inp,.sel{height:36px;border:1px solid var(--bd2);border-radius:10px;background:var(--panel);padding:0 12px;font-size:13px;outline:0;width:100%}
select.sel{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7b7b' stroke-width='2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");background-repeat:no-repeat;background-position:right 10px center;padding-right:30px}
.inp:focus,.sel:focus,textarea:focus{border-color:#a07a33;box-shadow:0 0 0 3px rgba(160,122,51,.12)}
.dt{position:relative}
.dt input{padding-right:34px}
.dt .i{position:absolute;right:11px;top:10px;width:15px;height:15px;color:var(--tx2);pointer-events:none}
textarea.inp{height:auto;padding:10px 12px;resize:vertical}
.sw{width:40px;height:22px;border-radius:11px;background:#ded8d4;position:relative;transition:.15s;flex:none}
.sw::after{content:"";position:absolute;left:2px;top:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:.15s}
.sw.on{background:#10b981}.sw.on::after{left:20px}

/* ===== Modal / toast / dropdown ===== */
.ov{position:fixed;inset:0;background:rgba(72,55,23,.45);display:grid;place-items:center;z-index:100;animation:fd .12s}
.modal{background:var(--panel);border-radius:18px;width:min(520px,92vw);max-height:90vh;overflow:auto;box-shadow:0 24px 60px rgba(0,0,0,.3)}
.modal h3{font-size:18px;font-weight:700;padding:22px 24px 4px}
.modal .mb{padding:14px 24px;display:grid;gap:14px}
.modal .mf{padding:14px 24px 22px;display:flex;justify-content:flex-end;gap:10px}
.modal .mp{padding:0 24px;color:var(--tx2);font-size:13px}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);background:#58431c;color:#fff;padding:11px 18px;border-radius:12px;font-size:13px;z-index:200;box-shadow:0 8px 24px rgba(0,0,0,.25);animation:fd .15s}
.menu{position:absolute;background:var(--panel);border:1px solid var(--bd);border-radius:12px;box-shadow:0 12px 32px rgba(77,58,24,.18);padding:6px;z-index:60;min-width:180px}
.menu button{display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:8px 10px;border-radius:8px;font-size:13px}
.menu button:hover{background:var(--hover)}
.menu button.on{color:#a07932;font-weight:600}
.menu .nt{padding:10px 12px;border-bottom:1px solid var(--bd);font-size:12.5px;line-height:1.35}
.menu .nt small{display:block;color:var(--tx3);font-size:11px;margin-top:2px}
@keyframes fd{from{opacity:0}to{opacity:1}}

/* ===== My account ===== */
.profile-card{background:linear-gradient(135deg,#faf4f0,#f6eeea);border:2px solid #ead4c8;border-radius:20px;height:188px;padding:44px 22px;display:flex;gap:12px;box-shadow:var(--shadow)}
.big-av{width:88px;height:88px;border-radius:50%;background:#a67e34;color:#fff;display:grid;place-items:center;font-size:30px;font-weight:700;box-shadow:0 0 0 4px #fff,0 0 0 6px #cca55c;position:relative;margin:0 8px 0 0;cursor:pointer;flex:none}
.big-av i{position:absolute;right:-4px;bottom:-4px;width:30px;height:30px;border-radius:50%;background:#a67e34;border:3px solid #f6eeea;display:grid;place-items:center}
.big-av i .i{width:13px;height:13px;color:#fff}
.pf-n{font-size:20px;font-weight:700;display:flex;align-items:center;gap:10px;line-height:1.3;margin-top:4px}
.role{background:#f6e9e1;border:1px solid #e9cebf;color:#8a692b;border-radius:10px;font-size:10px;font-weight:600;padding:3px 9px}
.sub{font-size:13px;color:var(--tx2);margin-top:2px}
.hint{font-size:10.5px;color:var(--tx2);display:flex;gap:6px;align-items:center;margin-top:10px}
.hint .i{width:12px;height:12px}
.att{background:linear-gradient(180deg,#fefcfb,#fbf5f2);border:2px solid #ebcbb9;border-radius:20px;padding:26px;margin-top:16px;box-shadow:var(--shadow)}
.att-h{display:flex;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid var(--bd);margin-bottom:16px}
.att-h .ic{width:48px;height:48px;border-radius:50%;background:#dff5ef;color:#a67e34;display:grid;place-items:center}
.att-h .ic .i{width:24px;height:24px}
.att-h b{font-size:15px;display:block}
.att-h span{font-size:12px;color:var(--tx2)}
.geo{margin-left:auto;border:1px solid #cca55c;background:#faf3ef;color:#95712f;font-size:10.5px;border-radius:12px;padding:4px 10px;display:flex;align-items:center;gap:5px;align-self:flex-end;margin-bottom:4px}
.geo .i{width:12px;height:12px}
.three{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.three>div{border:1px solid var(--bd);background:var(--panel);border-radius:12px;padding:14px 12px;height:75px}
.three small{font-size:10.5px;color:var(--tx2);display:block}
.three b{font-size:20px;display:block;margin-top:6px}
.ml{font-size:12px;display:flex;align-items:center;gap:8px;margin:7px 0;color:#5d524b}
.ml .i{width:13px;height:13px}
.ml.o{color:#b45309;font-size:14px}.ml.o .i{width:15px;height:15px}
.ml.e{color:#d10000}
.ml.k{font-size:10.5px;color:#5d524b}
.ckb{display:flex;gap:8px;margin-top:8px;align-items:center}
.ckb .big{flex:1;height:48px;border-radius:10px;font-size:15px;font-weight:500;display:flex;align-items:center;justify-content:center;gap:10px}
.big.in{background:#009966;color:#fff}
.big.out{border:1px dashed #fbb6c3;color:#e11d48;background:#fff7f8}
.big small{font-size:10px;color:#6b7280;font-weight:400}

/* ===== Section banners ===== */
.banner{border:1px solid #e9cebf;border-radius:18px;padding:24px 20px;display:flex;gap:16px;align-items:center;background:linear-gradient(90deg,#f9f0eb,#d3f4ea)}
.banner .bi{width:48px;height:48px;border-radius:14px;background:#a77f35;color:#fff;display:grid;place-items:center;flex:none;box-shadow:0 8px 16px rgba(160,122,51,.25)}
.banner .bi .i{width:22px;height:22px}
.banner h2{font-size:24px;font-weight:700}
.banner p{font-size:13px;color:var(--tx2);margin-top:4px}
.banner .lg{display:flex;gap:18px;font-size:10.5px;color:var(--tx2);margin-top:8px;flex-wrap:wrap}
.banner .lg b{font-weight:700;color:var(--tx)}
.banner .lg span{display:flex;gap:5px;align-items:center}
.banner .lg .i{width:12px;height:12px;color:#a07a33}
.banner.sal{background:linear-gradient(90deg,#f8f1f4,#f9eed7);border-color:#f7d9cf}
.banner.sal .bi{background:#f97316;box-shadow:0 8px 16px rgba(249,115,22,.25)}
.rep-banner{background:linear-gradient(90deg,#cca55c,#a07a33 40%,#a17a33);border-radius:18px;padding:24px 20px;display:flex;align-items:center;gap:14px;color:#fff;height:102px;box-shadow:0 8px 24px rgba(161,122,51,.2)}
.rep-banner .bi{width:48px;height:48px;border-radius:14px;background:rgba(255,255,255,.22);display:grid;place-items:center}
.rep-banner h2{font-size:22px;font-weight:800;letter-spacing:.5px}
.rep-banner p{font-size:13px;margin-top:4px}
.rep-banner .tags{margin-left:auto;display:flex;gap:8px}
.rep-banner .tags span{background:rgba(255,255,255,.22);border-radius:14px;padding:6px 12px;font-size:11px;font-weight:600}
.year{height:38px;border-radius:10px;border:0;background:rgba(255,255,255,.6);width:96px;padding:0 12px;font-size:14px}
.top-tabs{display:inline-flex;background:#f6f2f0;border:1px solid var(--bd);border-radius:14px;padding:5px;margin:16px 0 18px;gap:2px}
[data-theme=dark] .top-tabs{background:#5d471d}
.top-tabs button{display:flex;align-items:center;gap:8px;height:38px;padding:0 13px;border-radius:10px;font-size:14px;white-space:nowrap}
.top-tabs button .i{width:15px;height:15px}
.top-tabs button.on{background:var(--panel);box-shadow:0 1px 5px rgba(92,70,29,.13)}
.mon{display:flex;gap:6px;align-items:center;margin-bottom:12px;font-size:12px;color:var(--tx2)}
.mon span.l{margin-right:6px}
.mon button{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:12px;background:#f6f3f1;font-size:12px;color:var(--tx2)}
.mon button::before{content:"";width:5px;height:5px;border-radius:50%;background:#a79f9a}
.mon button.has::before{background:#10b981}
.mon button.on{background:#a07932;color:#fff;font-weight:600}.mon button.on::before{background:#fff}
.sc4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.sk{border-radius:18px;padding:24px 16px;display:flex;gap:12px;border:1px solid;height:140px;align-items:flex-start}
.sk .ik{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:#fff;flex:none;margin-top:12px}
.sk small{font-size:11px;color:var(--tx2);display:block;margin-top:2px}
.sk b{font-size:19px;font-weight:700;display:block;margin-top:2px}
.sk div div{margin-top:24px}
.sk.g{background:linear-gradient(135deg,#fbf6f3,#f6e9e1);border-color:#e8cab8}.sk.g .ik{background:#10b981}.sk.g b{color:#9d7832}
.sk.r{background:linear-gradient(135deg,#fdf3f6,#f8ebef);border-color:#f8c8d4}.sk.r .ik{background:#f43f5e}.sk.r b{color:#e11d48}
.sk.b{background:linear-gradient(135deg,#fbf4f0,#f7ece5);border-color:#e8cab8}.sk.b .ik{background:#b58a39}.sk.b b{color:#9b7631}
.sk.o{background:linear-gradient(135deg,#fdf6ec,#f9eeda);border-color:#f6d9a8}.sk.o .ik{background:#f97316}.sk.o b{color:#111}
.chartc{padding:24px 16px 18px;margin-top:16px;position:relative}
.chartc h4{font-size:13px;font-weight:700;margin:20px 0 0 0;position:absolute;left:16px;top:14px}
.chart-act{position:absolute;right:16px;top:16px;display:flex;gap:8px}
.leg{display:flex;justify-content:center;gap:14px;font-size:11px;color:#10b981;margin-top:-6px}
.leg i{display:inline-block;width:12px;height:10px;margin-right:4px;vertical-align:middle}
.tip{position:absolute;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 4px 14px rgba(0,0,0,.14);padding:8px 10px;font-size:11px;pointer-events:none;z-index:5;white-space:nowrap}

/* generic bits for finance pages */
.fbar{display:flex;align-items:center;gap:12px;padding:14px;background:var(--panel);border:1px solid var(--bd);border-radius:14px;margin-bottom:12px;flex-wrap:wrap}
.fbar.acc{border-left:3px solid #10b981;padding:14px 18px}
.fbar.red{border-left:3px solid #fb7185}
.fbar label{font-size:11px;color:var(--tx2);display:block;margin-bottom:4px}
.fbar .dt{width:144px}
.fbar .dt .inp{height:36px;font-size:12px}
.pill-amt{display:inline-flex;align-items:center;gap:8px;border:1px solid #cca55c;background:#faf3ef;color:#95712f;border-radius:12px;padding:0 12px;height:34px;font-size:12px}
.pill-amt b{font-size:13px}
.pill-amt.gr{background:#f8f7f7;border-color:var(--bd);color:var(--tx2)}
.mono{font-variant-numeric:tabular-nums}
.pos{color:#009966}.neg{color:#e11d48}
.tc{display:flex;gap:4px;flex-direction:column}
.amt{font-weight:700;font-size:14px;white-space:nowrap}
.amt.g{color:#009966}.amt.r{color:#e11d48}
.u-bar{height:6px;border-radius:4px;background:#f1ece9;overflow:hidden;margin-top:6px}
.u-bar i{display:block;height:100%;background:#af8537}
.fin-top{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.banner-p{background:linear-gradient(90deg,#b28738,#a17b33 50%,#009866);border-radius:18px;color:#fff;padding:20px;position:relative;height:136px}
.banner-p h4{font-size:17px;font-weight:700}
.banner-p .big{position:absolute;right:20px;top:24px;font-size:26px;font-weight:800}
.banner-p .sub2{display:flex;gap:16px;position:absolute;left:20px;right:20px;bottom:20px}
.banner-p .sub2 div{flex:1;background:rgba(255,255,255,.18);border-radius:10px;height:36px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;font-size:13px}
.vt{display:flex;flex-direction:column;gap:10px}
.rtl{direction:rtl;font-family:Tahoma,"Segoe UI",Vazirmatn,Arial,sans-serif}
.rtl .ph-t{font-size:22px}
.rtl .ph-a{margin-left:0;margin-right:auto}
.rtl .btn,.rtl .btn-g{font-size:11.5px}
.rtl td,.rtl th{text-align:right}

/* responsive-ish */
@media (max-width:1500px){.three,.fin-top,.sc4{grid-template-columns:repeat(2,1fr)}}

/* icon size variants & page-level tweaks */
svg.i.xs{width:12px;height:12px}
svg.i.lg{width:24px;height:24px}
svg.i.xl{width:40px;height:40px}
svg.i.s{width:11px;height:11px}
#wftabs::-webkit-scrollbar{height:9px}
#wftabs::-webkit-scrollbar-thumb{background:#c9bbb3;border-radius:6px}
.tw table{margin-top:0}
.nav-i .lb{pointer-events:none}
input[type=date]::-webkit-calendar-picker-indicator{cursor:pointer}
.hb:hover{fill:rgba(0,0,0,.14)}
@media print{#app{display:block}.side,.hdr,.chart-act{display:none}.main{overflow:visible}}

/* big modals from video */
.ov.big{align-items:start;padding-top:37px;background:rgba(0,0,0,.5)}
.bm{background:#fff;border-radius:16px;width:1280px;max-width:96vw;height:845px;max-height:calc(100vh - 60px);display:flex;flex-direction:column;box-shadow:0 24px 60px rgba(0,0,0,.3);position:relative;overflow:hidden}
.bm .x{position:absolute;right:17px;top:17px;width:24px;height:24px;display:grid;place-items:center;color:#222;z-index:2}
.bm-h{padding:18px 17px 0 17px;flex:none}
.bm-t{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:700}
.bm-meta{display:flex;gap:8px;align-items:center;margin-top:6px;font-size:9.5px;color:var(--tx2)}
.chipg{display:inline-flex;align-items:center;gap:5px;border:1px solid #9be0c8;color:#95712f;border-radius:12px;padding:2px 10px;font-size:10px;background:#f3fcf8}
.chipg svg{width:12px;height:12px}
.bm-tabs{display:flex;gap:6px;padding:12px 13px;border-bottom:1px solid var(--bd);flex:none}
.bm-tabs button{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 12px;border-radius:14px;font-size:11.5px;color:#333}
.bm-tabs button svg{width:14px;height:14px}
.bm-tabs button.on{background:#f7eae3;color:#a37c34;border:1px solid #cca55c;font-weight:500}
.bm-tabs.c{justify-content:center;gap:0;padding:0}
.bm-tabs.c button{height:48px;border-radius:0;padding:0 20px;font-size:14px;background:none;border:0}
.bm-tabs.c button.on{background:#f5f2f1;color:#000;border:0;font-weight:500;border-radius:12px 12px 0 0}
.bm-b{flex:1;overflow:auto;background:#fff;padding:16px 16px 12px}
.bm-b::-webkit-scrollbar{width:6px}.bm-b::-webkit-scrollbar-thumb{background:#c7beb9;border-radius:4px}
.bm-f{flex:none;height:68px;border-top:1px solid var(--bd);display:flex;align-items:center;padding:0 16px;gap:8px;font-size:9.5px;color:var(--tx2);background:#fff}
.bm-f .sp{flex:1}
.bbt{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 14px;border-radius:10px;font-size:12px;border:1px solid var(--bd);background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.bbt svg{width:15px;height:15px}
.bbt.g{background:#0a9a72;border-color:#0a9a72;color:#fff;font-weight:600}
.bbt.d{border-color:#f5a3b0;color:#d4143a;font-weight:500}
.sec{border:1px solid #e7d8cf;border-radius:14px;margin-bottom:16px;overflow:hidden;background:#fff}
.sec-h{display:flex;align-items:center;gap:10px;height:44px;padding:0 16px;font-weight:700;font-size:13px}
.sec-h svg{width:16px;height:16px}
.sec.blue .sec-h{background:#faf3ef}.sec.blue .sec-h svg{color:#b48939}.sec.blue{border-color:#f4e3da}
.sec.green .sec-h{background:#e6f8f1}.sec.green{border-color:#b7e9d4}
.sec.purple .sec-h{background:#f6e9fb}.sec.purple{border-color:#e8d1f1}
.sec.ind .sec-h{background:#eceeff}.sec.ind{border-color:#cfd3f7}
.sec.pink .sec-h{background:#fbeaf2}.sec.pink{border-color:#f3cde0}
.sec.gray .sec-h{background:#efefef}.sec.gray{border-color:#e3e3e3}
.stat4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:14px 16px 8px}
.stat4>div{border:1px solid #ece7e4;border-radius:10px;padding:12px 12px;height:62px}
.stat4 small{display:block;font-size:8px;margin-bottom:6px}.stat4 b{font-size:13px}
.kv{display:flex;justify-content:space-between;font-size:11px;padding:6px 14px}
.kv span:first-child{color:var(--tx2)}
.inp2{width:100%;height:36px;border:1px solid #ece6e3;border-radius:8px;padding:0 12px;font-size:12px;background:#fefdfc;font-family:inherit}
.lbl2{font-size:10.5px;margin:0 0 5px;display:block;color:#222}
.tech{display:flex;align-items:center;gap:8px;border:1px solid #ece6e3;border-radius:10px;height:46px;padding:0 10px;margin-bottom:6px}
.tech .rl{font-size:8px;border:1px solid #c9b5ec;border-radius:10px;padding:1px 8px;color:#6b46c1;background:#faf7ff}
.tech .rm{margin-left:auto;color:#e11d48}
.pay{border-radius:12px;overflow:hidden;min-height:150px}
.pay-h{display:flex;align-items:center;height:42px;padding:0 12px;gap:8px;font-weight:700;font-size:12.5px}
.pay-b{padding:0 12px;display:grid;place-items:center;font-size:10px;color:#444;min-height:84px}
.pay.cash{background:#e9efc3}.pay.inst{background:#f4dbe8}.pay.qr{background:#ebeec3}
.pay .add{margin-left:auto;display:inline-flex;gap:6px;align-items:center;background:#fff;border:1px solid #ddd;border-radius:8px;height:24px;padding:0 10px;font-size:9px;font-weight:400}
.alif{background:#fff;border-radius:10px;padding:2px 12px;height:42px;display:flex;align-items:center;font-weight:800;font-size:22px;color:#222;gap:4px}
.alif i{color:#ae8437;font-style:normal}
.ddm{position:absolute;background:#fff;border-radius:10px;box-shadow:0 6px 24px rgba(0,0,0,.18);padding:6px;z-index:5;width:588px}
.ddm div{height:32px;display:flex;align-items:center;padding:0 10px;border-radius:6px;font-size:13px;justify-content:space-between}
.ddm div.on{background:#f4e4db}
.st-chip{font-size:8px;border:1px solid #e8c3ae;color:#2563eb;background:#fbf5f2;border-radius:10px;padding:1px 9px}
.hist{border:1px solid var(--bd);border-radius:10px;padding:12px 12px;margin-bottom:8px;font-size:9px}
.hist b{font-size:11px}.hist .tm{float:right;border:1px solid #d8d2cf;border-radius:12px;padding:2px 10px;font-size:10px;color:#333}
.hist .rm{color:#d4143a;text-decoration:line-through}
.mono{font-size:8px;line-height:1.9;color:#555}
.pt-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.pt-cards>div{border:1px solid #e8e3e0;border-radius:10px;padding:14px 12px;height:78px}
.pt-cards small{display:block;font-size:8px;margin-bottom:8px;color:#333}
.pkg{border:1px solid #e8e3e0;border-radius:12px;height:74px;display:flex;align-items:center;gap:14px;padding:0 20px;margin-top:14px;position:relative}
.pkg .ic{width:36px;height:36px;border-radius:10px;background:#eef0ff;color:#4f46e5;display:grid;place-items:center}
.pkg.cancel{border-color:#f5b5c0;background:#fffafa}
.pkg b{font-size:14px}
.pkg .sm{font-size:9.5px;color:#444;display:flex;gap:12px;margin-top:6px}
.ribbon{position:absolute;left:8px;top:-4px;background:#e11d48;color:#fff;font-size:8px;font-weight:700;padding:2px 10px;border-radius:10px;transform:rotate(-8deg);z-index:2}
.tl{display:grid;gap:10px;padding:0 6px}
.tl>div{display:flex;gap:10px;align-items:flex-start;font-size:11px}
.tl .ck{width:16px;height:16px;border-radius:50%;border:1.5px solid #10b981;color:#10b981;display:grid;place-items:center;flex:none}
.tl .ck svg{width:10px;height:10px}
.qrow{display:grid;grid-template-columns:repeat(2,1fr);gap:14px 16px}
/* finance dashboard v2 */
.fq td{height:78px}
.fq .cl{font-size:13.5px}.fq .cl small{display:block;font-size:9.5px;color:#444;margin-top:2px}
.rbtn{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 15px;border-radius:8px;background:#00835f;color:#fff;font-size:13px;font-weight:600;box-shadow:0 2px 6px rgba(0,100,70,.3);margin:0}
.rbtn svg{width:15px;height:15px}
.donei{display:flex;align-items:center;gap:14px;height:60px;border-radius:10px;background:#f9f8f7;margin:0 0 8px;padding:0 16px}
.donei .ci{width:34px;height:34px;border-radius:50%;background:#dff6ec;color:#0a9a72;display:grid;place-items:center}
.donei b{font-weight:500;font-size:13px}.donei b i{font-style:normal;color:#555;font-weight:400}
.donei small{display:block;font-size:10px;color:#555;margin-top:2px}
.donei .ok{margin-left:auto;font-size:10px;border:1px solid #9fe0c8;border-radius:12px;padding:2px 10px;color:#95712f}
.langm button{display:flex;align-items:center;gap:10px;width:100%;height:40px;padding:0 12px;font-size:14px}
.langm button b{font-size:10px;font-weight:700;color:#333;width:18px}
.langm button.on{color:#a07932}.langm button svg{margin-left:auto}
/* account */
.bal{border:1px solid #f3d67a;background:linear-gradient(90deg,#fffdf4,#fff7de);border-radius:20px;height:240px;position:relative;padding:48px 24px 0 24px;margin-top:16px;box-shadow:0 0 0 1px #fbe9a6 inset}
.bal .wi{position:absolute;left:25px;top:48px;width:48px;height:48px;border-radius:50%;background:#fdf0c9;color:#d97706;display:grid;place-items:center}
.bal .t{margin-left:65px}
.bal .t small{font-size:13px;color:#333;display:block}
.bal .t b{font-size:32px;display:block;margin:4px 0 8px;font-weight:800}
.bal .cnt{position:absolute;right:24px;top:108px;background:#f9f2ee;border:1px solid #ecd6c9;border-radius:6px;font-size:12px;padding:4px 10px}
.k3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}
.k3>div{border:1px solid var(--bd);background:#fff;border-radius:18px;height:128px;display:flex;align-items:center;gap:14px;padding:0 16px;box-shadow:0 2px 6px rgba(0,0,0,.05)}
.k3 .ci{width:40px;height:40px;border-radius:50%;display:grid;place-items:center}
.k3 small{font-size:12px;color:#333;display:block;margin-bottom:6px}.k3 b{font-size:18px;font-weight:800}
.how{border:1px solid var(--bd);background:#fff;border-radius:18px;margin-top:16px;padding:40px 16px 40px}
.how li{list-style:none;display:flex;gap:10px;align-items:center;font-size:13.5px;margin:14px 0 0}
.how li i{width:20px;height:20px;border-radius:50%;background:#f3eae4;font-style:normal;font-size:10px;display:grid;place-items:center;flex:none}
.sec2{max-width:1608px}
.pwf{width:448px;margin-top:6px}
.pwf .in{height:36px;border:1px solid #ede9e6;border-radius:8px;background:#fff;width:100%;padding:0 12px;box-shadow:0 1px 2px rgba(0,0,0,.05);font-size:13px}
.ntx{border-left:3px solid #f5a30a;padding:14px 14px 12px;border-bottom:1px solid #eee;font-size:11px;white-space:normal}
.ntx b{font-size:12.5px;display:block;font-weight:600}.nt small{display:block;color:#555;margin:6px 0;font-size:10.5px}
.ntx .tg{display:inline-block;background:#fff;border:1px solid #e3e3e3;border-radius:8px;padding:3px 8px;font-size:9.5px;margin:3px 3px 0 0}
.ntx .tg.g{background:#e3f7ee;display:block;border-color:#bfe9d6}
.ntm{width:414px!important;padding:0!important;max-height:470px;overflow:auto;border-radius:12px}
.toastbig{position:fixed;left:50%;top:92px;transform:translateX(-50%);width:428px;background:#fff;border-radius:16px;box-shadow:0 10px 36px rgba(0,0,0,.25);padding:16px 12px;z-index:300;font-size:12px}
.lbo{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:400;display:grid;place-items:center}
.lbbx{background:#fff;border-radius:12px;padding:12px;width:440px}
.drop{border:1.5px dashed #d8d2cf;border-radius:12px;text-align:center;padding:30px 0}
.rev{width:700px!important;height:auto!important;max-height:calc(100vh - 40px)!important;overflow:auto}
.revb{padding:0 26px 22px}
.rvc{border:1px solid #f3e3a8;border-radius:14px;background:linear-gradient(135deg,#fffdf4,#fbf7f5);padding:14px 14px;display:grid;grid-template-columns:90px 1fr 1fr;gap:6px 12px;font-size:10px}
.rvc small{display:block;color:#555;font-size:8.5px;margin-bottom:2px}.rvc b{font-weight:500;font-size:12px}
.fb2{display:flex;align-items:center;gap:8px;margin:0 0 12px;flex-wrap:wrap}
.ib{height:36px;border:1px solid var(--bd);border-radius:10px;padding:0 12px;font-size:12px;background:#fff;display:inline-flex;align-items:center;gap:8px}

tr.clk{cursor:pointer}tr.clk:hover td{background:rgba(160,121,50,.05)}
html[dir=rtl] #root{direction:rtl}html[dir=rtl] .ov,html[dir=rtl] .menu{direction:rtl}
/* pages8 */
.tw.scr{max-height:calc(100vh - 330px);overflow:auto;position:relative}
.tw.scr thead th{position:sticky;top:0;background:#f4f2f1;z-index:3}
.vm{background:#fff;border-radius:16px;padding:24px 25px 22px;position:relative;max-height:calc(100vh - 80px);overflow:auto;box-shadow:0 20px 50px rgba(0,0,0,.25);font-size:13px;color:#111;text-align:left}
.vm.tall{max-height:calc(100vh - 74px)}
.vm .vt{font-size:17px;font-weight:700;margin:0 0 16px;display:flex;align-items:center;gap:8px;padding-right:30px}
.vmx{position:absolute;right:20px;top:20px;width:28px;height:28px;display:grid;place-items:center;border-radius:8px;z-index:5;color:#333}
.vmx .i{width:16px;height:16px}
.vl{display:block;font-size:12px;margin:0 0 6px;color:#111}
.vinp,.vsel{width:100%;height:40px;border:1px solid #e8e5e3;border-radius:10px;background:#faf8f7;padding:0 12px;font:inherit;font-size:13.5px;margin-bottom:14px;outline:none;box-sizing:border-box;color:#111}
textarea.vinp{padding:10px 12px;resize:vertical;height:auto;line-height:1.4}
.vsel{width:auto;min-width:140px;background:#fff;appearance:auto}
.vinp:focus,.vsel:focus{border-color:#c0923d;box-shadow:0 0 0 2px rgba(192,146,61,.25)}
.vrow{display:grid;grid-template-columns:1fr 1fr;gap:16px}.vrow .vsel{width:100%}
.dz{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;border:1.5px dashed #f06a8a;background:#fff0f3;border-radius:12px;padding:20px 18px;cursor:pointer;margin-bottom:10px;font-size:10.5px;color:#444}
.dz b{color:#c0103a;font-size:13px}.dzi{color:#d4143a;display:flex}.dzi .i{width:22px;height:22px}.dzn{font-style:normal;color:#95712f;font-weight:600}
.vwarn{font-size:10.5px;color:#a8321a;line-height:1.7;margin:0 0 16px}
.vnote{font-size:10.5px;color:#444;line-height:1.8;background:#fafafa;border-radius:10px;padding:10px 8px;margin-bottom:12px}
.vbt{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
.vcan{height:38px;padding:0 18px;border:1px solid #e8e5e3;border-radius:10px;background:#fff;font:inherit;font-size:13.5px;cursor:pointer}
.vok{height:38px;padding:0 16px;border-radius:10px;background:#a98136;color:#fff;font:inherit;font-size:13.5px;border:0;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
.vok .i,.vcan .i{width:15px;height:15px}.vok:disabled{opacity:.5}
.em .emh{height:140px;border-radius:16px 16px 0 0;padding:16px 22px;color:#fff;display:flex;align-items:center}
.emc{display:flex;gap:18px;align-items:center}.emi{width:56px;height:56px;border-radius:16px;background:rgba(255,255,255,.22);display:grid;place-items:center}.emi .i{width:28px;height:28px}
.emchips{display:flex;gap:8px;margin-bottom:10px}.emchips span{background:rgba(255,255,255,.22);border-radius:8px;padding:3px 9px;font-size:10.5px;font-weight:700;display:inline-flex;gap:5px;align-items:center}.emchips .i{width:11px;height:11px}
.emt{font-size:21px;font-weight:800;line-height:1.1}.ema{font-size:30px;font-weight:800;margin-top:6px}.ema small{font-size:11px;font-weight:700}
.emb{padding:20px 22px 24px;background:#fefcfb;border-radius:0 0 16px 16px}
.esh{display:flex;align-items:center;gap:10px;margin:14px 0 12px;font-size:14px}.esh i{flex:1;height:1px;background:linear-gradient(90deg,#d9efe9,transparent);margin-left:10px;max-width:640px}
.esi{width:28px;height:28px;border-radius:9px;display:grid;place-items:center}.esi .i{width:15px;height:15px}.esn{font-size:9px;font-weight:700;border-radius:20px;padding:1px 7px}
.eshint{font-size:10.5px;color:#444;margin:-4px 0 10px}
.eq{background:linear-gradient(90deg,#f4eeff,#f6f3ff);border:1px solid #d9cdf5;border-radius:14px;padding:14px 16px;font-size:13px;display:flex;gap:12px;align-items:center}.eq .i{width:16px;height:16px;color:#a78bfa}
.kvg{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:6px}
.kvc{background:#fbf8f7;border:1px solid #efe9e6;border-radius:12px;padding:12px 12px 10px;min-height:54px}.kvc small{display:block;font-size:9.5px;color:#444;margin-bottom:8px}.kvc b{font-size:13px;font-weight:700;word-break:break-word}
.mvc{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #eee7e3;border-radius:12px;padding:12px 16px;width:calc(50% - 6px);box-sizing:border-box}.mvc b{display:block;font-size:13.5px}.mvc small{display:block;font-size:9.5px;color:#666;margin-top:4px}.mvi{width:34px;height:34px;border-radius:50%;background:#e1f7ee;color:#0a9a72;display:grid;place-items:center}
.adj{display:flex;align-items:center;gap:20px;background:#fffbe9;border:1px solid #f3dc8a;border-radius:14px;padding:14px 16px;margin-top:22px}.adj div{flex:1}.adj b{font-size:13px}.adj small{display:block;font-size:10.5px;color:#444;margin-top:4px}.adj .btn{height:34px;background:#f7ece6;border-color:#eedacf;font-size:13px;gap:8px;flex:none}
.rvb{background:linear-gradient(180deg,#fffdf0,#fff);border:1px solid #f0e3a8;border-radius:14px;padding:16px;margin-bottom:12px}.rvh{display:flex;gap:10px;align-items:center;margin-bottom:12px}.rvh b{display:flex;gap:8px;align-items:center;font-size:13px}.rvh .i{width:16px;height:16px}.rvd{display:flex;gap:12px;align-items:center;margin-bottom:10px;font-size:10px;color:#555}.rvx{font-size:10.5px;color:#333;line-height:1.7;margin:6px 0 10px}
.att{display:inline-flex;gap:10px;align-items:center;border:1px solid #f5c2cf;background:#fff2f5;border-radius:12px;padding:8px 14px 8px 8px}.att b{display:block;font-size:10.5px;color:#a8123a}.att a{font-size:9px;color:#a37c33;font-weight:600}
.jebox{border:1px solid #e8e5e3;border-radius:12px;padding:12px;background:#fcfbfa;margin-bottom:14px}
.jel{display:grid;grid-template-columns:150px 1fr 74px 74px 24px;gap:4px;align-items:end;margin-bottom:6px}.jel small{display:block;font-size:11px;margin-bottom:4px}.jel .vsel,.jel .vinp{margin:0;height:36px;font-size:12px;min-width:0;width:100%}
.jeb{background:#ffe3e8;color:#d4143a;border-radius:10px;padding:2px 10px;font-size:11px}.jeb.ok{background:#dcf7ee;color:#a37c33}
.ema small{color:#fff;opacity:.9}
.vm .vt{display:flex!important;justify-content:flex-start!important;text-align:left!important;flex-direction:row!important}
.vm h3{font-weight:700}

/* pages9 */
.tw .amt.r,td.amt.r{color:#e11d48!important}
.jcard{background:#fff;border:1px solid var(--bd);border-left:3px solid #d8d2cf;border-radius:16px;margin-bottom:10px;overflow:hidden}
.jhd{display:flex;align-items:center;gap:14px;padding:0 16px;min-height:112px;cursor:pointer}
.jhd:hover{background:#fefcfa}
.jchev{color:var(--tx3);display:flex;transition:transform .15s}
.jcard.open .jchev{transform:rotate(90deg)}
.jdt{border-top:1px solid var(--bd);padding:14px 18px 16px;background:#fafdfc;font-size:12px}
.jdt[hidden]{display:none}
.jgr{display:grid;grid-template-columns:1.6fr 1.6fr 140px 140px;gap:10px;padding:9px 6px;border-bottom:1px solid #f1eeed;align-items:center}
.jgh{color:var(--tx2);font-size:11px;border-bottom:1px solid var(--bd)}
.jgt{background:#eef8f5;border-radius:8px;border-bottom:0;margin-top:6px}
.ptc:hover{filter:brightness(.98)}
.spf{display:flex;flex-direction:column;gap:5px;color:var(--tx2);font-weight:500}
.spf select,.spf input{color:var(--tx)}

/* бренд Fatimeh */
.logo{background:#f4e2d8!important;overflow:hidden;box-shadow:0 6px 14px rgba(181,138,60,.35)!important;border:1px solid #e6c98f}

/* ===== Редизайн Fatimeh Clinic: золото + розовый мрамор ===== */
:root{--bg:#fbf4ef;--panel2:#f8eee8;--thead:#f6ebe4;--hover:#fbf1ea}
body{background:var(--bg)}
.hdr{background:linear-gradient(180deg,#fffaf6,#f9ece4)!important;border-bottom:1px solid #ecd7c6!important}
.side{background:linear-gradient(180deg,#fff9f5,#f8e9df)!important;border-right:1px solid #ecd7c6!important}
.page-title{font-family:Georgia,"Times New Roman",serif;letter-spacing:.2px}
.ph h1,.ph .t,.ph-t{font-family:Georgia,"Times New Roman",serif}
.tw{border-color:#ecd7c6!important;box-shadow:0 2px 10px rgba(150,100,60,.08)!important}
.nav-i.on,.nav-i.active{background:linear-gradient(90deg,#c9a04e,#a9762f)!important;color:#fff!important;box-shadow:0 6px 14px rgba(169,118,47,.3)!important}
[data-theme=dark]{--bg:#17110d;--panel:#20170f;--panel2:#2a1e14;--thead:#2a1e14;--hover:#2d2116;--bd:#3a2a1c;--bd2:#4d3a24;--tx:#f5ece4}
[data-theme=dark] .hdr,[data-theme=dark] .side{background:#1b130d!important;border-color:#3a2a1c!important}
.btn-g{background:linear-gradient(90deg,#c9a04e,#a9762f)!important;border-color:#a9762f!important;color:#fff!important}
.banner{background:linear-gradient(90deg,#fbefe6,#f3dcc6)!important;border-color:#e6c8ae!important}
.ph-ic,.kpi .ico{background:#f6e6d8!important;color:#a9762f!important}
.sec.green .sec-h{background:#f6e6d8!important}.sec.green{border-color:#e6c8ae!important}
.big.in{background:#a9762f!important}
.chip.on,.chips .on,.ptabs .on{background:#f6e6d8!important;border-color:#d8b48a!important;color:#7a5418!important}

/* ===== Мобильная версия (телефоны и узкие экраны) ===== */
.burger,.scrim{display:none}
@media (max-width:820px){
  html,body{overflow-x:hidden;-webkit-text-size-adjust:100%}
  body{zoom:1!important}
  #app,#app.collapsed{display:block;height:100dvh;position:relative}
  .hdr{position:fixed;left:0;right:0;top:0;height:54px;z-index:60;padding:0 6px;gap:2px}
  .burger{display:grid;width:42px;height:42px;flex:none}
  .brand,#app.collapsed .brand{width:auto;padding-left:2px;gap:8px}
  .brand .bt{display:none}
  .logo{width:36px;height:36px}
  .page-title{margin-left:8px;font-size:14px;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .hr{padding-right:2px;gap:0;flex:none}
  .hr .lang,.hr .aa,.hr .uname,.hr [data-act=theme]{display:none}
  .hr .user{margin-left:4px}
  .hbtn{width:40px;height:40px}
  .main{position:absolute;top:54px;left:0;right:0;bottom:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
  .side{position:fixed;top:54px;left:0;bottom:0;width:min(300px,86vw);z-index:70;transform:translateX(-102%);transition:transform .2s;box-shadow:0 0 30px rgba(0,0,0,.25);overflow-y:auto}
  #app.menu-open .side{transform:none}
  #app.collapsed .side .nl,#app.collapsed .side span{display:revert}
  .collapse-btn{display:none}
  .scrim{position:fixed;inset:54px 0 0 0;background:rgba(72,55,23,.45);z-index:65;opacity:0;pointer-events:none;transition:opacity .2s}
  #app.menu-open .scrim{display:block;opacity:1;pointer-events:auto}
  .pg,.pg.p24{padding:14px 10px 24px!important;max-width:100vw}
  .ph{flex-wrap:wrap;gap:8px;margin-bottom:12px}
  .ph>div:last-child{flex-wrap:wrap}
  .ph-t,.ph .t{font-size:19px!important}
  /* сетки в один/два столбца */
  .pg [style*="grid-template-columns"]{grid-template-columns:1fr!important;gap:10px!important}
  .kpis,.sc4,.three,.fin-top{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .kpi,.kpis>*{height:auto!important;min-height:0}
  /* таблицы: горизонтальная прокрутка */
  .tw{overflow-x:auto!important;-webkit-overflow-scrolling:touch;border-radius:12px}
  .tw.scr{max-height:none}
  .tw table{min-width:760px;table-layout:auto!important}
  .tw colgroup{display:none}
  .tw th,.tw td{white-space:nowrap}
  .tw td .name,.tw td div{white-space:normal}
  /* вкладки и чипсы — лентой */
  .ptabs,.tabs,.top-tabs,.seg{overflow-x:auto;flex-wrap:nowrap!important;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .ptabs>*,.tabs>*,.top-tabs>*,.seg>*{flex:none!important;white-space:nowrap}
  .chips,.mon,.fbar,.fb2{flex-wrap:wrap!important;gap:8px!important}
  .fbar>div,.fbar select,.fbar input{max-width:100%}
  .search{width:100%!important;max-width:100%}
  /* поля и кнопки под палец */
    .btn,.chip{min-height:38px}
  .eye{width:38px!important;height:38px!important}
  /* окна на весь экран */
  .ov{place-items:stretch;align-items:end}
  .modal{width:100vw!important;max-width:100vw!important;max-height:92dvh;border-radius:18px 18px 0 0}
  .modal .mb{grid-template-columns:1fr!important}
  .ov>.bm,.ov>.vm,.ov>.em,.ov>.apm,.bm,.vm,.apm,.rev{width:100vw!important;max-width:100vw!important;height:auto!important;max-height:100dvh!important;border-radius:0!important;margin:0!important;overflow:auto}
  .vm,.em{padding-left:14px!important;padding-right:14px!important}
  .vm [style*="grid-template-columns"],.apm [style*="grid-template-columns"],.bm [style*="grid-template-columns"]{grid-template-columns:1fr!important}
  .toast,.toastbig{max-width:92vw}
  #fblogin form{width:min(340px,92vw)!important;padding:22px!important}
  svg{max-width:100%}
  .chartc,.card{overflow-x:auto}
}
@media (max-width:820px){
  body{font-size:12px}
  .hdr{height:46px}
  .burger{width:36px;height:36px}
  .hbtn{width:34px;height:34px}
  .logo{width:30px;height:30px}
  .page-title{font-size:13px;margin-left:6px}
  .main{top:46px}
  .side{top:46px;width:min(264px,80vw)}
  .scrim{inset:46px 0 0 0}
  .nav-i{height:36px;font-size:13px;margin-bottom:2px}
  .nav-i .i{width:17px;height:17px}
  .pg,.pg.p24{padding:10px 8px 20px!important}
  .ph{margin-bottom:8px;gap:6px;min-height:0}
  .ph-ic{width:34px!important;height:34px!important;border-radius:10px!important}
  .ph-ic .i{width:17px!important;height:17px!important}
  .ph-t,.ph .t,.ph h1{font-size:16px!important;line-height:1.2}
  .ph p,.ph-s,.ph .s{font-size:11.5px!important;line-height:1.3}
  .btn{font-size:12px;padding:0 10px;height:34px!important;min-height:34px;gap:6px}
  .btn .i{width:15px;height:15px}
  .chip,.ptabs>*,.tabs>*{font-size:12px!important;height:32px!important;padding:0 11px!important}
  .ptabs{gap:6px;margin-bottom:10px}
  .chips{gap:6px;margin-bottom:10px}
  input,select,textarea{font-size:14px!important;min-height:36px;padding-top:0;padding-bottom:0}
  textarea{min-height:70px}
  .tw table{min-width:640px}
  .tw th,.tw td{font-size:11.5px;padding:8px 9px!important}
  .kpi,.kpis>*{padding:10px 12px!important}
  .kpi .v,.kpi b,.kpis b{font-size:17px!important}
  .modal h3,.vm .vt{font-size:15px!important}
  .modal .mb,.modal .mf,.modal h3{padding-left:14px;padding-right:14px}
  .vm{font-size:12px}
  .vm label,.modal label{font-size:11.5px}
  .search{height:36px}
}
@media (max-width:420px){ .kpis,.sc4,.three,.fin-top{grid-template-columns:1fr!important} .ph-t{font-size:17px!important} }
@media (max-width:820px){
  .banner{flex-direction:column;align-items:stretch!important;padding:12px!important;gap:10px!important;border-radius:14px!important}
  .banner>*{min-width:0;max-width:100%}
  .banner .bi{width:34px!important;height:34px!important;border-radius:10px!important}
  .banner .bi .i{width:17px!important;height:17px!important}
  .banner h2{font-size:17px!important;line-height:1.25}
  .banner p,.banner .sub{font-size:11.5px!important}
  .banner [style*="display:flex"],.banner [style*="display: flex"]{flex-wrap:wrap!important}
  .banner .meta,.banner .ml{flex-direction:column!important;align-items:flex-start!important;gap:4px!important}
  .banner select,.banner .btn{width:auto}
  .kpi,.kpis>div{min-height:0!important;height:auto!important;padding:12px!important}
  .kpi .ico{width:30px!important;height:30px!important;right:10px!important;top:10px!important}
  .kpi .v,.kpi .val{font-size:18px!important}
  .tw{margin-left:0;margin-right:0}
  .mon,.months{gap:6px!important}
}
@media (max-width:820px){
  .sk{height:auto!important;min-height:0!important;padding:12px!important;gap:10px!important}
  .sk .ik{width:34px!important;height:34px!important}
  .sk b{font-size:16px!important}
  .sc4{grid-template-columns:1fr!important}
}
@media(max-width:768px){.att{max-width:100%;flex-wrap:wrap}.tags{flex-wrap:wrap!important}.btn.btn-t{max-width:100%;white-space:normal;height:auto;min-height:36px}}
@media(max-width:768px){.pg [style*="flex:1"]{min-width:0}.search.l,.search.l input{min-width:0;max-width:100%}.pg div:has(>div>.search.l){flex-wrap:wrap}.pg div:has(>div>.search.l)>div{flex:1 1 140px!important}}

/* ===== Мобильная версия v2: приложение-стиль ===== */
.bnav{display:none}
.mfoot{display:none}
@media (max-width:820px){
  body{font-size:14px;background:var(--bg,#fcf3ee)}
  .hdr{height:52px;padding:0 8px;box-shadow:0 1px 0 var(--bd)}
  .burger{width:40px;height:40px}.hbtn{width:38px;height:38px}.logo{width:32px;height:32px}
  .page-title{font-size:16px;font-weight:800;margin-left:6px}
  .main{top:52px;bottom:62px;scroll-behavior:smooth}
  .side{top:52px;bottom:62px;width:min(320px,88vw)}
  .scrim{inset:52px 0 62px 0}
  .side .nav-i,.nav-i{height:44px;font-size:14.5px;white-space:normal;border-radius:12px}
  .nav-i .i{width:20px;height:20px}
  .pg,.pg.p24{padding:12px 12px 28px!important}
  /* заголовок страницы уже в шапке — убираем дубль, оставляем кнопки действий */
  .ph{display:block!important;margin:0 0 10px!important}
  .ph-ic,.ph-t,.ph-s,.ph>div:first-child:not(.ph-a):not(:last-child){display:none!important}
  .ph-a,.ph>div:last-child{display:flex!important;gap:8px;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .ph-a::-webkit-scrollbar{display:none}
  .ph-a>*,.ph>div:last-child>*{flex:none}
  .ph-a:empty{display:none!important}
  .ph>div:last-child:empty{display:none!important}
  .btn{height:42px!important;min-height:42px;font-size:13.5px;border-radius:12px;padding:0 14px;white-space:nowrap}
  .btn .i{width:17px;height:17px}
  input,select,textarea{font-size:16px!important;min-height:44px;border-radius:12px}
  .chip,.ptabs>*,.tabs>*{height:38px!important;font-size:13px!important;padding:0 14px!important;border-radius:20px!important}
  .ptabs,.tabs,.top-tabs,.seg{margin-left:-12px;margin-right:-12px;padding-left:12px;padding-right:12px;padding-bottom:4px}
  .seg{border:0;background:none;padding-top:0}
  .seg button{height:38px;border:1px solid var(--bd);border-radius:20px;background:var(--panel,#fff)}
  /* карточки-показатели: два в ряд, компактно */
  .pg .kpis,.pg .sc4,.pg .three,.pg .fin-top{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
  .kpi,.kpis>*,.sk{height:auto!important;min-height:0!important;padding:12px!important;border-radius:16px!important}
  .pg .kpis>*:last-child:nth-child(odd){grid-column:1/-1}
  .pg .kpis>*{min-width:0}
  .pg .chips,.pg .mon{flex-wrap:nowrap!important;overflow-x:auto;margin-left:-12px;margin-right:-12px;padding:0 12px 4px;scrollbar-width:none}
  .pg .chips>*,.pg .mon>*{flex:none}
  .pg [style*="display:flex"][style*="align-items:center"]:has(>button[data-act=dprev]),.pg [style*="flex-wrap"]{flex-wrap:wrap}
  .kpi .v,.kpi b,.kpis b,.sk b{font-size:20px!important;line-height:1.15}
  .kpi,.kpi *{overflow-wrap:anywhere}
  .card,.dwc,.chartc{border-radius:16px!important}
  .banner{border-radius:16px!important}
  /* таблицы → карточки */
  .tw{overflow:visible!important;border:0!important;background:none!important;box-shadow:none!important}
  .tw table.mc{min-width:0!important;display:block;width:100%}
  .tw table.mc thead,.tw table.mc colgroup{display:none!important}
  .tw table.mc tbody{display:block}
  .tw table.mc tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;padding:12px 14px;margin:0 0 10px;border:1px solid var(--bd)!important;border-radius:16px;background:var(--panel,#fff);box-shadow:0 1px 3px rgba(90,60,20,.06)}
  .tw table.mc td{display:block;border:0!important;padding:0!important;min-width:0;white-space:normal!important;overflow-wrap:anywhere;height:auto!important;font-size:13.5px}
  .tw table.mc td::before{content:attr(data-l);display:block;font-size:10.5px;letter-spacing:.2px;text-transform:uppercase;color:var(--tx2);margin-bottom:2px;font-weight:600}
  .tw table.mc td[colspan]::before,.tw table.mc td[data-l=""]::before,.tw table.mc td:not([data-l])::before{display:none}
  .tw table.mc td:first-child,.tw table.mc td[colspan],.tw table.mc td.mw{grid-column:1/-1}
  .tw table.mc td:first-child{font-size:15px;font-weight:700}
  .tw table.mc td.mw{display:flex;gap:8px;flex-wrap:wrap}
  .tw table.mc tfoot,.tw table.mc tr.tot{background:#f6efe6}
  /* окна — «шторка» снизу */
  .modal{border-radius:22px 22px 0 0!important;max-height:94dvh!important}
  .modal::before{content:"";display:block;width:42px;height:4px;border-radius:2px;background:#d8c9b4;margin:8px auto 0}
  .modal .mf{position:sticky;bottom:0;background:var(--panel,#fff);padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .modal .mf .btn{flex:1}
  /* нижняя панель */
  .bnav{display:flex;position:fixed;left:0;right:0;bottom:0;height:62px;z-index:75;background:rgba(255,250,246,.96);backdrop-filter:blur(10px);border-top:1px solid var(--bd);padding:0 4px max(0px,env(safe-area-inset-bottom));box-sizing:content-box}
  .bnav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:none;color:var(--tx2);font-size:10.5px;font-weight:600;min-width:0;padding:4px 2px;cursor:pointer}
  .bnav button .i{width:22px;height:22px}
  .bnav button span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .bnav button.on{color:#9a6a1c}
  .bnav button.on .bi{background:#f6e6d8;border-radius:14px}
  .bnav .bi{display:grid;place-items:center;width:46px;height:28px;border-radius:14px;transition:.15s}
  .toast{bottom:78px!important}
  .toastbig{top:60px!important;bottom:auto!important;height:auto!important;width:calc(100vw - 24px)!important;max-height:60dvh;overflow:auto;font-size:13.5px!important;padding:16px!important}
  #fblogin form{border-radius:22px}
}
@media (max-width:420px){ .pg .kpis,.pg .sc4,.pg .three,.pg .fin-top{grid-template-columns:1fr 1fr!important} }
@media (max-width:820px){
  .pg .dt{width:auto!important;flex:1;min-width:0}
  .pg [data-act=bdate]{width:44px!important;height:44px!important;flex:none}
  .pg [data-act=btoday]{flex:none}
}
@media (max-width:820px){.tw:has(.cgt){overflow:auto!important;border:1px solid var(--bd)!important;border-radius:16px}.tw .cgt{min-width:560px}}
@media (max-width:820px){
  .bm .stat4,.vm .stat4,.stat4{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .stat4>div{min-width:0;overflow-wrap:anywhere}
  .bm-h{padding:14px 14px 0!important;position:relative}
  .bm-h .bbt{position:static!important;margin-top:10px;width:100%;justify-content:center;height:40px!important}
  .bm-t{flex-wrap:wrap;gap:6px;padding-right:34px;font-size:18px}
  .bm-meta{display:flex;flex-wrap:wrap;gap:6px 10px;font-size:12px}
  .bm-tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;padding:10px 12px}
  .bm-tabs button{flex:none;height:36px;font-size:13px;white-space:nowrap}
  .bm .x{position:absolute;right:10px;top:10px;z-index:3;width:36px;height:36px}
  .ov:not(.big)>*:not(.modal){height:auto!important}
  .ov .nt,.ov .popup,.ov>div:not(.modal):not(.bm):not(.vm):not(.em):not(.apm){max-height:90dvh}
}
@media (max-width:820px){.stat4>div{height:auto!important;min-height:0}.stat4 small{font-size:11px!important}.stat4 b{font-size:15px!important}}
@media (max-width:820px){.pg .btn{max-width:100%}.pg .btn.btn-g,.pg .btn.btn-t{white-space:normal;height:auto!important;min-height:42px;padding-top:6px;padding-bottom:6px;text-align:left}.ph-a .btn{max-width:none}}
@media (max-width:820px){
  .tw table.mc,.tw table.mc tr,.tw table.mc td{height:auto!important;min-height:0!important;table-layout:auto!important}
  .tw table.mc tr[style],.tw table.mc td[style]{height:auto!important}
  .tw table.mc td{position:static!important;line-height:1.35;width:auto!important;max-width:100%}
  .tw table.mc td>div{white-space:normal!important}
  .tw table.mc td small{display:block}
}
/* ---- v2.1: баннеры, свои заголовки, показатели, меню-подвал ---- */
@media (max-width:820px){
  .banner{height:auto!important;min-height:0!important;padding:14px!important}
  .banner .lg,.banner .legend{display:none!important}
  .banner h2{font-size:17px!important;margin:0 0 2px}
  .pg>div:first-child:has(>div>h1){flex-wrap:wrap!important;gap:8px!important;margin-bottom:10px!important;align-items:stretch!important}
  .pg>div:first-child:has(>div>h1)>div{flex:1 1 100%!important;min-width:0}
  .pg>div:first-child:has(>div>h1) h1{display:none}
  .pg>div:first-child:has(>div>h1)>span{display:none}
  .pg>div:first-child:has(>div>h1)>*:not(div){flex:1 1 auto}
  .pg h1{font-size:18px!important}
  .pg :has(>.kp17){display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
  .kp17{padding:12px!important;border-radius:16px!important}.kp17 b{font-size:20px!important}
  .kpi{padding:12px!important}.kpi .ico{top:10px!important;right:10px!important}
  .toastbig{font-size:13px!important}
  .toastbig:after{content:"нажмите, чтобы открыть";display:block;margin-top:6px;font-size:11px;color:var(--tx2)}
  .hr .logout{display:none!important}
  .mfoot{padding:12px 12px 8px;border-bottom:1px solid var(--bd);margin-bottom:6px}
  .mfoot .mu{display:flex;gap:10px;align-items:center;margin-bottom:10px}
  .mfoot .mu .av{width:40px;height:40px;border-radius:50%;background:#b08a35;color:#fff;display:grid;place-items:center;font-weight:800}
  .mfoot .mu b{display:block;font-size:14px}.mfoot .mu small{color:var(--tx2);font-size:12px}
  .mfoot .ml{display:flex;gap:6px;flex-wrap:wrap}
  .mfoot .ml button{flex:1 1 auto;height:36px;border:1px solid var(--bd);border-radius:18px;background:var(--panel,#fff);font-size:12.5px;padding:0 12px;cursor:pointer}
  .mfoot .ml button.on{background:#f6e6d8;border-color:#d8b48a;color:#7a5418;font-weight:700}
  .mfoot .mb2{display:flex;gap:8px;margin-top:8px}
  .mfoot .mb2 button{flex:1;height:40px;border-radius:12px;border:1px solid var(--bd);background:var(--panel,#fff);display:flex;gap:8px;align-items:center;justify-content:center;font-size:13px;cursor:pointer}
  .mfoot .mb2 button.out{color:#d11a44;border-color:#f3b5c2}
  .mfoot .mb2 .i{width:16px;height:16px}
}
@media (max-width:820px){
  .tw table.mc td[data-l]:not([data-l=""])[style*="text-align:center"]{display:flex!important;flex-direction:row;justify-content:space-between;align-items:center;grid-column:1/-1;text-align:left!important;gap:10px;padding:2px 0!important}
  .tw table.mc td[data-l]:not([data-l=""])[style*="text-align:center"]::before{margin:0;flex:1}
  .tb17{flex-wrap:nowrap!important;overflow-x:auto;margin-left:-12px;margin-right:-12px;padding:0 12px 4px;scrollbar-width:none}
  .tb17 button{flex:none;height:40px}
}
@media (max-width:820px){
  .vh17{flex-wrap:wrap!important;gap:8px!important}
  .vh17-t{flex:1 1 calc(100% - 52px)!important;min-width:0}
  .vh17-t>div:first-child{font-size:18px!important;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
  .vh17>.btn:not(.vh17-fin):not([data-act=drback]){flex:1 1 40%;justify-content:center}
  .vh17-fin{position:fixed!important;left:12px;right:12px;bottom:72px;height:50px!important;z-index:72;font-size:15px!important;box-shadow:0 8px 24px rgba(120,80,20,.35);justify-content:center}
  #view:has(.vh17-fin) .pg{padding-bottom:90px!important}
  .bm-f{height:auto!important;flex-wrap:wrap;padding:10px 12px max(10px,env(safe-area-inset-bottom))!important;gap:8px!important;position:sticky;bottom:0;background:#fff}
  .bm-f>span{display:none}
  .bm-f .bbt{flex:1 1 40%;height:44px!important;font-size:13.5px!important;justify-content:center}
  .mfoot .ml{display:grid!important;grid-template-columns:1fr 1fr}
  .nav-i{white-space:normal;height:auto;min-height:44px;padding-top:6px;padding-bottom:6px}
}
@media (max-width:820px){
  .ov.big{padding:0!important;align-items:stretch!important}
  .ov.big>.bm,.ov>.bm{height:100dvh!important;max-height:100dvh!important;display:block!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch}
  .bm .bm-b,.bm>div[class^=bm-b],.bm .bm-body{overflow:visible!important;height:auto!important;flex:none!important;max-height:none!important}
  .bm-tabs{position:sticky;top:0;z-index:4;background:#fff}
  .bm-h .bbt.d{width:auto!important;height:34px!important;margin-top:8px;padding:0 14px;justify-content:center}
  .bm-f{position:sticky!important;bottom:0;z-index:5;box-shadow:0 -4px 14px rgba(0,0,0,.08)}
}

@media (max-width:820px){
  .mfoot{display:block}
  .wh22 .modal{width:100vw!important}
  .wh22 .whl{grid-template-columns:1fr 1fr!important;position:relative;padding-right:52px!important}
  .wh22 .whl>label:first-child{grid-column:1/-1}
  .wh22 .whl>button[data-act=whldel]{position:absolute;right:8px;top:8px}
  .wh22 .whl select,.wh22 .whl input{width:100%;min-width:0}
  .wh22 [data-wh]{width:100%}
}
.wh22 input,.wh22 select{border:1px solid var(--bd);border-radius:10px;height:40px;padding:0 10px;background:var(--panel,#fff);color:var(--tx);font-size:14px;box-sizing:border-box;width:100%}
.wh22 input:focus,.wh22 select:focus{outline:2px solid #d8b48a;border-color:#c9a24f}
/* поля без классов на новых страницах */
.pg .dwc input:not([type=checkbox]):not([type=radio]):not(.inp):not(.vinp),.pg .dwc select:not(.sel):not(.vsel){border:1px solid var(--bd);border-radius:10px;height:40px;padding:0 10px;background:var(--panel,#fff);color:var(--tx);font-size:14px;box-sizing:border-box;font-family:inherit}
.pg .dwc label input,.pg .dwc label select{display:block;margin-top:4px}
@media (max-width:820px){
  .modal .mf{flex-wrap:wrap;gap:8px}
  .modal .mf .btn{flex:1 1 40%;min-width:0;justify-content:center}
  .pg .dwc input:not([type=checkbox]):not(.inp),.pg .dwc select:not(.sel){height:44px;font-size:16px}
  .pg .dwc label{flex:1 1 140px}
}



/* ===== Заставка входа: не показывать меню до определения роли ===== */
#authsplash{display:none;position:fixed;inset:0;z-index:10000;place-items:center;background:#fcf3ee;font-family:Inter,Arial,sans-serif}
body.auth-pending #authsplash{display:grid}
body.auth-pending #root,body.auth-pending #app,body.auth-pending .side,body.auth-pending .hdr,body.auth-pending .bnav,body.auth-pending .emr-fab,body.auth-pending .rf-fab,body.auth-pending #rffab,body.auth-pending #emrfab{visibility:hidden}

/* ===== Мобильная вёрстка: без боковой прокрутки, кнопка завершения не перекрывает поля ===== */
@media (max-width:820px){
  html,body{overflow-x:hidden;max-width:100%}
  body{overflow-wrap:anywhere}
  img,svg,video,canvas,input,select,textarea,button,.btn,.chip{max-width:100%;box-sizing:border-box}
  #app,#view,.main,.pg,.hdr,.side{max-width:100%;overflow-x:hidden}
  .pg,.pg.p24{padding:14px 10px calc(24px + 62px + env(safe-area-inset-bottom,0px))!important}
  .ptabs,.tabs,.top-tabs,.seg,.tb17,.bm-tabs,.pg .chips,.pg .mon,.ph-a,.ph>div:last-child{
    flex-wrap:wrap!important;overflow-x:hidden!important;overflow-y:visible;margin-left:0!important;margin-right:0!important;max-width:100%;gap:6px;row-gap:6px
  }
  .ptabs>*,.tabs>*,.top-tabs>*,.seg>*,.tb17 button,.bm-tabs button,.chip{
    flex:1 1 calc(33.33% - 8px)!important;min-width:0;max-width:100%;white-space:normal!important;height:auto!important;min-height:36px;line-height:1.25;text-align:center
  }
  .tb17{display:flex!important}
  /* таблицы: карточки, без обязательной горизонтальной ленты */
  .tw{overflow-x:visible!important;max-width:100%}
  .tw table{min-width:0!important;width:100%!important;table-layout:auto!important}
  .tw thead{display:none}
  .tw tbody,.tw tr{display:block;width:100%}
  .tw tr{border:1px solid var(--bd,#eadccb);border-radius:12px;margin:0 0 10px;padding:8px 12px;background:var(--panel,#fff);box-sizing:border-box}
  .tw th,.tw td{display:block;width:auto!important;white-space:normal!important;overflow-wrap:anywhere;border:0;padding:3px 0!important}
  .tw td:first-child{font-weight:650}
  /* «Завершить приём»: фиксированная панель над нижней навигацией, контент с запасом */
  .vh17-fin{position:fixed!important;left:12px;right:12px;bottom:calc(62px + 10px + env(safe-area-inset-bottom,0px))!important;height:50px!important;z-index:72;box-shadow:0 8px 24px rgba(120,80,20,.35);justify-content:center}
  #view:has(.vh17-fin) .pg,.main:has(.vh17-fin) .pg{padding-bottom:calc(62px + 50px + 28px + env(safe-area-inset-bottom,0px))!important}
}
