@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root { color-scheme: dark; --ink: #101416; --panel: #171c1f; --panel-raised: #1d2427; --line: rgba(231, 239, 235, .12); --line-strong: rgba(231, 239, 235, .24); --text: #e8efeb; --muted: #8f9d98; --soft: #b8c3bf; --lime: #c7f36b; --lime-deep: #8fc735; --coral: #ff8068; --blue: #83c7e9; --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace; --sans: 'Manrope', 'Segoe UI', sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--text); font-family: var(--sans); }
body { min-width: 320px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; }
.login-view { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr); min-height: 100vh; }
.login-art { position: relative; overflow: hidden; background: #1b2324; min-height: 100vh; }
.art-grid { position: absolute; inset: 0; opacity: .45; background-image: linear-gradient(rgba(199,243,107,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(199,243,107,.08) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(150deg, rgba(0,0,0,.95), transparent 75%); }
.login-art::after { content: ''; position: absolute; inset: 12% 10%; border: 1px solid rgba(199,243,107,.22); border-radius: 50% 50% 0 0; transform: rotate(-17deg); }
.art-caption { position: absolute; left: 11%; bottom: 12%; color: var(--lime); font: 500 11px var(--mono); letter-spacing: .13em; }
.caption-dot, .status-dot, .secure-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(199,243,107,.12); margin-right: 9px; }
.art-line { position: absolute; background: var(--lime); opacity: .7; }
.art-line-a { width: 1px; height: 42%; right: 19%; top: 19%; transform: rotate(28deg); }
.art-line-b { width: 36%; height: 1px; right: 7%; top: 34%; transform: rotate(-28deg); }
.login-panel { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 7vw, 90px) clamp(32px, 9vw, 128px); background: var(--ink); }
.brand-lockup { display: flex; align-items: center; gap: 11px; color: var(--text); font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--lime); color: var(--lime); font: 500 10px var(--mono); letter-spacing: -.08em; }
.login-copy { max-width: 500px; margin: 50px 0 36px; }
.eyebrow, .section-index { color: var(--lime); font: 500 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.login-copy h1 { margin: 17px 0 22px; font-size: clamp(42px, 5.2vw, 76px); line-height: .98; letter-spacing: -.065em; font-weight: 700; }
.login-copy h1 em { color: var(--soft); font-style: normal; font-weight: 400; }
.login-subtitle { max-width: 390px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.login-form { width: min(100%, 390px); }
label { display: block; margin-bottom: 9px; color: var(--soft); font-size: 12px; font-weight: 600; }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--line-strong); background: var(--panel); transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(199,243,107,.08); }
.input-symbol { padding-left: 14px; color: var(--lime); font-size: 20px; }
input, textarea { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
input { min-height: 48px; padding: 0 12px; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #66736e; }
.icon-button { display: inline-grid; flex: 0 0 auto; place-items: center; min-width: 42px; min-height: 42px; border: 0; background: transparent; color: var(--muted); font-size: 16px; }
.icon-button:hover { color: var(--lime); }
.primary-button, .secondary-button, .danger-button, .ghost-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; font-size: 12px; font-weight: 700; transition: transform .2s, background .2s, border-color .2s, color .2s; }
.primary-button { background: var(--lime); color: #152016; }
.primary-button:hover { background: #d6fa84; transform: translateY(-1px); }
.secondary-button { border-color: var(--line-strong); background: transparent; color: var(--text); }
.secondary-button:hover { border-color: var(--lime); color: var(--lime); }
.danger-button { background: var(--coral); color: #23100c; }
.danger-button:hover { background: #ff9a87; }
.ghost-button { min-height: 32px; padding: 0 10px; background: transparent; color: var(--muted); }
.ghost-button:hover { color: var(--text); }
.wide { width: 100%; margin-top: 14px; min-height: 49px; }
.form-error { min-height: 20px; margin: 12px 0 0; color: var(--coral); font-size: 12px; }
.login-footnote { color: var(--muted); font: 11px var(--mono); }
.workbench-view { min-height: 100vh; background: var(--ink); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 68px; padding: 0 clamp(18px, 4vw, 58px); border-bottom: 1px solid var(--line); }
.topbar-meta { display: flex; align-items: center; gap: 25px; }
.connection-state { color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; }
.connection-state .status-dot { width: 5px; height: 5px; margin-right: 8px; box-shadow: none; }
.workspace { display: grid; grid-template-columns: 265px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.sidebar { display: flex; flex-direction: column; gap: 32px; padding: 44px 27px; border-right: 1px solid var(--line); }
.sidebar-intro h2 { margin: 14px 0 7px; font-size: 24px; letter-spacing: -.04em; }
.muted-text { color: var(--muted); font-size: 12px; line-height: 1.7; }
.sidebar-actions { display: grid; gap: 9px; }
.storage-card { padding-top: 22px; border-top: 1px solid var(--line); }
.storage-heading { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--soft); font-size: 11px; }
.storage-heading span:last-child { color: var(--lime); font: 11px var(--mono); }
.storage-bar { height: 4px; background: var(--line-strong); }
.storage-bar span { display: block; height: 100%; width: 0; background: var(--lime); transition: width .4s ease; }
.storage-card .muted-text { margin: 9px 0 0; }
.sidebar-note { display: flex; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.sidebar-note p { margin: 0; color: #73817c; font-size: 11px; line-height: 1.7; }
.note-mark { color: var(--lime); }
.file-area { min-width: 0; padding: 42px clamp(18px, 5vw, 72px); }
.file-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 37px; }
.toolbar-title { display: flex; align-items: flex-start; gap: 17px; }
.toolbar-title h1 { margin: 4px 0 7px; font-size: clamp(25px, 3vw, 37px); letter-spacing: -.055em; }
.toolbar-title p { margin: 0; color: var(--muted); font-size: 12px; }
.section-index { display: block; padding-top: 8px; }
.search-box { display: flex; align-items: center; width: min(100%, 285px); min-height: 42px; margin: 0; border-bottom: 1px solid var(--line-strong); color: var(--muted); }
.search-box:focus-within { border-color: var(--lime); }
.search-box input { min-height: 40px; padding-left: 9px; font-size: 12px; }
.search-box kbd { padding: 2px 6px; border: 1px solid var(--line-strong); color: var(--muted); font: 10px var(--mono); }
.file-list { min-height: 280px; }
.file-list-head, .file-row { display: grid; grid-template-columns: minmax(200px, 1fr) 90px 144px 220px; align-items: center; gap: 18px; }
.file-list-head { padding: 0 17px 12px; border-bottom: 1px solid var(--line-strong); color: #76837f; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.file-list-head span:nth-child(2), .file-list-head span:nth-child(3) { text-align: right; }
.file-row { min-height: 78px; padding: 0 17px; border-bottom: 1px solid var(--line); transition: background .2s; }
.file-row:hover { background: rgba(199,243,107,.035); }
.file-identity { display: flex; align-items: center; min-width: 0; gap: 13px; }
.file-icon { display: grid; place-items: center; width: 33px; height: 39px; border: 1px solid rgba(131,199,233,.35); color: var(--blue); font: 500 11px var(--mono); }
.file-identity div { min-width: 0; }
.file-identity strong, .file-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-identity strong { color: var(--text); font-size: 13px; font-weight: 600; }
.file-identity div span { margin-top: 4px; color: var(--muted); font: 10px var(--mono); }
.file-size, .file-date { color: var(--muted); text-align: right; font: 11px var(--mono); }
.row-actions { display: flex; justify-content: flex-end; gap: 2px; }
.row-button { display: inline-flex; align-items: center; gap: 5px; min-height: 31px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-size: 11px; text-decoration: none; }
.row-button:hover { color: var(--lime); }
.danger-text:hover { color: var(--coral); }
.loading-state, .empty-state { display: grid; place-items: center; min-height: 310px; text-align: center; }
.loading-state { display: flex; justify-content: center; gap: 11px; color: var(--muted); font-size: 12px; }
.spinner { width: 13px; height: 13px; border: 1px solid var(--line-strong); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { align-content: center; gap: 8px; }
.empty-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 7px; border: 1px solid var(--line-strong); color: var(--lime); font-size: 18px; }
.empty-state h3 { margin: 0; font-size: 16px; }
.empty-state p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(4, 7, 8, .78); backdrop-filter: blur(8px); }
.modal { width: min(100%, 720px); max-height: min(90vh, 820px); overflow: auto; border: 1px solid var(--line-strong); background: var(--panel); box-shadow: 0 25px 80px rgba(0,0,0,.4); animation: modal-in .25s cubic-bezier(.25,1,.5,1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.small-modal { width: min(100%, 480px); padding: 29px; }
.editor-modal { padding: 31px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; }
.modal-head h2 { margin: 11px 0 0; font-size: 24px; letter-spacing: -.045em; }
.close-button { margin: -8px -8px 0 0; font-size: 25px; }
.editor-meta { display: flex; justify-content: space-between; gap: 14px; margin: 24px 0 12px; color: var(--muted); font: 10px var(--mono); }
.editor-textarea { display: block; min-height: 390px; padding: 17px; resize: vertical; border: 1px solid var(--line-strong); background: #101517; color: var(--text); font: 12px/1.7 var(--mono); }
.editor-textarea:focus { border-color: var(--lime); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.stack-form { margin-top: 27px; }
.stack-form input, .small-textarea { border: 1px solid var(--line-strong); background: #101517; }
.stack-form input { min-height: 45px; padding: 0 13px; }
.stack-form input:focus, .small-textarea:focus { border-color: var(--lime); }
.field-hint { margin: 8px 0 21px; color: var(--muted); font: 10px var(--mono); }
.optional { color: var(--muted); font-weight: 400; }
.small-textarea { display: block; min-height: 110px; padding: 13px; resize: vertical; font: 12px/1.6 var(--mono); }
.confirm-modal { text-align: center; }
.confirm-modal .eyebrow { margin-top: 21px; }
.confirm-modal h2 { margin: 10px 0; font-size: 22px; }
.confirm-icon { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto; border: 1px solid rgba(255,128,104,.5); color: var(--coral); font: 700 17px var(--mono); }
.confirm-modal .modal-actions { justify-content: center; }
.toast-region { position: fixed; z-index: 30; right: 18px; bottom: 18px; display: grid; gap: 9px; width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid var(--line-strong); background: var(--panel-raised); color: var(--text); box-shadow: 0 12px 35px rgba(0,0,0,.25); font-size: 12px; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-icon { display: grid; place-items: center; width: 19px; height: 19px; background: var(--lime); color: #152016; font: 700 11px var(--mono); }
.toast-error .toast-icon { background: var(--coral); }

@media (max-width: 980px) { .login-view { grid-template-columns: 1fr; } .login-art { display: none; } .login-panel { min-height: 100vh; padding: 30px clamp(24px, 8vw, 80px); } .login-copy { margin: 80px 0 36px; } .workspace { grid-template-columns: 215px minmax(0, 1fr); } .sidebar { padding-left: 20px; padding-right: 20px; } .file-list-head, .file-row { grid-template-columns: minmax(150px, 1fr) 75px 130px 185px; gap: 10px; } .action-label { display: none; } .row-button { padding: 0 7px; font-size: 16px; } }
@media (max-width: 720px) { .topbar { height: 59px; padding: 0 17px; } .topbar-meta { gap: 8px; } .connection-state { display: none; } .workspace { display: block; min-height: calc(100vh - 59px); } .sidebar { display: grid; grid-template-columns: 1fr auto; gap: 15px; padding: 23px 17px 19px; border-right: 0; border-bottom: 1px solid var(--line); } .sidebar-intro h2 { margin-top: 8px; font-size: 20px; } .sidebar-actions { grid-row: span 2; align-content: start; } .sidebar-actions .primary-button { font-size: 0; padding: 0; width: 43px; } .sidebar-actions .primary-button span { font-size: 20px; } .sidebar-actions .secondary-button { font-size: 0; padding: 0; width: 43px; } .sidebar-actions .secondary-button span { font-size: 19px; } .storage-card { grid-column: 1 / -1; padding-top: 14px; } .sidebar-note { display: none; } .file-area { padding: 27px 17px; } .file-toolbar { display: block; margin-bottom: 24px; } .toolbar-title { margin-bottom: 20px; } .search-box { width: 100%; } .file-list-head { display: none; } .file-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; padding: 16px 4px; } .file-identity { grid-column: 1 / 2; } .file-size, .file-date { grid-column: 1 / 2; padding-left: 46px; text-align: left; font-size: 10px; } .file-date { margin-top: -2px; } .row-actions { grid-column: 2 / 3; grid-row: 1 / 4; align-self: center; } .editor-modal { padding: 22px 17px; } .editor-textarea { min-height: 55vh; } .small-modal { padding: 24px 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }
