@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');
:root{--bg:#f3f7f6;--ink:#172e2b;--muted:#80918e;--green:#123b35;--green2:#1d6558;--mint:#dff4eb;--cyan:#dff5f4;--line:#e6eeeb;--white:#fff;--gold:#f5bd59;--red:#d96565;--shadow:0 12px 35px #173b3210}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Vazirmatn',Tahoma,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}.hidden{display:none!important}.app{min-height:100vh}.sidebar{position:fixed;right:0;top:0;bottom:0;width:255px;background:var(--green);color:#fff;padding:25px 17px;display:flex;flex-direction:column;z-index:5}.side-brand{display:flex;align-items:center;gap:12px;padding:0 8px 27px}.side-brand b{font-size:19px;letter-spacing:.2px}.side-brand small{display:block;color:#9cbcb4;font-size:9px;letter-spacing:1.4px}.brand-mark{width:58px;height:58px;border-radius:19px;background:linear-gradient(145deg,#7ce0bd,#29a88b);color:#0e3c32;display:grid;place-items:center;font-weight:900;font-size:33px;box-shadow:0 10px 25px #1a9d7b33}.brand-mark.small{width:43px;height:43px;border-radius:14px;font-size:25px}.profile{display:flex;align-items:center;gap:11px;padding:15px 10px;background:#ffffff10;border:1px solid #ffffff12;border-radius:16px;margin-bottom:22px}.avatar,.top-avatar{width:38px;height:38px;border-radius:13px;background:#d5f3e8;color:#145344;display:grid;place-items:center;font-weight:800}.profile b{display:block;font-size:13px}.profile small{color:#a9c8c0;font-size:11px}.nav-item{width:100%;background:transparent;color:#b7d0ca;text-align:right;padding:12px 14px;border-radius:12px;margin:3px 0;font-size:13px;display:flex;gap:13px;align-items:center}.nav-item i{font-style:normal;font-size:18px;width:20px;text-align:center}.nav-item.active,.nav-item:hover{background:#ffffff18;color:#fff}.side-bottom{margin-top:auto;color:#a9c8c0;font-size:10px;padding:16px 7px 0}.online-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#5be0a7;margin-left:6px}.logout{display:block;background:#ffffff12;color:#fff;padding:10px;border-radius:10px;width:100%;margin-top:16px;font-size:12px}.main{margin-right:255px;min-height:100vh;padding:0 34px 30px}.topbar{height:105px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.eyebrow{font-size:10px;color:var(--green2);font-weight:700;letter-spacing:.5px}.topbar h2{margin:3px 0 0;font-size:23px}.top-actions{display:flex;align-items:center;gap:15px}.local-chip{font-size:10px;color:#18765c;background:#e1f5e9;padding:8px 12px;border-radius:30px}.content{max-width:1250px;margin:26px auto}.welcome{background:linear-gradient(110deg,#143e37,#247c69);border-radius:22px;padding:25px 29px;color:#fff;display:flex;justify-content:space-between;align-items:center;position:relative;overflow:hidden;box-shadow:var(--shadow)}.welcome:after{content:'K';position:absolute;left:8%;top:-70px;font-size:230px;font-weight:900;color:#ffffff0b}.welcome h3{font-size:20px;margin:0 0 5px}.welcome p{font-size:12px;color:#c1ded4;margin:0}.welcome-art{font-size:52px;opacity:.85;z-index:1}.section-head{display:flex;align-items:center;justify-content:space-between;margin:25px 0 14px}.section-head h3{font-size:15px;margin:0}.section-head p{font-size:11px;color:var(--muted);margin:3px 0 0}.btn{padding:10px 16px;border-radius:11px;font-size:12px;font-weight:700}.primary{background:var(--green2);color:white;box-shadow:0 7px 16px #1c69551c}.soft{background:#e6f4ef;color:#17634f}.danger{background:#fff0f0;color:#b94d4d}.wide{width:100%;margin-top:18px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.stat{background:#fff;border:1px solid var(--line);border-radius:17px;padding:17px;box-shadow:var(--shadow)}.stat-top{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:11px}.stat-icon{width:37px;height:37px;border-radius:12px;display:grid;place-items:center;font-size:18px;background:var(--mint);color:#1b725b}.stat strong{display:block;font-size:22px;margin-top:13px}.stat small{font-size:10px;color:var(--muted)}.panel{background:#fff;border:1px solid var(--line);border-radius:17px;padding:18px;box-shadow:var(--shadow)}.grid2{display:grid;grid-template-columns:1.3fr 1fr;gap:15px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:570px}th{text-align:right;color:#91a09d;font-size:10px;font-weight:600;padding:12px 9px;border-bottom:1px solid var(--line)}td{padding:13px 9px;border-bottom:1px solid #f0f4f2;font-size:11px}tr:last-child td{border:0}.tag{padding:5px 9px;border-radius:20px;background:#e7f6ee;color:#247454;font-size:10px}.tag.warn{background:#fff5df;color:#9b7020}.tag.bad{background:#ffeded;color:#b64e4e}.empty{text-align:center;padding:30px;color:var(--muted);font-size:12px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:15px}.search{max-width:280px;flex:1}.field{margin:10px 0}.field label{display:block;font-size:11px;font-weight:700;margin-bottom:6px;color:#526560}.field input,.field select,.field textarea,.search{width:100%;padding:11px 12px;border:1px solid #dfe9e5;border-radius:10px;background:#fbfdfc;outline:none;font-size:12px;color:var(--ink)}.field input:focus,.field select:focus{border-color:#4eaa8e;box-shadow:0 0 0 3px #4eaa8e18}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 13px}.modal{position:fixed;inset:0;background:#102a27a8;z-index:20;display:grid;place-items:center;padding:18px}.modal-card{background:white;border-radius:20px;padding:25px;width:min(570px,100%);max-height:90vh;overflow:auto;position:relative}.modal-card h3{margin:0 0 15px;font-size:17px}.modal-x{position:absolute;left:15px;top:12px;background:#edf4f1;border-radius:9px;width:30px;height:30px;font-size:20px;color:#52736a}.modal-actions{display:flex;gap:9px;justify-content:flex-start;margin-top:18px}.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 20% 20%,#d8f1e8,transparent 30%),linear-gradient(135deg,#edf6f2,#f7faf9)}.login-card{width:min(410px,100%);background:#fff;border:1px solid #e3eee9;border-radius:25px;padding:35px;box-shadow:0 25px 70px #174b3b18;text-align:center}.login-card .brand-mark{margin:0 auto 16px}.login-card h1{font-size:29px;margin:5px 0}.login-card>label{text-align:right;display:block;font-size:11px;margin:14px 0 6px}.login-card input{width:100%;padding:12px;border:1px solid var(--line);border-radius:11px;direction:ltr;text-align:left}.muted{color:var(--muted);font-size:12px}.login-help{font-size:10px;line-height:2;color:#899994;margin-top:18px;background:#f5f9f7;padding:10px;border-radius:10px}.toast{position:fixed;bottom:25px;left:25px;background:#173f36;color:white;padding:12px 18px;border-radius:12px;font-size:12px;opacity:0;transform:translateY(10px);transition:.25s;z-index:40}.toast.show{opacity:1;transform:translateY(0)}footer{text-align:center;color:#9baaa6;font-size:10px;padding:25px}.mobile-nav{display:none}.metric-line{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}.metric-line:last-child{border:0}.notice{padding:12px 14px;border-radius:12px;background:#fff7e7;color:#8a692e;font-size:11px;line-height:1.9;margin-bottom:15px}.pill-actions{display:flex;gap:6px}.mini{font-size:10px;padding:6px 9px;border-radius:8px;background:#edf5f1;color:#356b5a}
@media(max-width:900px){.sidebar{width:220px}.main{margin-right:220px;padding:0 20px}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.sidebar{display:none}.main{margin:0;padding:0 14px 90px}.topbar{height:78px}.topbar h2{font-size:19px}.content{margin:17px auto}.welcome{padding:20px;border-radius:18px}.welcome h3{font-size:16px}.welcome p{font-size:10px}.welcome-art{font-size:37px}.stats{gap:9px}.stat{padding:13px}.stat strong{font-size:18px}.stat-icon{width:31px;height:31px}.grid2{grid-template-columns:1fr}.mobile-nav{position:fixed;bottom:0;right:0;left:0;display:flex;justify-content:space-around;background:#fff;border-top:1px solid var(--line);padding:8px 4px calc(8px + env(safe-area-inset-bottom));z-index:10;box-shadow:0 -8px 25px #173b320c}.mobile-nav button{background:transparent;color:#879792;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:19px;padding:3px 8px}.mobile-nav button small{font-size:9px}.mobile-nav button.active{color:#18745b}.form-grid{grid-template-columns:1fr}.top-actions .local-chip{font-size:9px}.modal-card{padding:22px 17px}.section-head h3{font-size:14px}}

.brand-ad{max-width:1250px;margin:18px auto 0;padding:13px 18px;border:1px dashed #9bcbbb;border-radius:13px;background:#e8f6ef;color:#225f4e;font-size:12px;line-height:1.9;white-space:pre-wrap}.brand-ad.hidden{display:none}.footer-ad{margin:22px auto 0;background:#f0f5f2;color:#48665d;border-color:#cbdcd4}
.brand-ad{display:flex;align-items:center;gap:16px;flex-wrap:wrap;min-height:52px;overflow:hidden;background:linear-gradient(120deg,#e8f6ef,#f5f8ff);box-shadow:0 8px 24px rgba(20,60,50,.06);border:1px solid #d8e9e1}.brand-ad .brand-copy{flex:1;min-width:180px}.brand-logo{width:auto;height:auto;max-width:110px;max-height:72px;object-fit:contain;border-radius:10px}.brand-photo{width:100%;max-height:190px;object-fit:cover;border-radius:12px}.brand-upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.brand-preview{display:block;max-width:150px;max-height:90px;object-fit:contain;margin-top:8px;border:1px solid var(--line);border-radius:10px;padding:5px;background:#fff}.field small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.mini.danger{color:#b04444;border-color:#edcaca;background:#fff7f7}@media(max-width:600px){.brand-upload-grid{grid-template-columns:1fr}.brand-ad{padding:12px}.brand-photo{max-height:140px}}
/* kidsrayan Plus visual refinement */
:root{--shadow:0 10px 28px rgba(22,65,53,.075);--line:#e1ebe6;--green2:#20745f}
.content{padding-bottom:28px}.panel{border-radius:20px;padding:21px;box-shadow:0 8px 25px rgba(24,66,55,.055);transition:box-shadow .18s,border-color .18s}.panel:hover{border-color:#d2e5dc;box-shadow:0 12px 30px rgba(24,66,55,.08)}
.stat{border-radius:19px;padding:19px 20px;background:linear-gradient(145deg,#fff,#fbfefd)}.stat strong{letter-spacing:-.3px}.section-head{gap:12px;flex-wrap:wrap}.section-head h3,.panel h3{letter-spacing:-.2px}.btn{transition:transform .15s,filter .15s,box-shadow .15s;border:1px solid transparent}.btn:hover{filter:brightness(1.025);transform:translateY(-1px)}.btn:active{transform:translateY(0)}.btn.primary{background:linear-gradient(135deg,#1e725d,#155442);box-shadow:0 7px 17px rgba(22,98,76,.16)}.btn.soft{border-color:#dceee6;background:#edf8f2}.btn.danger,.mini.danger{background:#fff1f0;color:#b54848;border-color:#f6d8d5}.field input,.field select,.field textarea{border-radius:12px;min-height:42px;background:#fcfefd;border-color:#dce8e2}.field input:focus,.field select:focus,.field textarea:focus{border-color:#57a98d;box-shadow:0 0 0 4px rgba(67,157,125,.11)}
th{background:#f8fbf9;white-space:nowrap}td{vertical-align:middle}tbody tr:hover{background:#fbfdfc}.mini{border:1px solid #e1ebe6;border-radius:9px;padding:7px 10px;background:#f5faf7;color:#235d4d;font-weight:700}.excel-tools{margin:16px 0 20px;background:linear-gradient(135deg,#f9fffc,#f1faf6);border-color:#d5eae0}.excel-tools h3{margin:0 0 4px;font-size:14px}.excel-tools .toolbar{margin:0;gap:7px}.excel-tools .field{margin:8px 0}.excel-tools input[type=file]{padding:9px;background:#fff}.notice{border-radius:13px;padding:12px 14px;background:#f0f8f4;border:1px solid #deeee5;color:#45665a;font-size:11px;line-height:1.9}.modal-card{border:1px solid #e5eee9;box-shadow:0 25px 80px rgba(10,40,31,.2)}
@media(max-width:900px){.main{padding-left:16px;padding-right:16px}.panel{padding:15px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.excel-tools .form-grid{grid-template-columns:1fr}.section-head{align-items:flex-start}.section-head .btn{white-space:nowrap}}
/* Product photos and clearer store branding controls */
.branding-settings{margin:22px 0;padding:18px;border:1px solid #b8d9ca;border-radius:16px;background:linear-gradient(135deg,#f2faf6,#f7f9ff);scroll-margin-top:20px}
.branding-settings h3{margin:0 0 8px;color:#174d3e}
.product-thumb{width:48px;height:48px;object-fit:cover;border-radius:9px;vertical-align:middle;margin-left:8px;border:1px solid var(--line);background:#fff}
.product-photo-edit{display:flex;align-items:center;gap:14px;margin-top:10px;flex-wrap:wrap}
.product-photo-preview{max-width:130px;max-height:110px;object-fit:contain;border:1px solid var(--line);border-radius:12px;background:#fff;padding:5px}

/* Sidebar scrolling: desktop mouse wheel and mobile touch */
.sidebar{height:100vh;height:100dvh;overflow:hidden;min-height:0}
.sidebar #nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:2px 2px 12px;scrollbar-width:thin;scrollbar-color:#5d9384 #123b35}
.sidebar #nav::-webkit-scrollbar{width:7px}.sidebar #nav::-webkit-scrollbar-track{background:#123b35;border-radius:8px}.sidebar #nav::-webkit-scrollbar-thumb{background:#5d9384;border-radius:8px;border:1px solid #123b35}.sidebar .side-bottom{flex:0 0 auto;padding-top:10px}
/* POS cash register layout */
.pos-page{direction:rtl}.pos-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;background:linear-gradient(115deg,#123b35,#24745f);padding:22px 25px;border-radius:20px;color:#fff;box-shadow:var(--shadow)}.pos-heading .eyebrow{color:#a9dfcc}.pos-heading h2{font-size:22px;margin:4px 0}.pos-heading p{font-size:11px;color:#c6e2d8;margin:0}.pos-heading-actions{display:flex;gap:8px;flex-wrap:wrap}.pos-heading-actions .soft{background:#ffffff18;color:#fff;border-color:#ffffff20}.pos-heading-actions .primary{background:#f4c76b;color:#263b31;box-shadow:none}.pos-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.pos-stat{background:#fff;border:1px solid var(--line);border-radius:15px;padding:13px 16px;min-width:0}.pos-stat small{display:block;color:var(--muted);font-size:10px}.pos-stat b{display:block;margin-top:5px;font-size:17px;overflow-wrap:anywhere}.pos-workspace{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:14px;align-items:start}.pos-catalog,.pos-side{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px;min-width:0}.pos-tools{display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:9px;margin-bottom:13px}.pos-tools .search{max-width:none;min-height:43px}.pos-tools select{min-width:0;border:1px solid #dfe9e5;border-radius:10px;padding:10px;background:#fbfdfc;color:var(--ink)}.pos-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}.pos-product{display:flex;flex-direction:column;align-items:flex-start;text-align:right;gap:5px;padding:13px;border:1px solid #e4eee9;border-radius:14px;background:linear-gradient(150deg,#fff,#f8fcfa);color:var(--ink);min-height:145px;transition:.15s}.pos-product:hover{border-color:#72b99c;box-shadow:0 7px 20px #1d6b5014;transform:translateY(-2px)}.pos-product-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#e4f5ed;color:#1e7058;font-size:18px}.pos-product b{font-size:12px;line-height:1.7}.pos-product small{font-size:9px;color:var(--muted)}.pos-product strong{font-size:12px;color:#17634f;margin-top:auto}.pos-product em{font-size:9px;color:#82918d;font-style:normal}.pos-side{position:sticky;top:15px}.pos-side-title{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:12px}.pos-primary-action{width:100%;padding:14px;border-radius:12px;background:#1d6b56;color:#fff;font-weight:800}.pos-side>p{font-size:10px;line-height:2;color:var(--muted);margin:12px 2px}.pos-side-links{display:grid;gap:7px}.pos-side-links button{padding:10px;border-radius:10px;background:#f0f7f3;color:#245d4b;text-align:right;font-size:11px}.pos-top-items{border-top:1px solid var(--line);margin-top:14px;padding-top:12px;font-size:11px}.pos-top-items .metric-line{font-size:10px;padding:9px 0}
@media(max-width:900px){.pos-workspace{grid-template-columns:1fr}.pos-side{position:static}.pos-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.pos-heading{padding:17px}.pos-heading h2{font-size:18px}.pos-heading-actions{width:100%}.pos-heading-actions .btn{flex:1;padding:9px 7px;font-size:10px}.pos-tools{grid-template-columns:1fr}.pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pos-product{min-height:132px;padding:10px}.pos-stat{padding:11px}.pos-stat b{font-size:14px}}

/* KidsRayan visual identity and POS reference-inspired desktop ribbon */
.side-logo{width:132px;max-height:48px;object-fit:contain;background:#fff;border-radius:9px;padding:3px}.login-logo{width:190px;height:82px;object-fit:contain;margin:0 auto 10px;display:block}.side-brand{gap:10px;align-items:center}
.pos-reference{background:#f3f7fc;border:1px solid #d7e3f4;border-radius:18px;overflow:hidden;box-shadow:0 12px 30px rgba(23,76,140,.08)}
.pos-reference-head{display:grid;grid-template-columns:1.15fr 1fr 1fr;align-items:center;gap:15px;padding:15px 20px;background:linear-gradient(110deg,#fff,#f2f7ff);border-bottom:1px solid #d9e4f4}
.pos-reference-brand{display:flex;align-items:center;gap:12px}.pos-reference-brand img{width:190px;max-height:65px;object-fit:contain}.pos-user{text-align:center;font-weight:800;color:#24334d}.pos-slogan{text-align:left;color:#1264bd;font-weight:900;font-size:17px}
.pos-ribbon{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:4px;padding:6px;background:#eaf2ff;border-bottom:1px solid #c8d9f3}
.pos-ribbon button{min-height:76px;border:1px solid #c7d8f0;border-radius:12px;background:linear-gradient(#f9fcff,#e1edfc);color:#20334d;font-weight:800;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;font-size:12px}.pos-ribbon button span{font-size:25px}.pos-ribbon button.active{background:linear-gradient(135deg,#2588ec,#0861c7);color:#fff;border-color:#0870d7;box-shadow:0 5px 14px #1267bd33}
.pos-ref-body{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:15px;padding:16px;min-height:390px}.pos-promo{position:relative;min-height:390px;border-radius:17px;overflow:hidden;padding:28px;background:radial-gradient(circle at 80% 25%,#fff 0,#e9f4ff 38%,#d9e9ff 100%);display:flex;flex-direction:column;justify-content:center}.pos-promo:after{content:'🛍️';position:absolute;left:7%;bottom:4%;font-size:120px;opacity:.28}.pos-promo h2{font-size:clamp(27px,4vw,48px);line-height:1.5;color:#075bb5;margin:0;max-width:540px}.pos-promo h2 strong{color:#e72f8b}.pos-promo p{font-size:15px;color:#395b7d;font-weight:700}.pos-invoice-menu{position:absolute;z-index:2;top:12px;right:50%;transform:translateX(50%);width:min(350px,90%);background:#fff;border:3px solid #1672d2;border-radius:16px;box-shadow:0 12px 28px #0c4d9730;padding:8px}.pos-invoice-menu button{width:100%;display:flex;justify-content:space-between;align-items:center;padding:11px 12px;border:0;border-bottom:1px solid #e5edf7;background:#fff;color:#1b2e4b;font-weight:800;text-align:right}.pos-invoice-menu button:last-child{border-bottom:0}.pos-invoice-menu button:hover{background:#eaf4ff;border-radius:9px}.pos-invoice-menu small{direction:ltr;color:#1b67b6;font-weight:900}.pos-ref-metrics{display:grid;gap:12px;align-content:start}.pos-ref-metric{min-height:105px;border-radius:16px;padding:18px;color:#fff;display:flex;align-items:center;justify-content:space-between;box-shadow:0 7px 17px #173a5a20}.pos-ref-metric:nth-child(1){background:linear-gradient(130deg,#4bd32c,#19a83d)}.pos-ref-metric:nth-child(2){background:linear-gradient(130deg,#12a5f6,#0872d7)}.pos-ref-metric:nth-child(3){background:linear-gradient(130deg,#9b45e8,#6323c4)}.pos-ref-metric span{font-size:34px}.pos-ref-metric b{display:block;font-size:18px}.pos-ref-metric small{display:block;font-size:11px;opacity:.9}.pos-ref-footer{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:12px 18px;background:#edf4ff;border-top:1px solid #d3e1f4;color:#2d5e98;font-size:11px;font-weight:800}
.dashboard-v2{background:#f5f9ff;border:1px solid #e1eaf7;border-radius:20px;padding:18px}.dashboard-v2 .welcome{background:linear-gradient(120deg,#075db6,#268be8);box-shadow:0 10px 25px #1769b32b}.dashboard-v2 .stats{grid-template-columns:repeat(4,minmax(0,1fr))}.dashboard-v2 .stat{border:1px solid #e2eaf5;box-shadow:0 5px 15px #143f6810}.dashboard-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}.dashboard-kpi{padding:16px;border-radius:15px;background:#fff;border:1px solid #e1eaf5}.dashboard-kpi b{display:block;font-size:19px;color:#145ca6}.dashboard-kpi small{color:#72839a}
@media(max-width:900px){.pos-reference-head{grid-template-columns:1fr 1fr}.pos-slogan{display:none}.pos-ref-body{grid-template-columns:1fr}.pos-invoice-menu{position:relative;top:auto;right:auto;transform:none;width:100%;margin-top:18px}.pos-promo{min-height:250px}.pos-ribbon{grid-template-columns:repeat(5,minmax(0,1fr))}.pos-ribbon button{min-height:62px}.dashboard-v2 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.pos-reference-head{grid-template-columns:1fr}.pos-user{display:none}.pos-ribbon{grid-template-columns:repeat(3,minmax(0,1fr))}.pos-ribbon button{min-height:58px;font-size:10px}.pos-ribbon button span{font-size:20px}.pos-ref-body{padding:9px}.pos-ref-metric{min-height:82px}.dashboard-kpis{grid-template-columns:1fr 1fr}.dashboard-v2{padding:9px}}

/* Persian calendar picker */
.jalali-input-wrap{position:relative;display:flex;align-items:stretch;gap:5px}.jalali-input-wrap input{flex:1;min-width:0}.jalali-picker-button{min-width:42px;border:1px solid var(--line,#d8dee8);border-radius:10px;background:var(--surface,#fff);cursor:pointer}.jalali-calendar-pop{position:absolute;z-index:9999;top:calc(100% + 6px);right:0;width:280px;padding:10px;border:1px solid var(--line,#d8dee8);border-radius:14px;background:var(--surface,#fff);box-shadow:0 12px 35px #0002}.jalali-cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.jalali-cal-head button,.jalali-cal-grid button{border:0;border-radius:8px;padding:7px;background:transparent;cursor:pointer}.jalali-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.jalali-cal-week{font-size:12px;color:var(--muted,#777);padding:5px 0}.jalali-cal-grid button:hover,.jalali-cal-grid button.selected{background:var(--primary,#2563eb);color:#fff}

.nav-section-label{padding:13px 13px 4px;color:#8fb3a8;font-size:10px;font-weight:700}.sidebar #nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;padding:2px 2px 12px;scrollbar-width:thin;scrollbar-color:#5d9384 #123b35}.sidebar #nav::-webkit-scrollbar{width:7px}.sidebar #nav::-webkit-scrollbar-thumb{background:#5d9384;border-radius:8px}#krBackupPanel input[type=checkbox]{width:auto}


/* 8.4.2: searchable hierarchical product categories and configurable mobile navigation */
.pr-category-tree{display:flex;flex-direction:column;gap:4px;max-height:230px;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:7px;margin-top:8px;background:#fbfdfc}
.pr-category-row{display:flex;align-items:center;gap:8px;min-height:36px;padding:5px 8px;border-radius:8px;background:#fff;border:1px solid #edf2ef;cursor:pointer}
.pr-category-row input{width:17px;height:17px;flex:0 0 auto}
.pr-category-row span{font-size:12px;font-weight:700}
.pr-category-row small{margin-right:auto;color:var(--muted);font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:48%}
.pr-category-selected{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0}
.pr-category-chip{display:inline-flex;padding:4px 8px;border-radius:20px;background:#e8f5ee;color:#17634f;font-size:10px;font-weight:700}
.mobile-nav{display:none}
.mobile-more-menu{display:none}
@media(max-width:900px){
 .mobile-nav{display:flex;position:fixed;bottom:0;right:0;left:0;justify-content:space-around;align-items:stretch;gap:3px;background:#fff;border-top:1px solid var(--line);padding:6px 5px calc(6px + env(safe-area-inset-bottom));z-index:100;box-shadow:0 -8px 25px #173b3214}
 .mobile-nav button{flex:1 1 20%;min-width:0;min-height:48px;border-radius:10px;background:transparent;color:#879792;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:22px;padding:2px 1px}
 .mobile-nav button span{font-size:23px;line-height:1.15}
 .mobile-nav button small{font-size:10px;line-height:1.4;white-space:nowrap}
 .mobile-nav button.active{color:#18745b;background:#edf7f1;font-weight:800}
 .mobile-more-menu{display:flex;position:fixed;z-index:99;bottom:calc(64px + env(safe-area-inset-bottom));right:10px;left:10px;max-height:min(55vh,420px);overflow:auto;flex-wrap:wrap;gap:7px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 35px #102a2730}
 .mobile-more-menu.hidden{display:none}
 .mobile-more-menu button{flex:1 1 calc(33.333% - 7px);min-width:85px;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#f5faf7;border:1px solid #e3eee8;border-radius:11px;color:var(--ink);font-size:11px;font-weight:700}
 .mobile-more-menu button span{font-size:21px}
 .mobile-more-empty{width:100%;padding:14px;text-align:center;color:var(--muted);font-size:11px}
 .main{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
}

.pr-category-popular{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0}.pr-category-popular b{font-size:10px;color:var(--muted);margin-left:3px}.pr-category-popular button{padding:5px 9px;border-radius:20px;background:#edf6f1;color:#24654f;font-size:10px;border:1px solid #dcece3}.pr-category-popular button:active{background:#d7eee1}

/* 8.4.3 audit hotfix: desktop sidebar toggle and mobile overlay stacking */
.topbar-title{display:flex;align-items:center;gap:12px}.sidebar-toggle{width:38px;height:38px;flex:0 0 38px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--green);font-size:22px;cursor:pointer;display:grid;place-items:center}.sidebar{transition:transform .22s ease}.main{transition:margin-right .22s ease}.app.sidebar-collapsed .sidebar{transform:translateX(110%)}.app.sidebar-collapsed .main{margin-right:0}
@media(max-width:650px){.sidebar-toggle{display:none}.toast{bottom:calc(82px + env(safe-area-inset-bottom));left:12px;right:12px;z-index:400;text-align:center;max-width:calc(100% - 24px)}.mobile-nav{z-index:200}.mobile-more-menu{z-index:220;bottom:calc(72px + env(safe-area-inset-bottom))}.modal{z-index:300}}
/* KidsRayan 8.4.4 integrated desktop POS */
.pos-shortcuts{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;margin:12px 0;background:#eaf2ff;border:1px solid #cbdcf5;border-radius:15px;padding:8px}
.pos-shortcuts button{min-width:0;min-height:76px;border:1px solid #cbd9ec;border-radius:11px;background:linear-gradient(#fff,#edf4ff);color:#1e416e;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;font-weight:700;padding:5px 2px}
.pos-shortcuts button b{font-size:22px;line-height:1.2}.pos-shortcuts button small{font-size:9px;color:#6b7d94}.pos-shortcuts button:hover{border-color:#4287d8;background:#e3efff}.pos-shortcuts .pos-checkout-shortcut{background:linear-gradient(#3ebd68,#198a48);color:#fff;border-color:#168341}.pos-shortcuts .pos-checkout-shortcut small{color:#e7ffef}
.pos-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:12px;align-items:stretch}.pos-products-pane,.pos-cart-pane{background:#fff;border:1px solid #d9e4f2;border-radius:16px;padding:13px;min-width:0;box-shadow:0 7px 22px #183e6610}.pos-pane-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.pos-pane-head h3{font-size:15px;margin:0}.pos-tools{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:10px}.pos-tools input,.pos-tools select,.pos-cart-controls input,.pos-cart-controls select{min-width:0;width:100%;border:1px solid #d7e2ef;background:#fbfdff;border-radius:9px;padding:10px;font-size:12px}.pos-product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-content:start}.pos-product{min-width:0;min-height:112px;border:1px solid #d7e2ef;border-radius:12px;background:linear-gradient(#fff,#f4f8ff);color:#203a59;padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}.pos-product b{font-size:11px;line-height:1.5}.pos-product strong{font-size:11px;color:#145caa}.pos-product small,.pos-product em{font-size:9px;color:#74869a;font-style:normal}.pos-product-icon{font-size:22px;color:#3179c6}.pos-cart-table{max-height:370px;overflow:auto}.pos-cart-table table{min-width:480px}.pos-cart-table tr.selected{background:#eaf3ff}.pos-cart-table input{width:60px;border:1px solid #d6e0ec;border-radius:7px;padding:5px}.pos-cart-controls{display:grid;grid-template-columns:1fr 1fr;gap:0 10px;margin-top:10px}.pos-cart-controls .field{margin:5px 0}.pos-cart-controls .jalali-field{grid-column:auto}.pos-totals{border:1px solid #dce6f2;border-radius:12px;overflow:hidden;margin-top:8px}.pos-totals>div{display:flex;justify-content:space-between;padding:9px 12px;border-bottom:1px solid #e9eef5;font-size:12px}.pos-totals>div:last-child{border:0}.pos-grand-total{background:#e7f1ff;color:#123d70;font-size:16px!important;font-weight:900}.pos-cart-actions{display:flex;gap:8px;margin-top:10px}.pos-cart-actions button{flex:1}.pos-bottom-status{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;background:#edf5ff;border:1px solid #d5e4f6;border-radius:10px;padding:9px 12px;margin-top:12px;color:#45617e;font-size:10px}.pos-sync-chip{font-size:10px;color:#216b4e;background:#e1f5e9;border-radius:30px;padding:7px 10px}
@media(max-width:1100px){.pos-shortcuts{grid-template-columns:repeat(6,minmax(0,1fr))}.pos-workspace{grid-template-columns:1fr 1fr}.pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.pos-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.pos-shortcuts button{min-height:65px;font-size:10px}.pos-workspace{grid-template-columns:1fr}.pos-products-pane{order:2}.pos-cart-pane{order:1}.pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.pos-tools{grid-template-columns:1fr}.pos-cart-controls{grid-template-columns:1fr 1fr}.pos-bottom-status{font-size:9px}}
.pos-product-image{width:58px;height:52px;object-fit:contain;border-radius:8px;background:#fff}

/* KidsRayan 8.4.4 responsive POS layout: adapts to viewport and display density */
.main:has(.pos-reference) .content{width:100%;max-width:1920px;margin-inline:auto;padding:clamp(7px,1vw,16px);box-sizing:border-box;overflow-x:hidden}
.main:has(.pos-reference) .pos-reference,.main:has(.pos-reference) .pos-shortcuts,.main:has(.pos-reference) .pos-workspace,.main:has(.pos-reference) .pos-bottom-status{width:100%;max-width:100%;box-sizing:border-box}
.main:has(.pos-reference) .pos-reference-head{grid-template-columns:minmax(150px,1fr) minmax(130px,.8fr) minmax(140px,.8fr) auto;gap:clamp(5px,1vw,14px);padding:clamp(7px,1vw,15px)}
.main:has(.pos-reference) .pos-reference-brand img{width:clamp(105px,13vw,190px);max-height:clamp(38px,5vw,65px)}
.main:has(.pos-reference) .pos-shortcuts{grid-template-columns:repeat(12,minmax(0,1fr));gap:clamp(3px,.45vw,7px);padding:clamp(4px,.6vw,9px)}
.main:has(.pos-reference) .pos-shortcuts button{min-width:0;min-height:clamp(48px,7.5vh,76px);font-size:clamp(9px,.72vw,12px);padding:4px 2px}
.main:has(.pos-reference) .pos-shortcuts button b{font-size:clamp(15px,1.5vw,22px)}
.main:has(.pos-reference) .pos-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(6px,.8vw,12px);align-items:stretch}
.main:has(.pos-reference) .pos-products-pane,.main:has(.pos-reference) .pos-cart-pane{padding:clamp(7px,.9vw,13px);min-width:0}
.main:has(.pos-reference) .pos-product-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,112px),1fr));gap:clamp(4px,.55vw,8px)}
.main:has(.pos-reference) .pos-cart-table{max-height:min(42vh,420px);overflow:auto}
.main:has(.pos-reference) .pos-cart-table table{min-width:440px}
.main:has(.pos-reference) .pos-cart-controls{gap:0 clamp(5px,.7vw,10px)}
.main:has(.pos-reference) .pos-cart-actions{flex-wrap:wrap}
.main:has(.pos-reference) .pos-cart-actions button{min-width:120px;flex:1 1 120px}
@media(max-width:1250px){.main:has(.pos-reference) .pos-shortcuts{grid-template-columns:repeat(6,minmax(0,1fr))}.main:has(.pos-reference) .pos-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@media(max-width:900px){.main:has(.pos-reference) .pos-reference-head{grid-template-columns:1fr 1fr}.main:has(.pos-reference) .pos-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr))}.main:has(.pos-reference) .pos-workspace{grid-template-columns:1fr}.main:has(.pos-reference) .pos-products-pane{order:2}.main:has(.pos-reference) .pos-cart-pane{order:1}.main:has(.pos-reference) .pos-cart-table{max-height:38vh}}
@media(max-height:720px) and (min-width:901px){.main:has(.pos-reference) .pos-reference-head{padding:6px 10px}.main:has(.pos-reference) .pos-shortcuts button{min-height:48px}.main:has(.pos-reference) .pos-cart-table{max-height:30vh}.main:has(.pos-reference) .pos-product{min-height:82px;padding:5px}}
@media(min-width:1600px){.main:has(.pos-reference) .pos-workspace{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}.main:has(.pos-reference) .pos-product-grid{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}}

/* Adapt based on the actual content width left after the sidebar, not only screen width. */
.main:has(.pos-reference){container-type:inline-size}
@container (max-width: 980px){.main:has(.pos-reference) .pos-workspace{grid-template-columns:minmax(0,1fr)}.main:has(.pos-reference) .pos-products-pane{order:2}.main:has(.pos-reference) .pos-cart-pane{order:1}.main:has(.pos-reference) .pos-shortcuts{grid-template-columns:repeat(6,minmax(0,1fr))}.main:has(.pos-reference) .pos-cart-table{max-height:34vh}}
@container (max-width: 560px){.main:has(.pos-reference) .pos-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr))}.main:has(.pos-reference) .pos-reference-head{grid-template-columns:1fr 1fr}.main:has(.pos-reference) .pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 8.4.4 follow-up: reliable mobile More menu and quick customer in POS */
@media(max-width:900px){
 .mobile-more-menu.is-open{display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
 .mobile-more-menu:not(.is-open){display:none!important;pointer-events:none!important}
}
.pos-customer-row{display:flex;align-items:center;gap:7px;min-width:0}
.pos-customer-row select{flex:1 1 auto;min-width:0;width:100%}
.pos-customer-row button{flex:0 0 auto;white-space:nowrap;padding:10px 11px}
@media(max-width:420px){.pos-customer-row{flex-wrap:wrap}.pos-customer-row button{width:100%}}


/* KidsRayan 8.4.4 professional categorized navigation */
.sidebar #nav{display:flex;flex-direction:column;gap:3px}
.nav-group{margin:2px 0;border:1px solid #ffffff12;border-radius:13px;overflow:hidden;background:#ffffff05}
.nav-group-toggle{width:100%;display:flex;align-items:center;gap:10px;padding:11px 12px;background:transparent;color:#e2f1ec;text-align:right;font-size:12px;font-weight:800;border:0;cursor:pointer}
.nav-group-toggle>i{font-style:normal;font-size:16px;width:21px;text-align:center;opacity:.95}
.nav-group-toggle>span{flex:1}
.nav-group-toggle>b{font-size:15px;color:#9fc6ba;transition:transform .18s}
.nav-group.is-open .nav-group-toggle{background:#ffffff12;color:#fff}
.nav-group.is-open .nav-group-toggle>b{transform:rotate(180deg)}
.nav-group-items{display:none;padding:3px 5px 7px;background:#092d28aa}
.nav-group.is-open .nav-group-items{display:block}
.nav-group .nav-item{font-size:11.5px;padding:9px 12px;margin:2px 0;border-radius:9px;color:#b9d2cb}
.nav-group .nav-item i{font-size:15px;width:18px}
.nav-group .nav-item.active{background:#ffffff20;color:#fff;box-shadow:inset -3px 0 #72d6b1}
#nav>.nav-item:first-child{margin-bottom:7px;background:#ffffff0c;color:#fff}
#nav>.nav-item:last-child{margin-top:8px;border-top:1px solid #ffffff18;border-radius:0;padding-top:13px}
.mobile-more-menu{display:block;flex-direction:column;flex-wrap:nowrap;gap:9px}
.mobile-menu-group{width:100%;min-width:0}
.mobile-menu-group h4{margin:2px 2px 7px;padding:0 5px;color:#54756b;font-size:11px;font-weight:900}
.mobile-menu-group>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.mobile-menu-group button{width:100%;min-width:0;min-height:58px;flex:initial;padding:7px 4px;white-space:normal;text-align:center;line-height:1.5}
.mobile-menu-group button span{font-size:19px}
@media(max-width:650px){.mobile-more-menu{display:none;max-height:min(68vh,560px);overflow:auto}.mobile-more-menu.is-open{display:flex!important}.mobile-menu-group>div{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* KidsRayan 8.4.4 professional-menu merged maintenance */
.purchase-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}.purchase-dialog-head h3{margin:0}.pr-category-tree{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.pos-tools #posStockFilter{min-width:0;max-width:180px;border:1px solid #dfe9e5;border-radius:10px;padding:10px;background:#fbfdfc;color:var(--ink)}
@media(max-width:650px){.purchase-dialog-head{align-items:flex-start}.pos-tools #posStockFilter{max-width:none;width:100%}}


/* 8.4.4 maintenance follow-up: stable sidebar scroll, readable multi-open navigation */
.sidebar{display:flex;flex-direction:column;min-height:0}
.sidebar .side-brand,.sidebar .profile,.sidebar .side-bottom{flex-shrink:0}
.sidebar #nav{flex:1 1 0%;min-height:0;height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;touch-action:pan-y;scrollbar-gutter:stable;padding:4px 3px 14px}
.nav-group{flex:0 0 auto;overflow:visible}
.nav-group-toggle{min-height:44px;white-space:normal;line-height:1.65;align-items:center}
.nav-group-toggle>span{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.7}
.nav-group-items{display:none;overflow:visible;padding:5px 6px 8px}
.nav-group.is-open .nav-group-items{display:block}
.nav-group .nav-item{min-height:38px;white-space:normal;line-height:1.7;overflow-wrap:anywhere;align-items:flex-start}
.nav-group .nav-item i{flex:0 0 18px}
.pos-hide-zero{display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 10px;border:1px solid #dfe9e5;border-radius:10px;background:#fbfdfc;color:var(--ink);font-size:11px;white-space:normal}
.pos-hide-zero input{width:auto!important;margin:0;accent-color:var(--green2)}
@media(max-width:900px){.sidebar #nav{height:0}}
/* Product category and attribute pickers - isolated scroll and touch-friendly dialogs */
.pr-picker-trigger{width:100%;text-align:right;display:flex;justify-content:space-between;align-items:center;min-height:44px}
.pr-picker-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.pr-picker-heading h4{margin:0 0 4px}.pr-picker-heading p{margin:0}
.pr-picker-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(10,35,30,.58);display:grid;place-items:center;padding:16px}
.pr-picker-dialog{width:min(720px,100%);max-height:min(86vh,820px);background:#fff;border:1px solid #e3eee8;border-radius:18px;box-shadow:0 24px 80px #102a2740;padding:18px;display:flex;flex-direction:column;gap:12px;min-height:0}
.pr-picker-head,.pr-picker-foot{display:flex;align-items:center;justify-content:space-between;gap:12px}.pr-picker-head h3{margin:0 0 4px;font-size:16px}.pr-picker-head small,.pr-picker-foot span{font-size:10px;color:var(--muted)}
.pr-picker-search{width:100%;padding:13px 14px;border:1px solid #dce9e3;border-radius:11px;background:#f8fcfa;outline:none;font-size:13px}
.pr-picker-scroll{min-height:120px;max-height:52vh;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px;padding:9px;background:#fbfdfc}
.pr-picker-dialog .pr-category-tree{max-height:none;margin:0}.pr-picker-dialog .pr-category-row{min-height:42px}.pr-picker-dialog .pr-category-row small{font-size:9px}
.pr-picker-foot{padding-top:10px;border-top:1px solid var(--line)}
.pr-attribute-list{display:flex;flex-direction:column;gap:8px}.pr-attribute-group{border:1px solid #e4eee8;border-radius:11px;background:#fff;padding:10px}.pr-attribute-group summary{font-size:12px;font-weight:800;cursor:pointer;padding:4px}.pr-attribute-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-top:10px}.pr-attribute-values .checkline{display:flex;align-items:center;gap:8px;background:#f7faf8;border:1px solid #edf2ef;border-radius:8px;padding:9px;font-size:11px;min-width:0}.pr-attribute-values input{width:17px;height:17px;flex:0 0 auto}
@media(max-width:650px){.pr-picker-backdrop{padding:0;place-items:stretch}.pr-picker-dialog{width:100%;height:100dvh;max-height:100dvh;border-radius:0;padding:14px 12px calc(12px + env(safe-area-inset-bottom))}.pr-picker-scroll{max-height:none;flex:1}.pr-attribute-values{grid-template-columns:1fr}.pr-picker-head h3{font-size:14px}.pr-picker-foot{align-items:center}.pr-picker-foot .btn{white-space:nowrap}}
.pr-category-node{display:block}.pr-category-line{display:flex;align-items:center;gap:5px;min-width:0}.pr-category-line>.pr-category-row{flex:1;min-width:0}.pr-category-toggle{width:28px;height:28px;flex:0 0 28px;border-radius:8px;background:#e8f4ee;color:#23634f;font-size:18px;line-height:1}.pr-category-toggle-spacer{width:28px;flex:0 0 28px}.pr-category-children{display:none}.pr-category-node.expanded>.pr-category-children{display:block}.pr-category-row{margin:3px 0}.pr-category-row.hidden{display:none!important}


/* KidsRayan 8.4.4 mobile navigation correction: phones and narrow tablets use only the dedicated mobile navigation. */
@media (max-width: 900px) {
  .sidebar { display: none !important; }
  .sidebar-toggle { display: none !important; }
  .main, .app.sidebar-collapsed .main { margin: 0 !important; padding: 0 14px calc(90px + env(safe-area-inset-bottom)) !important; width: 100%; min-width: 0; }
  .mobile-nav { position: fixed; display: flex !important; right: 0; left: 0; bottom: 0; justify-content: space-around; align-items: center; background: #fff; border-top: 1px solid var(--line); padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); z-index: 200; box-shadow: 0 -8px 25px #173b320c; }
  .mobile-nav button { background: transparent; color: #879792; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 19px; padding: 3px 8px; }
  .mobile-nav button small { font-size: 9px; line-height: 1.4; white-space: nowrap; }
  .mobile-nav button.active { color: #18745b; background: #edf7f1; font-weight: 800; }
  .mobile-more-menu { display: none; position: fixed; z-index: 220; bottom: calc(72px + env(safe-area-inset-bottom)); right: 10px; left: 10px; max-height: min(68vh,560px); overflow: auto; flex-direction: column; flex-wrap: nowrap; gap: 9px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 35px #102a2730; }
  .mobile-more-menu.is-open { display: flex !important; }
  .mobile-more-menu.hidden, .mobile-more-menu:not(.is-open) { display: none !important; }
  .mobile-menu-group > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .mobile-more-menu button { min-width: 0; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #f5faf7; border: 1px solid #e3eee8; border-radius: 11px; color: var(--ink); font-size: 11px; font-weight: 700; }
  .mobile-more-menu button span { font-size: 21px; }
  .modal { z-index: 300; }
}

/* KidsRayan 8.4.4 security + product picker correction */
.login-card{display:block;margin:0;font:inherit;color:inherit}.login-card .remember-password{display:flex!important;align-items:center;justify-content:flex-start;gap:9px;text-align:right!important;margin:13px 0 2px!important;padding:9px 11px;background:#f4faf7;border:1px solid #e0eee7;border-radius:10px;cursor:pointer}.login-card .remember-password input{width:17px!important;height:17px;flex:0 0 17px;margin:0;accent-color:#1d6558}.login-card .remember-password span{font-size:11px;color:#42645a}.pr-picker-backdrop{z-index:500;isolation:isolate}.pr-picker-dialog{position:relative;z-index:1}.pr-category-tree{min-height:180px}.pr-category-node{min-width:0}.pr-category-line{align-items:flex-start}.pr-category-row{min-width:0;flex-wrap:wrap}.pr-category-row small{max-width:42%}.pr-category-children{margin-right:12px;border-right:1px dashed #cbded4;padding-right:6px}.pr-category-node.expanded>.pr-category-children{display:block}.pr-category-toggle[aria-expanded=true]{background:#d9f0e5}
@media(max-width:650px){.pr-picker-backdrop{z-index:500}.pr-picker-dialog{min-height:0}.pr-category-row small{max-width:100%;width:100%;margin-right:25px}.login-card{max-width:410px}}




/* KidsRayan 8.4.4 unified in-page workspace and navigation */
.modal.inline-workspace{position:static!important;inset:auto!important;display:block!important;background:transparent!important;z-index:auto!important;padding:0!important;margin:22px auto!important;width:100%!important;max-width:1250px!important}
.modal.inline-workspace .modal-card{position:relative;width:100%!important;max-width:none!important;max-height:none!important;min-height:220px;overflow:visible!important;border-radius:17px;padding:20px 22px!important;box-shadow:0 8px 28px #173b320d!important}
.modal.inline-workspace .modal-x{position:static!important;inset:auto!important;width:auto!important;height:auto!important;padding:9px 13px!important;border-radius:10px!important;font-size:12px!important;font-weight:700!important;white-space:nowrap}
.inline-workspace-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 0 14px;margin:0 0 16px;border-bottom:1px solid var(--line)}
.inline-workspace-crumb{font-size:11px;color:var(--muted)}
.inline-page-hidden{display:none!important}
.page-back-button{background:#e6f4ef;color:#17634f;border:1px solid #d6eae1;border-radius:10px;padding:9px 12px;font-size:11px;font-weight:700;white-space:nowrap;margin-left:14px}
.nav-group-items{transition:max-height .22s ease,opacity .18s ease}
@media(max-width:650px){.modal.inline-workspace{margin:12px auto!important}.modal.inline-workspace .modal-card{padding:16px 13px!important;border-radius:14px}.inline-workspace-head{align-items:flex-start;flex-direction:column}.page-back-button{padding:7px 9px;margin-left:7px;font-size:10px}.topbar-title{gap:6px}}

/* Modal dialogs remain fixed-size; all application pages render in the main workspace. */
.modal-card{resize:none;min-width:min(340px,95vw)}
@media(max-width:650px){.top-actions{gap:6px}.modal-card{resize:none}}

/* Live product picker in purchase invoice */
.purchase-search-results [data-purchase-pick]:hover,.purchase-search-results [data-purchase-pick]:focus{background:var(--soft,rgba(20,90,75,.10));outline:2px solid var(--accent,rgba(20,90,75,.35));outline-offset:-2px}
.purchase-search-results [data-purchase-pick]:last-child{border-bottom:0}
.purchase-product-search{position:relative}

/* KidsRayan 8.4.4 unified navigation repair: stable desktop sidebar and complete mobile submenu */
.sidebar{position:sticky;top:0;align-self:flex-start;height:100dvh;min-height:0;overflow:hidden}
.sidebar #nav{display:flex;flex-direction:column;gap:4px;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;padding:8px 5px 18px}
.sidebar #nav>.nav-item,.sidebar #nav>.nav-group{flex:0 0 auto}
.nav-group{min-width:0}
.nav-group-toggle{width:100%;min-height:46px;line-height:1.55;white-space:normal}
.nav-group-items{padding:5px 6px 9px}
.nav-group .nav-item{display:flex;width:100%;min-width:0;min-height:40px;align-items:center;line-height:1.6;white-space:normal;overflow-wrap:anywhere;text-align:right}
.nav-group .nav-item.active{outline:1px solid #ffffff22}
.main{min-width:0;max-width:100%;overflow-x:clip}
.content{min-width:0;max-width:100%;overflow-wrap:anywhere}
.mobile-more-menu{max-height:min(78dvh,720px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(14px + env(safe-area-inset-bottom))}
.mobile-menu-group{width:100%;min-width:0}
.mobile-menu-group>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.mobile-menu-group button{min-height:62px;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.45;padding:8px 5px}
.mobile-menu-group button span{line-height:1.2}
.mobile-menu-operations{padding-bottom:10px;border-bottom:1px solid var(--line)}
.mobile-nav{min-height:58px;padding-bottom:calc(8px + env(safe-area-inset-bottom));}
.mobile-nav button{min-width:0;flex:1 1 0;padding-inline:3px}
.mobile-nav button small{max-width:100%;overflow:hidden;text-overflow:ellipsis}
@media(max-width:900px){.sidebar{display:none!important}.main{width:100%;max-width:100%;margin:0!important}.mobile-more-menu{right:8px;left:8px;bottom:calc(76px + env(safe-area-inset-bottom))}}
@media(max-width:420px){.mobile-menu-group>div{grid-template-columns:repeat(2,minmax(0,1fr))}.mobile-menu-group button{min-height:56px}.mobile-nav button small{font-size:8px}}


/* KidsRayan 8.4.4: keep the sticky sidebar in a horizontal app shell.
   Without a flex shell the sticky sidebar occupies a full viewport above .main,
   creating the large blank area before the topbar. */
@media (min-width: 901px) {
  .app {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
  }
  .app > .sidebar {
    position: sticky;
    top: 0;
    inset-block-start: 0;
    flex: 0 0 255px;
    width: 255px;
    height: 100vh;
    height: 100dvh;
    align-self: flex-start;
  }
  .app > .main {
    flex: 1 1 0%;
    width: calc(100% - 255px);
    min-width: 0;
    margin-right: 0 !important;
  }
  .app.sidebar-collapsed > .sidebar {
    flex-basis: 0;
    width: 0;
    padding: 0;
    border: 0;
    transform: translateX(110%);
  }
  .app.sidebar-collapsed > .main {
    width: 100%;
    margin-right: 0 !important;
  }
}
@media (max-width: 900px) {
  .app { display: block !important; width: 100%; }
  .app > .sidebar { display: none !important; }
  .app > .main { width: 100%; margin: 0 !important; }
}

/* 8.4.4 login visibility hotfix: the workspace must remain hidden until authentication succeeds. */
.app.hidden{display:none!important}

/* 8.4.4: hard gate for the workspace before authentication (ID + hidden attribute). */
#appView[hidden]{display:none!important;visibility:hidden!important;position:absolute!important;inset:auto!important;width:0!important;height:0!important;overflow:hidden!important}
