:root {
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r-xl: 20px; --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
  --glass: 60;
  --accent: #8a7cff; --accent2: #ff8acd;
  --bg: #111118; --surface: #18171f;
  --panel: rgba(255,255,255,0.042);
  --border: rgba(255,255,255,0.075);
  --text: #ede9f8; --muted: #9b96b0; --faint: #5e596e;
  --shadow: 0 24px 64px rgba(0,0,0,0.55);
}
[data-theme="daylight"]{ --bg:#eeeaf8; --surface:#fff; --panel:rgba(0,0,0,0.032); --border:rgba(0,0,0,0.08); --text:#1e1a2e; --muted:#6b6480; --faint:#b0aabf; --shadow:0 12px 40px rgba(80,60,160,.13); }
[data-theme="obsidian"]{ --bg:#08080c; --surface:#0d0c12; --panel:rgba(255,255,255,.025); --border:rgba(255,255,255,.05); --text:#dddae8; --muted:#7a768a; --faint:#42404e; }
[data-theme="rose"]{ --bg:#130e11; --surface:#1a1118; --panel:rgba(255,200,230,.04); --border:rgba(255,180,220,.09); --text:#f5e6f0; --muted:#a87898; --faint:#6b4860; }

*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; overflow:hidden; }
body{ font-family:var(--font); background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; }
button{ font-family:inherit; background:none; border:none; cursor:pointer; color:inherit; }
input,select,textarea{ font-family:inherit; background:none; border:none; outline:none; color:inherit; }
svg{ display:block; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
::-webkit-scrollbar{ width:5px; } ::-webkit-scrollbar-thumb{ background:var(--border); border-radius:5px; }
.hidden{ display:none !important; }

/* LOGIN */
.login-screen{ position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; background:var(--bg); }
.login-bg{ position:absolute; inset:0; background: radial-gradient(ellipse at 20% 30%,color-mix(in srgb,var(--accent) 18%,transparent) 0%,transparent 55%), radial-gradient(ellipse at 80% 70%,color-mix(in srgb,var(--accent2) 14%,transparent) 0%,transparent 55%); pointer-events:none; }
.login-box{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:24px; padding:40px 32px; background:var(--panel); backdrop-filter:blur(40px) saturate(150%); border:1px solid var(--border); border-radius:28px; box-shadow:var(--shadow); min-width:340px; }
.login-logo{ font-size:28px; font-weight:700; letter-spacing:-1px; background:linear-gradient(135deg,var(--accent),var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.user-select{ display:flex; flex-wrap:wrap; gap:16px; justify-content:center; }
.user-card{ display:flex; flex-direction:column; align-items:center; gap:8px; cursor:pointer; padding:12px; border-radius:var(--r-lg); transition:background .12s, transform .12s; min-width:90px; }
.user-card:hover{ background:var(--panel); transform:translateY(-2px); }
.user-avatar{ width:60px; height:60px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:26px; font-weight:700; border:2px solid var(--border); user-select:none; }
.user-name{ font-size:13px; color:var(--muted); text-align:center; }
.login-form{ display:flex; flex-direction:column; align-items:center; gap:12px; width:100%; }
.login-avatar-big{ width:80px; height:80px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:34px; border:2px solid var(--border); }
.login-username-label{ font-size:18px; font-weight:600; }
.login-password{ width:100%; padding:12px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); font-size:14px; transition:border-color .15s; }
.login-password:focus{ border-color:color-mix(in srgb,var(--accent) 60%,transparent); outline:none; }
.login-submit{ width:100%; padding:12px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; font-weight:600; font-size:14px; border-radius:var(--r-md); transition:opacity .12s; }
.login-submit:hover{ opacity:.9; }
.login-back{ color:var(--muted); font-size:13px; } .login-back:hover{ color:var(--text); }
.login-error{ color:#ff6b6b; font-size:13px; }
.add-user-btn{ color:var(--muted); font-size:13px; padding:8px 16px; border-radius:var(--r-sm); border:1px solid var(--border); transition:background .12s, color .12s; }
.add-user-btn:hover{ background:var(--panel); color:var(--text); }
.avatar-picker{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-bottom:4px; }
.av-opt{ width:44px; height:44px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:20px; cursor:pointer; border:2px solid transparent; transition:border-color .12s, transform .12s; }
.av-opt.selected{ border-color:var(--accent); transform:scale(1.1); }
.modal-box{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-xl); padding:24px; box-shadow:var(--shadow); width:min(360px,90vw); display:flex; flex-direction:column; gap:12px; }
.modal-box h3{ font-size:15px; font-weight:600; }
.modal-input{ width:100%; padding:11px 14px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); font-size:13.5px; }
.modal-input:focus{ border-color:color-mix(in srgb,var(--accent) 50%,transparent); outline:none; }
.modal-btns{ display:flex; gap:8px; }
.ghost-btn{ padding:8px 14px; border-radius:var(--r-sm); border:1px solid var(--border); font-size:13px; color:var(--muted); transition:background .12s, color .12s; }
.ghost-btn:hover{ background:var(--panel); color:var(--text); }

/* APP */
#app{ display:flex; height:100vh; padding:8px; gap:8px; }

/* SIDEBAR */
.sidebar{ width:240px; flex-shrink:0; display:flex; flex-direction:column; gap:4px; background:var(--panel); backdrop-filter:blur(30px) saturate(150%); -webkit-backdrop-filter:blur(30px) saturate(150%); border:1px solid var(--border); border-radius:var(--r-xl); overflow:hidden; position:relative; transition:width .22s ease, margin .22s ease, opacity .22s; }
.sidebar.collapsed{ width:0; margin-right:-8px; opacity:0; pointer-events:none; border:none; }
.aurora-orb{ position:absolute; top:-80px; left:-60px; width:320px; height:320px; border-radius:50%; background:radial-gradient(circle, color-mix(in srgb,var(--accent) 40%,transparent) 0%, color-mix(in srgb,var(--accent2) 20%,transparent) 50%, transparent 70%); filter:blur(50px); pointer-events:none; opacity:.65; animation:drift 18s ease-in-out infinite alternate; }
@keyframes drift{ from{ transform:translate(0,0) scale(1); } to{ transform:translate(18px,28px) scale(1.1); } }
.sidebar-top{ display:flex; align-items:center; gap:10px; padding:14px 12px 8px; position:relative; z-index:1; }
.brand{ display:flex; align-items:center; gap:8px; font-weight:600; font-size:15px; }
.brand-icon{ width:10px; height:10px; border-radius:50%; background:linear-gradient(135deg,var(--accent),var(--accent2)); box-shadow:0 0 14px color-mix(in srgb,var(--accent) 70%,transparent); flex-shrink:0; }
.new-tab-btn{ display:flex; align-items:center; gap:8px; margin:4px 10px; padding:8px 10px; border-radius:var(--r-md); font-size:13px; color:var(--muted); transition:background .12s, color .12s; position:relative; z-index:1; }
.new-tab-btn:hover{ background:var(--surface); color:var(--text); }
.new-tab-btn svg{ width:14px; height:14px; flex-shrink:0; }
.new-tab-btn kbd{ margin-left:auto; font-size:10.5px; color:var(--faint); font-family:var(--mono); }
.section-label{ font-size:10.5px; text-transform:uppercase; letter-spacing:.07em; color:var(--faint); padding:8px 18px 4px; position:relative; z-index:1; }
.tabs-section{ flex:1; overflow:hidden; display:flex; flex-direction:column; position:relative; z-index:1; }
.tabs-list{ flex:1; overflow-y:auto; padding:0 8px; display:flex; flex-direction:column; gap:1px; }
.tab-item{ display:flex; align-items:center; gap:8px; padding:8px; border-radius:var(--r-md); font-size:12.5px; color:var(--muted); cursor:pointer; position:relative; transition:background .1s, color .1s; user-select:none; }
.tab-item:hover,.tab-item.active{ background:var(--surface); color:var(--text); }
.tab-item.active::before{ content:""; position:absolute; left:-8px; top:25%; bottom:25%; width:3px; border-radius:3px; background:linear-gradient(var(--accent),var(--accent2)); }
.tab-fav{ font-size:12px; flex-shrink:0; width:16px; text-align:center; }
.tab-title{ flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tab-close{ opacity:0; flex-shrink:0; width:18px; height:18px; display:flex; align-items:center; justify-content:center; border-radius:4px; }
.tab-item:hover .tab-close{ opacity:.6; } .tab-close:hover{ opacity:1 !important; background:rgba(255,255,255,.08); }
.tab-close svg{ width:11px; height:11px; }
.bookmarks-section{ position:relative; z-index:1; padding-bottom:4px; }
.bookmarks-list{ max-height:130px; overflow-y:auto; padding:0 8px; display:flex; flex-direction:column; gap:1px; }
.bookmark-item{ display:flex; align-items:center; gap:7px; padding:6px 8px; border-radius:var(--r-sm); font-size:12px; color:var(--muted); cursor:pointer; transition:background .1s, color .1s; }
.bookmark-item:hover{ background:var(--surface); color:var(--text); }
.bookmark-item svg{ width:11px; height:11px; flex-shrink:0; color:var(--accent); }
.bookmark-item span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sidebar-footer{ display:flex; align-items:center; gap:2px; padding:10px 12px; border-top:1px solid var(--border); position:relative; z-index:1; }
.profile-chip{ width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; cursor:pointer; border:1.5px solid var(--border); transition:border-color .12s; margin-left:auto; }
.profile-chip:hover{ border-color:var(--accent); }

/* ICON BUTTONS */
.icon-btn{ width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:var(--r-sm); color:var(--muted); transition:background .1s, color .1s; flex-shrink:0; }
.icon-btn svg{ width:16px; height:16px; }
.icon-btn:hover{ background:var(--surface); color:var(--text); }
.icon-btn.sm{ width:28px; height:28px; } .icon-btn.sm svg{ width:15px; height:15px; }
.icon-btn.xs{ width:24px; height:24px; } .icon-btn.xs svg{ width:13px; height:13px; }

/* MAIN */
main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:8px; }
.toolbar{ display:flex; align-items:center; gap:5px; background:var(--panel); backdrop-filter:blur(30px) saturate(150%); -webkit-backdrop-filter:blur(30px) saturate(150%); border:1px solid var(--border); border-radius:var(--r-xl); padding:5px 8px; flex-shrink:0; }
.omnibox{ flex:1; display:flex; align-items:center; gap:8px; background:var(--surface); border:1px solid transparent; border-radius:999px; padding:7px 10px 7px 14px; transition:border-color .15s; }
.omnibox:focus-within{ border-color:color-mix(in srgb,var(--accent) 45%,transparent); }
.omni-icon{ width:13px; height:13px; color:var(--faint); flex-shrink:0; }
#omnibox{ flex:1; font-size:13px; min-width:0; } #omnibox::placeholder{ color:var(--faint); }
#starBtn svg{ width:14px; height:14px; } #starBtn.starred{ color:var(--accent); }
#viewport{ flex:1; position:relative; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-xl); overflow:hidden; min-height:0; }
.view-frame{ position:absolute; inset:0; width:100%; height:100%; border:none; display:none; background:#fff; }
.view-frame.active{ display:block; }

/* NEW TAB */
.newtab{ position:absolute; inset:0; display:none; flex-direction:column; align-items:center; justify-content:center; gap:28px; background: radial-gradient(ellipse at 25% 25%,color-mix(in srgb,var(--accent) 12%,transparent) 0%,transparent 60%), radial-gradient(ellipse at 75% 70%,color-mix(in srgb,var(--accent2) 10%,transparent) 0%,transparent 60%), var(--surface); }
.newtab.active{ display:flex; }
.newtab-logo{ font-size:40px; font-weight:700; letter-spacing:-1.5px; background:linear-gradient(135deg,var(--accent),var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.newtab-search{ width:min(520px,80vw); display:flex; align-items:center; gap:10px; background:rgba(255,255,255,0.06); border:1px solid var(--border); border-radius:999px; padding:13px 18px; backdrop-filter:blur(20px); transition:border-color .15s; }
.newtab-search:focus-within{ border-color:color-mix(in srgb,var(--accent) 50%,transparent); }
.newtab-search input{ flex:1; font-size:15px; background:none; border:none; outline:none; color:var(--text); }
.newtab-search input::placeholder{ color:var(--faint); }
.newtab-search svg{ color:var(--faint); flex-shrink:0; width:16px; height:16px; }
.newtab-shortcuts{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; max-width:520px; }
.shortcut{ display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; }
.shortcut-icon{ width:50px; height:50px; border-radius:var(--r-lg); background:var(--panel); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:19px; font-weight:700; color:var(--accent); transition:transform .12s; backdrop-filter:blur(16px); }
.shortcut:hover .shortcut-icon{ transform:translateY(-3px); }
.shortcut-label{ font-size:11px; color:var(--muted); }

/* CODE EDITOR (full workspace) */
.code-panel{ position:fixed; inset:8px; z-index:150; display:flex; flex-direction:column; background:var(--bg); border:1px solid var(--border); border-radius:var(--r-xl); box-shadow:var(--shadow); overflow:hidden; }
.cp-topbar{ display:flex; align-items:center; gap:12px; padding:8px 12px; border-bottom:1px solid var(--border); background:var(--panel); backdrop-filter:blur(30px) saturate(150%); -webkit-backdrop-filter:blur(30px) saturate(150%); flex-shrink:0; }
.cp-brand{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; }
.cp-brand-dot{ width:9px; height:9px; border-radius:50%; background:linear-gradient(135deg,var(--accent),var(--accent2)); box-shadow:0 0 12px color-mix(in srgb,var(--accent) 70%,transparent); }
.cp-toolbar{ display:flex; align-items:center; gap:6px; flex:1; flex-wrap:wrap; }
.tb-btn{ display:flex; align-items:center; gap:6px; padding:6px 11px; border-radius:var(--r-sm); font-size:12px; font-weight:500; color:var(--muted); border:1px solid var(--border); background:var(--surface); transition:background .12s, color .12s, border-color .12s; }
.tb-btn:hover{ color:var(--text); border-color:color-mix(in srgb,var(--accent) 40%,transparent); }
.tb-btn svg{ width:12px; height:12px; }
.tb-btn.run{ background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; border-color:transparent; }
.tb-btn.run:hover{ opacity:.92; }
.tb-sep{ width:1px; height:20px; background:var(--border); margin:0 2px; }
.tb-autorun{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); cursor:pointer; user-select:none; }
.tb-autorun input{ accent-color:var(--accent); }
.cp-body{ flex:1; display:flex; min-height:0; }

/* files sidebar */
.fe-sidebar{ width:210px; flex-shrink:0; display:flex; flex-direction:column; border-right:1px solid var(--border); background:var(--panel); }
.fe-sidebar-head{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px 8px; }
.fe-sidebar-label{ font-size:10.5px; text-transform:uppercase; letter-spacing:.1em; color:var(--faint); font-weight:600; }
.fe-add-btn{ width:22px; height:22px; display:flex; align-items:center; justify-content:center; border-radius:6px; font-size:17px; line-height:1; color:var(--muted); transition:background .1s, color .1s; }
.fe-add-btn:hover{ background:var(--surface); color:var(--text); }
.fe-new-row{ display:flex; flex-direction:column; gap:6px; padding:4px 10px 8px; }
.fe-new-row input{ width:100%; padding:6px 9px; background:var(--surface); border:1px solid var(--border); border-radius:6px; font-size:12px; font-family:var(--mono); transition:border-color .15s; }
.fe-new-row input:focus{ border-color:color-mix(in srgb,var(--accent) 55%,transparent); }
.fe-new-row input.shake{ animation:shake .35s ease; border-color:#ff6b6b; }
.fe-new-btns{ display:flex; gap:6px; }
.fe-new-ok{ flex:1; padding:5px; border-radius:6px; font-size:11.5px; font-weight:600; background:var(--accent); color:#fff; }
.fe-new-cancel{ padding:5px 9px; border-radius:6px; font-size:11.5px; color:var(--muted); border:1px solid var(--border); }
.fe-file-list{ flex:1; overflow-y:auto; padding:2px 8px 10px; }
.fe-file{ display:flex; align-items:center; gap:8px; padding:6px 9px; border-radius:var(--r-sm); font-size:12.5px; color:var(--muted); cursor:pointer; transition:background .1s, color .1s; }
.fe-file:hover{ background:var(--surface); color:var(--text); }
.fe-file.active{ background:var(--surface); color:var(--text); }
.fe-file-dot{ width:8px; height:8px; border-radius:2px; flex-shrink:0; }
.fe-file-name{ flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family:var(--mono); font-size:11.5px; }
.fe-file-del{ opacity:0; transition:opacity .1s; } .fe-file:hover .fe-file-del{ opacity:.55; } .fe-file-del:hover{ opacity:1 !important; } .fe-file-del svg{ width:11px; height:11px; }

/* editor */
.fe-main{ flex:1; display:flex; flex-direction:column; min-width:0; }
.fe-tabs{ display:flex; gap:2px; padding:6px 8px 0; overflow-x:auto; border-bottom:1px solid var(--border); flex-shrink:0; }
.fe-tab{ display:flex; align-items:center; gap:6px; padding:7px 12px; border-radius:8px 8px 0 0; font-size:11.5px; color:var(--muted); white-space:nowrap; cursor:pointer; font-family:var(--mono); transition:background .1s, color .1s; }
.fe-tab.active{ background:var(--surface); color:var(--text); }
.fe-tab-dot{ width:7px; height:7px; border-radius:2px; }
.fe-editor-area{ flex:1; display:flex; min-height:0; background:var(--surface); position:relative; }
.fe-lines{ flex-shrink:0; padding:12px 8px 12px 12px; text-align:right; font-family:var(--mono); font-size:12.5px; line-height:1.65; color:var(--faint); background:var(--panel); overflow:hidden; user-select:none; }
.fe-lines span{ display:block; }
.fe-editor{ flex:1; resize:none; padding:12px 14px; font-family:var(--mono); font-size:12.5px; line-height:1.65; color:var(--text); background:transparent; tab-size:2; white-space:pre; overflow:auto; }

/* right: preview + console */
.fe-right{ width:38%; min-width:280px; flex-shrink:0; display:flex; flex-direction:column; border-left:1px solid var(--border); background:var(--bg); }
.fe-right-head, .fe-console-head{ display:flex; align-items:center; justify-content:space-between; padding:8px 12px; font-size:10.5px; text-transform:uppercase; letter-spacing:.09em; color:var(--faint); font-weight:600; border-bottom:1px solid var(--border); }
.live-dot{ width:7px; height:7px; border-radius:50%; background:#34d399; box-shadow:0 0 8px #34d399; animation:pulse 2s ease-in-out infinite; }
.fe-preview{ flex:1; width:100%; border:none; background:#fff; min-height:0; }
.fe-console-head{ border-top:1px solid var(--border); }
.err-badge{ display:none; margin-left:4px; padding:1px 7px; border-radius:999px; background:#ff6b6b; color:#fff; font-size:10px; }
.err-badge.show{ display:inline-block; }
.console-clear{ font-size:11px; text-transform:none; letter-spacing:0; color:var(--muted); font-weight:500; } .console-clear:hover{ color:var(--text); }
.fe-console{ height:32%; min-height:110px; overflow-y:auto; padding:8px 0; font-family:var(--mono); font-size:11.5px; }
.c-empty{ padding:4px 14px; color:var(--faint); font-style:italic; }
.c-line{ display:flex; gap:8px; padding:3px 14px; border-bottom:1px solid color-mix(in srgb,var(--border) 50%,transparent); white-space:pre-wrap; word-break:break-word; }
.c-icon{ flex-shrink:0; opacity:.6; }
.c-line.warn{ color:#f7c948; } .c-line.error{ color:#ff8a8a; background:color-mix(in srgb,#ff6b6b 8%,transparent); } .c-line.info{ color:#5bc8ff; }

@keyframes shake{ 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
@keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.4} }

.wisp-status{ font-size:11.5px; color:var(--muted); font-family:var(--mono); word-break:break-all; padding:8px 10px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm); }
.wisp-status.ok{ color:#34d399; }

/* DEVTOOLS (Requests + Settings) */
.devtools{ position:absolute; inset:0; z-index:60; display:flex; flex-direction:column; background:var(--surface); }
.dt-tabs{ display:flex; align-items:center; gap:2px; padding:6px 8px; border-bottom:1px solid var(--border); background:var(--panel); flex-shrink:0; }
.dt-tab{ padding:6px 14px; border-radius:var(--r-sm); font-size:12.5px; color:var(--muted); transition:background .1s, color .1s; }
.dt-tab:hover{ color:var(--text); }
.dt-tab.active{ background:var(--surface); color:var(--text); }
.dt-count{ color:var(--faint); font-size:11px; }
.dt-spacer{ flex:1; }
.dt-close{ color:var(--muted); }
.dt-body{ flex:1; min-height:0; display:flex; }
.dt-view{ flex:1; min-height:0; display:flex; flex-direction:column; }
.dt-req-bar{ display:flex; gap:8px; padding:8px 10px; border-bottom:1px solid var(--border); flex-shrink:0; }
.dt-search{ flex:1; padding:7px 12px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm); font-size:12.5px; }
.dt-search:focus{ border-color:color-mix(in srgb,var(--accent) 45%,transparent); }
.dt-req-split{ flex:1; min-height:0; display:flex; }
.dt-req-list{ width:46%; min-width:280px; overflow-y:auto; border-right:1px solid var(--border); }
.req-row{ padding:8px 12px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .08s; }
.req-row:hover{ background:var(--panel); }
.req-row.active{ background:color-mix(in srgb,var(--accent) 15%,transparent); }
.req-line1{ display:flex; align-items:center; gap:8px; }
.req-method{ font-size:9.5px; font-weight:700; padding:1px 6px; border-radius:4px; font-family:var(--mono); background:var(--panel); color:var(--muted); flex-shrink:0; }
.req-method.m-get{ color:#34d399; } .req-method.m-post{ color:#f7c948; } .req-method.m-put,.req-method.m-patch{ color:#5bc8ff; } .req-method.m-delete{ color:#ff8a8a; }
.req-url{ flex:1; font-size:12px; font-family:var(--mono); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
.req-line2{ display:flex; align-items:center; gap:10px; margin-top:4px; font-size:11px; color:var(--faint); font-family:var(--mono); }
.req-status.s-ok{ color:#34d399; } .req-status.s-redir{ color:#f7c948; } .req-status.s-err{ color:#ff8a8a; } .req-status.s-pending{ color:var(--faint); }
.req-ct{ background:var(--panel); padding:0 6px; border-radius:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:180px; }
.dt-req-detail{ flex:1; overflow-y:auto; padding:14px 16px; }
.dt-sec-title{ font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--faint); font-weight:600; margin:16px 0 8px; }
.dt-sec-title:first-child{ margin-top:0; }
.kv{ display:grid; grid-template-columns:150px 1fr; gap:3px 12px; font-size:12px; font-family:var(--mono); }
.kv-k{ color:var(--muted); } .kv-v{ color:var(--text); } .kv-v.break{ word-break:break-all; }
.dt-empty{ color:var(--faint); font-size:12.5px; font-style:italic; }
.dt-settings{ max-width:640px; padding:22px 26px; overflow-y:auto; }
.dt-settings h3{ font-size:15px; margin-bottom:4px; font-weight:600; }
.dt-sub{ color:var(--muted); font-size:12px; margin-bottom:18px; }
.dt-field{ margin-bottom:16px; display:flex; flex-direction:column; gap:6px; }
.dt-field > label{ font-size:12.5px; color:var(--text); font-weight:500; }
.dt-check{ display:flex; align-items:center; gap:8px; cursor:pointer; }
.dt-check input{ accent-color:var(--accent); }
.dt-hint{ font-size:11px; color:var(--faint); }
.dt-hint code{ background:var(--panel); padding:1px 5px; border-radius:4px; font-family:var(--mono); }
.lang-select2{ padding:9px 11px; background:var(--panel); border:1px solid var(--border); border-radius:var(--r-sm); font-size:13px; }
.dt-actions{ display:flex; gap:8px; margin-top:8px; }

@media (max-width:820px){
  .cp-body{ flex-direction:column; }
  .fe-sidebar{ width:100%; flex-direction:row; border-right:none; border-bottom:1px solid var(--border); overflow-x:auto; }
  .fe-right{ width:100%; border-left:none; border-top:1px solid var(--border); }
}

/* OVERLAYS */
.overlay{ position:fixed; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); display:flex; align-items:center; justify-content:center; z-index:200; }
.overlay.hidden{ display:none; }
.palette-box{ width:min(560px,90vw); background:var(--surface); border:1px solid var(--border); border-radius:var(--r-xl); box-shadow:var(--shadow); overflow:hidden; align-self:flex-start; margin-top:12vh; }
.palette-input{ width:100%; padding:16px 18px; font-size:15px; border-bottom:1px solid var(--border); }
.palette-results{ max-height:340px; overflow-y:auto; padding:6px; }
.p-result{ display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:var(--r-sm); font-size:13px; color:var(--muted); cursor:pointer; }
.p-result:hover,.p-result.sel{ background:var(--panel); color:var(--text); }
.p-result kbd{ margin-left:auto; font-size:11px; color:var(--faint); }
.theme-box{ background:var(--surface); border:1px solid var(--border); border-radius:var(--r-xl); box-shadow:var(--shadow); padding:20px; width:min(400px,92vw); }
.theme-box-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.theme-box-head h3{ font-size:15px; font-weight:600; }
.theme-section{ margin-bottom:16px; }
.theme-label{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--faint); margin-bottom:8px; }
.swatch-row{ display:flex; gap:9px; flex-wrap:wrap; }
.swatch{ width:32px; height:32px; border-radius:50%; cursor:pointer; border:2px solid transparent; transition:transform .12s, border-color .12s; }
.swatch.active{ border-color:var(--text); transform:scale(1.12); }
.seg-ctrl{ display:flex; background:var(--panel); border-radius:var(--r-sm); padding:3px; }
.seg-ctrl button{ flex:1; padding:6px 10px; border-radius:6px; font-size:12px; color:var(--muted); transition:background .1s, color .1s; }
.seg-ctrl button.active{ background:var(--surface); color:var(--text); }
#glassRange{ width:100%; accent-color:var(--accent); margin-top:4px; }
.cloak-section{ background:var(--panel); border:1px solid var(--border); border-radius:var(--r-md); padding:14px; margin-bottom:10px; display:flex; flex-direction:column; gap:8px; }
.cloak-title{ font-size:13.5px; font-weight:600; }
.cloak-desc{ font-size:12px; color:var(--muted); }
.cloak-desc code{ background:var(--panel); padding:1px 5px; border-radius:4px; font-family:var(--mono); font-size:11px; }
.profile-info{ display:flex; align-items:center; gap:12px; padding:4px 0 16px; }
.profile-avatar-lg{ width:56px; height:56px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:24px; font-weight:700; border:2px solid var(--border); flex-shrink:0; }
.profile-details{ display:flex; flex-direction:column; gap:2px; }
.profile-name{ font-size:16px; font-weight:600; }
.profile-sub{ font-size:12px; color:var(--muted); }

/* COMPACT */
body.compact .sidebar{ width:56px; }
body.compact .brand-name{ display:none; }
body.compact .new-tab-btn span{ display:none; }
body.compact .new-tab-btn kbd{ display:none; }
body.compact .tab-title{ display:none; }
body.compact .tab-close{ display:none; }
body.compact .section-label{ display:none; }
body.compact .bookmarks-section{ display:none; }
body.compact .tab-item{ justify-content:center; }
body.compact .new-tab-btn{ justify-content:center; }

/* LOCK SCREEN */
.lock-screen{ position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; background:var(--bg); }
.lock-bg{ position:absolute; inset:0; background: radial-gradient(ellipse at 20% 30%,color-mix(in srgb,var(--accent) 18%,transparent) 0%,transparent 55%), radial-gradient(ellipse at 80% 70%,color-mix(in srgb,var(--accent2) 14%,transparent) 0%,transparent 55%); pointer-events:none; }
.lock-box{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:16px; padding:40px 36px; background:var(--panel); backdrop-filter:blur(40px) saturate(150%); border:1px solid var(--border); border-radius:28px; box-shadow:var(--shadow); min-width:300px; }
.lock-logo{ font-size:26px; font-weight:700; letter-spacing:-1px; background:linear-gradient(135deg,var(--accent),var(--accent2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.lock-icon{ font-size:48px; }
.lock-input{ width:100%; padding:12px 16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-md); font-size:15px; text-align:center; letter-spacing:2px; transition:border-color .15s; }
.lock-input:focus{ border-color:color-mix(in srgb,var(--accent) 60%,transparent); outline:none; }
.lock-submit{ width:100%; padding:12px; background:linear-gradient(135deg,var(--accent),var(--accent2)); color:#fff; font-weight:600; font-size:14px; border-radius:var(--r-md); transition:opacity .12s; }
.lock-submit:hover{ opacity:.9; }
.lock-error{ color:#ff6b6b; font-size:13px; }