/* SH V3: visual language. Original V2.0 reconciliation CSS remains intact. */
:root{color-scheme:dark}
html[data-theme="dark"]{--bg:#091422;--panel:#111f31;--surface:#0e1c2c;--surface-alt:#18283d;--teal:#35d9be;--ink:#eef6fe;--muted:#a6b8ce;--line:#2c4155;--chip:#18372f;--hover:#1a3042}
body{background:#091422;font-family:Tahoma,"Segoe UI",Arial,sans-serif}
.site-header.sh-topbar{border-bottom:1px solid #244259;background:linear-gradient(95deg,#0b1c2d,#0b1b2a 40%,#10263a 100%);color:#f4faff;box-shadow:0 2px 14px #0003}
.sh-header-inner{max-width:1500px;min-height:88px;padding-block:10px;display:flex;align-items:center;gap:24px;justify-content:space-between;direction:rtl}
.sh-brand{display:flex;align-items:center;gap:12px;min-width:250px;flex:0 0 auto}
.sh-brand .brand-logo-slot{flex:0 0 86px;width:86px;height:63px;filter:drop-shadow(0 1px 8px #0bbff032);margin:0}
.sh-brand-copy{display:flex;flex-direction:column;gap:1px;white-space:nowrap}
.sh-brand-copy strong{font-size:clamp(18px,1.3vw,23px);line-height:1.4;letter-spacing:-.3px}
.sh-brand-copy small{font-size:11px;color:#b7cbdc;font-weight:450}
.sh-top-actions{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap}
.sh-top-actions .utility-toggle,.sh-top-actions .button{font-weight:700;font-size:13px;line-height:1.45;padding:9px 13px;border-radius:11px;white-space:nowrap}
.sh-top-actions .sh-settings-btn{background:#17293d;color:#e9f4fc;border:1px solid #3a536a}
.sh-top-actions .sh-new-btn{border:1px solid #1d9c8c;color:#6aebda;background:#112b34}
.sh-user-tools{display:flex;align-items:center;gap:16px;justify-content:flex-end;margin-right:auto;flex:0 0 auto}
.sh-greeting{text-align:center;display:flex;flex-direction:column;white-space:nowrap;gap:1px}
.sh-greeting strong{font-size:15px;color:#fff;font-weight:780}
.sh-greeting small{font-size:11px;color:#46dfca;font-weight:600}
.sh-logout{background:rgba(100,20,44,.15);border:1px solid #d84d66;color:#f398a5;border-radius:12px;padding:9px 13px;font-size:13px;font-weight:800;white-space:nowrap}
.sh-logout:hover{background:#4e2331;color:#fff}
@media(max-width:1180px){.sh-header-inner{gap:12px}.sh-top-actions{gap:6px}.sh-user-tools{gap:9px}.sh-brand{min-width:205px}.sh-brand .brand-logo-slot{flex-basis:70px;width:70px}}
@media(max-width:920px){.sh-header-inner{flex-wrap:wrap;justify-content:center}.sh-brand{flex:1 0 40%;min-width:0}.sh-user-tools{margin-right:0}.sh-top-actions{order:3;flex:1 0 100%;justify-content:space-between}}
@media(max-width:650px){.sh-header-inner{min-height:0;padding-block:12px;gap:8px}.sh-brand{flex:1 0 55%}.sh-brand .brand-logo-slot{width:55px;height:47px;flex:0 0 55px}.sh-brand-copy strong{font-size:17px}.sh-brand-copy small{font-size:9px}.sh-user-tools{flex:1 0 100%;justify-content:space-between}.sh-greeting{text-align:right}.sh-top-actions{justify-content:center;gap:5px}.sh-top-actions .utility-toggle,.sh-top-actions .button{padding:7px 9px;font-size:11px}.sh-logout{font-size:12px;padding:7px 10px}}
/* Banner: brand watermark, not an avatar. */
.hero{position:relative;overflow:hidden;background:linear-gradient(105deg,#142b45 0%,#10263c 45%,#0d3737 100%)!important;border:1px solid #31566a;border-radius:24px;max-width:none;margin-block:23px 18px;padding:35px 32px!important;min-height:183px;color:#e8f7ff}
.hero .hero-sh-watermark{position:absolute;left:4%;top:50%;transform:translateY(-50%) skew(-9deg);font-size:clamp(82px,10vw,190px);font-weight:900;color:#4ed6cf;opacity:.15;line-height:1;pointer-events:none;letter-spacing:-15px;text-shadow:2px 1px 25px #10acaf37}
.hero .hero-sh-watermark::before,.hero .hero-sh-watermark::after{content:"";position:absolute;width:107%;height:17%;border-top:5px solid #4cdace;border-radius:50%;left:-11%;transform:rotate(-22deg);opacity:.65}
.hero .hero-sh-watermark::before{top:-12%}.hero .hero-sh-watermark::after{bottom:-25%;transform:rotate(154deg)}
.hero-accent{display:none!important}.hero-caption{color:#4ce5d1;font-size:12px!important}.hero h1{font-size:clamp(21px,2.2vw,33px)!important;position:relative;z-index:1;color:#52ead9!important;max-width:79%;line-height:1.55}
.hero h1 span{color:inherit}.hero p{font-size:12px!important;color:#b5d5e5!important;max-width:80%;position:relative;z-index:1}
@media(max-width:760px){.hero{padding:24px 19px!important;min-height:0}.hero h1,.hero p{max-width:100%}.hero .hero-sh-watermark{opacity:.065;left:0;font-size:90px}}
/* Upload zones imitate the chosen two-card reference. */
.sh-upload-grid{gap:14px!important}.sh-upload-card{background:#0e1d2c!important;border:2px dashed #176e58!important;min-height:337px!important;padding:20px 20px 15px!important;position:relative;cursor:default;display:flex;flex-direction:column;border-radius:18px!important}
.sh-upload-card.is-paste-target{background:#13283a!important;border-color:#3be1bd!important;box-shadow:0 0 0 2px #0c635b3d}
.sh-upload-title{display:flex;align-items:center;gap:9px;padding-inline-end:90px}.sh-upload-title h3{font-size:16px;margin:0;color:#edf6fd}.sh-upload-card .upload-icon{width:34px;height:31px;font-size:12px;background:#163b32;color:#44dcc1;border:1px solid #1c5a4c;border-radius:8px}
.sh-clear{position:absolute;left:17px;top:17px;border:0;background:transparent;color:#9eafbd;font-size:12px;padding:3px 4px;cursor:pointer}.sh-clear:hover{color:#5df0c7;text-decoration:underline}
.sh-upload-center{display:flex;flex:1;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:7px;padding-block:23px}
.sh-upload-cloud{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;color:#42dda9;border:1px solid #314c5a;font-size:19px}
.sh-upload-center p{color:#c0ceda;font-size:13px;line-height:1.8;margin:3px 0 0}
.sh-pick{border:1px solid #3b5067;background:#152337;color:#f5fafc;border-radius:9px;padding:8px 15px;font-size:12px;font-weight:650;cursor:pointer}.sh-pick:hover{border-color:#4ee5bb;background:#1c3443}
.sh-upload-center small{color:#7e98aa;font-size:10px}.sh-upload-bottom{border-top:1px solid #25394a;padding-top:9px;min-height:45px}
.sh-file-summary{font-size:11px;color:#40dcae;font-weight:700;margin-bottom:6px}.sh-upload-card .file-list{text-align:right;margin:0;display:flex;flex-wrap:wrap;gap:6px;font-size:12px}
.sh-upload-card .file-entry{display:flex;align-items:center;gap:7px;background:#0f2923;border:1px solid #196447;color:#d6f3e4;padding:4px 7px;border-radius:8px;max-width:100%;font-size:11px;margin:0}
.sh-file-name{max-width:145px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sh-file-size{color:#95bbaa;white-space:nowrap}
.sh-file-remove{border:1px solid #693140;border-radius:5px;background:#42212e;color:#ffa4b0;width:21px;height:21px;display:grid;place-items:center;font-weight:900;cursor:pointer}
.sh-file-remove:hover{color:white;background:#a53c51}
@media(max-width:680px){.sh-upload-grid{grid-template-columns:1fr!important}.sh-upload-card{min-height:300px!important;padding:15px!important}.sh-upload-title h3{font-size:14px}}
/* Engine order cards */
.sh-engine-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.sh-engine-head strong{font-size:17px}.sh-key-link{border:1px solid #41546d;background:#1a2d40;color:#e0edfa;border-radius:9px;padding:8px 13px;font-size:12px;cursor:pointer}
.sh-engine-explain{font-size:11px;color:var(--muted);margin:5px 0 14px}.sh-engines{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-bottom:11px}
.sh-engine-card{border:1px solid #30465a;border-radius:12px;background:#0d1b2b;padding:13px 12px;display:flex;flex-direction:column;gap:8px;transition:.2s}
.sh-engine-card>span{color:#c2d4e3;font-size:12px;font-weight:800}.sh-engine-card select{width:100%;border:1px solid #33485f;border-radius:9px;background:#15233a;color:#eff6fb;padding:10px 9px;font-size:12px;min-width:0;cursor:pointer}
.sh-engine-card small{font-size:10px;color:#8ca9bd}.sh-engine-card.is-running{background:#0c3b36;border-color:#42d2b8;box-shadow:inset 0 0 0 1px #1a806f}.sh-engine-card.is-running small{color:#5beed7;font-weight:750}
.sh-engine-current{font-size:12px;color:#42dabf;font-weight:700;margin-bottom:12px}
@media(max-width:680px){.sh-engines{grid-template-columns:1fr}.sh-engine-card{padding:10px}.sh-engine-card select{padding:7px}}
/* Personal settings; no avatar or photo feature. */
.sh-settings-dialog{width:min(95vw,620px);max-height:91vh;overflow:auto;border:1px solid #375369;border-radius:20px;padding:0;background:#0f1d30;color:#eef7ff;box-shadow:0 18px 95px #000a;direction:rtl}
.sh-settings-dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}.sh-dialog-head{display:flex;align-items:start;justify-content:space-between;gap:10px;padding:23px 23px 17px;border-bottom:1px solid #2e455a}
.sh-dialog-head h2{font-size:19px;margin:0}.sh-dialog-head p{font-size:11px;color:#93a9c3;margin:6px 0 0}.sh-dialog-head button{border:0;background:transparent;color:#a8bbce;font-size:26px;cursor:pointer}
.sh-dialog-body{padding:22px}.sh-dialog-body>label{display:block;font-size:13px;font-weight:800;margin-bottom:10px}.sh-key-input{display:flex;gap:6px;border:1px solid #41576b;border-radius:11px;background:#09182a;padding:6px}.sh-key-input input{border:0;outline:0;flex:1;min-width:0;background:transparent;color:#fff;padding:7px}.sh-key-input button{border:0;background:#1c3548;color:#d5eef5;border-radius:8px;padding:6px 11px;cursor:pointer}.sh-key-help{font-size:11px;line-height:1.8;color:#9fb5c7}.sh-dialog-buttons{display:flex;gap:8px}.sh-dialog-buttons button{font-size:12px;padding:8px 13px}
#settingsMsg{font-size:12px;color:#51dcbb;min-height:18px}.sh-admin-panel{border-top:1px solid #385064;margin-top:23px;padding-top:16px}.sh-admin-panel h3{font-size:17px;margin:0}.sh-admin-panel p{font-size:11px;color:#a4bbcd}.sh-admin-form{display:grid;gap:7px;grid-template-columns:repeat(2,minmax(0,1fr))}.sh-admin-form input{background:#17273a;color:white;border:1px solid #3c566c;border-radius:8px;padding:9px;min-width:0}.sh-admin-form button{border-radius:8px;background:#0c967f;color:white;border:0;font-weight:800;cursor:pointer}.sh-user-row{display:flex;gap:9px;align-items:center;justify-content:space-between;border-bottom:1px solid #304558;padding:10px 0;font-size:12px}.sh-user-row button{background:#1c354a;border:1px solid #3a566a;color:#c8e3ec;border-radius:7px;padding:5px 8px;cursor:pointer}
@media(max-width:580px){.sh-admin-form{grid-template-columns:1fr}.sh-dialog-head{padding:16px}.sh-dialog-body{padding:17px}}


/* HEADER LAYOUT FIX: requested left-aligned controls; preserves all other site logic. */
.sh-header-inner{justify-content:space-between;gap:20px;}
.sh-header-left{margin-inline-start:auto;display:flex;align-items:center;justify-content:flex-end;gap:22px;min-width:0;direction:rtl;}
.sh-header-left .sh-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:nowrap;flex:0 0 auto;}
.sh-header-left .sh-top-actions .utility-toggle,.sh-header-left .sh-top-actions .button{font-size:12px;font-weight:700;min-height:36px;padding:7px 10px;border-radius:9px;line-height:1.35;}
.sh-header-left .control-group{padding:3px;gap:1px;border-radius:9px;}
.sh-header-left .control-group .utility-toggle{min-height:30px;padding:5px 9px;}
.sh-header-left .theme-toggle{background:#17283a;border:1px solid #3a5267;min-width:80px;gap:5px;}
.sh-header-left #themeIcon{color:#ffd34b;font-size:17px;line-height:1;}
html[data-theme="light"] .sh-header-left #themeIcon{color:#4269a8;}
.sh-header-left .sh-settings-btn{background:#17283a;border-color:#3a5267;color:#e6f0f6;}
.sh-header-left .sh-new-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#0d2929!important;border:1px solid #109675!important;color:#47e3bf!important;border-radius:9px!important;padding:7px 12px!important;white-space:nowrap;box-shadow:none;font-weight:750;}
.sh-header-left .sh-new-btn:hover{background:#144238!important;}
.sh-new-file-icon{width:17px;height:17px;flex:none;}
.sh-header-left .sh-user-tools{margin-right:0;gap:13px;flex:0 0 auto;justify-content:flex-end;}
.sh-header-left .sh-greeting{text-align:right;}
.sh-header-left .sh-greeting strong{font-size:13px;}
.sh-header-left .sh-greeting small{font-size:10px;}
.sh-header-left .sh-logout{font-size:12px;padding:8px 11px;border-radius:9px;}
@media(max-width:1220px){
 .sh-header-inner{flex-wrap:wrap;align-items:center;gap:6px 15px;}
 .sh-brand{flex:0 0 auto;}
 .sh-header-left{flex:1 0 100%;order:2;justify-content:flex-end;margin:0;gap:15px;}
 .sh-header-left .sh-top-actions{order:0;flex:0 0 auto;justify-content:flex-end;}
 .sh-header-left .sh-user-tools{order:1;flex:0 0 auto;}
}
@media(max-width:700px){
 .sh-header-inner{min-height:0;padding-block:10px;gap:8px;}
 .sh-header-left{flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;}
 .sh-header-left .sh-top-actions{flex:1 0 100%;width:100%;justify-content:flex-end;flex-wrap:wrap;order:1;gap:6px;}
 .sh-header-left .sh-user-tools{flex:1 0 100%;width:100%;justify-content:space-between;order:0;}
 .sh-header-left .sh-top-actions .utility-toggle,.sh-header-left .sh-top-actions .button{font-size:11px;padding:6px 8px;min-height:33px;}
 .sh-header-left .sh-greeting strong{font-size:12px;}
 .sh-header-left .sh-greeting small{font-size:10px;}
}
