/* ManhTool Ghi Chú — Design system */
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/be-vietnam-pro-vietnamese-400-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/be-vietnam-pro-vietnamese-500-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/be-vietnam-pro-vietnamese-600-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/be-vietnam-pro-vietnamese-700-normal.woff2) format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 400; src: url(/fonts/be-vietnam-pro-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 500; src: url(/fonts/be-vietnam-pro-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 600; src: url(/fonts/be-vietnam-pro-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-display: swap; font-weight: 700; src: url(/fonts/be-vietnam-pro-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-soft: #ecfdf3;
  --primary-ring: rgba(22, 163, 74, .22);
  --primary-ink: #14532d;
  --accent: #84cc16;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --hover: #f1f5f9;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --sh: 0 1px 3px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .05);
  --sh-lg: 0 10px 30px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .05);
  --c-yellow: #fef9c3; --c-green: #dcfce7; --c-blue: #dbeafe; --c-purple: #ede9fe; --c-pink: #fce7f3; --c-orange: #ffedd5; --c-gray: #f1f5f9;
  --d-yellow: #eab308; --d-green: #22c55e; --d-blue: #3b82f6; --d-purple: #8b5cf6; --d-pink: #ec4899; --d-orange: #f97316; --d-gray: #94a3b8;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --primary: #22c55e; --primary-hover: #4ade80; --primary-soft: rgba(34, 197, 94, .12); --primary-ring: rgba(34, 197, 94, .3); --primary-ink: #bbf7d0;
  --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --subtle: #64748b; --line: #1e293b; --line-strong: #334155;
  --bg: #0b1120; --surface: #111827; --surface-2: #1a2333; --hover: #1e293b;
  --danger-soft: rgba(220, 38, 38, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12); --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
  --sh-sm: none; --sh: 0 1px 3px rgba(0,0,0,.4); --sh-lg: 0 12px 32px rgba(0,0,0,.5);
  --c-yellow: #2a2614; --c-green: #12261a; --c-blue: #142033; --c-purple: #1f1a33; --c-pink: #2b1622; --c-orange: #2b1d12; --c-gray: #1a2333;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #22c55e; --primary-hover: #4ade80; --primary-soft: rgba(34, 197, 94, .12); --primary-ring: rgba(34, 197, 94, .3); --primary-ink: #bbf7d0;
    --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --subtle: #64748b; --line: #1e293b; --line-strong: #334155;
    --bg: #0b1120; --surface: #111827; --surface-2: #1a2333; --hover: #1e293b;
    --danger-soft: rgba(220, 38, 38, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12); --info: #60a5fa; --info-soft: rgba(96, 165, 250, .12);
    --sh-sm: none; --sh: 0 1px 3px rgba(0,0,0,.4); --sh-lg: 0 12px 32px rgba(0,0,0,.5);
    --c-yellow: #2a2614; --c-green: #12261a; --c-blue: #142033; --c-purple: #1f1a33; --c-pink: #2b1622; --c-orange: #2b1d12; --c-gray: #1a2333;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -.03em; line-height: 1.12; }
h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 1em; }
img { max-width: 100%; }
code, pre, kbd { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; font-size: .9em; }
::selection { background: var(--primary-ring); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.i { width: 18px; height: 18px; flex: none; vertical-align: -3.5px; }
.i.sm { width: 15px; height: 15px; vertical-align: -2.5px; }
.i.lg { width: 22px; height: 22px; }
.i.xl { width: 28px; height: 28px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; min-width: 160px; }
.between { justify-content: space-between; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary-ink); background: var(--primary-soft); padding: 5px 12px; border-radius: 999px; }
:root[data-theme="dark"] .eyebrow { color: var(--primary); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 8px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 16px; white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand .brand-sub { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 2px; }
.nav { display: flex; gap: 2px; margin-left: 20px; }
.nav a { color: var(--text); padding: 7px 12px; border-radius: var(--r); font-weight: 500; font-size: 14.5px; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 600; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
#auth-slot { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.menu-btn { display: none !important; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; }
.user-btn:hover { background: var(--hover); color: var(--ink); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.announce { background: var(--ink); color: var(--bg); font-size: 13.5px; }
.announce .container { display: flex; align-items: center; gap: 10px; min-height: 38px; padding-top: 6px; padding-bottom: 6px; }
.announce .grow { flex: 1; }
.announce button { background: transparent; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 4px; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 12px 14px; margin: 0; box-shadow: var(--sh); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
  .menu-btn { display: inline-flex !important; }
  .brand .brand-sub { display: none; }
}
@media (max-width: 520px) {
  .user-btn .label, [data-hide-mobile] { display: none !important; }
  .user-btn { padding: 3px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s; box-shadow: var(--sh-sm); user-select: none;
}
.btn:hover { background: var(--hover); color: var(--ink); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(22, 163, 74, .3); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #052e16; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: var(--text); color: var(--bg); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: var(--r-sm); gap: 6px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink); }
.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 14.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--subtle); }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 110px; line-height: 1.6; }
select.input { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.input-icon { position: relative; }
.input-icon .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.input-icon .input { padding-left: 36px; }
.field { margin-bottom: 14px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; font-size: 14px; cursor: pointer; color: var(--text); }
.check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--primary); flex: none; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; font-size: 14px; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); background: var(--primary-soft); color: var(--primary-ink); font-size: 14px; margin-bottom: 12px; border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); }
.alert .i { margin-top: 2px; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
:root[data-theme="dark"] .alert:not(.error):not(.warn):not(.info) { color: var(--primary); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--primary-soft); color: var(--primary-ink); }
:root[data-theme="dark"] .badge.green { color: var(--primary); }
.badge.pro { background: linear-gradient(135deg, #16a34a, #65a30d); color: #fff; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.kbd, kbd { display: inline-block; background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font-size: 12px; line-height: 20px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ---------- Marketing ---------- */
.hero { padding: 72px 0 48px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 640px; background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 14%, transparent), transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero .lead { font-size: 18px; color: var(--muted); max-width: 560px; line-height: 1.65; margin-top: 16px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 22px; }
.trust { display: flex; gap: 22px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .i { color: var(--primary); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } .hero { padding-top: 40px; } }

.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); font-size: 16.5px; margin: 0; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.feature { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.feature:hover { border-color: var(--line-strong); box-shadow: var(--sh); }
.feature .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 14.5px; }
.step-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; margin-bottom: 12px; }

/* App preview (mockup bằng CSS) */
.mock { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-lg); overflow: hidden; }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mock-body { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.mock-list { border-right: 1px solid var(--line); padding: 10px; display: grid; gap: 6px; align-content: start; }
.mock-item { padding: 9px 10px; border-radius: 8px; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.mock-item small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.mock-item.on { background: var(--primary-soft); }
.mock-doc { padding: 20px 22px; font-size: 13.5px; }
.mock-doc h4 { font-size: 18px; margin-bottom: 10px; }
.mock-doc .task { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.mock-doc .box { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.mock-doc .box.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.mock-lock { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }

/* Quick note card */
.quick-card { padding: 22px; }
.quick-card textarea.input { min-height: 150px; }
.quick-result .link-box { display: flex; gap: 8px; margin: 12px 0 8px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r); padding: 3px; gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }

/* ---------- Pricing ---------- */
.price-card { position: relative; display: flex; flex-direction: column; padding: 28px; }
.price-card.featured { border: 2px solid var(--primary); box-shadow: var(--sh-lg); }
.price-card .ribbon { position: absolute; top: -12px; left: 28px; }
.price { font-size: 38px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; margin: 10px 0 2px; }
.price small { font-size: 14.5px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.price del { font-size: 18px; color: var(--subtle); font-weight: 500; margin-left: 6px; }
.feat-list { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; flex: 1; align-content: start; }
.feat-list li { display: flex; gap: 10px; font-size: 14.5px; align-items: flex-start; }
.feat-list li .i { color: var(--primary); margin-top: 2px; }
.feat-list li.no { color: var(--subtle); }
.feat-list li.no .i { color: var(--subtle); }
table.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.compare th, .compare td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; }
.compare tr:last-child td { border-bottom: 0; }
.compare th { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .i { color: var(--primary); }
.table-wrap { overflow-x: auto; }

details.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
details.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; font-size: 15.5px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); font-weight: 400; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 10px 0 0; color: var(--muted); }

.cta-band { border-radius: var(--r-xl); padding: 44px; background: linear-gradient(135deg, #14532d, #166534 55%, #3f6212); color: #fff; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: rgba(255,255,255,.8); margin: 0; }
.cta-band .btn { background: #fff; color: #14532d; border-color: #fff; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 28px; margin-top: 56px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--primary); }
.footer-contact { display: grid; gap: 6px; margin-top: 12px; color: var(--muted); }
.footer-contact span { display: inline-flex; align-items: center; gap: 8px; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Ads ---------- */
.ad-slot { margin: 24px auto; text-align: center; }
.ad-slot.filled { min-height: 100px; }
.ad-label { font-size: 10.5px; color: var(--subtle); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }

/* ---------- Modal / toast / menu ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: var(--r-xl); width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--sh-lg); border: 1px solid var(--line); animation: pop .15s ease-out; }
.modal.wide { max-width: 680px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 16px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: grid; gap: 8px; width: min(calc(100vw - 32px), 380px); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: var(--r); box-shadow: var(--sh-lg); font-size: 14px; animation: pop .18s ease-out; }
.toast.error .i { color: #f87171; }
.toast.success .i { color: #4ade80; }
@media (max-width: 560px) { .toasts { left: 16px; right: 16px; bottom: 16px; width: auto; } }
.menu { position: fixed; z-index: 120; min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 6px; animation: pop .1s ease-out; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: transparent; border-radius: 7px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--hover); color: var(--ink); }
.menu .danger { color: var(--danger); }
.menu .danger:hover { background: var(--danger-soft); color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .menu-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); padding: 6px 10px 4px; font-weight: 600; }

/* ---------- Payment ---------- */
.pay-grid { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; }
.qr-box img { width: 100%; display: block; }
.pay-info dl { margin: 0; display: grid; gap: 2px; }
.pay-info .kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.pay-info dt { font-size: 13px; color: var(--muted); }
.pay-info dd { margin: 0; display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); text-align: right; word-break: break-all; }
.pay-info dd.code { font-size: 17px; color: var(--primary); letter-spacing: .04em; }
.pay-status { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 11px 13px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--primary); animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 14px; background: var(--primary-soft); color: var(--primary); }
@media (max-width: 600px) { .pay-grid { grid-template-columns: 1fr; } .qr-box { max-width: 240px; margin: 0 auto; } }

/* ---------- Markdown ---------- */
.md { word-wrap: break-word; overflow-wrap: anywhere; color: var(--ink); font-size: 16px; line-height: 1.75; }
.md h1 { font-size: 1.75em; } .md h2 { font-size: 1.4em; } .md h3 { font-size: 1.18em; }
.md h1, .md h2, .md h3, .md h4 { margin: 1.3em 0 .5em; }
.md > :first-child { margin-top: 0; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md table { margin: 0 0 1em; }
.md pre { background: var(--surface-2); padding: 14px 16px; border-radius: var(--r); overflow-x: auto; border: 1px solid var(--line); line-height: 1.5; }
.md code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: .88em; }
.md pre code { background: none; padding: 0; }
.md blockquote { padding: 2px 16px; border-left: 3px solid var(--primary); color: var(--muted); }
.md ul, .md ol { padding-left: 1.5em; }
.md li { margin: 2px 0; }
.md li.task { list-style: none; margin-left: -1.4em; display: flex; gap: 8px; align-items: flex-start; }
.md li.task input { margin-top: 7px; accent-color: var(--primary); width: 15px; height: 15px; flex: none; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 12px; }
.md th { background: var(--surface-2); }
.md mark { background: #fef08a; color: #422006; padding: 0 2px; border-radius: 3px; }
.md img { border-radius: var(--r); }
.md a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; }
.auth-card h1 { font-size: 24px; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 14.5px; }
.auth-logo { display: block; width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 12px; }
.otp-input { text-align: center; font-size: 22px; letter-spacing: .4em; height: 52px; font-weight: 600; }

/* ---------- Docs ---------- */
.doc-layout { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding: 48px 0; align-items: start; }
.doc-nav { position: sticky; top: 80px; font-size: 14px; }
.doc-nav h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.doc-nav a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--text); }
.doc-nav a:hover { background: var(--hover); color: var(--ink); }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(28px, 3.6vw, 38px); }
.doc h2 { margin-top: 2em; font-size: 24px; scroll-margin-top: 80px; }
.doc h3 { margin-top: 1.4em; }
.doc li { margin-bottom: 6px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 42px; margin-bottom: 14px; min-height: 28px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: grid; place-items: center; font-size: 13px; }
.inline-ic { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink); vertical-align: 1px; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 0; padding-top: 28px; } .doc-nav { display: none; } }

/* ---------- Page header ---------- */
.page-head { padding: 48px 0 8px; }
.page-head p { color: var(--muted); font-size: 16.5px; max-width: 620px; }

/* ---------- App ---------- */
body.app-page { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.app-page .site-header .container { max-width: none; }
.app-shell { flex: 1; display: grid; grid-template-columns: 236px 320px 1fr; min-height: 0; }
.rail-backdrop { display: none; }
.rail { background: var(--surface-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
:root[data-theme="dark"] .rail { background: var(--bg); }
.rail-top { padding: 14px 12px 8px; }
.rail-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.rail-section { margin-top: 18px; }
.rail-title { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--subtle); }
.rail-title button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 3px; border-radius: 6px; display: grid; place-items: center; }
.rail-title button:hover { background: var(--hover); color: var(--ink); }
.nav-item { display: flex; width: 100%; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--sh-sm); border: 1px solid var(--line); }
:root[data-theme="dark"] .nav-item.active { background: var(--surface-2); }
.nav-item .i { color: var(--muted); }
.nav-item.active .i { color: var(--primary); }
.nav-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { font-size: 12px; color: var(--subtle); font-weight: 500; }
.nav-item .more { opacity: 0; border: 0; background: transparent; color: var(--muted); padding: 2px; border-radius: 5px; cursor: pointer; display: grid; place-items: center; }
.nav-item:hover .more { opacity: 1; }
.rail-foot { padding: 12px; border-top: 1px solid var(--line); }
.plan-card { padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.plan-card b { color: var(--ink); font-size: 13.5px; }
.meter { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 6px 0 8px; }
.meter span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.meter.warn span { background: #f59e0b; }

.list-pane { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.list-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.list-head .row { flex-wrap: nowrap; }
.list-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.note-list { flex: 1; overflow-y: auto; }
.note-item { display: block; width: 100%; text-align: left; padding: 13px 16px 13px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--text); font: inherit; position: relative; }
.note-item:hover { background: var(--hover); }
.note-item.active { background: var(--primary-soft); }
.note-item.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.note-item .t { font-weight: 600; color: var(--ink); display: flex; gap: 6px; align-items: center; font-size: 14.5px; }
.note-item .t .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.note-item .t .i { color: var(--subtle); width: 14px; height: 14px; }
.note-item .p { font-size: 13px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 3px; line-height: 1.5; }
.note-item .m { font-size: 12px; color: var(--subtle); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tag-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.list-empty { padding: 48px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.list-empty .i { color: var(--subtle); margin-bottom: 8px; }

.editor { display: flex; flex-direction: column; min-height: 0; background: var(--surface); position: relative; }
.editor-top { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.editor-top .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.editor-top .status { margin-right: auto; font-size: 12.5px; color: var(--subtle); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding-left: 4px; }
.editor-top .btn-ghost { color: var(--muted); }
.editor-top .btn-ghost.on { color: var(--primary); background: var(--primary-soft); }
.fmt-bar { display: flex; align-items: center; gap: 2px; padding: 6px 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.fmt-bar::-webkit-scrollbar { display: none; }
.fmt-bar .btn-ghost { width: 32px; height: 32px; padding: 0; color: var(--muted); border-radius: 7px; }
.fmt-bar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }
.editor-body { flex: 1; overflow-y: auto; }
.editor.c-yellow .editor-body { background: var(--c-yellow); } .editor.c-green .editor-body { background: var(--c-green); }
.editor.c-blue .editor-body { background: var(--c-blue); } .editor.c-purple .editor-body { background: var(--c-purple); }
.editor.c-pink .editor-body { background: var(--c-pink); } .editor.c-orange .editor-body { background: var(--c-orange); }
.editor.c-gray .editor-body { background: var(--c-gray); }
.editor-inner { max-width: 820px; margin: 0 auto; padding: 32px 40px 80px; min-height: 100%; display: flex; flex-direction: column; }
.title-input { border: 0; background: transparent; font: inherit; font-size: 30px; font-weight: 700; color: var(--ink); outline: none; width: 100%; padding: 0; letter-spacing: -.02em; line-height: 1.25; }
.title-input::placeholder { color: var(--subtle); }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.meta-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.meta-chip .i { color: var(--muted); width: 15px; height: 15px; }
.tags-input { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); outline: none; flex: 1; min-width: 160px; height: 28px; }
.content-input { overflow: hidden; flex: 1; border: 0; background: transparent; font: inherit; font-size: 16px; line-height: 1.75; color: var(--ink); outline: none; resize: none; width: 100%; min-height: 55vh; padding: 0; }
.content-input::placeholder { color: var(--subtle); }
.word-count { margin-top: 18px; font-size: 12px; color: var(--subtle); text-align: right; }
.empty-state { margin: auto; text-align: center; color: var(--muted); padding: 48px 24px; max-width: 420px; }
.empty-state .ill { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin: 0 auto 18px; }
.empty-state h3 { font-size: 19px; }
.shortcuts { display: grid; gap: 8px; margin: 20px auto 0; max-width: 260px; font-size: 13px; text-align: left; }
.shortcuts div { display: flex; justify-content: space-between; align-items: center; }
.lock-screen { margin: auto; width: 100%; max-width: 360px; text-align: center; padding: 56px 20px; }
.lock-screen .ill { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); margin: 0 auto 16px; }
.color-dots { display: flex; gap: 10px; flex-wrap: wrap; }
.color-dots button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); display: grid; place-items: center; color: var(--ink); }
.color-dots button.active { border-color: var(--ink); }
.share-row { display: flex; gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.share-row:last-child { border-bottom: 0; }
.share-row .grow { flex: 1; min-width: 0; }
.share-row .url { font-size: 13px; font-family: ui-monospace, Consolas, monospace; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-only { display: none !important; }
.upsell { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent); font-size: 14px; }
.upsell .grow { flex: 1; }
.upsell .ic { color: var(--primary); }
@media (max-width: 1100px) { .app-shell { grid-template-columns: 210px 290px 1fr; } .editor-inner { padding: 28px 28px 80px; } }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; position: relative; }
  .rail { position: fixed; inset: 60px auto 0 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .2s ease-out; box-shadow: var(--sh-lg); background: var(--surface); }
  .app-shell.rail-open .rail { transform: none; }
  .rail-backdrop { display: none; position: fixed; inset: 60px 0 0; background: rgba(15,23,42,.35); z-index: 55; }
  .app-shell.rail-open .rail-backdrop { display: block; }
  .app-shell.show-editor .list-pane { display: none; }
  .app-shell:not(.show-editor) .editor { display: none; }
  .mobile-only { display: inline-flex !important; }
  .editor-inner { padding: 20px 18px 80px; }
  .title-input { font-size: 24px; }
  .editor-top .label { display: none; }
}

/* ---------- Account / settings ---------- */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 36px 0; align-items: start; }
.settings-nav { position: sticky; top: 80px; display: grid; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 14px; }
.settings-nav a:hover { background: var(--hover); color: var(--ink); }
.settings-nav a.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); border: 1px solid var(--line); }
.settings-main { display: grid; gap: 20px; min-width: 0; }
.settings-main .card { scroll-margin-top: 80px; }
.settings-main .card > p.muted { margin-top: -8px; }
@media (max-width: 860px) { .settings-layout { grid-template-columns: 1fr; padding-top: 20px; } .settings-nav { position: static; display: flex; overflow-x: auto; } .settings-nav a { white-space: nowrap; } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; margin-top: 4px; }
.stat .s { font-size: 12px; color: var(--subtle); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: var(--surface-2); padding: 14px; border-radius: var(--r); text-align: center; color: var(--ink); }

/* Admin */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 20px 0 14px; border-bottom: 1px solid var(--line); }
.admin-tabs button { border: 0; background: transparent; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; }
.admin-tabs button.active { color: var(--ink); border-bottom-color: var(--primary); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 10px; }
.bars div { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; }
.bars div:hover { opacity: 1; }

/* Donate */
.amount-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.amount-chips button { height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.amount-chips button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); box-shadow: 0 0 0 3px var(--primary-ring); }
.supporters { display: grid; gap: 0; }
.supporter { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.supporter:last-child { border-bottom: 0; }

/* Receipt */
.receipt { max-width: 640px; margin: 40px auto; padding: 40px; }
.receipt table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.receipt td, .receipt th { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.receipt td:last-child, .receipt th:last-child { text-align: right; }
@media print {
  .site-header, .site-footer, .no-print, .ad-slot, .announce { display: none !important; }
  body { background: #fff; }
  .receipt { box-shadow: none; border: 0; margin: 0; }
}

.contact-grid { grid-template-columns: 1fr 1.5fr; gap: 24px; margin-top: 20px; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.google-btn { background: var(--surface); color: var(--ink); gap: 10px; margin-bottom: 4px; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--subtle); font-size: 12.5px; margin: 16px 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.or-divider.hidden { display: none; }

/* Cho phép cột co lại, tránh tràn ngang trên điện thoại */
.app-shell > * { min-width: 0; }
.editor-body { overflow-x: hidden; }
.meta-row > * { min-width: 0; }
@media (max-width: 480px) { .meta-row .row { min-width: 100% !important; } }
.editor-top { overflow: hidden; }
.editor-top .status { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
.editor-top .btn { flex-shrink: 0; }
@media (max-width: 860px) { .input, .tags-input, .content-input { font-size: 16px; } }

/* ---------- Lời mời tư vấn (giống trang chủ) ---------- */
.nudge {
  position: fixed; left: 20px; bottom: 24px; z-index: 99; width: 320px; padding: 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 20px 50px -12px rgba(15,23,42,.28), 0 2px 6px rgba(15,23,42,.06);
  animation: nudge-in .35s ease-out;
}
.nudge[hidden] { display: none; }
@keyframes nudge-in { from { opacity: 0; transform: translateY(12px); } }
.nudge-close {
  position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  background: none; border: 0; border-radius: 8px; color: var(--subtle); cursor: pointer;
}
.nudge-close:hover { background: var(--surface-2); color: var(--ink); }
.nudge-close .i { width: 16px; height: 16px; }
.nudge-head { display: flex; align-items: center; gap: 12px; padding-right: 24px; }
.nudge-head img { width: 50px; height: 30px; object-fit: contain; flex: none; }
.nudge-head p { font-size: .95rem; font-weight: 700; line-height: 1.35; margin: 0; }
.nudge-text { margin-top: 8px; font-size: .88rem; line-height: 1.55; color: var(--muted); margin-bottom: 0; }
.nudge-actions { display: flex; gap: 8px; margin-top: 16px; }
.nudge-actions .btn-primary {
  flex: 1; height: 42px; padding: 0 12px;
  background: linear-gradient(135deg, #0e7c5a, #12b886);
  border-radius: 10px; color: #fff; font-weight: 600; font-size: .88rem;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: none;
}
.nudge-actions .btn-primary:hover { background: linear-gradient(135deg, #0a5c44, #0e7c5a); }
:root[data-theme="dark"] .nudge-actions .btn-primary { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nudge-actions .btn-primary { color: #fff; } }
.nudge-actions .btn-ghost {
  height: 42px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink);
  font-weight: 600; font-size: .88rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; background: transparent;
}
.nudge-actions .btn-ghost:hover { background: var(--surface-2); }
.nudge-actions .btn-ghost .i { width: 16px; height: 16px; }
@media (max-width: 1023px) { .nudge { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; } }

