@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap");
:root{font-family:"Tajawal","Segoe UI",Tahoma,Arial,sans-serif;color:#17263c;background:#f3f6fb;font-size:14px;--blue:#2458db;--muted:#687991;--line:#e0e7f0}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:10px;padding:11px 16px;background:var(--blue);color:white;font-weight:700;transition:background .15s}button:hover{filter:brightness(.94)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #8eb5ff;outline-offset:2px}button.secondary{background:#edf2fc;color:#244b9c}button.danger{background:#fff0f0;color:#b62c3d}small{color:var(--muted);display:block;line-height:1.7}h1,h2,h3,p{margin:0}h1{font-size:24px}h2{font-size:21px}h3{font-size:16px}p{line-height:1.8;color:var(--muted)}[hidden]{display:none!important}.sidebar{position:fixed;right:0;top:0;bottom:0;width:245px;background:#111f37;color:white;padding:25px 17px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;direction:ltr;justify-content:flex-end;margin-bottom:45px}.brand b{font-size:19px;letter-spacing:1px}.brand small{color:#91a6c8;letter-spacing:2px;font-size:10px}.logo{display:grid;place-items:center;background:#3267ef;color:white;border-radius:14px;width:46px;height:46px;font-size:25px;font-weight:bold}.nav-label{color:#91a6c8;font-size:12px;padding:0 12px 12px}nav{display:grid;gap:7px}nav button,.sidebar-bottom button{background:transparent;color:#c0cce0;text-align:right;display:flex;align-items:center;gap:12px;width:100%;padding:13px}nav button span{font-size:20px;width:24px;text-align:center}nav button.active{background:#2856c6;color:white}.sidebar-bottom{margin-top:auto;border-top:1px solid #30415b;padding-top:16px}.sidebar-bottom small{color:#91a6c8;padding:8px}.workspace{margin-right:245px;min-height:100vh}.topbar{background:white;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:20px 32px;gap:12px}.topbar h1{margin-top:4px}.admin{display:flex;align-items:center;gap:10px}.avatar{display:grid;place-items:center;background:#e9efff;color:#2458db;width:40px;height:40px;border-radius:50%;font-weight:bold}.content{max-width:1450px;margin:auto;padding:25px 32px}.mode,.notice{display:flex;gap:12px;align-items:center;background:#edf3ff;border:1px solid #d9e5ff;border-radius:12px;padding:12px 16px;margin-bottom:20px;color:#244b9c}.mode>span{font-size:23px}.mode small{color:#526a94}.notice{background:#fff3e2;color:#925516}.hero{display:flex;justify-content:space-between;align-items:center;overflow:hidden;background:linear-gradient(120deg,#132b58,#2458db);color:white;border-radius:18px;padding:30px;margin-bottom:22px;min-height:185px}.hero small,.hero p{color:#d2e1ff}.hero h2{font-size:27px;margin:10px 0}.hero button{margin-top:18px;background:white;color:#244b9c}.hero-art{font-size:125px;color:#ffffff30;line-height:1;padding:0 25px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:22px}article{background:white;border:1px solid var(--line);border-radius:15px;padding:20px;box-shadow:0 3px 12px #17263c05}.metric{display:grid;gap:9px}.metric strong{font-size:30px}.metric-icon,.device-icon{display:grid;place-items:center;width:42px;height:42px;background:#eaf0ff;color:#2458db;border-radius:12px;font-size:23px}.quick{display:grid;grid-template-columns:1.3fr 1fr;gap:16px}.quick h3{margin-bottom:14px}.quick button{display:block;width:100%;margin-top:8px;text-align:right}.logrow{display:flex;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--line);align-items:center}.logrow:last-child{border:0}.logrow bdi{color:var(--muted);font-size:13px}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.toolbar{display:flex;gap:12px;margin-bottom:18px}.toolbar input{flex:1;min-width:0}.toolbar select{width:155px}input,select,textarea{border:1px solid #ccd7e6;border-radius:9px;background:white;color:#17263c;padding:12px;width:100%}textarea{min-height:85px;resize:vertical}.device-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.device-head{display:flex;gap:10px;align-items:center}.device-head>div{flex:1;min-width:0;overflow-wrap:anywhere}.state{font-size:11px;background:#eef1f5;color:#526174;border-radius:20px;padding:6px 9px;white-space:nowrap}.state.on{background:#e5f5ee;color:#16724c}.details{display:grid;grid-template-columns:1fr 1fr;gap:10px;background:#f6f8fc;border-radius:10px;padding:14px;margin:18px 0}.details bdi{font-weight:bold;display:block;margin-top:5px}.networks{min-height:65px}.chip{display:inline-block;background:#eef2f9;border-radius:7px;padding:6px 8px;margin:5px 0 0 5px;font-size:12px}.device-foot,.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.device-foot button{font-size:12px;padding:10px}.empty{padding:35px;text-align:center;color:var(--muted);background:white;border:1px dashed var(--line);border-radius:12px;grid-column:1/-1}.profile{max-width:620px}.profile h2,.profile p{margin:14px 0}dialog{border:1px solid var(--line);border-radius:18px;padding:26px;width:min(560px,calc(100% - 28px));max-height:90vh;overflow:auto;color:#17263c;box-shadow:0 20px 80px #10213e40}dialog::backdrop{background:#0d1c38aa}dialog h2{margin-bottom:20px}label{display:block;font-weight:700;margin:12px 0}label input,label textarea{margin-top:7px}input[type=checkbox]{width:auto;margin-left:8px}#msg{color:#b62c3d;overflow-wrap:anywhere}pre{direction:ltr;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;background:#111f37;color:#e0eaff;padding:15px;border-radius:10px;font-size:12px}.login-body{background:#eef3fb;min-height:100vh;display:grid;place-items:center;padding:25px}.login-layout{width:min(100%,960px);display:grid;grid-template-columns:1fr 1fr;min-height:530px;background:white;border-radius:24px;overflow:hidden;box-shadow:0 20px 70px #142c5520}.login-brand{background:linear-gradient(145deg,#111f37,#2458db);color:white;padding:55px 40px;display:flex;flex-direction:column;justify-content:center;gap:20px}.login-brand h1{font-size:40px;line-height:1.5}.login-brand p,.login-brand small{color:#d4e3ff}.login-panel{display:grid;place-items:center;padding:40px}.login-form{width:100%;max-width:350px}.login-form h2{font-size:28px;margin:18px 0 8px}.login-form button{width:100%;margin:18px 0}.login-error:empty{display:none}.login-error{color:#b62c3d;background:#fff0f0;padding:10px;border-radius:8px;margin-top:15px}.login-form input{margin-top:4px}@media(max-width:1050px){.stats{grid-template-columns:repeat(2,1fr)}.device-grid{grid-template-columns:1fr}}@media(max-width:700px){.sidebar{position:static;width:auto;padding:12px;gap:8px}.brand{margin:0;justify-content:flex-end}.nav-label{display:none}nav{grid-template-columns:repeat(2,1fr);gap:5px}nav button{font-size:12px;padding:8px}.sidebar-bottom{margin:0;padding:0;border:0;display:flex;justify-content:space-between;align-items:center}.sidebar-bottom button{width:auto;padding:7px}.workspace{margin:0}.topbar{padding:15px}.topbar h1{font-size:20px}.admin div{display:none}.content{padding:15px}.hero{padding:20px}.hero h2{font-size:22px}.hero-art{display:none}.stats{gap:9px}.metric{padding:14px}.quick{grid-template-columns:1fr}.toolbar{flex-wrap:wrap}.toolbar select{width:100%}.toolbar input{flex-basis:100%}.login-layout{grid-template-columns:1fr;min-height:0}.login-brand{padding:25px;gap:10px}.login-brand h1{font-size:25px}.login-panel{padding:25px}.login-body{padding:12px}.logrow{flex-wrap:wrap}}

/* V1.2 compact Arabic interface */
:root{font-size:14px}body{line-height:1.55}h1{font-size:20px}h2{font-size:18px}h3{font-size:15px}small{font-size:12px;line-height:1.55}button{padding:8px 12px;border-radius:8px;font-weight:700;min-height:36px}input,select,textarea{padding:8px 11px;border-radius:8px;min-height:38px}textarea{min-height:64px}.sidebar{width:210px;padding:18px 12px}.workspace{margin-right:210px}.brand{margin-bottom:25px;gap:9px}.brand b{font-size:16px}.logo{width:36px;height:36px;font-size:20px;border-radius:10px;flex-shrink:0}.nav-label{padding-bottom:8px}nav{gap:4px}nav button,.sidebar-bottom button{padding:9px 10px;gap:9px}nav button span{font-size:17px;width:20px}.sidebar-bottom{padding-top:10px}.topbar{padding:11px 22px}.avatar{width:32px;height:32px}.content{max-width:1250px;padding:18px 22px}.mode,.notice{padding:8px 12px;margin-bottom:12px;border-radius:9px;gap:9px}.mode>span{font-size:18px}.hero{min-height:0;padding:16px 20px;margin-bottom:14px;border-radius:12px}.hero h2{font-size:21px;margin:4px 0}.hero button{margin-top:10px}.hero-art{font-size:76px;padding:0 12px}.stats{gap:10px;margin-bottom:14px}article{padding:14px;border-radius:11px}.metric{grid-template-columns:36px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;row-gap:2px;align-items:center;min-height:78px}.metric .metric-icon{grid-row:1/3}.metric small{align-self:end}.metric strong{font-size:23px;line-height:1.2;align-self:start}.metric-icon,.device-icon{width:34px;height:34px;font-size:19px;border-radius:9px;flex-shrink:0}.quick{gap:12px}.quick h3{margin-bottom:8px}.quick button{margin-top:6px}.logrow{padding:9px 0}.section-head,.toolbar{margin-bottom:12px}.toolbar{gap:8px}.device-grid{gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr))}.device{max-width:560px;width:100%}.details{padding:9px 11px;margin:11px 0;gap:8px}.details bdi{margin-top:2px}.networks{min-height:0}.chip{padding:3px 7px;margin-top:4px}.device-foot,.actions{margin-top:12px;gap:6px}.device-foot button{padding:7px 10px;min-height:34px;font-size:12px}.state{padding:4px 7px}.profile{max-width:480px}.profile h2,.profile p{margin:8px 0}.empty{padding:22px}dialog{width:min(480px,calc(100% - 24px));padding:19px;border-radius:13px}dialog h2{margin-bottom:12px}label{margin:9px 0}label input,label textarea{margin-top:4px}pre{padding:11px}.login-body{padding:20px}.login-layout{width:min(100%,780px);min-height:390px;border-radius:17px}.login-brand{padding:30px;gap:12px}.login-brand h1{font-size:29px;line-height:1.45}.login-panel{padding:28px}.login-form{max-width:300px}.login-form h2{font-size:23px;margin:10px 0 4px}.login-form button{margin:12px 0}.login-error{padding:8px;margin-top:10px}.login-form input{margin-top:3px}
@media(max-width:1050px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.sidebar{width:auto;padding:10px;gap:6px}.workspace{margin:0}.brand{margin:0}.topbar{padding:10px 12px}.topbar h1{font-size:18px}.content{padding:12px}.hero{padding:14px}.hero h2{font-size:19px}.stats{gap:8px}.metric{padding:10px;min-height:70px;grid-template-columns:30px minmax(0,1fr);column-gap:7px}.metric .metric-icon{width:30px;height:30px}.metric strong{font-size:21px}.login-layout{width:min(100%,420px);min-height:0}.login-brand{padding:20px;gap:8px}.login-brand h1{font-size:23px}.login-panel{padding:22px}.login-body{padding:12px}.device{max-width:none}.toolbar select{width:100%}}
