/* Shared Nestryn surfaces, palette and controls. File contents remain in app.css. */
:root{
 --bg:#121318;--panel:#202126;--panel2:#2e3747;--line:#34353a;
 --text:#fff;--muted:#b8bfcb;--accent:#fff;--accent2:#dedee3;--accent-ink:#121318;
 --danger:#ff727b;--hover:#ffffff08;--selected:#ffffff0c;
 --shadow:0 20px 60px #0003;--input:#2e3747;--preview:#191a20;--header:#121318ed;
 --sidebar-width:252px;color-scheme:dark;
 font-family:'Segoe UI',system-ui,-apple-system,sans-serif;
}
:root[data-theme=light]{
 --bg:#f6f7fb;--panel:#fff;--panel2:#eceef3;--line:#d9dce5;
 --text:#121318;--muted:#636975;--accent:#121318;--accent2:#34353a;--accent-ink:#fff;
 --danger:#b52f40;--hover:#12131805;--selected:#1213180a;
 --shadow:0 20px 60px #17192312;--input:#eceef3;--preview:#f0f1f5;--header:#f6f7fbed;
 color-scheme:light;
}
body,body:has(.cloud-login){background:var(--bg);color:var(--text);line-height:1.5;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
h1,h2,h3,.button,.nav-link,.file-name strong{font-weight:650}
.button,.file-action,.more-button,.icon-button,.view-button,.nav-link{transition:background .16s,border-color .16s,color .16s;touch-action:manipulation}
.button{border-radius:999px;min-height:44px;padding:10px 18px;font-size:14px}
.button:hover{transform:none}
.button.primary,.button.primary:hover{background:var(--accent);color:var(--accent-ink);box-shadow:none}
.button.primary:hover{background:var(--accent2)}
.button.secondary,.button.ghost,.button.identity-login{background:var(--panel);border-color:var(--line);color:var(--text)}
.button.secondary:hover,.button.ghost:hover,.button.identity-login:hover{background:var(--selected);border-color:var(--muted)}
.button.danger{background:var(--danger);color:var(--bg)}
.button.small{min-height:36px;font-size:12px;padding:7px 13px}
.icon-button{border-radius:50%;background:transparent;color:var(--text)}
.icon-button:hover{background:var(--selected)}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--text);outline-offset:3px}
.topbar{height:80px;background:var(--header);padding-inline:24px;gap:32px;border-color:var(--line)}
.topbar nav{gap:6px}
.nav-link{border-radius:999px;padding:10px 16px;color:var(--muted);font-size:14px}
.nav-link[aria-current=page],.nav-link:hover{background:var(--selected);color:var(--text)}
.brand-product{color:var(--muted)}
.theme-toggle{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--line);flex:none}
.theme-toggle .ui-icon{width:19px;height:19px}
.user-menu{gap:12px}.user-menu>span{max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:root[data-theme=light] .brand-wordmark-image,:root[data-theme=light] .identity-login-logo img{filter:brightness(0)}
:root[data-theme=light] .cloud-brand-icon{filter:none}
.cloud-workspace{grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
.cloud-workspace>.page{padding:24px 28px 56px}
.cloud-sidebar{background:transparent;border-color:var(--line)}
.cloud-explorer{padding:22px 12px;scrollbar-color:var(--line) transparent;scrollbar-width:thin}
.cloud-explorer summary{border-radius:22px;padding:10px 12px;font-size:15px}
.cloud-explorer ul{margin-left:8px;padding-left:6px}
.explorer-row{display:flex;position:relative;align-items:center;border-radius:22px;min-width:0}
.explorer-folder{border-radius:22px;min-height:42px;flex:1;padding:9px 12px;font-size:14px;gap:10px}
.explorer-folder[aria-current=page]{background:var(--selected);color:var(--text)}
.explorer-row:has([aria-current=page]),.explorer-row:hover{background:var(--selected)}
.explorer-row .explorer-folder[aria-current=page]{background:transparent}
.explorer-folder:hover,.cloud-explorer summary:hover{background:var(--hover)}
.explorer-more{width:30px;height:30px;margin-right:5px;flex:none;display:grid;place-items:center;opacity:0;border:0}
.explorer-row:hover .explorer-more,.explorer-row:focus-within .explorer-more,.explorer-more[aria-expanded=true]{opacity:1}
.explorer-row:has(.context-menu.open){z-index:25}
.explorer-row .context-menu{top:calc(100% + 4px);right:0;min-width:min(190px,100%)}
.hero-row{background:var(--panel);border:1px solid var(--line);border-radius:28px;padding:24px;gap:20px;margin-bottom:20px;min-width:0}
.hero-row>div:first-child{min-width:0}
.hero-row h1{font-size:clamp(26px,2.6vw,36px);letter-spacing:-.035em;overflow-wrap:anywhere}
.storage-note{font-size:12px;color:var(--muted);margin:8px 0 0}
.hero-row .actions{flex:none;align-items:center}
.hero-row .button.secondary{background:var(--selected)}
.file-toolbar{margin-bottom:18px;gap:16px}
.breadcrumbs{font-size:13px;min-width:0;overflow:auto;padding:6px 0;scrollbar-width:thin}
.breadcrumbs a{color:var(--muted)}.breadcrumbs a:last-child,.breadcrumbs a:hover{color:var(--text)}
.item-count{color:var(--muted);font-size:12px}
.view-switch{border-radius:24px;background:var(--panel);border-color:var(--line);padding:4px;gap:4px}
.view-button{width:36px;height:32px;border-radius:18px;color:var(--muted)}
.view-button:hover{background:var(--selected);color:var(--text)}
.view-button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}
.file-panel,.card-list,.integration-card,.public-card,.auth-card,.upload-queue{border-color:var(--line);background:var(--panel);border-radius:24px;box-shadow:none}
.file-panel[data-layout=grid]{gap:16px;grid-template-columns:repeat(auto-fill,minmax(244px,1fr));background:transparent}
.file-panel[data-layout=grid]>.file-row{border-radius:24px;background:var(--panel);border-color:var(--line);padding:14px;gap:10px 12px}
.file-panel[data-layout=grid]>.file-row:hover{background:var(--panel);border-color:var(--muted)}
.file-row{border-bottom-color:var(--line)}
.file-row:hover{background:var(--hover)}
.file-name strong,.file-panel[data-layout=grid] .file-name strong{font-size:14px;font-weight:650}
.file-name:hover strong{color:var(--text)}
.file-visual,.file-panel[data-layout=grid] .file-visual{border-radius:16px;background:var(--preview);color:var(--muted)}
.file-panel[data-layout=grid] .file-visual{height:160px}
.file-panel[data-layout=grid] .file-fallback{color:var(--muted);font-size:26px;font-weight:700}
.file-panel[data-layout=grid] .row-actions{border-top-color:var(--line);padding-top:12px;margin-top:4px}
.file-action,.more-button{border-radius:20px;background:transparent;color:var(--text);border-color:var(--line);height:38px}
.file-action{font-size:12px;font-weight:600}
.file-action:hover,.more-button:hover{background:var(--selected);color:var(--text);border-color:var(--muted)}
.more-button{width:38px}.meta{color:var(--muted)}
.context-menu{border-radius:18px;background:var(--panel);border-color:var(--line);box-shadow:var(--shadow);padding:6px;color:var(--text)}
.context-menu button{border-radius:12px;color:var(--text);padding:10px 12px}
.context-menu button:hover{background:var(--selected)}.context-menu button.danger-text,.danger-text{color:var(--danger)}
.file-panel[data-layout=grid]>.empty-state{background:var(--panel);border:1px solid var(--line);border-radius:24px}
.empty-state{color:var(--muted);padding:56px 20px;text-align:center}
.empty-state h2,.empty-state h3{color:var(--text)}
.empty-icon{display:grid;place-items:center;margin:0 auto 16px;width:56px;height:56px;border-radius:20px;background:var(--selected);color:var(--text)}
.empty-icon>.ui-icon{width:26px;height:26px}
dialog{border-radius:26px;background:var(--panel);border:1px solid var(--line);color:var(--text);box-shadow:var(--shadow)}
dialog::backdrop{background:#12131888;backdrop-filter:blur(10px)}
.dialog-card{padding:26px}.dialog-card h2{font-size:24px;letter-spacing:-.025em}
input,select,textarea,.integration-page textarea,.integration-page select{border-radius:24px;background:var(--input);color:var(--text);border:1px solid transparent;padding:12px 16px;font-size:15px;font-weight:600}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--muted)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
label{color:var(--muted)}.dialog-actions{gap:10px}
.share-card,.shared-incoming{border-color:var(--line)}.share-card:hover,.shared-incoming:hover{background:var(--hover)}
.share-url{background:var(--preview);border-color:var(--line);color:var(--muted);border-radius:24px}
.public-row,.preview-head{border-color:var(--line)}.public-row:hover{background:var(--hover)}
.preview-body{background:var(--preview)}.preview-body pre{color:var(--text)}
.cloud-login{--panel:inherit;--panel2:inherit;--line:inherit;--text:inherit;--muted:inherit;--shadow:inherit;color:var(--text)}
.cloud-login .auth-card{background:var(--panel);border-color:var(--line);border-radius:24px}
.cloud-login .stack input{background:var(--input);color:var(--text)}
.cloud-login .button.primary{color:var(--accent-ink)}.cloud-login .button.identity-login:hover{background:var(--selected);border-color:var(--muted)}
@media(min-width:761px) and (max-width:1150px){
 :root{--sidebar-width:220px}.topbar{gap:18px}.nav-link{padding:10px 12px}
 .cloud-workspace>.page{padding:20px}.hero-row{align-items:flex-start;flex-direction:column}.hero-row .actions{width:auto}
}
@media(max-width:760px){
 .topbar{height:auto;gap:12px;padding:14px 16px}.topbar nav{gap:4px}.nav-link{font-size:12px;padding:9px 12px}
 .topbar .brand-wordmark-image{width:115px}.topbar .cloud-brand-icon{width:28px;height:28px}.topbar .brand-product{font-size:12px}
 .user-menu{gap:8px}.theme-toggle{width:36px;height:36px}
 .cloud-workspace>.page{padding:16px 16px 40px}.cloud-sidebar{border-color:var(--line)}
 .cloud-explorer{padding:6px 16px;max-height:40dvh}.explorer-more{opacity:1}
 .hero-row{padding:20px;border-radius:24px;gap:18px;margin-bottom:16px}.hero-row h1{font-size:28px}
 .hero-row .actions{width:100%;gap:8px}.hero-row .button{font-size:12px;padding:10px 12px}
 .file-toolbar{gap:8px}.breadcrumbs{font-size:12px}.view-controls{gap:8px}
 .file-panel[data-layout=grid]{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .file-panel[data-layout=grid]>.file-row{padding:10px;border-radius:20px;gap:8px}
 .file-panel[data-layout=grid] .file-name strong{font-size:12px;min-height:36px;line-height:18px}
 .file-panel[data-layout=grid] .file-visual{height:124px;border-radius:12px}
 .file-panel[data-layout=grid] .row-actions{gap:5px;padding-top:10px}.file-action{font-size:11px}
 .file-panel[data-layout=grid] .file-action,.file-panel[data-layout=grid] .more-button{height:34px;min-width:28px}
 .file-panel[data-layout=list] .file-name strong{font-size:13px}
 .dialog-card{padding:22px}.dialog-actions .button{flex:1}
}
@media(max-width:360px){.file-panel[data-layout=grid]{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important}}
