@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{--bg:#060c1b;--card:#0b1830;--stroke:#1d3c66;--cyan:#61d8ff;--text:#eaf5ff;--muted:#8ba6c5}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,'Segoe UI',sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #59d4ff;outline-offset:3px}.shell{display:grid;grid-template-columns:220px minmax(410px,1fr) 360px;min-height:100dvh;background:radial-gradient(ellipse at 47% 37%,#112b58 0%,#08152d 39%,#040b1a 78%)}.sidebar{display:flex;flex-direction:column;gap:30px;padding:28px 16px;background:linear-gradient(170deg,#091c38,#060f23);border-right:1px solid #234773}.brand{display:flex;gap:11px;align-items:center}.brand-mark{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#103e80;color:#71dfff;font-size:27px;box-shadow:0 0 30px #1368bc45}.brand b{font-size:32px;letter-spacing:4px}.brand small{display:block;font-size:9px;letter-spacing:1.4px;color:#85a8c8}.nav-title,.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#74b9ec}.nav-title{margin:12px 10px -17px}nav{display:grid;gap:7px}.nav-btn{border:1px solid transparent;border-radius:13px;padding:15px 14px;text-align:left;color:#b8d4ef;background:transparent}.nav-btn:hover,.nav-btn.active{background:linear-gradient(90deg,#144f9a,#0d2b54);color:white;border-color:#296eb3}.sidebar-foot{margin-top:auto}.side-status{display:flex;gap:7px;flex-wrap:wrap}.badge{border:1px solid #2d486b;border-radius:99px;padding:8px;font-size:10px;color:#98a9bf}.badge.on{color:#5ce7bc;border-color:#297c71}.badge.off{color:#b1bdcc}#build-stamp{display:block;color:#6f92b5;font-size:10px;margin-top:14px}.stage{display:flex;flex-direction:column;min-width:0;padding:28px 26px 25px;min-height:100dvh;position:relative}.topline{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;z-index:1}.topline h1{font-size:clamp(16px,1.4vw,22px);margin:9px 0 0;letter-spacing:-.5px}.top-right{display:flex;align-items:center;gap:12px}.voice-picker{font-size:10px;letter-spacing:1px;color:#83add3;display:grid;gap:5px}.voice-picker select{background:#0d2649;border:1px solid #2d6297;color:#eaf5ff;border-radius:10px;padding:10px;max-width:170px}.status{border:1px solid #265781;background:#0b2442;padding:12px 13px;border-radius:13px;font-size:11px;color:#8bb6d6;white-space:nowrap}#status.live{color:#5fecc0;border-color:#287f75}.visual{position:relative;flex:1;min-height:370px;display:grid;place-items:center;overflow:hidden}.hero-halo{position:absolute;width:min(68vw,600px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,#0a67bc44,transparent 66%);filter:blur(24px)}.kam-hero{position:relative;height:min(64vh,630px);width:min(100%,610px);display:flex;align-items:center;flex-direction:column;justify-content:flex-start}.robot{height:54%;max-width:100%;object-fit:contain;filter:drop-shadow(0 0 28px #117de77a);z-index:2;pointer-events:none}.globe-stage{position:relative;height:46%;aspect-ratio:1;display:grid;place-items:center;margin-top:-18px;filter:drop-shadow(0 0 32px #1398ff77)}.globe-stage:before,.globe-stage:after{content:'';position:absolute;width:122%;height:26%;bottom:-1%;border:2px solid #39bfff8a;border-radius:50%;box-shadow:0 0 24px #138cffaa;transform:perspective(140px) rotateX(56deg)}.globe-stage:after{width:95%;height:16%;bottom:3%;border-color:#bc53ff7c}.kam-globe{height:100%;max-height:285px;object-fit:contain;animation:kam-orbit 18s linear infinite;filter:drop-shadow(0 0 18px #138aff)}@keyframes kam-orbit{0%{transform:rotateY(0deg) rotateZ(-4deg)}50%{transform:rotateY(180deg) rotateZ(4deg)}100%{transform:rotateY(360deg) rotateZ(-4deg)}}.orb-holder{position:absolute;bottom:7%;left:50%;width:140px;height:95px;transform:translateX(-50%);opacity:.18;pointer-events:none}#orb{width:100%;height:100%}.stage-caption{text-align:center;color:#83c9ed;letter-spacing:1.8px;font-size:10px;font-weight:700}.pulse-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#40edba;box-shadow:0 0 13px #40edba;margin-right:7px}.quick-actions{display:flex;justify-content:center;gap:10px;padding:18px 0}.quick-actions button{background:#0b2344;border:1px solid #265785;color:#d7e9fc;border-radius:12px;padding:10px 17px}.quick-actions button:hover{background:#14477d}footer{display:flex;gap:10px;align-items:center;width:100%;max-width:900px;margin:0 auto}.controls{display:flex;gap:8px}.ctl{border:1px solid #2b639e;border-radius:14px;background:#10386a;color:#eaf5ff;padding:14px 12px;white-space:nowrap}#text-form{display:flex;flex:1;min-width:0;border:1px solid #3375af;border-radius:15px;background:#0b1e3b;overflow:hidden;box-shadow:0 8px 35px #0005}#text-input{background:transparent;border:0;outline:0;color:white;padding:16px;min-width:0;flex:1}#text-form button{border:0;background:#1468c7;color:white;padding:0 21px;font-size:24px}.right-panel{display:flex;flex-direction:column;gap:16px;padding:22px 16px;background:linear-gradient(180deg,#081b34,#050e21);border-left:1px solid #22456e;min-height:0}.panel{background:linear-gradient(155deg,#0d2544,#07152c);border:1px solid #244c79;border-radius:20px;padding:20px}.conversation{flex:1;display:flex;flex-direction:column;min-height:250px}.panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-title h2{font-size:19px;margin:7px 0 19px}.panel-title button{border:1px solid #29577f;background:#123155;color:#bad7f0;border-radius:9px;padding:8px}#log{flex:1;overflow:auto;min-height:180px;max-height:calc(100vh - 300px);scrollbar-color:#2e6295 transparent}.row{border:1px solid #21436b;background:#0b2240;border-radius:13px;padding:12px;margin:0 0 10px;line-height:1.55;font-size:12px;overflow-wrap:anywhere}.who-user{color:#6ed4ff;font-weight:700}.who-kam{color:#6fe4bd;font-weight:700}.who-sys{color:#9daeca}.live-card{display:grid;gap:9px}.live-card #local-datetime{font-size:15px;font-weight:700}.live-card #web-connection{font-size:12px;color:#94b5d2}.hidden{display:none!important}#cam-wrap{position:absolute;right:14px;bottom:10px;width:210px;border:2px solid #39b5f5;border-radius:14px;overflow:hidden;background:#000}#cam{width:100%;display:block}.cam-live{position:absolute;top:8px;left:8px;color:#5ef5c0;font-size:10px;background:#041b2b;padding:5px}#key-screen{position:fixed;inset:0;display:grid;place-items:center;background:#030917ed;z-index:100}.key-box{display:grid;gap:16px;background:#0b2140;border:1px solid #3779b3;border-radius:20px;padding:30px;width:min(420px,90vw)}.key-title{font-size:34px;color:#6cd8ff}.key-sub,.key-note{color:#a9c6e0;font-size:13px}.key-box input{background:#07162e;color:white;border:1px solid #336a9c;border-radius:10px;padding:14px}.key-box button{background:#1762b5;color:white;border:0;border-radius:10px;padding:14px}
@media(max-width:1150px){.shell{grid-template-columns:185px minmax(0,1fr) 290px}.sidebar{padding:20px 10px}.stage{padding:22px 14px}.right-panel{padding:16px 10px}.kam-hero{height:min(60vh,540px)}}
@media(max-width:780px){.shell{display:flex;flex-direction:column;min-height:100dvh}.sidebar{display:none}.stage{order:0;min-height:0;padding:14px 14px 0;flex:0 0 auto}.topline{align-items:center}.topline h1,.topline .eyebrow{display:none}.top-right{width:100%;justify-content:space-between}.voice-picker{display:flex;align-items:center;gap:10px}.voice-picker select{max-width:200px}.status{font-size:10px}.visual{min-height:220px;height:30dvh;flex:none}.kam-hero{height:100%;width:100%;max-width:360px}.robot{height:56%}.globe-stage{height:49%;margin-top:-8px}.kam-globe{max-height:140px}.orb-holder{display:none}.stage-caption{font-size:9px;padding:5px}.quick-actions{display:none}.controls{flex:0 0 auto}.controls #btn-cam{display:none}footer{padding:12px 0 8px;gap:8px}.ctl{font-size:0;padding:12px}.ctl:before{content:'🎙';font-size:20px}#text-input{padding:14px;font-size:14px}.right-panel{order:1;flex:1;border:0;background:transparent;padding:6px 14px 16px}.conversation{min-height:25dvh;padding:14px;max-height:46dvh}.panel-title h2{font-size:16px;margin:4px 0 12px}#log{min-height:120px;max-height:35dvh}.live-card{display:none}.row{font-size:12px}.topline{margin-bottom:5px}}
@media(max-width:400px){.voice-picker select{max-width:150px}.visual{height:28dvh}.status{max-width:120px;overflow:hidden;text-overflow:ellipsis}}
@media(prefers-reduced-motion:reduce){.kam-globe{animation:none}}

/* KAM V3.18 / cinematic glass redesign */
:root{--bg:#030613;--card:#081329;--stroke:#30538b;--cyan:#4fe8ff;--text:#f3f7ff;--muted:#a5badb}
html,body{background:#030613}
.shell{background:radial-gradient(ellipse at 54% 38%,#19305d 0%,#0a0d29 42%,#030613 82%)}
.sidebar{background:linear-gradient(164deg,#061a38f5,#06091bef);box-shadow:inset -1px 0 #287af84d}
.stage:before{content:"";pointer-events:none;position:absolute;inset:0;background:linear-gradient(135deg,transparent 25%,#c4006b12 51%,transparent 75%),repeating-linear-gradient(0deg,transparent 0 48px,#1e6aff0b 49px 50px);z-index:0}
.stage>*{z-index:1}
.panel{background:linear-gradient(155deg,#102249e8,#080d25f2);border:1px solid #3b65a2aa;box-shadow:0 20px 55px #0008,inset 0 1px #8acbff1e;backdrop-filter:blur(18px)}
.nav-btn{transition:background .2s,box-shadow .2s,transform .2s}
.nav-btn:hover,.nav-btn.active{box-shadow:inset 3px 0 #53e7ff,0 0 25px #136bff38;transform:translateX(2px)}
.brand-mark{background:linear-gradient(145deg,#063b78,#1b105a);box-shadow:0 0 35px #078aff55,0 0 12px #ff2b9333}
.visual{isolation:isolate}
.hero-halo{background:radial-gradient(circle,#1767d277 0%,#6b16a82b 35%,transparent 68%);filter:blur(36px)}
.robot{filter:drop-shadow(0 0 27px #126cffaa) drop-shadow(0 0 16px #e316743d)}
.globe-stage{filter:drop-shadow(0 0 28px #159cffba)}
.ctl,#text-form,.quick-actions button,.row{box-shadow:inset 0 1px #9ee5ff18,0 10px 30px #0004}
#text-form:focus-within{border-color:#61e5ff;box-shadow:0 0 24px #0fafff44}
@media(max-width:780px){.shell{background:radial-gradient(ellipse at 50% 20%,#142b58,#060919 70%)}.stage{padding-top:20px}.visual{height:35dvh;min-height:245px}.kam-hero{max-width:390px}.robot{height:60%}.globe-stage{height:45%}.right-panel{padding-top:10px}.conversation{border-color:#4775b8}.row{background:#0b1a38e8}.status{background:#091e3dcc}.panel-title h2{color:#8defff}}

/* KAM V3.19: theme system, desktop + mobile */
html[data-kam-theme="bordo"]{--bg:#100714;--card:#210c25;--stroke:#8c315b;--cyan:#ff6db5;--text:#fff0fa;--muted:#c9a0bf}
html[data-kam-theme="ice"]{--bg:#021923;--card:#082f42;--stroke:#287c9c;--cyan:#76efff;--text:#e8fcff;--muted:#9fd1e2}
body{background:radial-gradient(ellipse at 48% 24%,color-mix(in srgb,var(--cyan) 12%,transparent),transparent 58%),var(--bg)!important}
#kam-theme-switcher{position:fixed;z-index:9999;right:14px;bottom:calc(18px + env(safe-area-inset-bottom));padding:9px 12px;border:1px solid var(--stroke);border-radius:14px;background:var(--card);color:var(--text);box-shadow:0 6px 28px #0008;font:600 12px system-ui;max-width:180px}
@media(max-width:700px){#kam-theme-switcher{right:10px;bottom:calc(82px + env(safe-area-inset-bottom));max-width:130px;font-size:11px}}

/* KAM V3.20 - unified cinematic robot imagery on desktop, web and mobile */
html{--kam-wallpaper:url('/static/KAM_THEME_NEON.png')}
html[data-kam-theme="bordo"]{--kam-wallpaper:url('/static/KAM_THEME_BORDO.png')}
html[data-kam-theme="ice"]{--kam-wallpaper:url('/static/KAM_THEME_ICE.png')}
.stage{isolation:isolate}
.stage::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background-image:linear-gradient(180deg,#0308179e 0%,#03081700 22%,#03081700 64%,#030817c7 100%),var(--kam-wallpaper);background-size:cover;background-position:center center;background-repeat:no-repeat;opacity:.96}
.stage::before{z-index:0}
.stage>*{position:relative;z-index:1}
.visual{background:transparent}
.visual .hero-halo,.visual .kam-hero,.visual .orb-holder{display:none!important}
.stage-caption{color:#c6e9ff;text-shadow:0 2px 10px #000}
.topline,.quick-actions,footer{filter:drop-shadow(0 4px 8px #0009)}
@media(max-width:780px){
 .stage::after{background-size:cover;background-position:center 31%;opacity:.98}
 .visual{height:40dvh;min-height:300px}
 .stage{background:transparent}
 .stage-caption{margin-top:4px}
}
@media(max-width:400px){.visual{height:36dvh;min-height:255px}}

/* KAM Ayarlar — ARM64 */
.kam-settings-modal{position:fixed;inset:0;z-index:99999;background:rgba(1,6,18,.85);display:flex;align-items:center;justify-content:center;padding:16px}.kam-settings-modal.hidden,.kam-settings-pane.hidden{display:none!important}.kam-settings-card{width:min(760px,100%);max-height:92vh;overflow:auto;background:#111e34;color:#e6efff;border:1px solid #3d567b;border-radius:16px;padding:22px;box-shadow:0 20px 70px #0009}.kam-settings-head{display:flex;justify-content:space-between;align-items:center}.kam-settings-head h2{margin:0 0 16px}.kam-settings-head button,.kam-settings-tabs button,.kam-settings-actions button{border:1px solid #425d80;background:#1a304e;color:#e6efff;padding:10px 13px;border-radius:9px;cursor:pointer}.kam-settings-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.kam-settings-tabs button.active{background:#7c263a}.kam-settings-pane{line-height:1.6}.kam-settings-pane label{display:block;margin:14px 0}.kam-settings-pane input[type=password]{display:block;width:100%;max-width:420px;background:#0c1729;color:white;border:1px solid #425d80;padding:12px;border-radius:8px}.kam-settings-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.kam-settings-actions input[type=file]{max-width:100%;color:#fff}.kam-settings-pane pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#071326;padding:14px;border-radius:8px;min-height:50px}


/* KAM yönetim paneli */
#kam-admin-gate{padding:22px;display:grid;gap:12px}#kam-admin-gate input,.kam-settings-pane input{display:block;width:100%;max-width:500px;padding:10px;margin:6px 0 12px;border:1px solid #667085;border-radius:7px;background:#151d2a;color:#fff}#kam-login-error{color:#ff8585}.kam-settings-pane{max-height:62vh;overflow-y:auto}.kam-settings-pane label{display:block;margin:10px 0}.kam-settings-actions{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}.kam-settings-actions button,#kam-admin-login,#kam-share-add{padding:10px 14px;border-radius:7px;cursor:pointer}#kam-share-list button,#kam-share-browse button{margin:4px;padding:6px 10px}#kam-share-list{margin:15px 0}.kam-settings-card{max-height:92vh;overflow:auto}#kam-update-result{white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto}

.kam-compact-list{max-height:290px;overflow:auto;border:1px solid #48536a;border-radius:8px;padding:9px;margin:10px 0}.kam-list-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border-bottom:1px solid #43516b;padding:7px}.kam-list-row span{flex:1;min-width:180px}.kam-inline-dialog{padding:15px;border:1px solid #536786;border-radius:10px;margin-top:12px}.kam-inline-dialog label{display:block;margin:8px 0}.kam-inline-dialog input,.kam-text-row input{width:100%;box-sizing:border-box}.kam-memory-row{font-size:12px;padding:6px;border-bottom:1px solid #34415b;overflow-wrap:anywhere}.kam-text-row{display:block;padding:6px;border-bottom:1px solid #34415b}.kam-text-row span{display:block;font-size:12px;margin-bottom:3px}.kam-settings-tabs{flex-wrap:wrap}
#kam-chat-history{max-height:380px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;}
#kam-memory-list{max-height:260px;overflow:auto;overflow-wrap:anywhere;}

/* v1.4: oturum ve hafıza */
#kam-auth-overlay{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;background:#040b1af8;padding:20px}
#kam-auth-form{display:grid;gap:16px;width:min(430px,95vw);padding:35px;background:#0b2041;border:1px solid #4079b2;border-radius:20px;box-shadow:0 30px 90px #000b}
#kam-auth-form label{display:grid;gap:7px;color:#b8d6f0}#kam-auth-form input,#kam-user-new-role{background:#091a35;color:white;border:1px solid #396da3;padding:12px;border-radius:9px;width:100%}
#kam-auth-form button,.kam-user-identity button{background:#1467b7;color:white;border:0;border-radius:10px;padding:12px}
.kam-auth-logo{font-size:32px;color:#73dcff;font-weight:bold}#kam-auth-error{color:#ff9ba6;margin:0;min-height:18px}
.kam-user-identity{display:grid;gap:7px;font-size:12px;color:#9ad8f7;margin-bottom:16px}
#kam-personal-memory{position:fixed;inset:0;background:#000c;z-index:9999;display:grid;place-items:center;padding:16px}
.kam-personal-memory-card{background:#0b2041;border:1px solid #396da3;border-radius:15px;width:min(760px,96vw);max-height:85vh;overflow:auto;padding:25px}
.kam-personal-memory-card p{overflow-wrap:anywhere;padding:10px;border-bottom:1px solid #244568}
.kam-personal-memory-card button{float:right;background:#164b80;color:white;padding:9px;border:0;border-radius:8px}

/* KAM 1.5 device telemetry */
.kam-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin:18px 0}.kam-metric{background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:15px;min-width:0}.kam-metric>div:first-child{display:flex;justify-content:space-between;gap:8px;margin-bottom:12px}.kam-meter{height:15px;border-radius:30px;background:rgba(140,160,190,.2);overflow:hidden}.kam-meter>div{height:100%;width:0;background:linear-gradient(90deg,#20c997,#f0ad4e);transition:width .6s ease}.kam-metric small{display:block;margin-top:10px}.kam-user-editor{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:12px;border:1px solid rgba(255,255,255,.15);border-radius:10px;margin-bottom:10px}.kam-user-editor select{min-width:105px}.kam-list-row{flex-wrap:wrap;gap:6px}

/* v1.5.1: kullanıcı işlem düğmeleri her ekranda görünür */
#kam-users-list .kam-list-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.12)}
#kam-users-list .kam-list-row>span{flex:1 1 170px;min-width:0;overflow-wrap:anywhere}
#kam-users-list .kam-list-row button{display:inline-flex!important;visibility:visible!important;opacity:1!important;position:static!important;width:auto!important;min-width:64px;padding:7px 10px;cursor:pointer}
#kam-users-list .kam-user-editor{padding:12px;border:1px solid rgba(255,255,255,.18);border-radius:10px;display:flex;gap:8px;flex-wrap:wrap}

/* v1.5.2: Kullanıcı işlem butonları her hesap satırında görünür. */
#kam-users-list .kam-user-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 4px}
#kam-users-list .kam-user-row .kam-user-name{flex:1 1 180px;min-width:160px}
#kam-users-list .kam-user-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;gap:7px;align-items:center;justify-content:flex-start}
#kam-users-list .kam-user-actions button{display:inline-flex!important;align-items:center;justify-content:center;white-space:nowrap;min-width:unset!important;padding:8px 11px}
#kam-users-list .kam-user-actions button:disabled{opacity:.42!important;cursor:not-allowed!important;filter:grayscale(.5)}

/* v1.5.3 - kullanıcı modalı */
.kam-user-popup.hidden,.kam-user-popup .hidden{display:none!important}
.kam-user-popup{position:fixed;inset:0;z-index:100010;background:rgba(0,5,16,.86);display:flex;align-items:center;justify-content:center;padding:15px}
.kam-user-popup-card{width:min(520px,100%);max-height:90vh;overflow:auto;background:#14243d;color:#eaf2ff;border:1px solid #486587;border-radius:14px;padding:22px;box-shadow:0 25px 75px #000b}
.kam-user-popup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.kam-user-popup-head h3{margin:0 0 12px}
.kam-user-popup-card label{display:block;margin:10px 0;font-size:14px}
.kam-user-popup-card input,.kam-user-popup-card select{display:block;width:100%;margin-top:6px;background:#0b172b;color:#fff;border:1px solid #456081;border-radius:8px;padding:11px;box-sizing:border-box}
.kam-user-popup-card input[readonly]{opacity:.65}
.kam-user-popup-card button{background:#213d60;color:#fff;border:1px solid #506f94;border-radius:8px;padding:9px 12px;cursor:pointer}
.kam-user-popup-card button:hover{background:#315477}
.kam-user-info-row{padding:9px 0;border-bottom:1px solid #334968;overflow-wrap:anywhere}
.kam-user-danger{margin-top:20px;padding:15px;border:1px solid #984357;background:#381d31;border-radius:10px}
.kam-user-danger button{background:#8d3049}
.kam-user-danger small{display:block;margin-top:10px;color:#efc9d2}
#kam-user-popup-error{color:#ffb4bf}

/* v1.5.4: paylasim kullanici secimi */
.kam-acl-user{display:flex!important;align-items:center;gap:12px;padding:8px;border-bottom:1px solid #34415b;cursor:pointer}.kam-acl-user input{width:18px!important;height:18px;flex:none;margin:0!important}.kam-acl-user span{flex:1}#kam-my-shares-list button,#kam-my-shares-browse button{margin:5px;padding:9px 12px;background:#1a304e;color:#e6efff;border:1px solid #425d80;border-radius:7px}#kam-share-access-popup{z-index:100020}

/* KAM 1.5.6 — ekran yüksekliğine oturan masaüstü kokpiti */
@media (min-width:781px){
 html,body{height:100%;overflow:hidden}
 .shell{height:100dvh;min-height:0;overflow:hidden;grid-template-columns:220px minmax(340px,1fr) minmax(280px,360px)}
 .sidebar,.stage,.right-panel{height:100%;min-height:0;overflow:hidden}
 .sidebar{gap:clamp(8px,1.4vh,24px);padding:clamp(12px,2vh,24px) 14px}
 .sidebar nav{min-height:0;overflow:visible}
 .nav-btn{padding:clamp(8px,1.3vh,14px) 12px}
 .stage{padding:clamp(10px,1.6vh,24px) 18px}
 .visual{min-height:0;flex:1 1 auto}
 .kam-hero{height:min(100%,58vh);max-height:100%;width:min(100%,510px)}
 .quick-actions{padding:clamp(4px,.9vh,12px) 0}
 .right-panel{padding:clamp(10px,1.6vh,20px) 12px;gap:10px}
 .conversation{min-height:0;flex:1 1 auto;overflow:hidden}
 #log{min-height:0;max-height:none;overflow:auto}
 .panel{padding:clamp(10px,1.5vh,18px)}
 .kam-ops{position:relative}
 .kam-ops-toggle{width:100%;display:flex;justify-content:space-between;align-items:center}
 .kam-ops-menu{position:absolute;top:0;left:calc(100% + 9px);width:210px;z-index:500;background:#0a1b34;border:1px solid #3777af;border-radius:14px;box-shadow:0 15px 45px #000b;padding:7px;display:grid;gap:3px}
 .kam-ops-menu .nav-btn{width:100%}
}
.kam-profile-line{font-size:11px;color:#a8d6f6;line-height:1.4;overflow-wrap:anywhere;margin-bottom:8px}
@media(max-height:650px) and (min-width:781px){.brand b{font-size:24px}.brand-mark{width:35px;height:35px}.sidebar{gap:7px}.quick-actions{display:none}.stage-caption{display:none}.kam-hero{height:min(100%,48vh)}}

/* KAM v1.5.7 — sabit yükseklikte taşmayan navigasyon */
@media(min-width:781px){
 .sidebar{gap:12px!important;overflow:hidden}
 .sidebar .nav-title{margin:10px 10px 4px!important;flex:none;line-height:1.5;position:relative;z-index:1}
 .sidebar nav{display:flex;flex-direction:column;gap:6px;overflow:visible;flex:none}
 .sidebar nav>.nav-btn,.sidebar nav>.kam-ops{flex:none;min-height:0}
 .sidebar .brand{flex:none}
 .sidebar-foot{min-height:0}
}
/* Menu lives at BODY level, above stage/sidebars. */
body>#kam-ops-menu{position:fixed!important;z-index:90000!important;width:220px!important;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow-y:auto;background:#0a1b34;border:1px solid #3777af;border-radius:14px;box-shadow:0 15px 45px #000d;padding:7px;display:flex;flex-direction:column;gap:3px}
body>#kam-ops-menu.hidden{display:none!important}
body>#kam-ops-menu .nav-btn{width:100%;flex:none;text-align:left;padding:11px 12px;color:#dceaff;background:transparent;border:1px solid transparent}
body>#kam-ops-menu .nav-btn:hover{background:#164f89;border-color:#387ac1}
/* A row of accessible icon buttons with explanatory hover/focus tooltips. */
.kam-user-actions{display:flex!important;flex-wrap:wrap;gap:8px;align-items:center}
.kam-user-actions .kam-user-icon-btn{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:5px 9px;font-size:22px;line-height:1;background:#183557;color:#eaf5ff;border:1px solid #426c9b;border-radius:10px;transition:background .15s,transform .15s}
.kam-user-actions .kam-user-icon-btn:hover:not(:disabled){background:#245f9b;transform:translateY(-1px)}
.kam-user-actions .kam-user-icon-btn:disabled{opacity:.35;cursor:not-allowed}
@media(max-width:780px){body>#kam-ops-menu{left:8px!important;right:8px!important;top:64px!important;width:auto!important}}

/* KAM 1.6 belge analizi */
.kam-doc-progress{padding:15px;margin:12px 0;border:1px solid #47678c;border-radius:12px;background:#101e33}.kam-doc-progress.hidden{display:none}.kam-doc-head{display:flex;justify-content:space-between;align-items:center}.kam-doc-progress progress{width:90%;height:19px;accent-color:#18b7e5}.kam-doc-progress pre{white-space:pre-wrap;max-height:90px;overflow:auto;color:#e4b5b5}.controls~#kam-chat-attach,#kam-chat-attach{flex:0 0 auto;min-width:40px;padding:9px;background:#193656;border:1px solid #426b90;border-radius:10px;color:white;cursor:pointer}#kam-attachment-status{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a5d8ec;font-size:11px}footer{flex-wrap:wrap}

/* KAM 1.6.2: Ağ kaynakları ikon eylemleri */
.kam-share-icon-btn{min-width:36px!important;width:36px!important;height:36px!important;padding:5px!important;display:inline-flex!important;align-items:center;justify-content:center;font-size:18px!important;line-height:1!important;flex:0 0 36px;cursor:pointer}

/* v1.6.6 */
.kam-auth-hidden-identity{display:none!important}
#kam-profile-line{cursor:pointer;text-decoration:underline;text-decoration-style:dotted;line-height:1.5}
.kam-profile-backdrop{position:fixed;inset:0;z-index:99999;background:#000a;display:flex;align-items:center;justify-content:center;padding:16px}
.kam-profile-card{background:#13223a;color:#edf3ff;border:1px solid #526783;border-radius:15px;max-width:460px;width:100%;padding:24px;box-shadow:0 18px 60px #0009}
.kam-profile-card label{display:block;margin:12px 0}.kam-profile-card input{display:block;width:100%;margin-top:5px;padding:10px;border-radius:6px;background:#0b182b;color:white;border:1px solid #5c6b83}
.kam-profile-card button{margin:6px;padding:9px}.kam-share-summary{display:block;font-size:12px;opacity:.82;margin-top:4px}
.kam-backup-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border-bottom:1px solid #536178}.kam-backup-row button{flex-shrink:0}

.kam-profile-button{display:block;width:100%;text-align:left;cursor:pointer;border:1px solid rgba(255,255,255,.2);padding:10px;border-radius:8px;background:rgba(255,255,255,.06);color:inherit;font:inherit;margin:6px 0}.kam-profile-button:hover{background:rgba(255,255,255,.14)}

/* v3.22.4 mobile workspace and camera controls */
#kam-theme-switcher{position:static!important;inset:auto!important;max-width:160px!important;box-shadow:none!important;width:100%;padding:10px!important}
.kam-theme-picker{font-size:10px;letter-spacing:1px;color:#83add3;display:grid;gap:5px}
#kam-mobile-menu{display:none}
#kam-vpm-list>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px;border-bottom:1px solid var(--stroke)}
#kam-vpm-list button{border:1px solid var(--stroke);border-radius:8px;background:var(--card);color:var(--text);padding:7px}
@media(max-width:780px){
 .top-right{flex-wrap:wrap;gap:7px!important;justify-content:flex-start!important}
 .voice-picker,.kam-theme-picker{display:grid!important;flex:1 1 110px;min-width:0;gap:3px!important}
 .voice-picker select,#kam-theme-switcher{max-width:100%!important;min-width:0;width:100%;padding:8px!important;font-size:12px}
 #status{flex:0 0 auto;padding:8px!important;max-width:100%;font-size:9px!important}
 #kam-mobile-menu{display:block;order:-1;border:1px solid #3974a7;border-radius:9px;background:#0b2a4f;color:#eaf5ff;padding:9px 12px}
 .sidebar.kam-mobile-open{display:flex!important;position:fixed;top:0;bottom:0;left:0;width:min(310px,88vw);z-index:99991;overflow-y:auto;gap:18px}
 .sidebar.kam-mobile-open nav{display:flex;flex-direction:column}
 .sidebar.kam-mobile-open .sidebar-foot{margin-top:12px}
 .controls #btn-cam{display:inline-flex!important;font-size:12px!important;padding:10px!important}
 .controls #btn-cam:before{content:none!important}
 #cam-wrap{width:min(200px,60vw)!important;right:5px;bottom:5px}
}

/* v3.22.5 status caption */
.kam-status-group{display:inline-flex;flex-direction:column;gap:3px;align-items:flex-start}.kam-status-label{font-size:10px;letter-spacing:.09em;font-weight:700;opacity:.72}

/* v3.22.6: keep Settings close visible on narrow/mobile viewports. */
.kam-settings-card{position:relative;overscroll-behavior:contain}
.kam-settings-head{position:sticky;top:-22px;z-index:30;background:#111e34;padding:12px 0 8px;min-height:52px;align-items:center}
#kam-settings-close{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 44px;min-width:44px;min-height:44px;position:relative;z-index:31;font-size:20px;cursor:pointer}
@media(max-width:780px){.kam-settings-modal{padding:0!important;align-items:stretch!important}.kam-settings-card{width:100%!important;max-height:100dvh!important;height:100dvh!important;border-radius:0!important;padding:12px 14px calc(20px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}.kam-settings-head{top:-12px!important;padding-top:calc(12px + env(safe-area-inset-top))!important}.kam-settings-head h2{font-size:18px!important;margin:0!important}.top-right .kam-theme-picker{display:grid!important;min-width:110px!important}.top-right #kam-theme-switcher{display:block!important;visibility:visible!important}}

/* KAM v3.22.8: keep chat composer visible on desktop and mobile, even after attachments. */
.stage{min-height:0}
.stage>footer{display:flex!important;flex:0 0 auto!important;position:relative;z-index:12;align-items:center;justify-content:flex-start;gap:8px;max-width:none;min-height:64px}
.stage>footer #text-form{display:flex!important;flex:1 1 280px!important;min-width:170px!important;min-height:50px;visibility:visible!important;opacity:1!important;order:10}
.stage>footer #text-input{display:block!important;min-width:80px!important;width:100%;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
.stage>footer #kam-research-bar{display:none!important}
.stage>footer #kam-research-sources[hidden]{display:none!important}
.stage>footer #kam-attachment-status{flex-basis:100%;order:20;min-height:0}
.quick-actions{display:none!important}
@media(min-width:781px){.stage>footer{margin-top:auto!important;padding:8px 0 2px!important}.stage>.visual{min-height:0!important;flex:1 1 0!important}.stage>footer #text-form{min-width:220px!important}}
@media(max-width:780px){.stage>footer{display:flex!important;flex-wrap:wrap!important;padding:8px 0 calc(12px + env(safe-area-inset-bottom))!important}.stage>footer #text-form{flex:1 1 55%!important;order:10;min-width:150px!important}.stage>footer .controls{order:1}.stage>footer #kam-chat-attach{order:2}.stage>footer #kam-attachment-status{order:20}.stage>.visual{max-height:34dvh;min-height:150px!important}#kam-mobile-menu{font-size:21px!important;min-width:44px;min-height:42px;line-height:1!important;padding:7px!important}}
