/* LoginBoard — app.css — no build step required */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ──────────────────────────────────── */
:root {
  --bg:       #f7f8fa;
  --surface:  #ffffff;
  --s2:       #f0f2f5;
  --s3:       #e8eaee;
  --border:   #e4e7ec;
  --border2:  #d0d5dd;
  --text:     #18212f;
  --text2:    #4a5568;
  --text3:    #8a94a6;
  --accent:   #2563eb;
  --accentH:  #1d4ed8;
  --accentL:  #eff6ff;
  --accentM:  #dbeafe;
  --green:    #16a34a;
  --greenL:   #f0fdf4;
  --red:      #dc2626;
  --amber:    #d97706;
  --ra:       12px;
  --rs:       8px;
  --rl:       16px;
  --sh1: 0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --sh2: 0 2px 8px rgba(0,0,0,.08),0 1px 3px rgba(0,0,0,.04);
  --sh3: 0 4px 20px rgba(0,0,0,.09),0 2px 6px rgba(0,0,0,.04);
}

/* ── Reset ──────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Layout ─────────────────────────────────────── */
.wrap    { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap-md { max-width: 720px;  margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 480px;  margin: 0 auto; padding: 0 24px; }

/* ── Buttons ─────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: var(--rs); font-size: .875rem; font-weight: 600; white-space: nowrap; transition: background .13s, color .13s, border-color .13s; cursor: pointer; border: none; font-family: inherit; line-height: 1; }
.btn-p  { background: var(--accent); color: #fff; }
.btn-p:hover { background: var(--accentH); }
.btn-s  { background: var(--surface); color: var(--text); border: 1px solid var(--border2); }
.btn-s:hover { background: var(--s2); }
.btn-g  { background: transparent; color: var(--text2); }
.btn-g:hover { background: var(--s2); color: var(--text); }
.btn-d  { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.btn-d:hover { background: #fee2e2; }
.btn-sm { padding: 5px 12px; font-size: .8125rem; }
.btn-lg { padding: 11px 26px; font-size: .9375rem; }
.btn-xl { padding: 13px 32px; font-size: 1rem; }
.btn-blk { width: 100%; }
.btn-ic { padding: 7px; width: 32px; height: 32px; border-radius: var(--rs); }

/* ── Logo ────────────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; color: var(--accent); letter-spacing: -.02em; }
.logo-mark { width: 28px; height: 28px; background: var(--accent); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0; }

/* ── Forms ───────────────────────────────────────── */
.fg { margin-bottom: 14px; }
.fl { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 5px; color: var(--text); }
.fl-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.fi { width: 100%; padding: 9px 13px; border: 1px solid var(--border2); border-radius: var(--rs); font-size: .875rem; color: var(--text); background: var(--surface); outline: none; transition: border-color .13s, box-shadow .13s; }
.fi:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.fi::placeholder { color: var(--text3); }
.fi-ro { background: var(--s2); color: var(--text2); font-family: 'DM Mono', monospace; font-size: .825rem; }
.fhint { font-size: .775rem; color: var(--text3); margin-top: 4px; }
.ferr  { font-size: .775rem; color: var(--red); margin-top: 4px; }
.fpfx-wrap { display: flex; align-items: center; border: 1px solid var(--border2); border-radius: var(--rs); overflow: hidden; background: var(--surface); transition: border-color .13s, box-shadow .13s; }
.fpfx-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.fpfx { padding: 9px 12px; background: var(--s2); color: var(--text3); font-size: .8125rem; border-right: 1px solid var(--border2); white-space: nowrap; flex-shrink: 0; }
.fpfx-in { flex: 1; border: none; outline: none; padding: 9px 12px; font-size: .875rem; color: var(--text); background: transparent; }
.fpfx-in::placeholder { color: var(--text3); }

/* ── Alerts ──────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: var(--rs); font-size: .875rem; font-weight: 500; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.alert-ok  { background: var(--greenL); color: var(--green); border: 1px solid #bbf7d0; }
.alert-err { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.alert-info { background: var(--accentL); color: var(--accent); border: 1px solid var(--accentM); }

/* ── Badge ───────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.badge-blue  { background: var(--accentL); color: var(--accent); }
.badge-gray  { background: var(--s2); color: var(--text2); }
.badge-green { background: var(--greenL); color: var(--green); }

/* ── Cards ───────────────────────────────────────── */
.card  { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 20px; box-shadow: var(--sh1); }
.card-lg { padding: 28px; border-radius: var(--rl); }

/* ── Divider ─────────────────────────────────────── */
.div-or { text-align: center; position: relative; margin: 18px 0; }
.div-or::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.div-or span { position: relative; background: var(--surface); padding: 0 12px; font-size: .8rem; color: var(--text3); }

/* ── Toasts ──────────────────────────────────────── */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 10px 16px; border-radius: var(--rs); font-size: .875rem; font-weight: 500; display: flex; align-items: center; gap: 8px; box-shadow: var(--sh3); animation: tup .16s ease; pointer-events: auto; }
.toast-ok  { background: var(--green); }
.toast-err { background: var(--red); }
@keyframes tup { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ── Modal ───────────────────────────────────────── */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: var(--surface); border-radius: var(--rl); padding: 24px; width: 100%; max-width: 440px; box-shadow: var(--sh3); }
.modal-title { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }

/* ══════════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════════ */
.land-nav { background: var(--surface); border-bottom: 1px solid var(--border); height: 58px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.land-nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.land-nav-links { display: flex; align-items: center; gap: 6px; }
.land-nav-link { padding: 6px 13px; border-radius: var(--rs); font-size: .875rem; font-weight: 500; color: var(--text2); cursor: pointer; }
.land-nav-link:hover { background: var(--s2); color: var(--text); }

.hero { padding: 80px 0 64px; text-align: center; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--accentL); color: var(--accent); font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin-bottom: 22px; border: 1px solid var(--accentM); }
.hero-h1 { font-size: clamp(2.2rem, 5.5vw, 3.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.035em; max-width: 720px; margin: 0 auto 18px; }
.hero-h1 em { color: var(--accent); font-style: normal; }
.hero-sub { font-size: 1.0625rem; color: var(--text2); max-width: 520px; margin: 0 auto 34px; line-height: 1.68; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-proof { display: flex; gap: 20px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.hero-proof li { list-style: none; font-size: .8125rem; color: var(--text3); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.hero-proof li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* Profile preview on landing */
.profile-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rl); padding: 24px; box-shadow: var(--sh3); max-width: 740px; margin: 48px auto 0; }
.pp-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pp-avatar { width: 52px; height: 52px; border-radius: 13px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; flex-shrink: 0; }
.pp-name { font-size: 1.0625rem; font-weight: 800; letter-spacing: -.02em; }
.pp-handle { font-size: .8rem; color: var(--text3); font-family: 'DM Mono', monospace; margin-top: 2px; }
.pp-tagline { font-size: .875rem; color: var(--text2); margin-top: 3px; }
.pp-actions { margin-left: auto; display: flex; gap: 8px; }
.pp-board-label { font-size: .8rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }

/* Tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 9px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 11px 13px; display: flex; align-items: center; gap: 11px; transition: border-color .13s, box-shadow .13s; cursor: pointer; position: relative; }
.tile:hover { border-color: var(--border2); box-shadow: var(--sh2); }
.tile-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--s2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; overflow: hidden; }
.tile-icon img { width: 22px; height: 22px; object-fit: contain; }
.tile-body { flex: 1; min-width: 0; }
.tile-title { font-size: .875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-url { font-size: .75rem; color: var(--text3); font-family: 'DM Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-cat { display: inline-block; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 20px; background: var(--accentL); color: var(--accent); margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.tile-del { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 5px; background: var(--s2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text3); opacity: 0; transition: opacity .12s; }
.tile:hover .tile-del { opacity: 1; }
.tile-del:hover { background: #fef2f2; color: var(--red); border-color: #fecaca; }

/* Features */
.features { padding: 64px 0; border-top: 1px solid var(--border); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 40px; }
.feature-card { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); }
.feature-icon { width: 38px; height: 38px; border-radius: 9px; background: var(--accentL); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 13px; }
.feature-title { font-size: .9375rem; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: .875rem; color: var(--text2); line-height: 1.6; }

/* How it works */
.how { padding: 64px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin-top: 40px; }
.how-step { text-align: center; padding: 24px; position: relative; }
.how-step:not(:last-child)::after { content: '→'; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); font-size: 1.25rem; color: var(--border2); }
.how-num { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: .875rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.how-title { font-size: .9375rem; font-weight: 700; margin-bottom: 6px; }
.how-desc { font-size: .8125rem; color: var(--text2); line-height: 1.55; }

/* Social proof */
.proof-strip { padding: 48px 0; border-top: 1px solid var(--border); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 32px; }
.proof-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 18px; }
.proof-stars { color: #f59e0b; font-size: .875rem; margin-bottom: 8px; }
.proof-text { font-size: .875rem; color: var(--text2); line-height: 1.6; margin-bottom: 12px; font-style: italic; }
.proof-author { font-size: .8125rem; font-weight: 600; color: var(--text); }
.proof-role { font-size: .775rem; color: var(--text3); }

/* CTA band */
.cta-band { background: var(--accent); padding: 56px 0; text-align: center; }

/* Footer */
.land-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 28px 0; }
.land-footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-links { display: flex; gap: 20px; font-size: .875rem; }
.footer-links a { color: var(--text3); }
.footer-links a:hover { color: var(--text); }

/* ══════════════════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════════════════ */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-left { background: var(--accent); display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; position: relative; overflow: hidden; }
.auth-left-bg { position: absolute; inset: 0; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.08) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(0,0,0,.1) 0%, transparent 50%); pointer-events: none; }
.auth-left-content { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 52px; }
.auth-brand-mark { width: 32px; height: 32px; background: rgba(255,255,255,.2); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 800; }
.auth-brand-name { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.auth-headline { font-size: 1.875rem; font-weight: 800; color: #fff; line-height: 1.18; letter-spacing: -.03em; margin-bottom: 14px; }
.auth-tagline { font-size: .9375rem; color: rgba(255,255,255,.72); line-height: 1.62; max-width: 320px; }
.auth-feats { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.auth-feat { display: flex; align-items: flex-start; gap: 10px; }
.auth-feat-icon { width: 26px; height: 26px; background: rgba(255,255,255,.15); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.auth-feat-title { font-size: .875rem; font-weight: 600; color: #fff; }
.auth-feat-desc  { font-size: .8125rem; color: rgba(255,255,255,.72); }
.auth-quote { font-size: .875rem; color: rgba(255,255,255,.65); font-style: italic; line-height: 1.58; max-width: 300px; position: relative; z-index: 1; }
.auth-quote-by { font-size: .8rem; color: rgba(255,255,255,.42); margin-top: 8px; font-style: normal; }

.auth-right { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-form-wrap { width: 100%; max-width: 380px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--text3); font-weight: 500; margin-bottom: 28px; background: none; border: none; padding: 0; cursor: pointer; }
.auth-back:hover { color: var(--text); }
.auth-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.auth-h1 { font-size: 1.375rem; font-weight: 800; letter-spacing: -.025em; margin-bottom: 4px; }
.auth-sub { font-size: .875rem; color: var(--text3); margin-bottom: 24px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rl); padding: 28px 28px 22px; box-shadow: var(--sh2); }
.auth-switch { text-align: center; font-size: .875rem; color: var(--text3); margin-top: 18px; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { color: var(--accentH); }
.forgot-link { font-size: .8rem; font-weight: 500; color: var(--accent); }
.forgot-link:hover { color: var(--accentH); }

/* Forgot PW standalone */
.forgot-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 24px; }
.forgot-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rl); padding: 40px 36px; width: 100%; max-width: 420px; box-shadow: var(--sh3); }

/* ══════════════════════════════════════════════════
   APP SHELL (Dashboard + inner pages)
══════════════════════════════════════════════════ */
.app-nav { background: var(--surface); border-bottom: 1px solid var(--border); height: 54px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.app-nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.app-nav-right { display: flex; align-items: center; gap: 8px; }
.app-avatar { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 800; cursor: pointer; flex-shrink: 0; }

/* Sidebar + Main */
.app-body { display: grid; grid-template-columns: 200px 1fr; min-height: calc(100vh - 54px); }
.sidebar { border-right: 1px solid var(--border); background: var(--surface); padding: 14px 10px; position: sticky; top: 54px; height: calc(100vh - 54px); overflow-y: auto; display: flex; flex-direction: column; }
.s-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); padding: 0 8px; margin: 10px 0 4px; }
.s-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--rs); font-size: .875rem; font-weight: 500; color: var(--text2); cursor: pointer; transition: background .1s, color .1s; user-select: none; text-decoration: none; }
.s-item:hover { background: var(--s2); color: var(--text); }
.s-item.active { background: var(--accentL); color: var(--accent); font-weight: 600; }
.s-icon { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.s-count { margin-left: auto; font-size: .7rem; background: var(--s2); color: var(--text3); padding: 1px 6px; border-radius: 10px; font-weight: 600; }
.s-add { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: var(--rs); font-size: .8125rem; font-weight: 500; color: var(--text3); width: 100%; border: 1.5px dashed var(--border2); margin-top: 6px; background: none; cursor: pointer; }
.s-add:hover { background: var(--s2); color: var(--text2); }
.s-div { height: 1px; background: var(--border); margin: 10px 2px; }

.app-main { padding: 0 24px 56px; background: var(--bg); min-width: 0; overflow-x: hidden; }

/* Page header */
.page-hdr { padding: 20px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 1.125rem; font-weight: 800; letter-spacing: -.02em; }
.page-sub { font-size: .8125rem; color: var(--text3); margin-top: 1px; }
.page-hdr-r { display: flex; gap: 8px; align-items: center; }

/* Magic Bar */
.magic-bar { background: var(--surface); border: 1.5px solid var(--border2); border-radius: var(--ra); padding: 9px 13px; display: flex; align-items: center; gap: 10px; box-shadow: var(--sh1); margin-bottom: 20px; transition: border-color .13s, box-shadow .13s; }
.magic-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.magic-bar input { flex: 1; border: none; outline: none; font-size: .875rem; background: transparent; color: var(--text); font-family: 'DM Mono', monospace; }
.magic-bar input::placeholder { font-family: 'DM Sans', sans-serif; color: var(--text3); font-size: .875rem; }
.magic-hint { font-size: .75rem; color: var(--text3); white-space: nowrap; }
.magic-spin { width: 16px; height: 16px; border: 2px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; display: none; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Board sections */
.board-section { margin-bottom: 26px; }
.launch-bar { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 9px 13px; margin-bottom: 9px; }
.launch-bar-l { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 600; flex-wrap: wrap; }
.launch-bar-count { font-size: .8rem; color: var(--text3); font-weight: 400; }
.launch-bar-r { display: flex; gap: 6px; flex-shrink: 0; }

/* App tiles (dashboard) */
.app-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px; }
.app-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 11px 13px; display: flex; align-items: center; gap: 11px; cursor: pointer; position: relative; transition: border-color .13s, box-shadow .13s; text-decoration: none; color: inherit; }
.app-tile:hover { border-color: var(--border2); box-shadow: var(--sh2); }
.app-tile-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--s2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; overflow: hidden; }
.app-tile-icon img { width: 22px; height: 22px; object-fit: contain; }
.app-tile-body { flex: 1; min-width: 0; }
.app-tile-title { font-size: .875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tile-url { font-size: .75rem; color: var(--text3); font-family: 'DM Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-tile-cat { display: inline-block; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 20px; background: var(--accentL); color: var(--accent); margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.app-tile-del { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 5px; background: var(--s2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text3); opacity: 0; transition: opacity .12s; cursor: pointer; }
.app-tile:hover .app-tile-del { opacity: 1; }
.app-tile-del:hover { background: #fef2f2; color: var(--red); border-color: #fecaca; }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--text3); }
.empty-icon { font-size: 2rem; margin-bottom: 10px; }
.empty-title { font-size: .9375rem; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.empty-sub { font-size: .85rem; }

/* Dropdown */
.dropdown { position: relative; }
.drop-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border2); border-radius: var(--ra); box-shadow: var(--sh3); min-width: 164px; z-index: 50; padding: 4px; display: none; }
.drop-menu.open { display: block; }
.drop-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: .875rem; color: var(--text2); border-radius: var(--rs); cursor: pointer; transition: background .1s; width: 100%; text-align: left; border: none; background: none; font-family: inherit; }
.drop-item:hover { background: var(--s2); color: var(--text); }
.drop-item-danger { color: var(--red); }
.drop-item-danger:hover { background: #fef2f2; }
.drop-div { height: 1px; background: var(--border); margin: 4px 0; }

/* ══════════════════════════════════════════════════
   PUBLIC PROFILE PAGE
══════════════════════════════════════════════════ */
.profile-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 28px 0 22px; }
.profile-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.profile-av { width: 56px; height: 56px; border-radius: 14px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0; }
.profile-av img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.profile-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.025em; }
.profile-tagline { font-size: .9rem; color: var(--text2); margin-top: 4px; max-width: 500px; }
.profile-handle { font-size: .8rem; color: var(--text3); font-family: 'DM Mono', monospace; margin-top: 3px; }
.profile-stats { display: flex; gap: 16px; margin-top: 8px; }
.profile-stat { font-size: .8125rem; color: var(--text3); }
.profile-stat strong { color: var(--text); font-weight: 700; }
.profile-actions { margin-left: auto; display: flex; gap: 8px; align-items: flex-start; }
.made-with { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; color: var(--text3); padding: 4px 10px; background: var(--s2); border-radius: 20px; border: 1px solid var(--border); }
.made-with strong { color: var(--accent); }

/* ══════════════════════════════════════════════════
   SETTINGS PAGE
══════════════════════════════════════════════════ */
.settings-wrap { max-width: 640px; margin: 0 auto; padding: 28px 24px 60px; }
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 22px; box-shadow: var(--sh1); margin-bottom: 14px; }
.settings-title { font-size: .9375rem; font-weight: 700; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.settings-danger { border-color: #fecaca; }
.settings-danger .settings-title { color: var(--red); }

/* ══════════════════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════════════════ */
.about-wrap { max-width: 680px; margin: 0 auto; padding: 52px 24px 80px; }
.about-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--accentL); color: var(--accent); font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin-bottom: 20px; border: 1px solid var(--accentM); }
.about-h1 { font-size: clamp(1.75rem, 4vw, 2.375rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.15; margin-bottom: 16px; }
.about-lead { font-size: 1.0625rem; color: var(--text2); line-height: 1.72; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.about-section { margin-bottom: 36px; }
.about-section h2 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.about-section p { font-size: .9375rem; color: var(--text2); line-height: 1.72; }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.about-val { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 16px; }
.about-val-icon { font-size: 20px; margin-bottom: 8px; }
.about-val-title { font-size: .875rem; font-weight: 700; margin-bottom: 4px; }
.about-val-desc { font-size: .8125rem; color: var(--text2); line-height: 1.52; }
.about-cta { background: var(--accentL); border: 1px solid var(--accentM); border-radius: var(--rl); padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; }
.about-cta h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.about-cta p { font-size: .875rem; color: var(--text2); }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .app-body { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 640px) {
  .hero-h1 { font-size: 2rem; }
  .tile-grid, .app-tile-grid { grid-template-columns: 1fr; }
  .features-grid, .proof-grid { grid-template-columns: 1fr; }
  .about-values { grid-template-columns: 1fr; }
  .how-step:not(:last-child)::after { display: none; }
  .auth-right { padding: 28px 20px; }
  .auth-card { padding: 22px 18px; }
}

/* ══════════════════════════════════════════════════
   TODOS
══════════════════════════════════════════════════ */

.priority-select { border: 1px solid var(--border2); border-radius: var(--rs); padding: 4px 7px; font-size: .775rem; font-family: inherit; color: var(--text2); background: var(--surface); outline: none; cursor: pointer; flex-shrink: 0; }
.priority-select:focus { border-color: var(--accent); }
.due-input { border: 1px solid var(--border2); border-radius: var(--rs); padding: 4px 7px; font-size: .775rem; font-family: inherit; color: var(--text2); background: var(--surface); outline: none; flex-shrink: 0; width: 130px; }
.due-input:focus { border-color: var(--accent); }

.todo-tabs { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.todo-tab { padding: 5px 12px; border-radius: var(--rs); font-size: .8125rem; font-weight: 500; color: var(--text3); background: none; border: none; cursor: pointer; transition: background .1s, color .1s; display: flex; align-items: center; gap: 6px; }
.todo-tab:hover { background: var(--s2); color: var(--text2); }
.todo-tab.active { background: var(--accentL); color: var(--accent); font-weight: 600; }
.todo-tab-count { font-size: .7rem; background: currentColor; color: var(--surface); border-radius: 10px; padding: 1px 6px; font-weight: 700; opacity: .85; }

.todo-list { display: flex; flex-direction: column; gap: 4px; }
.todo-loading { color: var(--text3); font-size: .875rem; padding: 24px 0; text-align: center; }

.todo-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 10px 13px; transition: border-color .12s, box-shadow .12s; position: relative; }
.todo-item:hover { border-color: var(--border2); box-shadow: var(--sh1); }
.todo-item.done-item { opacity: .55; }
.todo-item.done-item .todo-text { text-decoration: line-through; color: var(--text3); }

.todo-check { width: 18px; height: 18px; border: 2px solid var(--border2); border-radius: 5px; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .13s, border-color .13s; }
.todo-check:hover { border-color: var(--accent); }
.todo-check.checked { background: var(--accent); border-color: var(--accent); }
.todo-check.checked::after { content: '✓'; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }

.todo-text { flex: 1; font-size: .875rem; color: var(--text); line-height: 1.4; word-break: break-word; cursor: text; outline: none; min-width: 0; }
.todo-text:focus { color: var(--accent); }

.todo-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.todo-priority { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.todo-priority.high { background: #fef2f2; color: var(--red); }
.todo-priority.normal { display: none; }
.todo-priority.low { background: var(--accentL); color: var(--accent); }
.todo-due { font-size: .75rem; color: var(--text3); font-family: 'DM Mono', monospace; white-space: nowrap; }
.todo-due.overdue { color: var(--red); font-weight: 600; }

.todo-del { width: 22px; height: 22px; border-radius: 5px; background: var(--s2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text3); opacity: 0; transition: opacity .12s; cursor: pointer; flex-shrink: 0; }
.todo-item:hover .todo-del { opacity: 1; }
.todo-del:hover { background: #fef2f2; color: var(--red); border-color: #fecaca; }

.todo-empty { text-align: center; padding: 52px 20px; color: var(--text3); }
.todo-empty-icon { font-size: 2.2rem; margin-bottom: 10px; }
.todo-empty-title { font-size: .9375rem; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.todo-empty-sub { font-size: .8125rem; }
/* ── Task status + signal chips ── */
.todo-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.db-task-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.db-task-body { flex: 1; min-width: 0; }

/* Status badge */
.task-status-badge {
  display: inline-flex; align-items: center;
  font-size: .65rem; font-weight: 600; padding: 2px 7px;
  border-radius: 20px; white-space: nowrap;
}
.st-todo    { background: var(--s2);   color: var(--text3); border: 1px solid var(--border2); }
.st-doing   { background: #eff6ff;     color: #2563eb;      border: 1px solid #bfdbfe; }
.st-blocked { background: #fef2f2;     color: #dc2626;      border: 1px solid #fecaca; }
.st-done    { background: #f0fdf4;     color: #16a34a;      border: 1px solid #bbf7d0; }

/* Automatic signal chips */
.task-signal {
  display: inline-flex; align-items: center;
  font-size: .62rem; font-weight: 700; padding: 2px 6px;
  border-radius: 20px; white-space: nowrap;
}
.sig-overdue { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.sig-today   { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.sig-stuck   { background: #fafafa; color: #6b7280; border: 1px solid #e5e7eb; }

/* Status buttons in modal */
.task-status-group { display: flex; gap: 6px; flex-wrap: wrap; }
.task-status-btn {
  padding: 5px 13px; border-radius: 8px; font-size: .8rem; font-weight: 500;
  border: 1.5px solid var(--border2); background: var(--surface);
  cursor: pointer; color: var(--text2); transition: all .13s;
}
.task-status-btn:hover { background: var(--s2); }
.task-status-btn.status-todo.active    { background: var(--s2);   color: var(--text2); border-color: var(--border2); font-weight:700; }
.task-status-btn.status-doing.active   { background: #eff6ff;     color: #2563eb;      border-color: #2563eb; font-weight:700; }
.task-status-btn.status-blocked.active { background: #fef2f2;     color: #dc2626;      border-color: #dc2626; font-weight:700; }
.task-status-btn.status-done.active    { background: #f0fdf4;     color: #16a34a;      border-color: #16a34a; font-weight:700; }

/* ── Updated todo item layout ── */
.todo-body { flex: 1; min-width: 0; cursor: pointer; }
.todo-body:hover .todo-text { color: var(--accent); }
.todo-text { font-size: .875rem; color: var(--text); line-height: 1.4; word-break: break-word; }
.todo-text.done-text { text-decoration: line-through; color: var(--text3); }
.todo-desc { font-size: .75rem; color: var(--text3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Priority badge (P1/P2/P3) ── */
.todo-prio-badge {
  font-size: .65rem; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; flex-shrink: 0; letter-spacing: .03em;
}
.todo-prio-badge.prio-p1 { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.todo-prio-badge.prio-p2 { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.todo-prio-badge.prio-p3 { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ── Task Modal ── */
.task-priority-group {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.task-prio-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 8px; font-size: .8125rem; font-weight: 500;
  border: 1.5px solid var(--border2); background: var(--surface);
  cursor: pointer; color: var(--text2); transition: all .13s;
}
.task-prio-btn:hover { border-color: var(--border2); background: var(--s2); }
.prio-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.task-prio-btn.prio-p1 .prio-dot { background: #dc2626; }
.task-prio-btn.prio-p2 .prio-dot { background: #ea580c; }
.task-prio-btn.prio-p3 .prio-dot { background: #2563eb; }
.task-prio-btn.prio-p1.active { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.task-prio-btn.prio-p2.active { background: #fff7ed; border-color: #ea580c; color: #ea580c; }
.task-prio-btn.prio-p3.active { background: #eff6ff; border-color: #2563eb; color: #2563eb; }


/* ══════════════════════════════════════════════════
   NOTES
══════════════════════════════════════════════════ */


.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

.note-card { border-radius: var(--ra); padding: 16px; border: 1px solid var(--border); position: relative; cursor: pointer; transition: box-shadow .13s, border-color .13s; display: flex; flex-direction: column; gap: 8px; min-height: 110px; }
.note-card:hover { box-shadow: var(--sh2); border-color: var(--border2); }
.note-card.color-default { background: var(--surface); }
.note-card.color-yellow  { background: #fffbeb; border-color: #fde68a; }
.note-card.color-green   { background: #f0fdf4; border-color: #bbf7d0; }
.note-card.color-blue    { background: #eff6ff; border-color: #bfdbfe; }
.note-card.color-pink    { background: #fdf2f8; border-color: #f9a8d4; }

.note-pin-badge { position: absolute; top: 10px; right: 10px; font-size: 13px; opacity: .7; }
.note-card-title { font-size: .875rem; font-weight: 700; color: var(--text); line-height: 1.3; word-break: break-word; }
.note-card-body { font-size: .8125rem; color: var(--text2); line-height: 1.58; word-break: break-word; flex: 1; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; }
.note-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.note-card-date { font-size: .72rem; color: var(--text3); font-family: 'DM Mono', monospace; }
.note-card-del { width: 22px; height: 22px; border-radius: 5px; background: rgba(0,0,0,.06); border: none; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text3); opacity: 0; transition: opacity .12s; cursor: pointer; flex-shrink: 0; }
.note-card:hover .note-card-del { opacity: 1; }
.note-card-del:hover { background: #fef2f2; color: var(--red); }

.notes-empty { text-align: center; padding: 52px 20px; color: var(--text3); grid-column: 1/-1; }
.notes-empty-icon { font-size: 2.2rem; margin-bottom: 10px; }
.notes-empty-title { font-size: .9375rem; font-weight: 600; color: var(--text2); margin-bottom: 4px; }

/* ══════════════════════════════════════════════════
   MEMORY LAYER — PROJECT WORKSPACE
══════════════════════════════════════════════════ */

/* Sidebar project status dots */
.s-new-btn { background:none;border:none;color:var(--text3);font-size:1rem;cursor:pointer;padding:0 2px;line-height:1; }
.s-new-btn:hover { color:var(--accent); }

/* ── Sidebar profile card ── */
.s-spacer { flex: 1; min-height: 12px; }
.s-profile-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: var(--ra);
  border: 1px solid var(--border);
  background: var(--s2);
  margin-top: 8px;
  flex-shrink: 0;
}
.s-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  user-select: none;
}
.s-profile-info { flex: 1; min-width: 0; }
.s-profile-name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s-profile-username {
  font-size: .7rem;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s-profile-gear {
  font-size: 14px;
  color: var(--text3);
  text-decoration: none;
  flex-shrink: 0;
  padding: 3px;
  border-radius: 5px;
  transition: color .12s, background .12s;
  line-height: 1;
}
.s-profile-gear:hover { color: var(--accent); background: var(--surface); }
.s-status-dot { width:7px;height:7px;border-radius:50%;flex-shrink:0; }
.status-active   .s-status-dot, .s-status-dot.status-active   { background:var(--green); }
.status-paused   .s-status-dot, .s-status-dot.status-paused   { background:var(--amber); }
.status-done     .s-status-dot, .s-status-dot.status-done     { background:var(--accent); }
.status-archived .s-status-dot, .s-status-dot.status-archived { background:var(--text3); }

/* Capture bar (unified quick-add) */
.capture-bar { background:var(--surface);border:1.5px solid var(--border2);border-radius:var(--ra);box-shadow:var(--sh1);margin-bottom:20px;overflow:hidden; }
.capture-tabs { display:flex;border-bottom:1px solid var(--border);padding:0 4px; }
.capture-tab { padding:7px 14px;font-size:.8125rem;font-weight:600;color:var(--text3);background:none;border:none;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .12s,border-color .12s; }
.capture-tab:hover { color:var(--text2); }
.capture-tab.active { color:var(--accent);border-bottom-color:var(--accent); }
.capture-inputs { padding:9px 13px; }
.cap-panel { display:flex;align-items:center;gap:10px; }
.cap-panel input { border:none;outline:none;font-size:.875rem;background:transparent;color:var(--text);font-family:inherit; }
.cap-panel input::placeholder { color:var(--text3); }
.cap-panel input[type=url] { flex:1;font-family:'DM Mono',monospace; }
.cap-board-sel { max-width:160px; }

/* Project cards on home */
.proj-card { background:var(--surface);border:1px solid var(--border);border-radius:var(--ra);padding:16px 18px;cursor:pointer;transition:border-color .13s,box-shadow .13s;margin-bottom:10px; }
.proj-card:hover { border-color:var(--border2);box-shadow:var(--sh2); }
.proj-card-archived { opacity:.6; }
.proj-card-hdr { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px; }
.proj-card-title { display:flex;align-items:center;gap:8px;font-size:.9375rem;font-weight:700;min-width:0;overflow:hidden; }
.proj-emoji { font-size:1.1rem;flex-shrink:0; }
.proj-status { font-size:.7rem;font-weight:700;padding:2px 8px;border-radius:20px;flex-shrink:0; }
.status-active   { background:var(--greenL);color:var(--green); }
.status-paused   { background:#fffbeb;color:var(--amber); }
.status-done     { background:var(--accentL);color:var(--accent); }
.status-archived { background:var(--s2);color:var(--text3); }
.proj-card-meta { display:flex;align-items:center;gap:8px;flex-shrink:0; }
.proj-last { font-size:.75rem;color:var(--text3);white-space:nowrap; }
.proj-desc { font-size:.8125rem;color:var(--text2);margin-bottom:8px;line-height:1.5; }
.proj-stats { display:flex;align-items:center;gap:12px; }
.proj-stat { font-size:.8rem;color:var(--text3);font-weight:500; }

/* Board workspace 3-col */
/* ── Smart board layout ── */
.board-action-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.board-add-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--ra);
  font-size: .8125rem; font-weight: 600;
  border: 1.5px dashed var(--border2);
  background: var(--surface); color: var(--text2);
  cursor: pointer; transition: all .13s;
}
.board-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accentL); border-style: solid; }

.board-smart { display: flex; flex-direction: column; gap: 18px; }

/* Each section */
.bsec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); padding: 16px 18px; }
.bsec-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.bsec-title { font-size: .8125rem; font-weight: 700; color: var(--text2); }
.bsec-count { font-size: .7rem; background: var(--s2); color: var(--text3); padding: 2px 7px; border-radius: 10px; font-weight: 600; }

/* Notes — 2 columns max; single note spans full width */
.ws-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.ws-notes-grid .ws-note-card:only-child {
  grid-column: 1 / -1;
}

/* Tasks — plain list, already styled by todo-list */

/* Links — 2 per row reference strip */
.ws-links-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* Empty state */
.board-empty-state { text-align: center; padding: 60px 20px; color: var(--text3); }
.board-empty-icon  { font-size: 2.4rem; margin-bottom: 12px; }
.board-empty-title { font-size: .9375rem; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.board-empty-sub   { font-size: .8125rem; }

/* Legacy ws-col kept for any remaining references */
.ws-col { background:var(--surface);border:1px solid var(--border);border-radius:var(--ra);padding:14px; }
.ws-col-hdr { display:flex;align-items:center;justify-content:space-between;font-size:.8125rem;font-weight:700;color:var(--text2);margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--border); }
.ws-add-btn {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1px 7px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.ws-add-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.ws-col-count { font-size:.7rem;background:var(--s2);color:var(--text3);padding:2px 7px;border-radius:10px;font-weight:600; }

/* Links in workspace */
.ws-links-list { display:flex;flex-direction:column;gap:6px; }
.ws-link-item { display:flex;align-items:flex-start;gap:9px;padding:9px 10px;border:1px solid var(--border);border-radius:var(--rs);background:var(--bg);position:relative;transition:border-color .12s; }
.ws-link-item:hover { border-color:var(--border2); }
.ws-link-icon { width:26px;height:26px;border-radius:6px;background:var(--s2);display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:13px;overflow:hidden; }
.ws-link-icon img { width:16px;height:16px;object-fit:contain; }
.ws-link-body { flex:1;min-width:0; }
.ws-link-title { font-size:.8125rem;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none;display:block; }
.ws-link-title:hover { color:var(--accent); }
.ws-link-host { font-size:.72rem;color:var(--text3);font-family:'DM Mono',monospace; }
.ws-link-note { font-size:.75rem;color:var(--text2);margin-top:3px;line-height:1.45;word-break:break-word; }
.ws-link-note-input { font-size:.75rem;color:var(--text2);border:none;outline:none;background:transparent;width:100%;font-family:inherit;padding:0;margin-top:3px;line-height:1.45; }
.ws-link-note-input::placeholder { color:var(--text3); }
.ws-link-status { display:inline-block;font-size:.65rem;font-weight:700;padding:1px 6px;border-radius:10px;margin-top:3px; }
.ws-link-status.wip     { background:#fffbeb;color:var(--amber); }
.ws-link-status.done    { background:var(--greenL);color:var(--green); }
.ws-link-status.blocked { background:#fef2f2;color:var(--red); }
.ws-link-del { position:absolute;top:6px;right:6px;width:18px;height:18px;border-radius:4px;background:var(--s2);border:none;font-size:9px;color:var(--text3);opacity:0;cursor:pointer;display:flex;align-items:center;justify-content:center; }
.ws-link-item:hover .ws-link-del { opacity:1; }
.ws-link-del:hover { background:#fef2f2;color:var(--red); }

/* Notes in workspace */
.ws-notes-list { display:flex;flex-direction:column;gap:8px; }
.ws-note-card { border-radius:var(--rs);padding:12px;border:1px solid var(--border);cursor:pointer;transition:box-shadow .12s; }
.ws-note-card:hover { box-shadow:var(--sh1); }
.ws-note-card.color-default { background:var(--bg); }
.ws-note-card.color-yellow  { background:#fffbeb;border-color:#fde68a; }
.ws-note-card.color-green   { background:#f0fdf4;border-color:#bbf7d0; }
.ws-note-card.color-blue    { background:#eff6ff;border-color:#bfdbfe; }
.ws-note-card.color-pink    { background:#fdf2f8;border-color:#f9a8d4; }
.ws-note-title { font-size:.8125rem;font-weight:700;margin-bottom:4px;color:var(--text); }
.ws-note-body  { font-size:.775rem;color:var(--text2);line-height:1.5;white-space:pre-wrap;overflow:hidden;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical; }

/* Workspace empty states */
.ws-empty { text-align:center;padding:24px 12px;color:var(--text3);font-size:.8125rem; }

@media (max-width:900px) {
  .board-workspace { grid-template-columns:1fr; }
  .capture-tab { padding:6px 10px;font-size:.75rem; }
}

/* ── Alignment fixes ──────────────────────────────── */

/* Project cards — use flex column not random grid */
#view-home > .proj-card { display:block; }

/* Capture bar inputs fill available space properly */
.cap-panel { display:flex; align-items:center; gap:8px; width:100%; }
.cap-panel > input[type=url],
.cap-panel > input[type=text] { min-width:0; }
.cap-panel input[type=url]  { flex:1; font-family:'DM Mono',monospace; }
.cap-panel input[type=text] { flex:1; }

/* Sidebar label with + button inline */
.s-label { display:flex; align-items:center; justify-content:space-between; }

/* Board workspace top spacing */
.board-workspace { margin-top:4px; }

/* Page header bottom border for separation */
.page-hdr { border-bottom: 1px solid var(--border); margin-bottom:16px; }

/* Fix ws-col min height so empty state looks right */
.ws-col { min-height:200px; }

/* proj-card-title fix */
.proj-card-title { flex-wrap:nowrap; overflow:hidden; white-space:nowrap; }
.proj-emoji { flex-shrink:0; }

/* Fix modal-box overflow on small screens */
.modal-box { max-height:90vh; overflow-y:auto; }

/* Fix capture bar focus ring */
.capture-bar:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.08); }

/* Magic spin inside capture bar */
.cap-panel .magic-spin { flex-shrink:0; }
.magic-hint { font-size:.72rem; color:var(--text3); white-space:nowrap; flex-shrink:0; }

/* Sidebar project item overflow */
.s-project-item { overflow:hidden; }
.s-project-item > span:nth-child(2) { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* ── Stats grid (dashboard) ─────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ra);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .12s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-num { font-size: 1.75rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.stat-lbl { font-size: .8rem; color: var(--text3); font-weight: 500; }

/* ── Project grid ───────────────────────────────── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ra);
  padding: 16px;
  cursor: pointer;
  transition: border-color .12s;
}
.proj-card:hover { border-color: var(--border2); }
.proj-card-archived { opacity: .6; }
.proj-card-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}
.proj-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: .9375rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-emoji { font-size: 1rem; flex-shrink: 0; }
.proj-desc  { font-size: .8125rem; color: var(--text3); margin-bottom: 10px; }
.proj-stats { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.proj-stat  { font-size: .75rem; color: var(--text3); }
.proj-status {
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}
.status-active   { background: #f0fdf4; color: #16a34a; }
.status-paused   { background: #fffbeb; color: #d97706; }
.status-done     { background: #eff6ff; color: #2563eb; }
.status-archived { background: var(--s2); color: var(--text3); }

/* ── Empty state card ───────────────────────────── */
.empty-state-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  padding: 52px 24px;
  text-align: center;
  margin-top: 8px;
}
.empty-icon  { font-size: 2.5rem; margin-bottom: 14px; }
.empty-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.empty-sub   { font-size: .875rem; color: var(--text3); margin-bottom: 20px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ── All-links list ─────────────────────────────── */
.all-links-list { display: flex; flex-direction: column; gap: 0; }

/* ── Calendar ───────────────────────────────────── */
.cal-grid-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--ra); overflow: hidden; }
.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  background: var(--s2);
  border-bottom: 1px solid var(--border);
}
.cal-dow-row > div {
  padding: 8px 0;
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text3);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  border-left: 1px solid var(--border);
}
.cal-day {
  min-height: 88px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px;
  cursor: pointer;
  overflow: hidden;
}
.cal-day:hover { background: var(--s2); }
.cal-day-blank { background: var(--s2); cursor: default; }
.cal-day-num { font-size: .8125rem; color: var(--text3); margin-bottom: 4px; min-width: 0; }
.cal-today { background: #eff6ff; }
.cal-today-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
}
.cal-ev {
  font-size: .7rem;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  display: block;
}
.cal-ev:hover { opacity: .85; }
.cal-ev-blue   { background: #dbeafe; color: #1d4ed8; }
.cal-ev-green  { background: #dcfce7; color: #15803d; }
.cal-ev-red    { background: #fee2e2; color: #b91c1c; }
.cal-ev-amber  { background: #fef3c7; color: #b45309; }
.cal-ev-purple { background: #ede9fe; color: #6d28d9; }

/* ── Content width fixes ─────────────────────────── */
/* Prevent content overflow */
.app-body { display: flex; min-height: calc(100vh - 52px); max-width: 100%; overflow: hidden; }
.app-main  { flex: 1; min-width: 0; padding: 20px 24px; overflow-y: auto; overflow-x: hidden; }
.sidebar   { width: 220px; min-width: 220px; max-width: 220px; flex-shrink: 0; }

/* Fix board workspace width */
.board-workspace {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}
.ws-col { min-width: 0; overflow: hidden; }

/* Fix todo items overflow */
.todo-item   { min-width: 0; }
.todo-text   { min-width: 0; word-break: break-word; }
.ws-link-body{ min-width: 0; overflow: hidden; }
.ws-link-title{ display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-note-card { word-break: break-word; }

/* Notes grid overflow fix */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 10px; min-width: 0; }
.note-card  { min-width: 0; word-break: break-word; }

/* Capture bar overflow fix */
.capture-bar    { min-width: 0; overflow: hidden; }
.capture-inputs { min-width: 0; overflow: hidden; }
.cap-panel      { min-width: 0; }
.cap-panel input { min-width: 0; }

/* Page header overflow */
.page-hdr   { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; gap: 12px; min-width: 0; }
.page-title { font-size: 1.25rem; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.page-sub   { font-size: .8125rem; color: var(--text3); margin-top: 2px; }
.page-hdr-r { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Responsive: collapse sidebar on small screens */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .app-main { padding: 14px 16px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .proj-grid  { grid-template-columns: 1fr; }
  .board-workspace { grid-template-columns: 1fr; }
  .cal-ev { font-size: .65rem; }
  .cal-day { min-height: 60px; }
}

/* ══════════════════════════════════════════════════
   DASHBOARD GRID LAYOUT (matching reference design)
   ══════════════════════════════════════════════════ */

/* stat row */
.db-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.db-stat {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  padding: 10px 12px;
  cursor: pointer;
}
.db-stat:hover { border-color: var(--accent); }
.db-stat-val { font-size: 1.375rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.db-stat-lbl { font-size: .72rem; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* 3-column row */
.db-row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
  min-width: 0;
}

/* 2-column row: wider left, narrower right */
.db-row2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
  min-width: 0;
}

/* Dashboard card */
.db-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ra);
  padding: 12px 14px;
  min-width: 0;
  overflow: hidden;
}
.db-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.db-card-title {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-card-action {
  font-size: .72rem;
  color: var(--text3);
  flex-shrink: 0;
}
.db-card-action:hover { color: var(--accent); }
.db-loading { font-size: .8rem; color: var(--text3); padding: 6px 0; }

/* Dashboard task rows */
.db-task-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.db-task-row:last-child { border-bottom: none; }
.db-chk {
  width: 13px; height: 13px;
  border-radius: 3px;
  border: 1px solid var(--border2);
  background: none;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; cursor: pointer;
}
.db-chk.done { background: var(--green); border-color: var(--green); color: #fff; }
.db-task-text { font-size: .8125rem; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-task-text.done { text-decoration: line-through; color: var(--text3); }
.db-task-lbl { font-size: .68rem; padding: 1px 5px; border-radius: 20px; flex-shrink: 0; white-space: nowrap; }
.db-lbl-work     { background: #dbeafe; color: #1d4ed8; }
.db-lbl-personal { background: #fce7f3; color: #9d174d; }
.db-lbl-urgent   { background: #fee2e2; color: #b91c1c; }
.db-lbl-high     { background: #fee2e2; color: #b91c1c; }
.db-lbl-low      { background: #dbeafe; color: #1d4ed8; }
.db-lbl-normal   { background: var(--s2); color: var(--text3); }

/* Dashboard task row extras */
.db-task-meta { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.db-task-due  { font-size: .68rem; color: var(--text3); font-family: 'DM Mono', monospace; white-space: nowrap; }
.db-task-due.overdue { color: var(--red); font-weight: 600; }
.db-task-edit {
  width: 22px; height: 22px; border-radius: 5px;
  background: var(--s2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text3); cursor: pointer;
  opacity: 0; transition: opacity .12s; flex-shrink: 0;
  line-height: 1; padding: 0;
}
.db-task-row:hover .db-task-edit { opacity: 1; }
.db-task-edit:hover { background: var(--accentL); color: var(--accent); border-color: var(--accent); }

/* Dashboard note rows */
.db-note-row {
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  min-width: 0;
}
.db-note-row:last-child { border-bottom: none; }
.db-note-row:hover .db-note-title { color: var(--accent); }
.db-note-title { font-size: .8125rem; font-weight: 600; color: var(--text); margin-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-note-body  { font-size: .75rem; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-note-time  { font-size: .68rem; color: var(--text3); margin-top: 2px; }

/* Dashboard link rows */
.db-link-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.db-link-row:last-child { border-bottom: none; }
.db-link-fav {
  width: 15px; height: 15px;
  border-radius: 3px;
  background: var(--s2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--text3);
  flex-shrink: 0;
}
.db-link-title { font-size: .8125rem; color: var(--accent); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-link-domain { font-size: .68rem; color: var(--text3); flex-shrink: 0; }

/* Dashboard board kanban mini */
.db-board-cols { display: flex; gap: 6px; min-width: 0; }
.db-bcol {
  flex: 1;
  background: var(--s2);
  border-radius: var(--rs);
  padding: 7px;
  min-width: 0;
}
.db-bcol-hdr {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 5px;
  display: flex; align-items: center; gap: 4px;
}
.db-bcol-cnt {
  font-size: .68rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0 5px;
  color: var(--text3);
}
.db-bcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: .75rem;
  color: var(--text);
  line-height: 1.4;
  overflow: hidden;
  cursor: pointer;
}
.db-bcard:last-child { margin-bottom: 0; }
.db-bcard:hover { border-color: var(--border2); }
.db-bcard.done-card { opacity: .5; }
.db-bcard-tag {
  display: inline-block;
  font-size: .65rem;
  padding: 1px 5px;
  border-radius: 20px;
  margin-top: 3px;
}

/* Dashboard event rows */
.db-event-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.db-event-row:last-child { border-bottom: none; }
.db-ev-time { text-align: right; min-width: 32px; flex-shrink: 0; }
.db-ev-hr   { font-size: .72rem; font-weight: 600; color: var(--text); }
.db-ev-ap   { font-size: .65rem; color: var(--text3); }
.db-ev-bar  { width: 3px; border-radius: 2px; flex-shrink: 0; align-self: stretch; min-height: 22px; }
.db-ev-bar-blue   { background: #2563eb; }
.db-ev-bar-green  { background: #16a34a; }
.db-ev-bar-red    { background: #dc2626; }
.db-ev-bar-amber  { background: #d97706; }
.db-ev-bar-purple { background: #7c3aed; }
.db-ev-title { font-size: .8125rem; font-weight: 600; color: var(--text); }
.db-ev-desc  { font-size: .72rem; color: var(--text3); }
.db-no-events { font-size: .8rem; color: var(--text3); padding: 8px 0; }

/* Today Schedule — 70/30 side-by-side layout */
.tl-layout {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.tl-events {
  flex: 7;
  min-width: 0;
}
.tl-sidebar {
  flex: 3;
  display: flex;
  gap: 2px;
  border-left: 1px solid var(--border);
  padding-left: 7px;
  min-width: 0;
}
.tl-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tl-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  user-select: none;
  min-width: 0;
}
.tl-block:hover { background: #dcfce7; border-color: #4ade80; }
.tl-block:active { background: #bbf7d0; }
.tl-time {
  font-size: .6rem;
  font-weight: 600;
  color: #15803d;
  white-space: nowrap;
  overflow: hidden;
}
.tl-plus {
  font-size: .65rem;
  color: #16a34a;
  opacity: .35;
  transition: opacity .12s;
  flex-shrink: 0;
}
.tl-block:hover .tl-plus { opacity: 1; }
@media (prefers-color-scheme: dark) {
  .tl-block { background: #052e16; border-color: #166534; }
  .tl-block:hover { background: #14532d; border-color: #16a34a; }
  .tl-block:active { background: #166534; }
  .tl-time { color: #4ade80; }
  .tl-plus { color: #4ade80; }
}

/* ══════════════════════════════════════════════════
   CALENDAR — FIXED & COMPLETE
   ══════════════════════════════════════════════════ */
.cal-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ra);
  overflow: hidden;
}
.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--s2);
  border-bottom: 1px solid var(--border);
}
.cal-dow > div {
  padding: 8px 6px;
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text3);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-day {
  min-height: 90px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 5px 6px;
  cursor: pointer;
  overflow: hidden;
  vertical-align: top;
}
.cal-day:hover { background: var(--s2); }
.cal-day-blank { background: var(--s2); cursor: default; opacity: .5; }
.cal-day-blank:hover { background: var(--s2); }
.cal-day-num {
  font-size: .75rem;
  color: var(--text3);
  margin-bottom: 3px;
  line-height: 1;
}
.cal-today { background: #eff6ff; }
.cal-today-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 700;
}
.cal-ev {
  display: block;
  font-size: .68rem;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.4;
}
.cal-ev:hover { opacity: .82; }
.cal-ev-blue   { background: #dbeafe; color: #1d4ed8; }
.cal-ev-green  { background: #dcfce7; color: #15803d; }
.cal-ev-red    { background: #fee2e2; color: #b91c1c; }
.cal-ev-amber  { background: #fef3c7; color: #92400e; }
.cal-ev-purple { background: #ede9fe; color: #5b21b6; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .db-row3 { grid-template-columns: 1fr; }
  .db-row2 { grid-template-columns: 1fr; }
  .db-stat-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .sidebar { display: none; }
  .app-main { padding: 12px 14px; }
  .db-stat-row { grid-template-columns: repeat(2, 1fr); }
  .cal-day { min-height: 55px; }
  .cal-ev { display: none; }
  .cal-day-num::after { content: attr(data-count); font-size: .6rem; color: var(--accent); margin-left: 3px; }
}

/* ══════════════════════════════════════════════════
   BOARD SHARING — Toggle switch + sidebar badge
   ══════════════════════════════════════════════════ */

/* Public toggle row in modals */
.board-public-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 14px;
  cursor: pointer;
  user-select: none;
}
.board-public-cb {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--border2);
  border-radius: 20px;
  flex-shrink: 0;
  transition: background .18s;
  pointer-events: none;
}
.board-public-cb:checked + .toggle-track {
  background: var(--accent);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: left .18s;
  pointer-events: none;
}
.board-public-cb:checked + .toggle-track .toggle-thumb {
  left: 18px;
}
.board-public-label {
  font-size: .875rem;
  color: var(--text2);
}
.board-public-row:hover .board-public-label {
  color: var(--text);
}

/* Globe badge on sidebar project items */
.s-public-badge {
  font-size: .75rem;
  opacity: .7;
  flex-shrink: 0;
  margin-right: 2px;
}

/* ══════════════════════════════════════════════════
   PUBLIC PROFILE — Tasks + Notes on board sections
   ══════════════════════════════════════════════════ */

.launch-bar-desc {
  font-size: .8rem;
  color: var(--text3);
  font-weight: 400;
  margin-left: 4px;
}

/* Two-column extras row below links */
.profile-board-extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .profile-board-extras { grid-template-columns: 1fr; }
}

.profile-extras-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ra);
  padding: 14px 16px;
}

.profile-extras-hdr {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-extras-count {
  font-weight: 500;
  color: var(--text3);
  text-transform: none;
  letter-spacing: 0;
}

/* Tasks list */
.profile-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--text);
}
.profile-task-item.done {
  opacity: .45;
}
.profile-task-item.done .profile-task-text {
  text-decoration: line-through;
}
.profile-task-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .65rem;
  color: var(--accent);
  background: var(--surface);
}
.profile-task-item.done .profile-task-check {
  background: var(--accentL);
  border-color: var(--accent);
}
.profile-task-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-task-badge {
  font-size: .7rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.profile-task-badge.high {
  background: #fef2f2;
  color: var(--red);
}

/* Notes mini-grid */
.profile-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 480px) {
  .profile-notes-grid { grid-template-columns: 1fr; }
}
.profile-note-card {
  border-radius: var(--rs);
  padding: 10px 12px;
  font-size: .8125rem;
  position: relative;
  border: 1px solid transparent;
}
.profile-note-card.color-default { background: var(--s2);  border-color: var(--border); }
.profile-note-card.color-yellow  { background: #fffbeb;    border-color: #fde68a; }
.profile-note-card.color-green   { background: #f0fdf4;    border-color: #bbf7d0; }
.profile-note-card.color-blue    { background: #eff6ff;    border-color: #bfdbfe; }
.profile-note-card.color-pink    { background: #fdf2f8;    border-color: #fbcfe8; }
.profile-note-pin {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: .75rem;
}
.profile-note-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-note-body {
  color: var(--text2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}