:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --border: #e4e1da;
  --text: #1b1a17;
  --muted: #77736a;
  --accent: #ff6a3d;
  --accent-ink: #ffffff;
  --accent-soft: #ffe6dc;
  --danger: #d93a2b;
  --shadow: 0 1px 2px rgba(20, 16, 10, .06), 0 8px 24px rgba(20, 16, 10, .06);
  --radius: 12px;
  --sidebar: 260px;
  --mono: 'Geist Mono', ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1a1918;
    --surface-2: #232220;
    --border: #2e2c29;
    --text: #efece6;
    --muted: #918c82;
    --accent-soft: #3a2219;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121110; --surface: #1a1918; --surface-2: #232220; --border: #2e2c29;
  --text: #efece6; --muted: #918c82; --accent-soft: #3a2219; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
i[data-i] { display: inline-flex; width: 18px; height: 18px; flex: none; }
i[data-i] svg { width: 100%; height: 100%; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); margin: 0; font-size: 13px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand b { color: var(--accent); font-weight: 700; }
.logo { width: 26px; height: 26px; border-radius: 7px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M8 23 15 9l3 6 2-3 4 11z' fill='white'/%3E%3C/svg%3E") center/100% no-repeat; flex: none; }
.brand-lg { font-size: 20px; justify-content: center; }
.brand-lg .logo { width: 34px; height: 34px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn i[data-i] { width: 16px; height: 16px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 8px; border: 0; background: transparent; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }
.icon-btn i[data-i] { width: 16px; height: 16px; }

input[type=text], input[type=password], input[type=url], input[type=search], textarea, select {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: 100%; max-width: 360px; display: grid; gap: 14px; padding: 32px 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); text-align: center;
}
.login-card p { margin: -6px 0 6px; }

/* Layout */
.app { display: flex; min-height: 100%; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; gap: 18px;
  padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--border); z-index: 30;
}
.sidebar > .brand { padding: 2px 8px 4px; }
.content { flex: 1; margin-left: var(--sidebar); min-width: 0; }
.main { padding: 32px 40px 80px; max-width: 1280px; margin: 0 auto; }
.topbar { display: none; }
.scrim { display: none; }

.nav { display: grid; gap: 2px; }
.nav a, .tree a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  text-decoration: none; color: var(--muted); font-weight: 500;
}
.nav a:hover, .tree a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.side-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-head {
  display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600;
}
.tree { overflow-y: auto; display: grid; gap: 1px; align-content: start; }
.tree a { padding: 6px 10px; font-size: 13.5px; }
.tree a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree a.active { background: var(--surface-2); color: var(--text); }
.tree .children { margin-left: 14px; padding-left: 6px; border-left: 1px solid var(--border); display: grid; gap: 1px; }
.tree .empty { padding: 6px 10px; font-size: 13px; color: var(--muted); }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 4px 0; border-top: 1px solid var(--border); }

/* Page header */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 650; }
.page-head .sub { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Breadcrumb */
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.crumbs a { text-decoration: none; padding: 2px 8px; border-radius: 8px; color: var(--muted); }
.crumbs a:hover, .crumbs a.drag-over { background: var(--surface-2); color: var(--text); }
.crumbs a:last-child { color: var(--text); }
.crumbs .sep { color: var(--border); font-weight: 400; }

/* Files */
.section-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 24px 0 10px; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.folder-card {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.folder-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: var(--shadow); }
.folder-card.drag-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.02); }
.folder-card .ficon { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.folder-card .ficon i { width: 20px; height: 20px; }
.folder-card .meta { min-width: 0; flex: 1; }
.folder-card .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-card .count { font-size: 12px; color: var(--muted); }
.card-menu { opacity: 0; transition: opacity .15s; display: flex; }
.folder-card:hover .card-menu, .file-card:hover .card-menu { opacity: 1; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.file-card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .15s, border-color .15s; cursor: default;
}
.file-card:hover { box-shadow: var(--shadow); }
.file-card.dragging { opacity: .4; }
.thumb {
  aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; position: relative;
  cursor: pointer;
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ext { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); display: grid; justify-items: center; gap: 6px; }
.thumb .ext i { width: 34px; height: 34px; color: var(--muted); opacity: .7; }
.thumb .play {
  position: absolute; width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.thumb .play i { width: 18px; height: 18px; margin-left: 2px; }
.file-info { padding: 10px 12px; display: flex; align-items: center; gap: 6px; }
.file-info .meta { min-width: 0; flex: 1; }
.file-info .name { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info .size { font-size: 12px; color: var(--muted); }
.file-card .card-menu { position: absolute; top: 8px; right: 8px; gap: 4px; }
.file-card .card-menu .icon-btn { background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.15); backdrop-filter: blur(6px); }
.file-card .card-menu .icon-btn.danger:hover { color: var(--danger); }

.dropzone {
  margin-top: 8px; border: 1.5px dashed var(--border); border-radius: 16px; padding: 48px 24px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.dropzone .big { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.dropzone .big i { width: 26px; height: 26px; }
.dropzone strong { color: var(--text); display: block; font-size: 15px; margin-bottom: 4px; }
.dropzone.compact { padding: 18px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; }
.dropzone.compact i { width: 18px; height: 18px; }

.drop-overlay {
  position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px); display: grid; place-items: center; padding: 24px; pointer-events: none;
}
.drop-box {
  display: grid; justify-items: center; gap: 8px; padding: 48px 64px; border-radius: 22px; border: 2px dashed var(--accent);
  background: var(--surface); box-shadow: var(--shadow); font-size: 17px;
}
.drop-box i { width: 40px; height: 40px; color: var(--accent); }

/* Uploads panel */
.uploads {
  position: fixed; right: 20px; bottom: 20px; width: 340px; max-width: calc(100vw - 32px); z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.uploads-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 14px; font-weight: 600; border-bottom: 1px solid var(--border); }
.uploads-list { max-height: 260px; overflow-y: auto; }
.up-item { padding: 10px 14px; display: grid; gap: 6px; border-bottom: 1px solid var(--border); }
.up-item:last-child { border-bottom: 0; }
.up-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.up-row .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row .p { color: var(--muted); font-family: var(--mono); font-size: 12px; flex: none; }
.bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up-item.done .bar span { background: #2fa36b; }
.up-item.error .bar span { background: var(--danger); width: 100% !important; }
.up-item.error .p { color: var(--danger); }

/* Docs */
.doc { max-width: 820px; }
.doc-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.doc-title-input { font-size: 26px !important; font-weight: 650; height: 52px !important; letter-spacing: -.02em; }
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.editor textarea { min-height: 62vh; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; resize: vertical; }
.editor .preview { border: 1px solid var(--border); border-radius: 9px; padding: 4px 20px; background: var(--surface); overflow: auto; max-height: 75vh; }
.editor-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.markdown { font-size: 15px; line-height: 1.7; }
.markdown h1, .markdown h2, .markdown h3 { letter-spacing: -.015em; line-height: 1.3; margin: 1.6em 0 .5em; }
.markdown h1 { font-size: 1.7em; } .markdown h2 { font-size: 1.35em; } .markdown h3 { font-size: 1.12em; }
.markdown a { color: var(--accent); }
.markdown code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .15em .4em; border-radius: 5px; }
.markdown pre { background: var(--surface-2); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.markdown pre code { background: none; padding: 0; }
.markdown blockquote { margin: 1em 0; padding: 2px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.markdown table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.markdown img { max-width: 100%; border-radius: 8px; }
.markdown hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.markdown input[type=checkbox] { accent-color: var(--accent); }

.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.doc-card {
  display: grid; gap: 4px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; transition: box-shadow .15s, border-color .15s;
}
.doc-card:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.doc-card .t { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.doc-card .t i { color: var(--accent); width: 16px; height: 16px; }

/* Accounts */
.toolbar { display: flex; gap: 10px; margin-bottom: 18px; }
.toolbar input { max-width: 340px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.acc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; align-content: start; }
.acc-top { display: flex; align-items: flex-start; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; text-transform: uppercase; }
.acc-top .meta { flex: 1; min-width: 0; }
.acc-top .svc { font-weight: 600; font-size: 15px; }
.acc-top a.url { font-size: 12.5px; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.acc-top a.url:hover { color: var(--accent); }
.acc-notes { color: var(--muted); font-size: 13px; white-space: pre-wrap; margin: 0; }
.cred { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 9px; padding: 4px 4px 4px 12px; }
.cred .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); width: 64px; flex: none; }
.cred .val { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Secrets */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg .n { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--border); color: var(--muted); }
.seg button.on[data-env=pro] .n { background: var(--accent-soft); color: var(--accent); }
.seg button.on[data-env=dev] .n { background: color-mix(in srgb, #2f80ed 18%, transparent); color: #2f80ed; }
.env-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.env-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; text-transform: uppercase; }
.env-badge.pro { background: var(--accent-soft); color: var(--accent); }
.env-badge.dev { background: color-mix(in srgb, #2f80ed 15%, transparent); color: #2f80ed; }
.sec-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sec-row { display: grid; grid-template-columns: minmax(160px, 34%) 1fr auto; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border); }
.sec-row:last-child { border-bottom: 0; }
.sec-row:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.sec-row .k { font-family: var(--mono); font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-row .v { font-family: var(--mono); font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-row .v.on { color: var(--text); white-space: normal; word-break: break-all; }
.sec-row .tools { display: flex; gap: 2px; }
.sec-row.form { background: var(--surface-2); padding: 10px; gap: 8px; }
.sec-row.form input { height: 34px; font-family: var(--mono); font-size: 13px; }
.sec-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: minmax(160px, 34%) 1fr auto; gap: 12px; }
@media (max-width: 760px) {
  .sec-row, .sec-head { grid-template-columns: 1fr auto; }
  .sec-row .v { grid-column: 1; grid-row: 2; }
  .sec-row .tools { grid-row: 1 / span 2; grid-column: 2; }
  .sec-head span:nth-child(2) { display: none; }
  .sec-row.form { grid-template-columns: 1fr; }
  .sec-row.form .tools { grid-row: auto; grid-column: auto; justify-content: flex-end; }
}

/* Empty */
.empty-state { text-align: center; padding: 64px 24px; color: var(--muted); border: 1px dashed var(--border); border-radius: 16px; }
.empty-state .big { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty-state .big i { width: 26px; height: 26px; }
.empty-state strong { color: var(--text); display: block; font-size: 15px; margin-bottom: 4px; }
.empty-state .btn { margin-top: 16px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(10, 8, 5, .45); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; animation: pop .18s; }
.modal h3 { margin: 0; font-size: 17px; }
.modal p { margin: 0; color: var(--muted); }
.modal label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 76px; }
.pass-wrap .tools { position: absolute; right: 4px; top: 4px; display: flex; }
.folder-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: grid; gap: 2px; }
.folder-pick button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; text-align: left; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.folder-pick button:hover { background: var(--surface-2); }
.folder-pick button.sel { background: var(--accent-soft); color: var(--accent); }
.folder-pick button:disabled { opacity: .4; cursor: not-allowed; }
.folder-pick i { width: 16px; height: 16px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8, 7, 6, .92); display: grid; grid-template-rows: auto 1fr; animation: fade .15s; color: #fff; }
.lb-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.lb-bar .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lb-bar .icon-btn { color: #ddd; }
.lb-bar .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.lb-stage { position: relative; display: grid; place-items: center; padding: 0 64px 24px; min-height: 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; border-radius: 6px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.2); }
.lb-nav.prev { left: 12px; } .lb-nav.next { right: 12px; }
.lb-nav i { width: 20px; height: 20px; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow); animation: pop .2s; }
.toast.err { background: var(--danger); color: #fff; }

.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(4px); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .editor .preview { display: none; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .app.menu-open .sidebar { transform: none; }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .content { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
  .main { padding: 20px 16px 80px; }
  .page-head h1, .crumbs { font-size: 20px; }
  .folder-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .acc-grid { grid-template-columns: 1fr; }
  .card-menu { opacity: 1 !important; }
  .lb-stage { padding: 0 8px 16px; }
  .modal .row { grid-template-columns: 1fr; }
}
