:root{--green:#086b2a;--green-dark:#075522;--green-soft:#e9f2df;--cream:#fffaf0;--peach:#f4cfaf;--ink:#203329;--muted:#77847b;--line:#e6e9e3;--danger:#a63d36;--shadow:0 12px 34px rgba(44,72,51,.12)}
*{box-sizing:border-box}html{background:#edf0ea}body{margin:0;font-family:Tahoma,Arial,sans-serif;color:var(--ink)}button,input,select{font:inherit}a{color:inherit;text-decoration:none}button,a{-webkit-tap-highlight-color:transparent}svg{width:1.25em;height:1.25em;fill:currentColor}.app-body{min-height:100dvh;background:#edf0ea}.app-shell{position:relative;width:100%;max-width:480px;min-height:100dvh;margin:auto;overflow:hidden;background:var(--cream);box-shadow:0 0 40px rgba(25,45,31,.12)}
.app-header{position:fixed;z-index:20;top:0;left:50%;width:100%;max-width:480px;height:88px;padding:calc(12px + env(safe-area-inset-top)) 18px 10px;transform:translateX(-50%);display:grid;grid-template-columns:48px 1fr 44px;gap:11px;align-items:center;background:rgba(255,250,240,.97);border-bottom:1px solid rgba(225,228,218,.9)}.avatar-button,.list-shortcut{width:44px;height:44px;border-radius:15px;display:grid;place-items:center;color:var(--green);background:#fff;box-shadow:0 5px 14px rgba(42,64,48,.08)}.avatar-button{background:var(--peach)}.header-copy{min-width:0;display:flex;flex-direction:column}.header-copy strong{overflow:hidden;color:var(--green-dark);font-size:18px;text-overflow:ellipsis;white-space:nowrap}.header-copy span{color:var(--muted);font-size:10px}.list-shortcut{position:relative}.list-shortcut b,.nav-count{position:absolute;top:-5px;left:-5px;min-width:19px;height:19px;padding:0 5px;border:2px solid var(--cream);border-radius:10px;display:grid;place-items:center;color:#fff;background:#d64545;font-size:9px}
.app-main{min-height:100dvh;padding:108px 18px calc(112px + env(safe-area-inset-bottom))}.section-stack{display:flex;flex-direction:column;gap:18px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:12px}.section-heading h2{margin:0;color:var(--green-dark);font-size:18px}.section-heading span{color:var(--muted);font-size:10px}.messages{display:grid;gap:7px;margin-bottom:14px}.message{padding:11px 14px;border-radius:14px;color:var(--green-dark);background:var(--green-soft);font-size:11px;font-weight:700}.message.error{color:var(--danger);background:#fff0ed}.message.warning{color:#8b5937;background:#fff0e3}
.bottom-nav{position:fixed;z-index:20;left:50%;bottom:calc(10px + env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:456px;height:72px;padding:8px 13px;transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,1fr);border:1px solid rgba(218,224,215,.9);border-radius:24px;background:rgba(255,255,255,.98);box-shadow:0 10px 32px rgba(37,58,42,.14)}.bottom-nav a{position:relative;border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#8a958d}.bottom-nav a.active{color:var(--green);background:var(--green-soft)}.bottom-nav span{font-size:9px;font-weight:700}.bottom-nav svg{width:20px;height:20px}.bottom-nav .nav-count{top:-3px;right:16%;left:auto;border-color:#fff}.bottom-nav a.active .nav-count{border-color:var(--green-soft)}
.primary-button{min-height:54px;padding:0 24px;border:0;border-radius:19px;display:flex;align-items:center;justify-content:center;gap:9px;color:#fff;background:var(--green);font-weight:800;box-shadow:0 9px 18px rgba(8,107,42,.23);cursor:pointer}.wide-button{width:100%}.intro-card{padding:19px 20px;display:flex;flex-direction:column;border-radius:24px;color:var(--green-dark);background:var(--green-soft)}.intro-card span{color:#68806f;font-size:10px}.intro-card strong{font-size:18px}.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.category-card{min-width:0;min-height:151px;padding:8px 7px 11px;border:1px solid var(--line);border-radius:21px;display:flex;flex-direction:column;align-items:center;background:#fff;box-shadow:0 6px 17px rgba(42,68,48,.06)}.category-card img{width:100%;aspect-ratio:1.05;border-radius:16px;object-fit:cover}.category-card strong{width:100%;margin-top:7px;overflow:hidden;color:var(--green-dark);font-size:11px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.category-card span{color:var(--muted);font-size:7px}.list-reminder{padding:14px 16px;border-radius:19px;display:flex;align-items:center;gap:12px;color:#8b5937;background:#fff0e3}.list-reminder>svg{width:24px;height:24px}.list-reminder>span{display:flex;flex-direction:column}.list-reminder strong{font-size:11px}.list-reminder small{font-size:8px}
.back-chip{align-self:flex-start;min-height:40px;padding:0 13px;border-radius:13px;display:flex;align-items:center;color:var(--green);background:var(--green-soft);font-size:10px;font-weight:700}.category-banner{min-height:104px;padding:12px 16px;border-radius:24px;display:flex;align-items:center;gap:15px;color:#fff;background:var(--green)}.category-banner img{width:82px;height:78px;border-radius:18px;object-fit:cover}.category-banner div{display:flex;flex-direction:column}.category-banner span,.category-banner small{opacity:.76;font-size:9px}.category-banner strong{font-size:23px}.product-grid,.admin-product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.product-card{position:relative;min-width:0;padding:9px 9px 13px;border:1px solid var(--line);border-radius:22px;display:flex;flex-direction:column;align-items:stretch;color:var(--ink);background:#fff;text-align:right;box-shadow:0 6px 18px rgba(42,68,48,.06);cursor:pointer}.product-card.selected{border:2px solid var(--green);padding:8px 8px 12px}.product-card>img{width:100%;aspect-ratio:1.18;border-radius:16px;object-fit:cover}.product-card strong{padding:8px 4px 0;color:var(--green-dark);font-size:14px}.product-card>span:last-child{padding:0 4px;color:var(--muted);font-size:8px}.selected-mark{position:absolute;z-index:2;top:15px;right:15px;width:27px;height:27px;border-radius:10px;display:grid;place-items:center;color:#fff;background:var(--green)}
.quantity-dialog{width:min(100% - 22px,440px);padding:0;border:0;border-radius:28px;background:transparent}.quantity-dialog::backdrop{background:rgba(20,30,23,.54)}.dialog-card{position:relative;padding:28px 20px 22px;border-radius:28px;display:flex;flex-direction:column;align-items:center;gap:12px;background:#fff}.dialog-card>img{width:116px;height:116px;border-radius:26px;object-fit:cover}.dialog-card h2{margin:0;color:var(--green-dark)}.dialog-card p{margin:0;color:var(--muted);font-size:11px}.dialog-close{position:absolute;top:14px;left:14px;width:38px;height:38px;border:0;border-radius:13px;color:var(--muted);background:#f1f3ef}.quantity-field{width:100%;min-height:64px;padding:9px 12px;border-radius:20px;display:grid;grid-template-columns:1fr 100px auto;align-items:center;gap:9px;background:#f4f5f1}.quantity-field input{height:44px;border:1px solid var(--line);border-radius:14px;text-align:center}.quantity-field b{color:var(--green-dark)}.dialog-card .primary-button{width:100%}
.summary-card{min-height:112px;padding:20px 22px;display:flex;align-items:center;justify-content:space-between;border-radius:27px;color:#fff;background:var(--green);box-shadow:var(--shadow)}.summary-card>div:first-child{display:flex;flex-direction:column;gap:6px}.summary-card span{opacity:.8;font-size:12px}.summary-card strong{font-size:22px}.summary-count{width:58px;height:58px;border:6px solid rgba(255,255,255,.28);border-top-color:#fff;border-radius:50%;display:grid;place-items:center;font-weight:800}.list-card,.purchased-list,.history-list{overflow:hidden;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:0 8px 25px rgba(47,70,52,.06)}.shopping-row{min-height:88px;padding:10px 12px;border-bottom:1px solid #eef0ec;display:grid;grid-template-columns:58px 1fr auto;gap:10px;align-items:center}.shopping-row:last-child{border-bottom:0}.shopping-row>img{width:58px;height:58px;border-radius:17px;object-fit:cover}.shopping-copy{min-width:0;display:flex;flex-direction:column}.shopping-copy strong{font-size:15px}.shopping-copy span,.shopping-copy small{color:var(--muted);font-size:9px}.check-button{width:34px;height:34px;border:2px solid var(--green);border-radius:11px;display:grid;place-items:center;color:var(--green);background:#fff}.row-actions{grid-column:1/-1}.row-actions summary{cursor:pointer;color:var(--green);font-size:9px;font-weight:700}.row-actions>div{padding-top:8px;display:flex;gap:8px;justify-content:flex-end}.inline-form{display:flex;gap:6px}.inline-form input{width:90px;height:36px;border:1px solid var(--line);border-radius:11px;text-align:center}.inline-form button,.danger-button,.purchased-list button{min-height:36px;padding:0 12px;border:0;border-radius:11px;color:var(--green);background:var(--green-soft);font-weight:700}.danger-button{display:flex;align-items:center;gap:5px;color:var(--danger);background:#fff1ef}.purchased-list article{min-height:50px;padding:8px 13px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;font-size:11px}.purchased-list article:last-child{border-bottom:0}
.empty-card{min-height:280px;padding:32px;border:1px solid var(--line);border-radius:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;background:#fff}.empty-card h2{margin:0;color:var(--green-dark);font-size:19px}.empty-card p{margin:0;color:var(--muted);font-size:11px}.empty-icon{width:58px;height:58px;border-radius:19px;display:grid;place-items:center;color:var(--green);background:var(--green-soft)}.empty-icon svg{width:28px;height:28px}
.admin-welcome{min-height:102px;padding:21px;display:flex;align-items:center;gap:16px;border-radius:27px;color:var(--green);background:var(--green-soft)}.admin-welcome>svg{width:37px;height:37px}.admin-welcome div{display:flex;flex-direction:column}.admin-welcome span{font-size:11px;color:#66826c}.admin-welcome strong{font-size:20px}.admin-menu{display:grid;gap:11px}.admin-menu>a{min-height:77px;padding:13px 16px;border:1px solid var(--line);border-radius:22px;display:grid;grid-template-columns:49px 1fr;align-items:center;gap:13px;background:#fff;box-shadow:0 6px 18px rgba(42,68,48,.05)}.admin-menu>a>span:last-child{display:flex;flex-direction:column}.admin-menu strong{font-size:14px}.admin-menu small{color:var(--muted);font-size:9px}.menu-icon{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;color:var(--green);background:#edf4e5}.safety-note{padding:16px;border-radius:20px;display:flex;flex-direction:column;color:#9b6338;background:#fff1e3}.safety-note strong{font-size:11px}.safety-note span{font-size:9px}
.catalog-tabs{padding:5px;display:grid;grid-template-columns:1fr 1fr;gap:5px;border-radius:19px;background:#edf0ea}.catalog-tabs a{min-height:43px;border-radius:15px;display:flex;align-items:center;justify-content:center;gap:7px;color:var(--muted);font-size:11px;font-weight:800}.catalog-tabs a.active{color:var(--green);background:#fff;box-shadow:0 4px 12px rgba(43,66,48,.08)}.catalog-tabs span{min-width:22px;padding:3px 6px;border-radius:9px;background:var(--green-soft);font-size:8px}.catalog-toolbar{display:grid;grid-template-columns:54px 1fr;gap:11px}.add-square{width:54px;height:54px;border-radius:18px;display:grid;place-items:center;color:#fff;background:var(--green)}.catalog-toolbar select{width:100%;height:54px;padding:0 14px;border:1px solid var(--line);border-radius:18px;background:#fff}.admin-category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.admin-category-card,.admin-product-card{position:relative;overflow:hidden;padding:9px;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:0 6px 18px rgba(42,68,48,.06)}.admin-category-card>img,.admin-product-card>img{width:100%;aspect-ratio:1.2;border-radius:16px;object-fit:cover}.inactive img{filter:grayscale(.8);opacity:.55}.admin-category-card>div,.admin-product-card>div{padding:8px 3px;display:flex;flex-direction:column}.admin-category-card strong,.admin-product-card strong{color:var(--green-dark);font-size:12px}.admin-category-card span,.admin-product-card span{color:var(--muted);font-size:8px}.admin-category-card nav{display:grid;grid-template-columns:1fr 1fr;gap:6px}.admin-category-card nav a{min-height:34px;padding:0 5px;border-radius:11px;display:flex;align-items:center;justify-content:center;gap:4px;color:var(--green);background:var(--green-soft);font-size:8px;font-weight:800}.admin-category-card nav a:last-child{color:#fff;background:var(--green)}.admin-product-card>a{position:absolute;left:14px;bottom:14px;width:31px;height:31px;border-radius:11px;display:grid;place-items:center;color:var(--green);background:var(--green-soft)}
.form-card{overflow:hidden;border:1px solid var(--line);border-radius:27px;background:#fff;box-shadow:var(--shadow)}.form-intro{padding:20px;background:var(--green-soft)}.form-intro h2{margin:0;color:var(--green-dark);font-size:20px}.form-intro p{margin:4px 0 0;color:var(--muted);font-size:9px}.admin-form{padding:18px;display:flex;flex-direction:column;gap:14px}.current-image{width:112px;height:112px;margin:auto;border-radius:25px;object-fit:cover}.form-field{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:10px;font-weight:700}.form-field input:not([type=checkbox]):not([type=file]),.form-field select{width:100%;height:49px;padding:0 13px;border:1px solid var(--line);border-radius:15px;outline-color:var(--green);background:#fff}.form-field:has(input[type=file]){position:relative;min-height:70px;padding:12px 14px;border:1px dashed #b8c8b6;border-radius:15px;justify-content:flex-start;background:var(--green-soft);cursor:pointer}.form-field:has(input[type=file])::after{content:"اختار الصورة من الهاتف";align-self:center;margin-top:5px;color:var(--green);font-size:11px;font-weight:800}.form-field input[type=file]{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0}.form-field input[type=checkbox]{width:46px;height:25px;accent-color:var(--green)}.form-field small{font-size:8px;font-weight:400}.form-field b,.form-errors{color:var(--danger);font-size:9px}.form-errors ul{margin:0;padding:0;list-style:none}
.account-list{display:grid;gap:11px}.account-card{min-height:104px;padding:17px;border:1px solid var(--line);border-radius:25px;display:grid;grid-template-columns:60px 1fr auto;gap:13px;align-items:center;background:#fff}.account-avatar,.big-avatar{display:grid;place-items:center;font-weight:800}.account-avatar{width:58px;height:58px;border-radius:21px;color:#8b5535;background:var(--peach);font-size:21px}.account-card>div:nth-child(2){display:flex;flex-direction:column}.account-card strong{font-size:15px}.account-card span,.account-card small{color:var(--muted);font-size:9px}.account-card>a{min-height:36px;padding:0 10px;border-radius:11px;display:flex;align-items:center;gap:4px;color:var(--green);background:var(--green-soft);font-size:9px;font-weight:700}.profile-hero{padding:28px 20px;border-radius:28px;display:flex;flex-direction:column;align-items:center;background:var(--green-soft)}.big-avatar{width:82px;height:82px;margin-bottom:12px;border-radius:25px;color:#fff;background:var(--green);font-size:31px}.profile-hero h2{margin:0;color:var(--green-dark)}.profile-hero span{color:var(--muted);font-size:10px}.profile-details{overflow:hidden;border:1px solid var(--line);border-radius:22px;background:#fff}.profile-details>div{min-height:59px;padding:14px 17px;border-bottom:1px solid #eef0ec;display:flex;align-items:center;justify-content:space-between}.profile-details>div:last-child{border:0}.profile-details span{color:var(--muted);font-size:10px}.profile-details strong{font-size:11px}.logout-button{width:100%;min-height:56px;border:1px solid #efd1cd;border-radius:18px;color:var(--danger);background:#fff8f7;font-weight:800}
.history-summary{min-height:126px;padding:20px;border-radius:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--green);background:var(--peach)}.history-summary strong{font-size:42px}.history-summary span{font-size:11px}.history-list article{min-height:76px;padding:12px 14px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:36px 1fr auto;gap:10px;align-items:center}.history-list article:last-child{border:0}.history-check{width:35px;height:35px;border-radius:13px;display:grid;place-items:center;color:#fff;background:var(--green)}.history-list article>div{display:flex;flex-direction:column}.history-list strong{font-size:12px}.history-list span,.history-list time{color:var(--muted);font-size:8px}
.login-body{min-height:100dvh;background:#eff3d4}.login-page{min-height:100dvh;max-width:480px;margin:auto;background:#eff3d4}.login-hero{position:relative;height:51dvh;min-height:350px;overflow:hidden}.login-hero img{width:100%;height:100%;object-fit:cover;object-position:center 42%}.login-hero h1{position:absolute;top:50px;left:0;right:0;margin:0;color:#076121;text-align:center;font-size:44px;font-weight:800;text-shadow:0 2px 8px rgba(255,255,255,.65)}.login-sheet{position:relative;z-index:2;min-height:49dvh;margin-top:-32px;padding:42px 18px calc(28px + env(safe-area-inset-bottom));border-radius:32px 32px 0 0;background:#fff;box-shadow:0 -10px 36px rgba(33,59,41,.1)}.login-sheet h2{margin:0 0 28px;color:var(--green);text-align:center;font-size:38px}.login-form{display:flex;flex-direction:column;gap:16px}.login-form label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:10px}.login-form input{height:64px;padding:0 20px;border:1px solid #dfe3dd;border-radius:20px;outline-color:var(--green);background:#fbfbfa;font-size:20px;font-weight:700}.login-button{height:68px;margin-top:12px;font-size:28px}.form-alert{padding:10px;border-radius:13px;color:var(--danger);background:#fff0ed;text-align:center;font-size:11px}
@media(min-width:760px){.app-shell{max-width:980px}.app-header{max-width:980px}.app-main{padding-left:34px;padding-right:34px}.bottom-nav{max-width:680px}.category-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.product-grid,.admin-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-menu,.account-list{grid-template-columns:repeat(2,1fr)}}
