@font-face{font-family:VividArabic;src:url('/assets/arabic.ttf') format('truetype');font-display:swap}
:root{font-family:VividArabic,Segoe UI,sans-serif;color:#242334;background:#f5f5fa;font-size:16px;--purple:#493b94;--dark:#252137;--line:#e3e2ed;--muted:#6b697b;--green:#167455;--red:#ac3550}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:var(--purple)}button,.button{border:1px solid var(--line);border-radius:10px;padding:10px 16px;background:white;color:#302b4d;text-decoration:none;display:inline-block}button.primary{background:var(--purple);color:white;border-color:var(--purple)}button.danger{color:var(--red)}button.small{padding:5px 10px;font-size:.875rem}button:hover{filter:brightness(.97)}input,select{width:100%;padding:10px 12px;border:1px solid #cbc8db;border-radius:8px;background:#fff;color:inherit;min-height:46px}input[type=checkbox]{width:21px;min-height:21px;accent-color:var(--purple)}input[type=number]{direction:ltr;text-align:right}label{font-size:.9rem;display:block;margin:8px 0;color:#59536d}label>input,label>select{margin-top:5px}h1,h2,h3,p{margin:0}h1{font-size:1.8rem}h2{font-size:1.25rem}h3{font-size:1rem}small,.muted{color:var(--muted);font-size:.875rem}.hint{color:var(--muted);line-height:1.9;font-size:.9rem;margin:8px 0}.layout{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--dark);color:white;padding:30px 20px;display:flex;flex-direction:column;gap:24px;position:sticky;top:0;height:100vh}.brand{font-family:Georgia,serif;font-size:2rem;letter-spacing:3px}.brand span{font: .875rem VividArabic;letter-spacing:0;display:block;color:#c4bfdc}.nav{display:grid;gap:8px}.nav button{background:transparent;color:#d9d4ec;border:0;text-align:right;padding:13px 16px}.nav button.active{background:var(--purple);color:white}.profile{margin-top:auto;border-top:1px solid #484257;padding-top:18px}.profile p{margin-bottom:10px}.workspace{padding:30px 36px;min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding-bottom:23px;border-bottom:1px solid var(--line);margin-bottom:24px}.eyebrow{font-size:.85rem;color:var(--purple);margin-bottom:6px}.connection{display:flex;align-items:center;gap:8px;white-space:nowrap;color:var(--green);font-size:.875rem}.connection::before{content:'';width:8px;height:8px;border-radius:50%;background:currentColor}.connection.offline{color:var(--red)}.demo{background:#fff3d7;color:#73520c;border:1px solid #f0dca9;border-radius:10px;padding:10px 16px;margin-bottom:20px;font-size:.9rem}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.spread{justify-content:space-between}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.filters{margin-bottom:20px;display:flex;gap:12px;align-items:end;flex-wrap:wrap}.filters label{margin:0}.filters input{max-width:180px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:24px}.metric{padding:20px;background:#fff;border:1px solid var(--line);border-radius:14px}.metric strong{display:block;font-size:1.65rem;margin:12px 0 3px;line-height:1.5}.metric.purple{background:var(--purple);color:white;border-color:var(--purple)}.metric.purple small{color:#ded9f5}.panel{background:#fff;border:1px solid var(--line);border-radius:14px;margin-bottom:22px;padding:22px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.table-scroll{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:right;white-space:nowrap;font-size:.925rem}th{font-weight:500;color:#6a647c;background:#f7f6fa}td,th{padding:13px 12px;border-bottom:1px solid #efedf5}tbody tr:last-child td{border-bottom:0}td.name{font-weight:600;white-space:normal;min-width:150px}.tag{display:inline-block;border-radius:6px;padding:3px 8px;font-size:.8rem;background:#ece9f8;color:var(--purple)}.tag.warn{background:#fff1d7;color:#865d09}.tag.good{background:#e5f4ee;color:var(--green)}.empty{text-align:center;padding:35px;color:var(--muted)}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sell-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:start}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:14px}.product-card{border:1px solid var(--line);background:white;border-radius:13px;padding:18px;display:flex;flex-direction:column;gap:10px}.product-card h3{line-height:1.8}.product-card .price{font-size:1.25rem;font-weight:600;color:var(--purple)}.product-card .actions{margin-top:auto}.cart{position:sticky;top:20px}.cart-line{display:flex;align-items:center;gap:8px;padding:12px 0;border-bottom:1px solid var(--line)}.cart-line input{width:72px}.cart-line>div{flex:1}.total{display:flex;justify-content:space-between;font-weight:600;padding:18px 0;font-size:1.2rem}.full{width:100%}.search{max-width:400px;margin-bottom:16px}.login-wrap{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.login-story{background:var(--dark);color:white;padding:10vw 7vw;display:flex;flex-direction:column;justify-content:center}.login-story h1{font-size:2.6rem;line-height:1.6;margin:40px 0 20px}.login-story p{line-height:2;color:#c5bfdc;max-width:430px}.login-form{padding:50px;display:grid;place-items:center}.login-box{width:min(100%,390px)}.login-box h2{font-size:1.7rem;margin-bottom:12px}.login-box form{margin-top:28px}.login-box button{margin-top:20px}.error{color:var(--red);font-size:.9rem;padding:10px 0;white-space:pre-wrap}.success{color:var(--green)}.loading{padding:15vh;text-align:center}dialog{width:min(850px,95vw);max-height:90vh;border:1px solid var(--line);border-radius:17px;padding:28px;color:inherit;overflow:auto;box-shadow:0 24px 80px #24203c33}dialog::backdrop{background:#201a3c80}.close{position:sticky;top:0;float:left;font-size:1.4rem;line-height:1;padding:7px 12px;z-index:1}dialog h2{margin-bottom:16px;padding-left:40px}dialog .form-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}dialog input.qty{width:100px}.check-label{display:flex;gap:10px;align-items:center}.check-label input{margin:0}.bulk{display:grid;grid-template-columns:auto 110px 130px auto;gap:12px;align-items:center;background:#f6f5fb;padding:14px;border-radius:10px;margin:12px 0}.receipt{padding:18px;border-radius:10px;background:#edf7f2;border:1px solid #cde7da;line-height:2}.print-only{display:none}#toast{display:none;position:fixed;bottom:24px;left:24px;right:auto;max-width:min(480px,90vw);background:var(--dark);color:white;padding:15px 22px;z-index:20;border-radius:10px;box-shadow:0 10px 30px #28243e30;white-space:pre-wrap}#toast.show{display:block}.detail-note{border-right:3px solid #a899dc;padding:10px 14px;background:#f8f6ff;line-height:1.9;margin:14px 0}.num{font-variant-numeric:tabular-nums}.pills{display:flex;gap:7px;flex-wrap:wrap}.nowrap{white-space:nowrap}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(2,1fr)}.workspace{padding:24px}.layout{grid-template-columns:210px minmax(0,1fr)}.sell-layout{grid-template-columns:1fr}.cart{position:static}.grid2{grid-template-columns:1fr}}
@media(max-width:700px){.layout{display:block}.sidebar{height:auto;position:static;padding:14px 16px;gap:12px}.brand{font-size:1.5rem}.brand span{display:inline;font-size:.75rem;margin-right:8px}.nav{display:flex;overflow-x:auto}.nav button{white-space:nowrap;font-size:.875rem;padding:8px 12px}.profile{display:flex;align-items:center;justify-content:space-between;margin:0;padding-top:10px;font-size:.8rem}.profile p{margin:0}.profile button{padding:4px 10px;font-size:.8rem}.workspace{padding:18px 14px}.topbar{align-items:start;gap:8px}h1{font-size:1.45rem}.connection{font-size:.75rem}.metrics{gap:10px}.metric{padding:14px}.metric strong{font-size:1.3rem}.panel{padding:15px}.panel-head{flex-wrap:wrap}.login-wrap{grid-template-columns:1fr}.login-story{padding:30px}.login-story h1{font-size:1.6rem;margin:20px 0 8px}.login-story p{font-size:.9rem}.login-form{padding:30px 24px}.bulk{grid-template-columns:1fr 1fr}.filters input{max-width:145px}dialog{padding:18px}.product-grid{grid-template-columns:1fr 1fr}.product-card{padding:13px}.product-card h3{font-size:.9rem}.product-card .price{font-size:1rem}}
@media print{.sidebar,.topbar .connection,.filters button,.actions,button,.demo,#toast{display:none!important}.layout{display:block}.workspace{padding:0}.panel{break-inside:avoid;border-color:#bbb}.metrics{grid-template-columns:repeat(4,1fr)}.metric.purple{background:white;color:black}.metric.purple small{color:#555}.print-only{display:block}body{background:white}table{font-size:12px}.table-scroll{overflow:visible}}
/* Daily work: four owner sections, two employee sections. */
.period{margin:0 0 20px;color:var(--muted);font-size:.875rem}.period summary{cursor:pointer;padding:8px 0;list-style:none}.period summary span{display:inline-block;color:var(--purple);margin-right:16px;text-decoration:underline}.period .filters{margin-top:12px}.extras{margin:18px 0;border-top:1px solid var(--line);padding-top:14px}.extras>summary{cursor:pointer;color:var(--purple);font-size:.9rem;margin-bottom:12px}.extras .actions{margin:12px 0}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.product-photo{width:100%;height:175px;object-fit:contain;border-radius:10px;background:#f6f3fb}.product-name{display:flex;align-items:center;gap:12px;min-width:170px;white-space:normal}.product-name .product-photo,.product-name .product-placeholder{width:64px;height:64px;flex-shrink:0}.product-placeholder{height:100px;display:grid;place-items:center;color:#b4adc9;font:1.4rem Georgia;background:#f5f3fa;border-radius:8px}.product-detail{display:grid;grid-template-columns:220px 1fr;gap:24px;align-items:center}.product-detail>.product-photo{height:280px}.product-detail p{margin:8px 0}.confirm-question{font-size:1.1rem;font-weight:600;line-height:1.8;margin:10px 0 20px}.profile .small{margin:4px 0}th,td{vertical-align:middle}.sidebar .brand span{font-size:.85rem}.product-card{gap:12px}.product-card button{margin-top:auto}.product-card .row{gap:6px}.product-card .tag{font-size:.78rem}.product-card .price{font-size:1.1rem}
@media(max-width:700px){.profile{flex-wrap:wrap;gap:8px}.three{grid-template-columns:1fr}.product-photo{height:140px}.product-name .product-photo{width:50px;height:50px}.product-detail{grid-template-columns:1fr}.product-detail>.product-photo{height:200px}.product-card .price{font-size:.95rem}.product-card .row{align-items:start;flex-direction:column}}
/* Full dark theme, including forms, dialogs, tables, and native controls. */
:root{color-scheme:dark;font-size:18px;color:#eeeef4;background:#101014;--purple:#a08aff;--dark:#111116;--line:#353541;--muted:#b0adbf;--green:#75dfb4;--red:#ff98a9}
body{background:#101014;color:#eeeef4}.sidebar{background:#111116;border-left:1px solid #292831}.brand span{color:#b7b1c9}.sidebar .nav button{color:#d5d1e2}.nav button.active{background:#34274f;color:#fff}.profile{border-color:#35313e}.workspace{background:#101014}.topbar{border-color:#35313e}.eyebrow{color:#c7baff}.demo{background:#30291b;color:#f1d99b;border-color:#5e4d27}
button,.button{background:#25242e;border-color:#494552;color:#f2f0fa}button:hover,.button:hover{background:#34313f;filter:none}button.primary{background:#6d50bc;border-color:#9278d2;color:#fff}button.primary:hover{background:#7e60cd}button.danger{color:#ffb0bc;border-color:#71404e}button:disabled{opacity:.4}
input,select{background:#16161d;border-color:#514e61;color:#f0eff8;min-height:50px}input::placeholder{color:#9b96ab}input:focus,select:focus,button:focus-visible,summary:focus-visible{outline:2px solid #b49aff;outline-offset:2px}input[type=checkbox]{accent-color:#a28aff;min-height:23px;width:23px}label{color:#d2cde0}
.metric,.panel,.product-card{background:#1b1b23;border-color:#383542;color:#eeeef4}.metric.purple{background:#302342;border-color:#6c518e;color:#fff}.metric.purple small{color:#d4c9e4}small,.hint,.muted{color:#b9b4c8}.panel .hint{color:#bbb6c9}th{background:#292732;color:#d7d0e4}td,th{border-color:#393541}table{color:#eeeaf5}.table-scroll{scrollbar-color:#61586e #1b1b23}
.tag{background:#342c49;color:#d5bfff}.tag.good{background:#163d30;color:#a6f0cd}.tag.warn{background:#45341b;color:#ffe0a6}.detail-note{background:#282133;border-color:#a58acb;color:#e5dcf1}.bulk{background:#27232f}.receipt{background:#183d31;border-color:#3a6d58;color:#daf7e8}.error{color:#ffb0bc}.success{color:#a6f0cd}.empty{color:#b9b3c9}
dialog{background:#1b1b23;color:#f0edf7;border-color:#59515f;box-shadow:0 24px 90px #000b}dialog::backdrop{background:#000b}.login-form{background:#15151c}.login-story{background:#111116}.login-story p{color:#ccc4df}.login-box .hint{color:#c0b8ce}.login-box .eyebrow{color:#c4aaff}.product-photo{background:#27232e}.product-placeholder{background:#292431;color:#bfb3d1}.product-card .price{color:#d5c2ff}.profile .small{background:#292430;color:#eee8fa}.period{color:#c5bed3}.period summary span,.extras>summary,a{color:#c3aaff}.branch-actions{gap:8px}.branch-actions button{white-space:nowrap}#toast{background:#35303f;color:#fff;border:1px solid #6e5d86}.close{background:#2c2635}.confirm-question{color:#f3eafb}
@media(max-width:700px){:root{font-size:17px}.branch-actions{min-width:210px}.profile button{font-size:.875rem}.three{grid-template-columns:1fr}dialog{padding:20px}.metrics{gap:12px}}
@media print{:root{color-scheme:light;color:#111;background:#fff}body,.workspace{background:#fff;color:#111}.panel,.metric,.product-card{background:#fff;color:#111;border-color:#aaa}.metric.purple{background:#fff;color:#111}.metric.purple small,small,.hint{color:#444}th{background:#eee;color:#111}td,th,table{color:#111;border-color:#ccc}.tag,.tag.good,.tag.warn{background:#eee;color:#111}.detail-note{background:#fff;color:#111;border-color:#555}}

/* Plain-language explanations beside labels and actions. */
.form-field{margin:12px 0}.label-line,.caption-line{display:flex;align-items:center;gap:8px}.label-line label{margin:0;flex:1}.form-field>input,.form-field>select{margin-top:7px}.action-wrap{display:inline-flex;align-items:center;gap:5px}.help-dot{display:inline-grid;place-items:center;width:28px;height:28px;min-height:28px;flex:0 0 28px;padding:0!important;border:1px solid #797186;border-radius:50%;color:#d8c8f2;background:#27222f;font-size:.85rem;font-weight:700;line-height:1;cursor:help}.help-dot:hover{background:#514364}.nav>.action-wrap{display:flex;width:100%}.nav>.action-wrap>button[data-action]{flex:1}.nav .help-dot{color:#c9b5e9;border-color:#655975;background:transparent}.metric .caption-line{justify-content:space-between}.panel-head h2 .caption-line{gap:10px}.table-scroll th .help-dot{width:24px;height:24px;min-height:24px;flex-basis:24px}.caption-line>span{white-space:inherit}#rep-products input[type=number]{width:100px}#rep-products select{min-width:125px}.login-form .form-field{margin:18px 0}#toast{font-size:1rem;line-height:1.8;max-width:min(540px,92vw)}
@media(max-width:700px){.help-dot{width:27px;height:27px;min-height:27px;flex-basis:27px}.nav .action-wrap{min-width:140px;width:auto}.caption-line{gap:5px}.metrics .metric{min-width:0}.metric small{line-height:1.8}}
@media print{.help-dot{display:none!important}}

#explanation{position:fixed;inset:auto 16px 20px;margin:0 auto;width:max-content;max-width:min(540px,calc(100vw - 32px));padding:18px 22px;background:#302638;color:#fff;border:1px solid #b597d1;border-radius:14px;font-size:1rem;line-height:1.9;box-shadow:0 8px 40px #0009;direction:rtl;text-align:right}#explanation::backdrop{background:transparent}@media print{#explanation{display:none!important}}

.login-inline{margin:12px 0 7px;display:block}.login-inline button{font-weight:700}.build-version{display:block;width:100%;font-size:.72rem;margin-top:10px;color:#c4b7d9}.login-inline .help-dot{flex:0 0 26px}

.location-list{display:grid;gap:18px;min-width:0}.location-card{background:#20202a;border:1px solid #46404f;border-radius:16px;padding:20px;min-width:0}.location-head{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}.location-head h3{margin:0 0 7px;font-size:1.2rem}.location-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0}.location-stat{min-width:0}.location-stat small{display:block;margin-bottom:9px}.location-stat strong{display:block;font-size:1.15rem;overflow-wrap:anywhere}.location-actions{border-top:1px solid #443c4d;padding-top:15px;display:flex;flex-wrap:wrap;gap:12px}.location-actions .action-wrap{max-width:100%}.location-actions button{white-space:normal}.location-head>.action-wrap{max-width:100%}@media(max-width:700px){.location-card{padding:16px}.location-stats{grid-template-columns:1fr;gap:14px}.location-stat{display:flex;justify-content:space-between;align-items:center;gap:12px}.location-stat small{margin:0}.location-actions{flex-direction:column;align-items:stretch}.location-actions .action-wrap{display:flex}.location-actions button[data-action]{flex:1}.location-head{align-items:stretch;flex-direction:column}}

/* A single centered sign-in card for every account. */
.login-wrap{display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-height:100vh;min-height:100dvh;padding:32px 20px;background:#111116}
.login-form{width:min(100%,460px);padding:0;background:transparent}
.login-box{width:100%;padding:32px;background:#1b1b23;border:1px solid #383542;border-radius:18px;box-shadow:0 20px 60px #0005}
.login-brand{margin-bottom:20px;text-align:center;color:#eeeef4}
.login-box h2,.login-box>.hint{text-align:center}
.login-box form{margin-top:24px}
.login-box .help-dot{margin-top:0}
.login-box .error:empty{display:none}
@media(max-width:700px){.login-wrap{padding:24px 18px}.login-form{padding:0}.login-box{padding:26px 22px}}