:root {
  --notch-bg: #07080b;
  --blue-top: #0038ff;
  --blue-mid: #2a7bff;
  --blue-bottom: #7cc0ff;
  --muted: #c8d6ec;
  --ink: #0a0b0d;
  --ink-soft: #616b7c;
  --line: rgba(10, 20, 40, 0.09);
  --card: #ffffff;
  --accent: #0b50ff;
  --shadow: 0 24px 60px rgba(20, 40, 90, 0.12);
  --shadow-sm: 0 10px 30px rgba(20, 40, 90, 0.07);
  --fillet: 30px;
  --bar-h: 60px;
  --maxw: 960px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; } /* ensure hidden attr wins over flex/grid rules */
html, body { background: #000; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding: 12px;
}
a { color: inherit; text-decoration: none; }
::selection { background: #0b50ff; color: #fff; }

.screen { position: relative; background: #fff; border-radius: 30px; overflow: hidden; isolation: isolate; min-height: calc(100vh - 24px); display: flex; flex-direction: column; }

/* ---------- hero band ---------- */
.hero-band {
  position: relative;
  border-radius: 0 0 34px 34px;
  background:
    radial-gradient(120% 90% at 50% -12%, rgba(255, 255, 255, 0.24), transparent 55%),
    linear-gradient(180deg, var(--blue-top) 0%, var(--blue-mid) 55%, var(--blue-bottom) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 130px;
}
.hero-band.short { padding-bottom: 64px; }
.hero-band::after {
  content: ""; position: absolute; inset: 0; border-radius: 0 0 34px 34px; pointer-events: none;
  background: radial-gradient(140% 120% at 50% 0%, transparent 58%, rgba(0, 0, 0, 0.26));
  mix-blend-mode: multiply;
}

/* ---------- notch navbar ---------- */
.notch { position: relative; width: clamp(300px, 92vw, 760px); height: var(--bar-h); z-index: 20; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35)); }
.notch-bar { position: absolute; inset: 0; background: var(--notch-bg); border-radius: 0 0 26px 26px; }
.fillet { position: absolute; top: 0; width: var(--fillet); height: var(--fillet); fill: var(--notch-bg); display: block; }
.fillet.left { left: calc(-1 * var(--fillet)); }
.fillet.right { right: calc(-1 * var(--fillet)); }
.notch-bar-inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 12px 0 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; color: #fff; letter-spacing: -0.2px; }
.brand-logo { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #6fb6ff, #0a4dff); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.4); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color 0.2s ease; }
.nav-links a:hover { color: #fff; }
.download-btn { display: inline-flex; align-items: center; gap: 7px; background: #fff; color: #000; border: none; border-radius: 13px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer; }

/* ---------- hero text ---------- */
.hero { position: relative; z-index: 1; text-align: center; color: #fff; margin-top: 70px; padding: 0 22px; max-width: 760px; }
.hero.compact { margin-top: 44px; max-width: 900px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 22px; padding: 7px 15px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.28); }
.hero h1 { font-size: clamp(40px, 7vw, 78px); line-height: 0.98; font-weight: 700; letter-spacing: -2.5px; }
.hero h1 em { font-family: "New York", Georgia, serif; font-style: italic; font-weight: 400; }
.hero p { margin-top: 18px; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, 0.92); }
.hero h1.note-title { font-size: clamp(28px, 4vw, 44px); letter-spacing: -1px; line-height: 1.1; font-weight: 700; word-break: break-word; }
.note-meta { margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }

.cta-row { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 14px; font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.cta.primary { background: #fff; color: #0033e6; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); }
.cta.ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.32); }
.cta:hover { transform: translateY(-2px); }

/* ---------- editor card (overlaps hero) ---------- */
.editor-wrap { position: relative; z-index: 5; width: min(880px, 92%); margin: 40px auto -90px; }
.window { background: #fff; border-radius: 18px; box-shadow: 0 40px 90px rgba(0, 10, 40, 0.4); overflow: hidden; border: 1px solid rgba(0, 0, 0, 0.06); }
.titlebar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: #f3f4f7; border-bottom: 1px solid var(--line); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.titlebar .tb-title { margin-left: 8px; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }

form#noteForm { display: block; }
.field { padding: 0 18px; }
.field.title-field { padding-top: 16px; }
input.title-input { width: 100%; border: none; outline: none; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; padding: 8px 0; color: var(--ink); }
input.title-input::placeholder { color: #aab3c2; }
textarea.content-input {
  width: 100%; min-height: 320px; resize: vertical; border: none; outline: none;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.6; color: var(--ink); padding: 14px 0; background: #fff;
}
textarea.content-input::placeholder { color: #aab3c2; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line); background: #fafbfd; }
.toolbar select { font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; color: var(--ink); cursor: pointer; outline: none; }
.toolbar .count { font-size: 12.5px; color: var(--ink-soft); }
.toolbar .spacer { flex: 1; }
.btn-create { background: var(--accent); color: #fff; border: none; border-radius: 12px; padding: 11px 22px; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease; }
.btn-create:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11, 80, 255, 0.35); }
.btn-create:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.form-error { color: #d22; font-size: 13px; padding: 0 18px 14px; }

/* ---------- content area below hero ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 130px 24px 70px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat .card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-sm); }
.feat .card h3 { font-size: 17px; letter-spacing: -0.3px; }
.feat .card p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--ink-soft); }
.feat .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #eaf0ff, #d6e4ff); color: var(--accent); margin-bottom: 16px; }
.feat .ic svg { width: 21px; height: 21px; }

/* ---------- note view ---------- */
.note-main { max-width: var(--maxw); margin: 0 auto; padding: 26px 18px 48px; }
.note-window { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.note-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #f7f8fb; border-bottom: 1px solid var(--line); }
.note-id { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 13px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.5px; }
.note-actions { display: flex; gap: 8px; }
.tbtn { font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 14px; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease; }
.tbtn:hover { transform: translateY(-1px); background: #f0f3fa; }
.tbtn.solid { background: var(--accent); color: #fff; border-color: var(--accent); }
.note-content {
  margin: 0; padding: 20px; overflow-x: auto;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-word;
}

/* ---------- ad slot ---------- */
.ad-slot { margin: 22px 0; min-height: 90px; display: flex; align-items: center; justify-content: center; }
.ad-slot ins { width: 100%; }

/* ---------- footer ---------- */
.footer { background: var(--notch-bg); color: #fff; padding: 40px 24px; margin-top: auto; }
.footer.slim { margin-top: auto; }
.footer .bottom { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.footer a { color: rgba(255, 255, 255, 0.85); }
.footer a:hover { color: #fff; }

/* ---------- create settings ---------- */
.settings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; padding: 16px 18px; border-top: 1px solid var(--line); background: #fafbfd; }
.set { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.set small { font-weight: 500; color: #9aa3b2; }
.set select, .set input[type="password"], .set input[type="text"] { font-size: 13.5px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; color: var(--ink); outline: none; }
.set select:focus, .set input:focus { border-color: var(--accent); }

/* custom select chevron (hide the native one) */
.set select, .toolbar select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 13px; padding-right: 34px; cursor: pointer;
}
.set.check { flex-direction: row; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); grid-column: 1 / -1; }
.set.check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* ---------- note toolbar / info ---------- */
.note-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; background: #f7f8fb; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.note-info { display: flex; flex-direction: column; gap: 2px; }
.note-id { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 13px; font-weight: 700; color: var(--ink); letter-spacing: 0.5px; }
.note-sub { font-size: 11.5px; color: var(--ink-soft); }
.note-meta-line { text-align: center; color: rgba(255,255,255,.88); font-size: 13.5px; margin-top: 14px; }
.note-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------- embed box ---------- */
.embed-box { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f0f3fa; flex-wrap: wrap; }
.embed-box textarea { flex: 1; min-width: 220px; min-height: 42px; resize: none; font-family: "SF Mono", ui-monospace, monospace; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }

/* ---------- syntax highlight + line numbers ---------- */
.note-content { margin: 0; padding: 18px; overflow-x: auto; background: #0d1117; color: #e6edf3; font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.note-content code.hljs { padding: 0; background: transparent; }
/* line-numbers plugin table */
.hljs-ln td.hljs-ln-numbers { text-align: right; color: rgba(230,237,243,.34); padding-right: 14px; border-right: 1px solid rgba(255,255,255,.1); user-select: none; -webkit-user-select: none; }
.hljs-ln td.hljs-ln-code { padding-left: 14px; }

/* ---------- gate (password / burn) ---------- */
.gate { text-align: center; padding: 48px 24px; }
.gate-ic { font-size: 42px; }
.gate h2 { margin-top: 10px; font-size: 22px; letter-spacing: -0.4px; }
.gate p { margin-top: 8px; font-size: 14.5px; color: var(--ink-soft); max-width: 420px; margin-left: auto; margin-right: auto; }
.gate-form { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gate-form input { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: none; min-width: 220px; }
.gate-form input:focus { border-color: var(--accent); }
.gate-btn { margin-top: 18px; background: var(--accent); color: #fff; border: none; }
.gate .cta.primary { background: var(--accent); color: #fff; }
.gate-err { color: #d22; font-size: 13.5px; margin-top: 14px; }

/* ---------- archive ---------- */
.archive { display: grid; gap: 10px; }
.arch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-sm); transition: transform 0.12s ease; }
.arch-row:hover { transform: translateY(-2px); }
.arch-title { font-weight: 600; font-size: 15px; color: var(--ink); }
.arch-meta { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.arch-empty { text-align: center; color: var(--ink-soft); padding: 40px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .feat { grid-template-columns: 1fr; }
  .editor-wrap { margin-bottom: -60px; }
  .settings { grid-template-columns: 1fr; }
}

/* =======================================================================
   DASHBOARD — glassmorphism login + Mac Finder
   ======================================================================= */
.app-body { min-height: 100vh; padding: 0; overflow-x: hidden; }
.ws-fill { position: fixed; inset: 0; overflow: auto; }
.app-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 18% 12%, #4a86ff 0%, transparent 60%),
    radial-gradient(55% 55% at 85% 18%, #7b5cff 0%, transparent 55%),
    radial-gradient(70% 70% at 75% 90%, #00c6ff 0%, transparent 55%),
    radial-gradient(60% 60% at 10% 88%, #ff7eb3 0%, transparent 55%),
    linear-gradient(160deg, #0a3cff, #2a7bff 55%, #7cc0ff);
}
.app-root { min-height: 100vh; }
/* darker workspace gradient when dark mode is on (same vibe, deeper) */
[data-theme="dark"] .app-bg {
  background:
    radial-gradient(60% 60% at 18% 12%, #1b3a8f 0%, transparent 60%),
    radial-gradient(55% 55% at 85% 18%, #3a2d7a 0%, transparent 55%),
    radial-gradient(70% 70% at 75% 90%, #0a5a78 0%, transparent 55%),
    radial-gradient(60% 60% at 10% 88%, #6a2f55 0%, transparent 55%),
    linear-gradient(160deg, #070c1f, #0c1430 55%, #101a3a);
}

/* tag chips input */
.tags-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: #fff; cursor: text; }
.tags-field:focus-within { border-color: var(--accent); }
[data-theme="dark"] .tags-field { background: #11151c; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; background: #eaf0ff; color: var(--accent); border-radius: 7px; padding: 3px 4px 3px 9px; font-weight: 500; }
[data-theme="dark"] .tag-chip { background: rgba(124,192,255,.16); color: #7cc0ff; }
.tag-chip button { border: none; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; opacity: .7; }
.tag-chip button:hover { opacity: 1; }
.tags-field input { border: none; outline: none; background: none; flex: 1; min-width: 80px; font-size: 13.5px; color: var(--ink); padding: 2px; }
.app-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px; }
.app-loading { color: #fff; font-size: 15px; opacity: .85; }
.app-boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.boot-logo { width: 48px; height: 48px; border-radius: 14px; }
.boot-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.28); border-top-color: #fff; animation: bootspin .8s linear infinite; }
@keyframes bootspin { to { transform: rotate(360deg); } }
.app-body svg { vertical-align: middle; display: inline-block; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > svg { position: absolute; left: 14px; color: rgba(255,255,255,0.7); pointer-events: none; }
.input-icon input { padding-left: 42px !important; }

/* frosted glass surface */
.glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 70px rgba(8, 20, 60, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.glass-btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  background: rgba(255, 255, 255, 0.2); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px; padding: 12px 18px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: transform 0.15s ease, background 0.2s ease;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.glass-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.3); }
.glass-btn.primary { background: #fff; color: #0b3bd6; border-color: #fff; }
.glass-btn.small { padding: 9px 14px; font-size: 13px; }

/* ---- login / OTP (split screen, Apple-style) ---- */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px; }
.auth-split { width: min(960px, 96vw); min-height: min(600px, 84vh); border-radius: 26px; overflow: hidden; display: flex; }
.auth-left { flex: 1.05; display: flex; align-items: center; justify-content: center; padding: 40px 36px; background: rgba(255,255,255,0.06); }
.auth-right { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, #4a86ff, transparent 55%), radial-gradient(120% 90% at 90% 90%, #7b5cff, transparent 55%), linear-gradient(160deg, #0a3cff, #2a7bff 60%, #7cc0ff); }
.ar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.ar-brand .brand-logo { width: 30px; height: 30px; border-radius: 9px; }
.ar-copy h2 { font-size: 30px; line-height: 1.12; letter-spacing: -1px; }
.ar-copy p { margin-top: 12px; font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,0.85); max-width: 320px; }
.ar-mock { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.28); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px rgba(0,0,20,0.3); }
.arm-bar { display: flex; gap: 7px; padding: 11px 13px; background: rgba(0,0,0,0.18); }
.arm-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.arm-tile { height: 46px; border-radius: 9px; background: rgba(255,255,255,0.22); }
.arm-tile:nth-child(2) { background: rgba(255,255,255,0.34); }
.arm-tile:nth-child(5) { background: rgba(255,255,255,0.30); }
.auth-inner { width: 100%; max-width: 360px; text-align: center; color: #fff; }
.auth-card { width: min(420px, 94vw); border-radius: 24px; padding: 38px 34px; text-align: center; color: #fff; }
@media (max-width: 820px) { .auth-right { display: none; } .auth-split { min-height: auto; } .auth-left { padding: 40px 28px; } }
.auth-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-logo .brand-logo { width: 46px; height: 46px; border-radius: 13px; }
.auth-card h1 { font-size: 26px; letter-spacing: -0.6px; }
.auth-sub { margin-top: 8px; font-size: 14.5px; color: rgba(255, 255, 255, 0.82); line-height: 1.5; }
.auth-form { margin-top: 24px; display: grid; gap: 12px; }
.auth-form input[type="email"] {
  width: 100%; text-align: center; font-size: 16px; padding: 14px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.16); color: #fff; outline: none;
}
.auth-form input::placeholder { color: rgba(255, 255, 255, 0.6); }
.auth-form input:focus { border-color: #fff; background: rgba(255, 255, 255, 0.24); }
.otp { display: flex; gap: 12px; justify-content: center; }
.otp-box {
  width: 60px; height: 70px; text-align: center; font-size: 30px; font-weight: 700; text-transform: uppercase;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.16);
  color: #fff; outline: none; caret-color: #fff;
}
.otp-box:focus { border-color: #fff; background: rgba(255, 255, 255, 0.28); transform: translateY(-2px); transition: 0.15s; }
.auth-err { margin-top: 14px; font-size: 13.5px; color: #ffd9d9; }
.auth-links { margin-top: 18px; display: flex; justify-content: center; gap: 16px; }
.linkbtn, .auth-back { background: none; border: none; color: rgba(255, 255, 255, 0.85); font-size: 13px; cursor: pointer; text-decoration: underline; display: inline-block; margin-top: 18px; }
.linkbtn { margin-top: 0; }

/* ---- finder window ---- */
.finder { width: min(1120px, 96vw); height: min(760px, 88vh); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; color: #fff; }
.finder.full { width: 100%; height: 100vh; border-radius: 0; border-left: none; border-right: none; }
.finder-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); }
.lights { display: flex; gap: 8px; }
.lt { width: 12px; height: 12px; border-radius: 50%; }
.lt.r { background: #ff5f57; } .lt.y { background: #febc2e; } .lt.g { background: #28c840; }
.finder-title { font-weight: 600; font-size: 14.5px; letter-spacing: -0.2px; }
.finder-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.input-icon.search > svg { left: 12px; }
.finder-search { background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px; padding: 8px 12px 8px 34px !important; font-size: 13px; color: #fff; outline: none; width: 200px; }
.finder-search::placeholder { color: rgba(255, 255, 255, 0.7); }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 12.5px; background: rgba(0, 0, 0, 0.18); padding: 6px 8px 6px 12px; border-radius: 10px; }
.user-chip .ue { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: none; background: rgba(255,255,255,0.16); color: #fff; cursor: pointer; transition: background 0.15s ease; }
.logout:hover { background: rgba(255,80,80,0.6); }

.finder-body { flex: 1; display: grid; grid-template-columns: 220px 1fr; min-height: 0; }
.finder-side { padding: 16px 12px; border-right: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); overflow-y: auto; }
.side-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(255, 255, 255, 0.6); padding: 6px 10px; }
.side-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: none; background: none; color: #fff; font-size: 13.5px; cursor: pointer; transition: background 0.15s ease; }
.side-item:hover { background: rgba(255, 255, 255, 0.16); }
.side-item.active { background: rgba(255, 255, 255, 0.26); font-weight: 600; }
.si-ic { width: 18px; text-align: center; }
.si-label { flex: 1; text-align: left; }
.si-count { font-size: 12px; opacity: 0.7; }

.finder-main { overflow-y: auto; padding: 22px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; align-content: start; }
.file { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: 14px; cursor: pointer; transition: transform 0.16s ease, background 0.16s ease; border: 1px solid transparent; }
.file:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.28); transform: translateY(-3px); }
.ficon { position: relative; width: 64px; height: 80px; border-radius: 9px; background: linear-gradient(160deg, #ffffff, #eef2fb); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; }
.ficon::after { content: ""; position: absolute; top: 0; right: 0; border-width: 0 16px 16px 0; border-style: solid; border-color: rgba(0,0,0,0.12) #cdd6e8; border-top-right-radius: 9px; }
.fext { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; color: #fff; background: var(--lab, #8a93a6); padding: 3px 8px; border-radius: 6px; }
.fbadge { position: absolute; left: 6px; top: 6px; font-size: 13px; }
.fname { font-size: 13px; font-weight: 500; color: #fff; text-align: center; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmeta { font-size: 11px; color: rgba(255, 255, 255, 0.75); }
.fmeta.dim { color: rgba(255, 255, 255, 0.55); }
.file-del { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.4); color: #fff; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.15s ease, transform 0.15s ease; }
.file:hover .file-del { opacity: 1; }
.file-del:hover { background: #ff4d4d; transform: scale(1.1); }
.files-empty { grid-column: 1 / -1; text-align: center; color: rgba(255, 255, 255, 0.9); padding: 60px 20px; display: grid; gap: 14px; justify-items: center; }
.fe-ic { font-size: 46px; }

@media (max-width: 720px) {
  .finder { height: 90vh; }
  .finder-body { grid-template-columns: 1fr; }
  .finder-side { display: none; }
  .finder-search { width: 120px; }
  .user-chip { font-size: 11px; }
}

/* ---------- markdown rendered ---------- */
.md-rendered { padding: 24px 26px; font-size: 15px; line-height: 1.7; color: var(--ink); }
.md-rendered h1, .md-rendered h2, .md-rendered h3, .md-rendered h4 { letter-spacing: -0.4px; margin: 1.3em 0 .5em; line-height: 1.25; }
.md-rendered h1 { font-size: 1.8em; } .md-rendered h2 { font-size: 1.4em; } .md-rendered h3 { font-size: 1.15em; }
.md-rendered p { margin: 0 0 1em; }
.md-rendered a { color: var(--accent); text-decoration: underline; }
.md-rendered ul, .md-rendered ol { margin: 0 0 1em 1.4em; }
.md-rendered li { margin: .3em 0; }
.md-rendered code { background: #eef2fb; padding: 2px 6px; border-radius: 6px; font-family: "SF Mono", ui-monospace, monospace; font-size: .88em; }
.md-rendered pre { background: #0d1117; color: #e6edf3; padding: 16px; border-radius: 12px; overflow-x: auto; margin: 0 0 1em; }
.md-rendered pre code { background: none; padding: 0; color: inherit; }
.md-rendered blockquote { border-left: 3px solid var(--accent); margin: 0 0 1em; padding: .2em 0 .2em 1em; color: var(--ink-soft); }
.md-rendered img { max-width: 100%; border-radius: 10px; }
.md-rendered table { border-collapse: collapse; margin: 0 0 1em; width: 100%; }
.md-rendered th, .md-rendered td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.md-rendered hr { border: none; border-top: 1px solid var(--line); margin: 1.4em 0; }

/* note tags + edited + danger */
.note-tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0 0; }
.note-tag { font-size: 12.5px; color: #fff; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); padding: 3px 10px; border-radius: 999px; }
.edited { opacity: .82; }
.tbtn.danger { color: #d22; border-color: rgba(210,40,40,.3); }
.tbtn.danger:hover { background: #ffecec; }

/* dashboard: folders + per-file actions + tags */
.side-head.row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.side-add { background: rgba(255,255,255,.16); border: none; color: #fff; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.side-add:hover { background: rgba(255,255,255,.3); }
.side-empty { font-size: 12px; color: rgba(255,255,255,.5); padding: 6px 11px; }
.file-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease; }
.file:hover .file-actions { opacity: 1; }
.fa-btn { width: 24px; height: 24px; border-radius: 7px; border: none; background: rgba(0,0,0,.42); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.fa-btn:hover { background: rgba(0,0,0,.65); transform: scale(1.08); }
.fa-btn.on { background: #ffce3a; color: #5a3d00; }
.fa-btn.del:hover { background: #ff4d4d; }
.fav-dot { position: absolute; top: 8px; left: 8px; color: #ffce3a; }
.ftags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 124px; }
.ftag { font-size: 10px; color: rgba(255,255,255,.82); background: rgba(255,255,255,.14); padding: 1px 6px; border-radius: 6px; }

/* ---------- finder: view toggle, list, rename, skeletons ---------- */
.seg { display: flex; background: rgba(0,0,0,.18); border-radius: 9px; padding: 2px; }
.seg-btn { width: 30px; height: 28px; border: none; background: none; color: rgba(255,255,255,.7); border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.seg-btn.on { background: rgba(255,255,255,.22); color: #fff; }
.cmd-hint { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.8); border-radius: 9px; padding: 7px 10px; font-size: 12px; cursor: pointer; }
.cmd-hint span { font-weight: 600; }
.side-item.drop { background: rgba(124,192,255,.4); outline: 2px dashed rgba(255,255,255,.6); }
.rename-input { width: 118px; text-align: center; font-size: 13px; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.3); color: #fff; border-radius: 7px; padding: 3px 6px; outline: none; }

/* list view */
.rows { display: flex; flex-direction: column; gap: 2px; }
.row-file { display: grid; grid-template-columns: 52px 1fr auto auto auto auto; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 10px; cursor: pointer; position: relative; transition: background .12s ease; }
.row-file:hover { background: rgba(255,255,255,.14); }
.row-ext { font-size: 10px; font-weight: 800; color: #fff; text-align: center; padding: 4px 0; border-radius: 6px; }
.row-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-name .fname { max-width: 320px; }
.row-tags { display: flex; gap: 4px; }
.row-meta { font-size: 12px; color: rgba(255,255,255,.7); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.row-meta.dim { color: rgba(255,255,255,.5); }
.row-file .file-actions { position: static; opacity: 0; }
.row-file:hover .file-actions { opacity: 1; }

/* skeletons */
.file.skel { pointer-events: none; }
.ficon.sk, .sk-line { background: rgba(255,255,255,.14); border-radius: 8px; animation: pulse 1.3s ease-in-out infinite; }
.ficon.sk { width: 64px; height: 80px; box-shadow: none; }
.sk-line { height: 11px; width: 80px; margin-top: 6px; border-radius: 6px; }
.sk-line.sm { width: 50px; }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: .9; } }

/* ---------- Quick Look ---------- */
.ql-overlay, .cmd-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(6,12,30,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; }
.ql-overlay { align-items: center; justify-content: center; padding: 30px; }
.ql-card { width: min(820px, 94vw); max-height: 84vh; border-radius: 18px; color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.ql-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.18); }
.ql-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-actions { display: flex; align-items: center; gap: 8px; }
.ql-close { width: 30px; height: 30px; border-radius: 8px; border: none; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; display: grid; place-items: center; }
.ql-close:hover { background: rgba(255,80,80,.6); }
.ql-body { overflow: auto; padding: 0; flex: 1; min-height: 120px; }
.ql-pre { margin: 0; padding: 18px 20px; font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: #e8eefc; }
.ql-msg { padding: 40px; text-align: center; color: rgba(255,255,255,.8); }
.ql-meta { padding: 11px 16px; border-top: 1px solid rgba(255,255,255,.18); font-size: 12px; color: rgba(255,255,255,.65); }

/* ---------- Analytics modal ---------- */
.stats-card { width: min(560px, 94vw); }
.stats-body { padding: 22px 24px; color: #fff; }
.stat-big { font-size: 15px; color: rgba(255,255,255,.8); }
.stat-big b { font-size: 30px; font-weight: 700; color: #fff; }
.stat-h { margin: 22px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.55); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; justify-content: flex-end; }
.bar { width: 100%; max-width: 22px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg,#7cc0ff,#2a7bff); }
.bar-x { font-size: 9px; color: rgba(255,255,255,.5); }
.refs { display: flex; flex-direction: column; gap: 6px; }
.ref-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 8px 12px; background: rgba(255,255,255,.1); border-radius: 9px; }
.stat-empty { font-size: 13px; color: rgba(255,255,255,.6); }

/* ---------- Command palette ---------- */
.cmd-overlay { align-items: flex-start; justify-content: center; padding-top: 14vh; }
.cmd { width: min(560px, 94vw); border-radius: 16px; color: #fff; overflow: hidden; }
.cmd-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.18); }
.cmd-input input { flex: 1; background: none; border: none; outline: none; color: #fff; font-size: 16px; }
.cmd-input input::placeholder { color: rgba(255,255,255,.6); }
.cmd-list { max-height: 340px; overflow: auto; padding: 6px; }
.cmd-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: none; background: none; color: #fff; border-radius: 10px; cursor: pointer; font-size: 14px; text-align: left; }
.cmd-item.sel, .cmd-item:hover { background: rgba(255,255,255,.18); }
.ci-ic { display: grid; place-items: center; opacity: .85; }
.ci-tag { margin-left: auto; font-size: 11px; opacity: .6; }
.cmd-empty { padding: 22px; text-align: center; color: rgba(255,255,255,.6); font-size: 14px; }

/* ---------- editor toast ---------- */
.vtoast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 200; background: rgba(20,30,60,.92); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 12px 18px; font-size: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; backdrop-filter: blur(12px); }
.vtoast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.vtoast a { color: #9ec4ff; font-weight: 600; }

/* ---------- editor: cover + image actions + storage ---------- */
.ed-cover { height: 140px; border-radius: 14px 14px 0 0; background-size: cover; background-position: center; position: relative; }
.ed-cover-rm { position: absolute; right: 10px; bottom: 10px; font-size: 12px; background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.ed-actions { display: flex; align-items: center; gap: 8px; padding: 8px 18px 0; }
.ed-act { font-size: 13px; font-weight: 600; color: var(--accent); background: #eaf0ff; border: none; border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.ed-act:hover { background: #dde8ff; }
.storage-pill { margin-left: auto; font-size: 12px; color: var(--ink-soft); background: #f0f3fa; padding: 5px 10px; border-radius: 999px; }
[data-theme="dark"] .ed-act { background: #18233a; }
[data-theme="dark"] .storage-pill { background: #11151c; }

/* ---------- note cover + image lightbox + task lists ---------- */
.note-cover { height: 210px; border-radius: 16px; background-size: cover; background-position: center; margin-bottom: 18px; box-shadow: var(--shadow); position: relative; z-index: 1; }
.md-rendered img.zoomable { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 95%; max-height: 95%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.md-rendered li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.1em; display: flex; align-items: flex-start; gap: 9px; }
.md-rendered li > input[type="checkbox"] { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- confirmation dialog ---------- */
.confirm-overlay { position: fixed; inset: 0; z-index: 120; background: rgba(6,12,30,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.confirm-card { width: min(400px, 94vw); border-radius: 18px; padding: 26px; color: #fff; text-align: left; }
.confirm-title { font-size: 18px; letter-spacing: -.3px; }
.confirm-msg { margin-top: 10px; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.8); }
.confirm-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 10px; }
.cbtn { padding: 9px 16px; border-radius: 11px; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.14); color: #fff; }
.cbtn.ghost:hover { background: rgba(255,255,255,.24); }
.cbtn.danger { background: #ff4d4d; border-color: #ff4d4d; }
.cbtn.danger:hover { background: #ff3636; }
.cbtn.primary { background: var(--accent); border-color: var(--accent); }
.confirm-input { width: 100%; margin-top: 16px; padding: 11px 14px; border-radius: 11px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.14); color: #fff; font-size: 15px; outline: none; }
.confirm-input:focus { border-color: #fff; background: rgba(255,255,255,.22); }
.confirm-input::placeholder { color: rgba(255,255,255,.6); }

/* ---------- workspace: image gallery ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.media-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.media-tile img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.media-del { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 8px; border: none; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s ease; display: grid; place-items: center; }
.media-tile:hover .media-del { opacity: 1; }
.media-del:hover { background: #ff4d4d; }
.media-size { position: absolute; bottom: 6px; left: 8px; font-size: 11px; color: #fff; background: rgba(0,0,0,.5); padding: 2px 7px; border-radius: 6px; }

/* ---------- workspace: trash + storage ---------- */
.side-sep { height: 1px; background: rgba(255,255,255,.14); margin: 12px 6px; }
.storage-card { margin-top: 14px; padding: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; }
.storage-top { display: flex; justify-content: space-between; font-size: 11.5px; color: rgba(255,255,255,.7); margin-bottom: 8px; }
.storage-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; }
.storage-fill { height: 100%; background: linear-gradient(90deg,#7cc0ff,#0b50ff); }
.storage-up { display: inline-block; margin-top: 10px; font-size: 12px; color: #cfe0ff; }
.trash-hint { font-size: 12.5px; color: rgba(255,255,255,.6); margin-bottom: 12px; }
.trash-list { display: flex; flex-direction: column; gap: 8px; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.08); }
.trash-row .row-name { flex: 1; min-width: 0; }
.trash-row .fname { color: #fff; }

/* ---------- share / collaborators ---------- */
.share-card { width: min(480px, 94vw); }
.share-body { padding: 18px 20px 22px; color: #fff; }
.share-hint { font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.5; }
.share-add { display: flex; gap: 8px; margin-top: 14px; }
.share-add .input-icon { flex: 1; }
.share-add input { width: 100%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 10px; padding: 10px 12px 10px 38px; outline: none; }
.share-add input::placeholder { color: rgba(255,255,255,.6); }
.share-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.share-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.1); border-radius: 10px; padding: 8px 10px; }
.share-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #06204a; background: linear-gradient(135deg,#9ec4ff,#3b78ff); flex: none; }
.share-email { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-rm { width: 24px; height: 24px; border: none; border-radius: 7px; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.share-rm:hover { background: rgba(255,80,80,.6); }
.share-dot { position: absolute; top: 8px; right: 8px; color: #7cc0ff; background: rgba(11,80,255,.2); border-radius: 6px; padding: 2px; display: grid; place-items: center; }
.share-dot.shared { color: #5fffc0; background: rgba(95,255,192,.16); }

/* ---------- billing page ---------- */
.billing-wrap { max-width: 720px; margin: 0 auto; }
.bill-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-sm); }
.bill-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bill-plan { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.bill-sub { margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); }
.bill-on { color: #1a9e54; font-weight: 600; }
.bill-off { color: var(--ink-soft); }
.bill-actions { display: flex; gap: 10px; }
.bill-actions .pick { padding: 10px 16px; border-radius: 11px; font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; }
.bill-actions .pick.solid { background: var(--accent); color: #fff; border: none; }
.bill-h { margin: 30px 0 12px; font-size: 16px; }
.bill-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bill-table th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.bill-table td { padding: 10px; border-bottom: 1px solid var(--line); }

/* ---------- share & access sections ---------- */
.sa-sec { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sa-sec:first-child { border-top: none; padding-top: 4px; }
.sa-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: rgba(255,255,255,.6); margin-bottom: 10px; }
.sa-on { color: #5fffc0; letter-spacing: 0; }
.sa-hint { font-size: 12.5px; color: rgba(255,255,255,.65); margin-top: 8px; line-height: 1.5; }
.sa-seg { display: inline-flex; }
.sa-seg .seg-btn { width: auto; padding: 8px 14px; gap: 6px; font-size: 13px; }

/* ---------- pricing page ---------- */
.pricing-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 18px 64px; width: 100%; }
.pricing-wrap .prices { width: 100%; max-width: 940px; }
.pricing-sub { color: var(--ink-soft); font-size: 16px; margin-bottom: 34px; text-align: center; }
.pricing-note { margin-top: 26px; text-align: center; color: var(--ink-soft); font-size: 13.5px; }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.price { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.price.feature { background: var(--notch-bg); color: #fff; border: none; transform: scale(1.03); }
.price .plan { font-size: 13px; font-weight: 700; letter-spacing: .4px; color: var(--accent); }
.price.feature .plan { color: #7cc0ff; }
.price .amt { margin-top: 12px; font-size: 42px; font-weight: 700; letter-spacing: -2px; }
.price .amt small { font-size: 14px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.price.feature .amt small { color: rgba(255,255,255,.6); }
.price ul { list-style: none; margin: 22px 0; display: grid; gap: 11px; padding: 0; }
.price li { font-size: 14px; display: flex; gap: 9px; align-items: flex-start; color: var(--ink-soft); }
.price.feature li { color: rgba(255,255,255,.85); }
.price li svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 1px; }
.price.feature li svg { color: #7cc0ff; }
.price .pick { margin-top: auto; text-align: center; padding: 12px; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; display: block; transition: transform .15s ease; }
.price .pick.solid { background: var(--accent); color: #fff; border: none; }
.price.feature .pick.solid { background: #fff; color: var(--ink); }
.price .pick:hover { transform: translateY(-1px); }
.price .pick:disabled { opacity: .6; cursor: default; }
.badge { font-size: 10px; font-weight: 800; background: #7cc0ff; color: #06204a; padding: 3px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
@media (max-width: 760px) { .prices { grid-template-columns: 1fr; } .price.feature { transform: none; } }

/* ---------- finder selection + context menu ---------- */
.file.selected, .row-file.selected { background: rgba(124,192,255,.26); border-color: rgba(124,192,255,.55); }
.file.selected { box-shadow: inset 0 0 0 2px rgba(124,192,255,.75); }
.file, .row-file { user-select: none; -webkit-user-select: none; }
.selbar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; margin: 0 0 14px; background: rgba(10,16,32,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; }
.sel-count { font-size: 13px; font-weight: 600; color: #fff; margin-right: 4px; }
.sel-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 9px; padding: 7px 11px; cursor: pointer; text-decoration: none; }
.sel-btn:hover { background: rgba(255,255,255,.3); }
.sel-btn.danger:hover { background: rgba(255,80,80,.65); }
.sel-btn.ghost { margin-left: auto; padding: 7px 9px; }
.sel-move { position: relative; }
.move-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 200px; background: rgba(20,28,48,.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.mm-head { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.55); padding: 6px 10px; }
.mm-item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: none; background: none; color: #fff; border-radius: 8px; cursor: pointer; font-size: 13.5px; text-align: left; }
.mm-item:hover { background: rgba(255,255,255,.16); }
.mm-item.dim { color: rgba(255,255,255,.7); }
.mm-empty { font-size: 12px; color: rgba(255,255,255,.55); padding: 8px 10px; }
.ctx-overlay { position: fixed; inset: 0; z-index: 60; }
.ctx-menu { position: fixed; min-width: 200px; background: rgba(20,28,48,.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 6px; box-shadow: 0 20px 50px rgba(0,0,0,.45); color: #fff; }
.ctx-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: none; background: none; color: #fff; border-radius: 8px; cursor: pointer; font-size: 13.5px; text-align: left; text-decoration: none; }
.ctx-item:hover { background: rgba(255,255,255,.16); }
.ctx-item.danger:hover { background: rgba(255,80,80,.6); }
.ctx-sep { height: 1px; background: rgba(255,255,255,.14); margin: 5px 0; }
.ctx-sub .move-menu { position: static; box-shadow: none; border: none; background: none; padding: 0; min-width: 0; }

/* ---------- theme toggle + dark mode ---------- */
.nav-right { display: flex; align-items: center; gap: 10px; }
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.14); color: #fff; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.theme-toggle:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: inline; }
.burn-label { display: inline-flex; align-items: center; gap: 7px; }

[data-theme="dark"] { --ink: #e7ecf3; --ink-soft: #9aa6b8; --line: rgba(255,255,255,.10); --card: #161a22; --bg-alt: #0f1219; }
[data-theme="dark"] .screen { background: #0c0e13; }
[data-theme="dark"] .band { background: #0c0e13; }
[data-theme="dark"] .band.dark { background: #07080b; }
[data-theme="dark"] .section.alt { background: #0f1219; }
[data-theme="dark"] .titlebar, [data-theme="dark"] .note-toolbar, [data-theme="dark"] .toolbar, [data-theme="dark"] .settings, [data-theme="dark"] .embed-box { background: #11151c; }
[data-theme="dark"] .window, [data-theme="dark"] .note-window, [data-theme="dark"] .card, [data-theme="dark"] details, [data-theme="dark"] .price, [data-theme="dark"] .arch-row { background: #161a22; }
[data-theme="dark"] .price.feature { background: #05060a; }
[data-theme="dark"] .tag-pill { background: rgba(124,192,255,.16); }
[data-theme="dark"] .feat .ic, [data-theme="dark"] .card .ic { background: linear-gradient(135deg,#1b2433,#172033); }
[data-theme="dark"] .title-input, [data-theme="dark"] .content-input, [data-theme="dark"] .set select, [data-theme="dark"] .set input, [data-theme="dark"] .toolbar select, [data-theme="dark"] .tbtn, [data-theme="dark"] .gate-form input, [data-theme="dark"] .finder-search { background-color: #11151c; color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .tbtn:hover { background: #1c2230; }
[data-theme="dark"] .download-btn { background: #e7ecf3; color: #0a0b0d; }
[data-theme="dark"] .md-rendered code { background: #222a38; }
[data-theme="dark"] .titlebar .tb-title, [data-theme="dark"] .note-sub { color: var(--ink-soft); }

/* ---------- pro badge / upgrade ---------- */
.pro-badge { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #5a3d00; background: linear-gradient(135deg,#ffd86b,#ffb01f); padding: 5px 10px; border-radius: 8px; }
.up-btn { font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.32); padding: 7px 13px; border-radius: 10px; }
.up-btn:hover { background: rgba(255,255,255,.3); }

/* ---------- captcha + admin ---------- */
.captcha-box { padding: 0 18px 14px; }
.captcha-box.ts { padding: 0; display: flex; justify-content: center; min-height: 65px; }
.admin-reports { display: grid; gap: 12px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.admin-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-meta a { color: var(--ink); }
.admin-sub { font-size: 12.5px; color: var(--ink-soft); }
.admin-act { display: flex; gap: 8px; }

/* ---------- print ---------- */
@media print {
  body { padding: 0; background: #fff; }
  .screen { border-radius: 0; }
  .hero-band, .note-toolbar, .embed-box, .footer, .ad-slot, .nav-links { display: none !important; }
  .note-main { margin: 0; padding: 0; }
  .note-window { border: none; box-shadow: none; }
  .note-content { font-size: 12px; }
}
