*{box-sizing:border-box}
:root{--ink:#0F172A;--muted:#4B5675;--slate:#2C3E50;--slate2:#3A5068;--green:#41B783;--green-d:#1F7A52;--green-l:#E2F4EA;--line:#E3E8F2;--bg:#F6F8FC;--red:#B3121D}
body{margin:0;font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;color:var(--ink);background:var(--bg);line-height:1.6}
[hidden]{display:none!important}
button,input,select,textarea{font-family:inherit;font-size:15px}
a{color:var(--green-d)}
.brand{display:flex;align-items:center;gap:12px}
.brand .logo{width:44px;height:44px;border-radius:12px;background:#0B1117;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.brand .logo img{width:34px}
.brand b{display:block;font-size:17px}
.brand small{color:#C5D2E0;font-size:12px}
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--slate);padding:20px}
.login-card{background:#fff;border-radius:20px;padding:32px;width:100%;max-width:380px;display:flex;flex-direction:column;gap:18px;box-shadow:0 30px 60px rgba(0,0,0,.25)}
.login-card .brand small{color:var(--muted)}
label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600}
input,select,textarea{border:1px solid #CBD3E1;border-radius:10px;padding:10px 12px;min-height:42px;background:#fff;color:var(--ink);width:100%}
textarea{min-height:84px;resize:vertical;line-height:1.7}
input:focus,select:focus,textarea:focus{outline:2px solid var(--green);outline-offset:1px;border-color:var(--green)}
input[dir=ltr],textarea[dir=ltr]{text-align:left}
.btn{border:0;border-radius:12px;padding:10px 18px;min-height:44px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn.primary{background:var(--green);color:#0B1117}
.btn.primary:disabled{background:#B9DCC9;color:#4B5675;cursor:not-allowed}
.btn.ghost{background:#fff;border:1px solid #CBD3E1;color:var(--slate)}
.btn.ghost:disabled{opacity:.5;cursor:not-allowed}
.btn.danger{background:#fff;border:1px solid #F1C4C7;color:var(--red)}
.btn.small{min-height:36px;padding:6px 12px;font-size:14px}
.link{background:none;border:0;color:inherit;cursor:pointer;padding:6px 0;text-decoration:underline}
.err{color:var(--red);font-weight:600;margin:0;min-height:1em}
.muted{color:var(--muted);margin:0;font-size:14px}
.shell{display:flex;min-height:100vh}
.side{width:250px;flex-shrink:0;background:var(--slate);color:#fff;padding:22px 16px;display:flex;flex-direction:column;gap:26px;position:sticky;top:0;height:100vh}
.side nav{display:flex;flex-direction:column;gap:6px}
.side nav button{background:none;border:0;color:#DCE4EE;text-align:start;padding:12px 14px;border-radius:12px;cursor:pointer;font-weight:600;font-size:15px}
.side nav button:hover{background:var(--slate2)}
.side nav button.on{background:var(--green);color:#0B1117}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;font-size:14px}
.side-foot a{color:#9BE7C4}
.side-foot .link{color:#C5D2E0;text-align:start}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.bar{position:sticky;top:0;z-index:5;background:#fff;border-bottom:1px solid var(--line);padding:16px 28px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.bar h1{margin:0;font-size:22px}
.bar-actions{display:flex;gap:10px;flex-wrap:wrap}
#dirty.on{color:#B45309;font-weight:700}
.view{padding:24px 28px 80px;display:flex;flex-direction:column;gap:18px;max-width:1200px}
.errors{margin:16px 28px 0;background:#FDECEC;border:1px solid #F1C4C7;color:var(--red);border-radius:12px;padding:14px 18px}
.errors ul{margin:6px 0 0;padding-inline-start:20px}
.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px;display:flex;flex-direction:column;gap:14px}
.card h2{margin:0;font-size:18px}
.card h3{margin:0;font-size:16px}
.row{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.grow{flex:1 1 auto}
.pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.pair .lang{font-size:12px;font-weight:700;color:var(--muted);margin-bottom:-2px}
.field{display:flex;flex-direction:column;gap:6px}
.field>.lbl{font-size:14px;font-weight:700}
.list{display:flex;flex-direction:column;gap:10px}
.item{border:1px dashed #CBD3E1;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:10px;background:#FAFBFD}
.item-head{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;font-weight:700;color:var(--muted)}
.svc-row{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff}
.svc-row .ic{width:44px;height:44px;border-radius:12px;background:var(--green-l);color:var(--green-d);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.svc-row .nm{flex:1;min-width:0}
.svc-row .nm b{display:block}
.svc-row .nm small{color:var(--muted)}
.svc-row .acts{display:flex;gap:6px;flex-wrap:wrap}
.chip{display:inline-block;background:var(--green-l);color:var(--green-d);border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700}
.imgs{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.img-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff;display:flex;flex-direction:column}
.img-card img{width:100%;aspect-ratio:800/520;object-fit:cover;background:#EEF2F7;display:block}
.img-card .body{padding:10px;display:flex;flex-direction:column;gap:8px}
.icon-btn{width:52px;height:52px;border-radius:12px;border:1px solid #CBD3E1;background:var(--green-l);color:var(--green-d);display:flex;align-items:center;justify-content:center;cursor:pointer}
dialog{border:0;border-radius:18px;padding:18px;max-width:560px;width:92vw}
dialog::backdrop{background:rgba(11,17,23,.55)}
.dlg-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:8px}
.icon-grid button{height:56px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--slate);cursor:pointer;display:flex;align-items:center;justify-content:center}
.icon-grid button:hover{background:var(--green-l);color:var(--green-d)}
.stars{display:flex;gap:2px}
.stars button{background:none;border:0;font-size:24px;cursor:pointer;color:#D6DCE5;padding:0 2px;line-height:1}
.stars button.on{color:#E0A82E}
.switch{display:inline-flex;align-items:center;gap:10px;cursor:pointer;font-weight:700}
.switch input{width:46px;height:26px;min-height:0;appearance:none;background:#CBD3E1;border-radius:999px;position:relative;cursor:pointer;border:0;padding:0;flex-shrink:0}
.switch input::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:.2s}
.switch input:checked{background:var(--green)}
[dir=rtl] .switch input:checked::after{inset-inline-start:23px}
.switch input:checked::after{inset-inline-start:23px}
details.sec{background:#fff;border:1px solid var(--line);border-radius:16px}
details.sec>summary{cursor:pointer;padding:16px 20px;font-weight:700;font-size:16px;list-style:none;display:flex;justify-content:space-between}
details.sec>summary::after{content:"+";color:var(--green-d);font-size:20px}
details.sec[open]>summary::after{content:"−"}
details.sec>.inner{padding:0 20px 20px;display:flex;flex-direction:column;gap:14px}
.toast{position:fixed;bottom:22px;inset-inline-start:50%;transform:translateX(50%);background:var(--slate);color:#fff;padding:12px 20px;border-radius:12px;font-weight:600;opacity:0;pointer-events:none;transition:opacity .25s;z-index:50;max-width:90vw}
[dir=rtl] .toast{transform:translateX(50%)}
.toast.show{opacity:1}
.toast.ok{background:var(--green-d)}
.toast.bad{background:var(--red)}
.backup-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}
@media (max-width:860px){
  .shell{flex-direction:column}
  .side{width:auto;height:auto;position:static;padding:14px}
  .side nav{flex-direction:row;overflow-x:auto}
  .side nav button{white-space:nowrap}
  .side-foot{flex-direction:row;justify-content:space-between}
  .pair{grid-template-columns:1fr}
  .view{padding:16px}
  .bar{padding:12px 16px}
}
