:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#e9edf8;background:#0b101b;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}.hidden{display:none!important}.accent{color:#6f9aff}.brand-mark{display:grid;place-items:center;background:linear-gradient(140deg,#4589ff,#9059fd);font-weight:900;border-radius:13px;width:41px;height:41px;font-size:25px;color:white;box-shadow:0 6px 30px #406fff44}.kicker,.eyebrow{letter-spacing:2.1px;font-size:11px;font-weight:750;color:#8b9cff}.sign-in{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse 45% 45% at 52% 12%,#23345b 0%,transparent 100%),#0b101b}.login-card{width:min(430px,100%);padding:40px;background:#131b2a;border:1px solid #28344c;border-radius:19px;box-shadow:0 25px 80px #0005}.login-card .brand-mark{margin-bottom:30px}.login-card h1{font-size:30px;letter-spacing:-1px;margin:10px 0}.login-card p,.modal-note{color:#93a1b9;font-size:14px;line-height:1.7}.login-card label,dialog label{display:block;font-size:13px;font-weight:600;margin:23px 0 9px}.login-card input,.form-grid input,dialog input,dialog textarea{width:100%;display:block;background:#0c1321;color:#e6ecf8;border:1px solid #334259;border-radius:9px;padding:13px;outline:none;margin-top:8px}.login-card input:focus,dialog input:focus,dialog textarea:focus{border-color:#7093ff}.primary{background:#507bff;color:#fff;border:0;border-radius:9px;padding:12px 20px;font-weight:650}.primary:hover{background:#6990ff}.login-card .primary{width:100%;margin-top:19px;display:flex;justify-content:space-between}.login-card small{display:block;margin-top:27px;color:#7d8b9e;font-size:11px;text-align:center}.error{color:#ff8796;font-size:12px;margin-top:12px;min-height:14px}.app{display:flex;min-height:100vh}.sidebar{width:240px;flex:none;background:#101725;border-right:1px solid #263248;display:flex;flex-direction:column;padding:25px 15px}.brand{display:flex;gap:12px;align-items:center;padding:0 12px;margin-bottom:44px}.brand strong{font-size:24px;letter-spacing:-1px}.brand small{font-size:9px;letter-spacing:2px;color:#7b8eaa;display:block}.side-section{font-size:10px;letter-spacing:1.8px;color:#677895;padding:12px 16px;margin-bottom:10px}.nav{border:0;background:transparent;color:#99a8c1;text-align:left;border-radius:10px;font-weight:550;padding:13px 15px;margin:3px 0;display:flex;gap:14px;align-items:center}.nav-ico{font-size:19px;width:20px;text-align:center}.nav:hover,.nav.active{background:#23365c;color:#fff}.nav.active{box-shadow:inset 3px 0 #7195ff}.side-bottom{margin-top:auto;padding:15px 10px}.secure-pill{color:#5fdbad;background:#122d29;border:1px solid #205145;padding:13px;border-radius:9px;font-size:12px;margin-bottom:18px}.logout{background:none;border:0;color:#8da0ba;padding:9px}.main{flex:1;min-width:0}.topbar{height:80px;border-bottom:1px solid #273248;display:flex;align-items:center;justify-content:space-between;padding:0 42px}.breadcrumbs{font-size:13px;color:#8492ab}.breadcrumbs span{padding:0 10px;color:#53617e}.breadcrumbs b{color:#dbe5fc}.account{display:flex;gap:14px;align-items:center;color:#9caac2;font-size:12px}.status-dot{height:8px;width:8px;background:#40c996;border-radius:50%}.avatar{background:#284065;border-radius:50%;color:#a6c4ff;padding:10px 13px;font-weight:700}.view{padding:43px;max-width:1500px;margin:auto}.hero{background:radial-gradient(ellipse at 95% 25%,#263a65,transparent 60%),#162039;border:1px solid #30405d;border-radius:17px;display:flex;justify-content:space-between;align-items:center;gap:30px;padding:40px;margin-bottom:24px}.hero h1{font-size:clamp(27px,3vw,42px);letter-spacing:-1.5px;margin:12px 0 8px}.gradient{background:linear-gradient(100deg,#92afff,#aa87ff);-webkit-background-clip:text;background-clip:text;color:transparent}.hero p,.section-heading p,.panel-heading p{color:#94a2b9;font-size:14px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:37px}.stat-card,.panel,.host-card{background:#141c2b;border:1px solid #29364c;border-radius:13px;padding:24px}.stat-label{display:flex;justify-content:space-between;color:#99a8c0;font-size:13px}.stat-label span{font-size:19px;color:#7c96c3}.stat-value{font-size:30px;font-weight:750;letter-spacing:-1px;margin:22px 0 8px}.stat-value.success{font-size:25px;color:#75dda7}.stat-card small{font-size:12px;color:#71839f}.panel-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:25px;margin-bottom:22px}.panel-heading h2,.section-heading h1{margin:0;font-size:23px}.section-heading{margin-bottom:28px}.section-heading h1{font-size:31px;margin:8px 0 3px}.outline,.small-button,.upload-button{border:1px solid #405472;background:#17243a;color:#d9e5ff;border-radius:9px;padding:10px 16px}.outline:hover,.small-button:hover,.upload-button:hover{background:#263955}.host-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}.host-card h3{font-size:16px;margin:15px 0 5px}.host-card .host-ip{color:#8c9bb3;font-size:13px;overflow-wrap:anywhere}.host-card .server-symbol{width:44px;height:44px;background:#1e3357;display:grid;place-items:center;border-radius:12px;font-size:22px}.host-actions{display:flex;gap:9px;margin-top:21px}.host-actions button{flex:1;font-size:12px}.danger{color:#fd8c9e!important}.empty{padding:46px 20px;text-align:center;color:#7889a5;font-size:14px}.host-select{background:#19263b;color:#e1e8fa;border:1px solid #364967;padding:11px;max-width:300px;border-radius:9px}.terminal-window{background:#080c14;border:1px solid #2e3b50;border-radius:13px;overflow:hidden}.terminal-header{background:#1b2535;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 18px;font-size:12px;color:#a4b4ce}.terminal-header>div:last-child{display:flex;gap:7px;align-items:center}.terminal-status{color:#ffbc83;margin-right:9px}.terminal-status.connected{color:#5dda9c}.lights{display:flex;gap:6px}.lights i{width:9px;height:9px;background:#fa6984;border-radius:50%}.lights i:nth-child(2){background:#ffbf5c}.lights i:nth-child(3){background:#43c998}.small-button{padding:6px 9px;font-size:11px}#terminalDisplay{height:min(62vh,650px);min-height:300px;padding:15px}.file-toolbar{display:flex;gap:11px;flex-wrap:wrap;margin-bottom:12px}.file-toolbar input{flex:1;min-width:180px;background:#0c1424;border:1px solid #33425c;color:white;border-radius:8px;padding:10px}.upload-button{display:grid;place-items:center}.file-row,.audit-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 10px;border-bottom:1px solid #263247;color:#cbd7e9;font-size:13px}.file-row:last-child,.audit-row:last-child{border-bottom:0}.file-row .name{flex:1;min-width:0;overflow-wrap:anywhere}.file-row button{font-size:12px}.file-ico{font-size:20px}.muted{color:#8090a9}.toast{position:fixed;bottom:25px;right:25px;border:1px solid #456491;background:#203250;padding:16px 22px;color:#e7efff;border-radius:12px;box-shadow:0 15px 50px #0008;max-width:380px;z-index:9}dialog{background:#141d2f;color:#e8f1fe;border:1px solid #3b4d6b;border-radius:16px;padding:25px;width:min(620px,95vw);box-shadow:0 20px 100px #000b}dialog::backdrop{background:#020810cc}.modal-head{display:flex;justify-content:space-between;align-items:start}.modal-head h2{margin:8px 0}.icon-button{background:none;border:none;color:#aebed5;font-size:27px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.modal-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:21px}dialog textarea{resize:vertical}.panel{min-height:180px}.audit-row{justify-content:flex-start}.audit-row time{margin-left:auto}.tag{border:1px solid #355d4a;border-radius:40px;color:#69d4a4;padding:4px 8px;font-size:10px}@media(max-width:820px){.sidebar{width:70px;padding:15px 7px}.brand{padding:0;justify-content:center}.brand>div:last-child,.side-section,.nav{font-size:0}.nav{justify-content:center;padding:13px 3px}.nav-ico{font-size:21px}.secure-pill{font-size:0;padding:10px}.logout{font-size:0}.topbar{padding:0 20px}.view{padding:24px 16px}.stats{grid-template-columns:1fr}.hero{padding:24px;flex-direction:column;align-items:start}.form-grid{grid-template-columns:1fr}.account{font-size:0}}

/* Hand v0.2: SSH onboarding, status overview and contextual quick actions */
.heading-actions{display:flex;align-items:center;gap:11px;flex-wrap:wrap}
#overview .stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.status-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.status-panel{margin-bottom:20px}
.status-list{display:grid;gap:11px}
.status-host{border:1px solid #2d3c56;background:#111a29;border-radius:11px;padding:16px;display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}
.status-host-main{display:flex;align-items:center;gap:12px;min-width:180px;flex:1}
.status-host-symbol{width:42px;height:42px;border:1px solid #344763;background:#20304a;border-radius:11px;display:grid;place-items:center;color:#9fbafc;font-size:19px}
.status-host-name{font-weight:650;font-size:14px;margin-bottom:5px;overflow-wrap:anywhere}
.status-host-address{color:#8699b3;font-size:12px;overflow-wrap:anywhere}
.status-host-meta{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.status-host-actions{display:flex;gap:8px;align-items:center}
.host-health{display:inline-flex;gap:7px;align-items:center;padding:5px 9px;border:1px solid #36425a;border-radius:25px;color:#aebed2;font-size:11px;font-weight:650;white-space:nowrap}
.host-health:before{content:"";display:block;width:7px;height:7px;background:#8293af;border-radius:50%}
.host-health.online{color:#75e2b6;border-color:#275443;background:#133129}
.host-health.online:before{background:#3bd49b}
.host-health.offline,.host-health.error{color:#ffad9d;border-color:#613d46;background:#38202b}
.host-health.offline:before,.host-health.error:before{background:#f18b78}
.host-health.auth_error,.host-health.key_mismatch{color:#f5cf85;border-color:#735530;background:#3a2b1c}
.host-health.auth_error:before,.host-health.key_mismatch:before{background:#e8bd6b}
.status-subinfo{color:#8c9db8;font-size:12px}
#statusMetrics{white-space:pre-wrap;overflow:auto;margin:0;border-radius:10px;padding:15px;background:#0b1220;border:1px solid #2b3b54;color:#d2e3f8;min-height:90px;line-height:1.6;font-size:12px}
.host-card .host-health{margin-top:12px}
#refreshStatus:disabled{opacity:.6}
#statusCheckedAt{font-size:12px}
.ssh-guide{margin:15px 0 22px;border:1px solid #34496e;background:#101b30;border-radius:12px}
.ssh-guide>summary{display:flex;align-items:center;gap:12px;padding:16px;cursor:pointer;list-style:none;color:#dce8ff}
.ssh-guide>summary::-webkit-details-marker{display:none}
.guide-summary-icon{width:30px;height:30px;display:grid;place-items:center;background:#294572;color:#b6d4ff;font-weight:700;border-radius:9px;flex:none}
.ssh-guide>summary strong{font-size:14px}
.ssh-guide>summary small{display:block;margin-top:3px;color:#98a9c2;font-size:11px;line-height:1.5}
.guide-chevron{margin-left:auto;color:#97b5e6;font-size:20px}
.ssh-guide[open] .guide-chevron{transform:rotate(180deg)}
.guide-content{padding:0 15px 17px}
.guide-warning{padding:12px;border-radius:9px;background:#352c21;border:1px solid #6a5232;font-size:12px;line-height:1.7;color:#f1d2a6;margin-bottom:13px}
.guide-tabs{display:flex;gap:8px;border-bottom:1px solid #314664;padding-bottom:12px;flex-wrap:wrap}
.guide-tabs button{background:#1a2840;border:1px solid #3d5170;color:#b3c6e5;border-radius:8px;padding:10px 11px;font-weight:600;font-size:12px}
.guide-tabs button.selected{background:#35528e;color:white;border-color:#6088d5}
.guide-content h3{font-size:13px;color:#dbe8ff;margin:17px 0 6px}
.guide-content p{font-size:12px;color:#a4b3c9;line-height:1.7;margin:7px 0 11px}
.guide-content p strong{color:#dce7fc}
.guide-content code{font-family:Consolas,"Cascadia Code",monospace;font-size:11px;color:#bdd4ff}
.guide-command{display:flex;align-items:stretch;gap:9px;background:#070f1d;border:1px solid #304462;border-radius:9px;padding:9px;margin:8px 0}
.guide-command code{white-space:pre-wrap;overflow-wrap:anywhere;min-width:0;flex:1;line-height:1.75}
.guide-copy{align-self:flex-start;border:1px solid #405777;border-radius:7px;background:#1d3151;color:#c8dafa;padding:7px 9px;font-size:11px}
.guide-copy:hover{background:#2e4774}
.guide-server-section{border-top:1px solid #32445f;margin-top:15px;padding-top:3px}
.key-file-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:11px}
.key-file-row .key-import{display:inline-block;cursor:pointer;font-size:12px;margin:0}
.key-file-row .muted{font-size:11px;line-height:1.5;flex:1}
.field-hint{color:#97a9c1;font-size:12px;line-height:1.6}
.inline-help{border:none;background:transparent;color:#90afff;padding:0;text-decoration:underline;font-size:12px}
dialog#hostDialog{width:min(770px,96vw);max-height:92vh;overflow-y:auto}
dialog#hostDialog .modal-note{margin:12px 0}
.status-empty-action{display:inline-block;margin:13px auto 0}
@media(max-width:1100px){#overview .stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.status-summary{grid-template-columns:1fr}.status-host{align-items:flex-start}.status-host-actions{width:100%}.status-host-actions button{flex:1}.section-heading{align-items:flex-start;flex-direction:column}.heading-actions{width:100%}.heading-actions .host-select{flex:1;min-width:135px}.heading-actions button{flex:1}}
@media(max-width:480px){#overview .stats{grid-template-columns:1fr}.guide-content{padding:0 10px 12px}.status-host-meta{width:100%}.guide-command{flex-direction:column}.guide-copy{align-self:flex-end}}


/* Persian / English language switch and RTL layout */
.lang-toggle{display:inline-flex;align-items:center;gap:3px;padding:4px;border:1px solid #35466a;background:#17253d;border-radius:10px;flex:none;direction:ltr}
.lang-toggle button{font-size:12px;line-height:1.3;border:0;padding:7px 10px;background:transparent;border-radius:7px;color:#91a6c9;font-weight:650;min-width:42px}
.lang-toggle button.active{color:#fff;background:#456ee0;box-shadow:0 2px 9px #0004}
.login-language{position:absolute;top:24px;right:24px}
.sign-in{position:relative}
html[lang="fa"] body{font-family:Tahoma,"Segoe UI",Arial,sans-serif}
html[dir="rtl"] .app{direction:rtl}
html[dir="rtl"] .sidebar{border-right:0;border-left:1px solid #263248}
html[dir="rtl"] .nav{text-align:right}
html[dir="rtl"] .nav.active{box-shadow:inset -3px 0 #7195ff}
html[dir="rtl"] .side-bottom{text-align:right}
html[dir="rtl"] .topbar,html[dir="rtl"] .view,html[dir="rtl"] .login-card,html[dir="rtl"] #hostDialog{text-align:right}
html[dir="rtl"] .login-card .primary{flex-direction:row}
html[dir="rtl"] .hero{flex-direction:row}
html[dir="rtl"] .guide-chevron{margin-left:0;margin-right:auto}
html[dir="rtl"] .modal-actions{justify-content:flex-start}
html[dir="rtl"] .file-ico{flex:none}
html[dir="rtl"] .host-ip,html[dir="rtl"] .status-host-address{direction:ltr;text-align:right;unicode-bidi:plaintext}
html[dir="rtl"] #remotePath,html[dir="rtl"] #sshPrivateKey,html[dir="rtl"] #password,
html[dir="rtl"] input[name="hostname"],html[dir="rtl"] input[name="port"],
html[dir="rtl"] input[name="fingerprint"],html[dir="rtl"] input[name="username"]{direction:ltr;text-align:left}
html[dir="rtl"] .guide-command,html[dir="rtl"] .guide-command code{direction:ltr;text-align:left;unicode-bidi:plaintext}
html[dir="rtl"] .terminal-window,html[dir="rtl"] #terminalDisplay,html[dir="rtl"] .xterm,
html[dir="rtl"] .xterm-screen,html[dir="rtl"] #statusMetrics{direction:ltr;text-align:left}
html[dir="rtl"] #statusMetrics{unicode-bidi:plaintext}
html[dir="rtl"] .terminal-header{direction:ltr}
html[dir="rtl"] .account{flex-direction:row}
html[dir="rtl"] .file-row .name{unicode-bidi:plaintext}
html[dir="rtl"] .toast{text-align:right}
html[dir="rtl"] dialog input[name="label"]{text-align:right}
@media(max-width:820px){html[dir="rtl"] .hero{flex-direction:column}.login-language{top:12px;right:12px}.login-card{padding-top:65px}.topbar .lang-toggle{margin-right:4px}.account .avatar{display:none}}
