@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");
/* C&I Podio Platform — shared styling.
   Dark theme clones the QuoteBox Video page palette; light theme is a clean C&I-navy variant.
   Theme is toggled by [data-theme] on <html> (persisted in localStorage). */

/* DEFAULT = Podio-style light: white surfaces, Podio green, readable gray text, left workspace rail. */
:root, :root[data-theme="light"] {
  --bg:#f4f4f4; --text:#2c3138; --muted:#7d868f; --dim:#a3aab2;
  --panel-a:#ffffff; --panel-b:#ffffff; --card-a:#ffffff; --card-b:#ffffff;
  --thumb:#eef0f2; --thumb-ico:#aeb6bf;
  --border:#e3e5e8; --border-2:#d6d9dd; --hairline:#edeff1;
  --accent:#5b9e2f; --accent-soft:rgba(91,158,47,0.10); --accent-bd:rgba(91,158,47,0.30); --accent-fg:#4d8a27;
  --link:#1d6fe0;   /* blue for hyperlinks inside field values, comments, statuses */
  --mention-fg:#2f7bc4; --mention-bg:rgba(47,123,196,0.10);
  --mention-grp-fg:#1f6f5c; --mention-grp-bg:rgba(31,111,92,0.12);
  --teal:#0d9488; --teal-soft:rgba(13,148,136,0.08); --teal-bd:rgba(13,148,136,0.22);
  --input-bg:#ffffff; --nav-bg:#ffffff;
  --hover:rgba(91,158,47,0.07);
  --activity-card:#eef2f6; --activity-bd:#dde3ea;
  --sidebar-bg:#ffffff; --sidebar-hover:#f1f4f2; --sidebar-active:#eaf3e3; --sidebar-w:248px;
  --link:#3b7cb9;
}
:root[data-theme="dark"] {
  --bg:#0f1221; --text:#e2e8f0; --muted:#94a3b8; --dim:#64748b;
  --panel-a:#161c38; --panel-b:#131832; --card-a:#1a2142; --card-b:#151b35;
  --thumb:#0b0e1c; --thumb-ico:#3b4468;
  --border:rgba(255,255,255,0.08); --border-2:rgba(255,255,255,0.12); --hairline:rgba(255,255,255,0.05);
  --accent:#6bb33a; --accent-soft:rgba(107,179,58,0.12); --accent-bd:rgba(107,179,58,0.30); --accent-fg:#a9dd7f;
  --link:#6db3ff;   /* blue for hyperlinks (lighter for dark theme) */
  --mention-fg:#7ab8f0; --mention-bg:rgba(122,184,240,0.14);
  --mention-grp-fg:#69d6b6; --mention-grp-bg:rgba(105,214,182,0.14);
  --teal:#5eead4; --teal-soft:rgba(94,234,212,0.08); --teal-bd:rgba(94,234,212,0.25);
  --input-bg:rgba(0,0,0,0.25); --nav-bg:rgba(15,18,33,0.9);
  --hover:rgba(107,179,58,0.08);
  --activity-card:#1e2749; --activity-bd:rgba(255,255,255,0.10);
  --sidebar-bg:#12172e; --sidebar-hover:#1a2142; --sidebar-active:#1e2748; --sidebar-w:248px;
  --link:#7fb2e0;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Lato','Inter',sans-serif; font-size:15px; background:var(--bg); color:var(--text); min-height:100vh; padding:0 22px 60px; transition:background .2s,color .2s; }

/* ---- top nav ---- */
.topnav { position:sticky; top:0; z-index:50; display:flex; align-items:center; gap:14px;
  padding:11px 22px; margin:0 -22px 16px; border-bottom:1px solid var(--border);
  background:var(--nav-bg); backdrop-filter:saturate(140%) blur(8px); }
.topnav .brand { font-weight:800; font-size:15px; letter-spacing:-.2px; color:var(--text); text-decoration:none; display:flex; align-items:center; gap:8px; }
.topnav .brand .dot { width:9px; height:9px; border-radius:50%; background:var(--accent); }
.topnav .nav-left { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.topnav .nav-right { display:flex; align-items:center; gap:8px; flex:0 0 auto; margin-left:auto; }

/* workspace / app switcher */
.wsswitch-wrap { position:relative; }
.wsswitch { display:flex; align-items:center; gap:8px; background:var(--input-bg); color:var(--text);
  border:1px solid var(--border-2); border-radius:9px; padding:7px 11px; cursor:pointer; font:inherit; font-size:13px; font-weight:600; max-width:260px; }
.wsswitch:hover { border-color:var(--accent-bd); }
.wsswitch .wsswitch-ico { color:var(--muted); font-size:13px; }
.wsswitch .wsswitch-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wsswitch .caret { color:var(--muted); font-size:10px; }
.wsmenu { position:absolute; top:calc(100% + 6px); left:0; width:300px; max-height:70vh; overflow:auto;
  background:var(--panel-a); border:1px solid var(--border-2); border-radius:12px; box-shadow:0 16px 44px rgba(0,0,0,.35); z-index:60; padding:8px; }
.wsmenu-search input { width:100%; background:var(--input-bg); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:8px 10px; font:inherit; font-size:13px; }
.wsmenu-org { display:flex; align-items:center; gap:8px; font-weight:700; font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; padding:12px 6px 6px; }
.wsmenu-logo { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:5px; background:var(--accent); color:#fff; font-size:9px; font-weight:800; }
.wsmenu-list { display:flex; flex-direction:column; gap:1px; }
.wsmenu-item { display:flex; align-items:center; gap:9px; padding:8px 8px; border-radius:8px; text-decoration:none; color:var(--text); font-size:13.5px; font-weight:500; }
.wsmenu-item:hover { background:var(--hover); }
.wsmenu-item.on { background:var(--accent); color:#fff; }
.wsmenu-item.on .wsmenu-cube { color:#fff; }
.wsmenu-cube { color:var(--thumb-ico); font-size:13px; }

/* center search */
.nav-search { flex:1 1 auto; max-width:600px; margin:0 6px; position:relative; display:flex; align-items:center; gap:6px; }
.nav-search-ws { flex:0 0 auto; max-width:170px; background:var(--input-bg); border:1px solid var(--border-2); color:var(--text);
  border-radius:999px; padding:8px 10px; font:inherit; font-size:12.5px; cursor:pointer; text-overflow:ellipsis; }
.nav-search-ws:focus { outline:none; border-color:var(--accent-bd); }
.search-field { position:relative; flex:1 1 auto; min-width:0; display:flex; align-items:center; }
.nav-search .search-ico { position:absolute; left:12px; color:var(--muted); font-size:15px; pointer-events:none; }
.nav-search input { width:100%; background:var(--input-bg); border:1px solid var(--border-2); color:var(--text);
  border-radius:999px; padding:8px 14px 8px 34px; font:inherit; font-size:13.5px; }
.nav-search input:focus { outline:none; border-color:var(--accent-bd); background:var(--panel-b); }
.search-drop { position:absolute; top:calc(100% + 6px); left:0; right:0; background:var(--panel-a);
  border:1px solid var(--border-2); border-radius:12px; box-shadow:0 16px 44px rgba(0,0,0,.35); z-index:60; padding:6px; max-height:70vh; overflow:auto; }
.search-item { display:flex; align-items:center; gap:10px; padding:8px 9px; border-radius:8px; text-decoration:none; color:var(--text); }
.search-item:hover { background:var(--hover); }
.search-cube { color:var(--thumb-ico); font-size:13px; }
.search-item-main { display:flex; flex-direction:column; overflow:hidden; }
.search-item-title { font-size:13.5px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.search-item-meta { font-size:11.5px; color:var(--muted); }
.search-all { display:block; padding:9px; text-align:center; font-size:12.5px; font-weight:600; color:var(--accent-fg); text-decoration:none; border-top:1px solid var(--border); margin-top:4px; }
.search-all:hover { background:var(--hover); }
.search-empty { padding:12px; text-align:center; font-size:12.5px; color:var(--muted); }

/* search results page */
.srch-list { display:flex; flex-direction:column; gap:2px; max-width:820px; }
.srch-row { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:10px; text-decoration:none; color:var(--text); border:1px solid transparent; }
.srch-row:hover { background:var(--hover); border-color:var(--border); }
.srch-cube { color:var(--thumb-ico); font-size:15px; }
.srch-main { display:flex; flex-direction:column; overflow:hidden; }
.srch-title { font-size:14px; font-weight:600; }
.srch-meta { font-size:12px; color:var(--muted); }

/* ---- profile ---- */
.profile-grid { display:grid; grid-template-columns:1fr 340px; gap:24px; align-items:start; max-width:1100px; }
@media (max-width:820px){ .profile-grid { grid-template-columns:1fr; } .profile-card { order:-1; } }
/* Avatar (icon) editor on the profile-edit page */
.pedit-avatar .pedit-avrow { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:4px; }
.pedit-ini { width:64px; text-align:center; text-transform:uppercase; font-weight:800; letter-spacing:1px; }
.pedit-swatches { display:flex; flex-wrap:wrap; gap:11px; }
.swatch { width:30px; height:30px; border-radius:50%; background:var(--sw); cursor:pointer; position:relative; box-shadow:0 0 0 2px var(--panel-a); }
.swatch input { position:absolute; inset:0; margin:0; opacity:0; cursor:pointer; }
.swatch:has(input:checked) { box-shadow:0 0 0 2px var(--panel-a), 0 0 0 4px var(--text); }
.profile-h { font-size:20px; font-weight:700; margin-bottom:14px; }
.act-feed { display:flex; flex-direction:column; }
.act-row { display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--hairline); }
.act-avatar { flex:0 0 auto; display:inline-grid; place-items:center; width:34px; height:34px; border-radius:50%; background:var(--thumb-ico); color:#fff; font-size:12px; font-weight:800; }
.act-body { min-width:0; flex:1; }
.act-line { font-size:13.5px; color:var(--text); }
.act-verb { color:var(--muted); }
.act-item { color:var(--accent-fg); text-decoration:none; font-weight:600; }
.act-item:hover { text-decoration:underline; }
.act-when { color:var(--dim); font-size:11.5px; margin-left:6px; }
.act-detail { margin-top:5px; padding:8px 11px; border-radius:8px; background:var(--panel-b); border:1px solid var(--border); font-size:13px; color:var(--text); white-space:pre-wrap; }
.act-detail.change { border-left:3px solid var(--accent); }
.act-detail.revert { border-left:3px solid var(--teal); }
.act-meta { margin-top:5px; font-size:11.5px; color:var(--muted); }

.profile-card { background:var(--panel-a); border:1px solid var(--border-2); border-radius:14px; overflow:hidden; }
.pc-top { padding:22px 20px 18px; text-align:center; border-bottom:1px solid var(--border); }
.pc-avatar { display:inline-grid; place-items:center; width:96px; height:96px; border-radius:50%; background:var(--thumb-ico); color:#fff; font-size:34px; font-weight:800; letter-spacing:1px; margin-bottom:12px; }
.pc-avatar.lg { width:110px; height:110px; font-size:38px; }
.pc-name { font-size:18px; font-weight:700; }
.pc-title { font-size:13px; color:var(--muted); margin-top:2px; }
.pc-edit { display:inline-block; margin-top:14px; background:var(--accent); color:#fff; text-decoration:none; font-size:13px; font-weight:600; padding:8px 18px; border-radius:999px; }
.pc-edit:hover { filter:brightness(1.08); }
.pc-about { padding:16px 20px; font-size:13px; color:var(--text); border-bottom:1px solid var(--border); white-space:pre-wrap; }
.pc-fields { padding:8px 20px 18px; }
.pc-row { display:grid; grid-template-columns:80px 1fr; gap:10px; padding:9px 0; border-bottom:1px solid var(--hairline); font-size:13px; }
.pc-row:last-child { border-bottom:0; }
.pc-lab { color:var(--muted); font-weight:600; }
.pc-val { color:var(--text); word-break:break-word; } a.pc-val { color:var(--accent-fg); text-decoration:none; } a.pc-val:hover { text-decoration:underline; }

/* profile edit */
.pedit { max-width:780px; background:var(--panel-a); border:1px solid var(--border-2); border-radius:14px; padding:24px; }
.pedit-alert { margin-bottom:18px; padding:11px 14px; border-radius:9px; background:rgba(230,208,107,.12); border:1px solid rgba(230,208,107,.4); color:var(--text); font-size:13px; }
.pedit-head { display:flex; gap:20px; align-items:flex-start; padding-bottom:20px; border-bottom:1px solid var(--border); margin-bottom:20px; }
.pedit-headfields { flex:1; display:flex; flex-direction:column; gap:10px; }
.pedit-name, .pedit-titleinput { background:var(--input-bg); border:1px solid var(--border-2); color:var(--text); border-radius:8px; padding:10px 12px; font:inherit; font-size:15px; font-weight:600; }
.pedit-titleinput { font-size:13.5px; font-weight:500; }
.pedit-hint { font-size:11.5px; color:var(--dim); }
.pedit-sec { margin-bottom:18px; display:flex; flex-direction:column; gap:6px; }
.pedit-sec label, .pedit-f label { font-size:12px; font-weight:600; color:var(--muted); }
.pedit textarea, .pedit-sec input, .pedit-f input { background:var(--input-bg); border:1px solid var(--border-2); color:var(--text); border-radius:8px; padding:9px 11px; font:inherit; font-size:13.5px; width:100%; }
.pedit textarea { resize:vertical; }
.pedit input:disabled { color:var(--dim); background:var(--panel-b); }
.pedit-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:560px){ .pedit-grid { grid-template-columns:1fr; } }
.pedit-f { display:flex; flex-direction:column; gap:5px; }
.pedit-actions { display:flex; gap:10px; margin-top:24px; padding-top:20px; border-top:1px solid var(--border); }
.btn-primary { background:var(--accent); color:#fff; border:0; border-radius:999px; padding:10px 26px; font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.btn-primary:hover { filter:brightness(1.08); }
.btn-ghost { background:none; border:1px solid var(--border-2); color:var(--text); border-radius:999px; padding:10px 22px; font-size:14px; text-decoration:none; }
.btn-ghost:hover { border-color:var(--accent-bd); }

/* right side icons + account */
.topnav .navicon { background:none; border:1px solid var(--border-2); color:var(--muted); border-radius:9px; width:34px; height:34px; cursor:pointer; font-size:15px; }
.topnav .navicon:hover { color:var(--text); border-color:var(--accent-bd); }
.bell-wrap { position:relative; }
.navicon.bell { position:relative; display:inline-grid; place-items:center; }
.navicon.bell svg { display:block; }
.bell-badge { position:absolute; top:-5px; right:-5px; min-width:16px; height:16px; padding:0 4px; border-radius:999px; background:#ef5350; color:#fff; font-size:10px; font-weight:700; display:grid; place-items:center; line-height:1; }
.bellmenu { position:absolute; top:calc(100% + 8px); right:0; width:400px; max-width:92vw; background:var(--panel-a); border:1px solid var(--border-2); border-radius:12px; box-shadow:0 16px 44px rgba(0,0,0,.35); z-index:60; overflow:hidden; display:flex; flex-direction:column; }
/* header: title + All/Unread toggle + Show all */
.bellmenu-top { display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--border); }
.bellmenu-title { font-size:15px; font-weight:700; color:var(--text); }
.bellmenu-tabs { display:inline-flex; margin-left:auto; border:1px solid var(--border-2); border-radius:8px; overflow:hidden; }
.bmtab { background:var(--panel-a); border:0; color:var(--muted); font:inherit; font-size:12.5px; font-weight:600; padding:5px 14px; cursor:pointer; }
.bmtab.on { background:var(--accent); color:#fff; }
.bellmenu-showall { font-size:12.5px; font-weight:600; color:var(--accent-fg); text-decoration:none; white-space:nowrap; }
.bellmenu-showall:hover { text-decoration:underline; }
.bellmenu-list { max-height:60vh; overflow:auto; }
.bellmenu-empty { padding:26px 14px; text-align:center; font-size:12.5px; color:var(--muted); }
/* rows */
.belln { display:flex; align-items:flex-start; gap:0; border-top:1px solid var(--hairline); position:relative; }
.belln:first-child { border-top:0; }
.belln:hover { background:var(--hover); }
.belln.new { background:var(--accent-soft); }
.belln-go { display:flex; align-items:flex-start; gap:11px; padding:12px 40px 12px 14px; text-decoration:none; color:var(--text); flex:1; min-width:0; }
.belln-av { flex:0 0 auto; width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; font-weight:800; }
.belln-main { display:flex; flex-direction:column; min-width:0; gap:2px; }
.belln-line { font-size:13px; line-height:1.4; color:var(--text); }
.belln-line b { font-weight:700; }
.belln-ctx { font-weight:600; }
.belln-count { display:inline-block; min-width:16px; text-align:center; padding:0 5px; margin-left:5px; border-radius:9px; background:var(--accent); color:#fff; font-size:11px; font-weight:700; vertical-align:baseline; }
.belln-snip { font-size:12.5px; color:var(--muted); line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.belln-meta { font-size:11.5px; color:var(--dim); margin-top:2px; }
.belln-space { color:var(--muted); font-weight:600; }
/* unread/read circle (click to mark read) */
.belln-circle { position:absolute; top:15px; right:14px; width:13px; height:13px; border-radius:50%; border:2px solid var(--border-2); background:transparent; cursor:pointer; padding:0; }
.belln.new .belln-circle { border-color:var(--accent); background:var(--accent); }
.belln-circle:hover { border-color:var(--accent); }
/* footer: Settings + Mark all as read */
.bellmenu-foot { display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap; gap:8px; padding:9px 12px; border-top:1px solid var(--border); background:var(--panel-b); }
.bmfoot-item { display:inline-flex; align-items:center; gap:5px; background:none; border:0; font:inherit; font-size:11.5px; font-weight:600; color:var(--muted); text-decoration:none; cursor:pointer; padding:0; white-space:nowrap; }
.bmfoot-item:hover { color:var(--accent-fg); }
.bmfoot-item svg { flex:0 0 auto; }

/* switcher search results */
.wsmenu-results { padding:2px 0; }
.wsmenu-grouplbl { font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--dim); padding:8px 8px 4px; }
.wsmenu-appmain { display:flex; flex-direction:column; min-width:0; }
.wsmenu-appspace { font-size:11px; color:var(--muted); }
.wsmenu-empty { padding:14px 8px; font-size:12.5px; color:var(--muted); text-align:center; }

/* notifications page */
.notif-group { margin-bottom:22px; }
.notif-grouphead { display:flex; align-items:center; gap:8px; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; margin-bottom:10px; }
.notif-grouphead span { background:var(--accent); color:#fff; border-radius:999px; font-size:11px; padding:1px 8px; }
.notif-list { display:flex; flex-direction:column; gap:6px; max-width:760px; }
.notif { display:flex; align-items:center; gap:12px; padding:13px 14px; border:1px solid var(--border); border-radius:11px; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); text-decoration:none; color:var(--text); position:relative; }
.notif:hover { border-color:var(--accent-bd); }
.notif.new { border-left:3px solid var(--accent); }
.notif-av { flex:0 0 auto; display:inline-grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--thumb-ico); color:#fff; font-size:12px; font-weight:800; }
.notif-main { min-width:0; flex:1; }
.notif-line { font-size:13.5px; }
.notif-item { color:var(--accent-fg); font-weight:600; }
.notif-body { font-size:12.5px; color:var(--muted); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notif-meta { font-size:11px; color:var(--dim); margin-top:4px; }
.notif-newdot { width:9px; height:9px; border-radius:50%; background:var(--accent); flex:0 0 auto; }
.notif-empty { text-align:center; padding:50px 20px; color:var(--text); }
.notif-empty-ico { font-size:34px; margin-bottom:10px; opacity:.9; }
.notif-empty-msg { font-size:15px; font-weight:600; color:var(--text); }
.notif-empty-sub { font-size:12.5px; color:var(--muted); margin-top:6px; }

/* notif tabs — two tiers */
.notif-tabs { display:flex; align-items:center; gap:2px; flex-wrap:wrap; }
.notif-tabs.tier1 { border-bottom:1px solid var(--border); }
.ntab { display:flex; align-items:center; gap:6px; font-size:13.5px; font-weight:600; color:var(--muted); text-decoration:none; padding:9px 14px; border-bottom:2px solid transparent; margin-bottom:-1px; }
.ntab:hover { color:var(--text); }
.ntab.on { color:var(--text); border-bottom-color:var(--accent); }
.ntab-n { background:var(--accent); color:#fff; border-radius:999px; font-size:10.5px; padding:1px 7px; }
.notif-tabs.tier2 { gap:6px; padding:12px 0 16px; }
.ntab2 { display:inline-flex; align-items:center; font-size:12.5px; font-weight:600; color:var(--muted); text-decoration:none; padding:6px 12px; border:1px solid var(--border-2); border-radius:999px; }
.ntab2:hover { color:var(--text); border-color:var(--accent-bd); }
.ntab2.on { background:var(--accent); color:#fff; border-color:var(--accent); }
.ntab2-ico { display:inline-flex; align-items:center; margin-right:6px; }
.ntab2-ico svg { width:14px; height:14px; }
/* Filter-by-person is a pill wrapping an icon + a borderless native select */
.ntab2-person { padding-right:6px; cursor:pointer; }
.ntab2-select-bare { font:inherit; font-size:12.5px; font-weight:600; color:inherit; background:none; border:0; padding:4px 2px; cursor:pointer; outline:none; }
.ntab2-person.on .ntab2-select-bare { color:#fff; }
.ntab2-select-bare option { color:var(--text); }
.ntab2-markall { margin-left:auto; }
.ntab2-markall .btn { font-size:12.5px; padding:6px 14px; border-radius:999px; }

/* 2-column: notification list + right-hand workspace/item info panel */
.notif-layout { display:flex; gap:22px; align-items:flex-start; }
.notif-layout .notif-list { flex:1 1 auto; max-width:760px; }
.notif-side { flex:0 0 300px; position:sticky; top:72px; align-self:flex-start; }
.notif-side-inner { background:var(--panel-a); border:1px solid var(--border-2); border-radius:12px; padding:16px 16px 18px; box-shadow:0 8px 24px rgba(0,0,0,.10); }
.ns-eyebrow { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:700; }
.ns-space { font-size:15px; font-weight:700; color:var(--text); margin:2px 0 10px; }
.ns-title { display:block; font-size:13.5px; font-weight:600; color:var(--accent-fg); text-decoration:none; line-height:1.4; margin-bottom:12px; }
.ns-title:hover { text-decoration:underline; }
.ns-rows { display:flex; flex-direction:column; gap:8px; padding-top:12px; border-top:1px solid var(--hairline); }
.ns-kv { display:flex; justify-content:space-between; gap:12px; font-size:12.5px; }
.ns-k { color:var(--muted); } .ns-v { color:var(--text); font-weight:600; text-align:right; word-break:break-word; }
.ns-goto { display:block; text-align:center; margin-top:14px; background:var(--accent); color:#fff; text-decoration:none; border-radius:999px; padding:9px 18px; font-size:13px; font-weight:600; }
.ns-goto:hover { filter:brightness(1.05); }
@media (max-width:900px){ .notif-side { display:none; } }

/* Mention toasts — bottom-right, slide in, auto-fade */
.notif-toasts { position:fixed; right:18px; bottom:18px; z-index:1200; display:flex; flex-direction:column; gap:10px; max-width:360px; pointer-events:none; }
.ntoast { pointer-events:auto; display:flex; align-items:flex-start; gap:0; background:var(--panel-a); border:1px solid var(--border-2); border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.22); overflow:hidden; opacity:0; transform:translateX(24px); transition:opacity .28s ease, transform .28s ease; }
.ntoast.in { opacity:1; transform:translateX(0); }
.ntoast.out { opacity:0; transform:translateX(24px); }
.ntoast-go { display:flex; align-items:flex-start; gap:10px; padding:12px 12px 12px 14px; text-decoration:none; color:var(--text); flex:1 1 auto; min-width:0; }
.ntoast-av { flex:0 0 30px; width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; }
.ntoast-main { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ntoast-line { font-size:13px; line-height:1.35; color:var(--text); }
.ntoast-ctx { font-weight:600; }
.ntoast-snip { font-size:12px; color:var(--muted); line-height:1.35; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.ntoast-x { flex:0 0 auto; background:none; border:0; color:var(--muted); font-size:18px; line-height:1; padding:8px 10px; cursor:pointer; align-self:flex-start; }
.ntoast-x:hover { color:var(--text); }
@media (max-width:560px){ .notif-toasts { left:12px; right:12px; bottom:70px; max-width:none; } }

/* notif row w/ star — unread = full saturation, viewed = muted */
.notif { display:block; transition:opacity .15s ease, border-color .15s ease; }
.notif-top { display:flex; align-items:center; gap:12px; }
.notif:not(.new):not(.open) { opacity:.5; }
.notif:not(.new):not(.open):hover { opacity:.8; }
.notif.open { border-color:var(--accent-bd); opacity:1; box-shadow:0 2px 10px rgba(0,0,0,.06); }
.notif.open .notif-body { display:none; }   /* snippet hidden when the full body is shown */
.notif-hit { flex:1; display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--text); min-width:0; cursor:pointer; }
.notif-caret { flex:0 0 auto; align-self:flex-start; margin-top:3px; color:var(--dim); font-size:11px; transition:transform .15s; }
.notif.open .notif-caret { transform:rotate(180deg); }
.notif-expand { padding:12px 2px 2px 48px; }
/* grouped-row bits */
.notif-sub { font-size:12px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notif-sub .notif-item { color:var(--accent-fg); font-weight:600; }
.notif-others { display:flex; align-items:center; gap:7px; margin-top:6px; }
.notif-parts { display:inline-flex; }
.notif-part { width:18px; height:18px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:#fff; font-size:8px; font-weight:800; border:2px solid var(--panel-a); margin-left:-6px; }
.notif-part:first-child { margin-left:0; }
.notif-othertxt { font-size:12px; color:var(--muted); font-weight:600; }
.notif-when { flex:0 0 auto; align-self:flex-start; font-size:11.5px; color:var(--dim); margin-top:2px; white-space:nowrap; }
/* expanded activity thread — each activity is its own subtle card (Podio-style) */
.notif-thread { display:flex; flex-direction:column; gap:10px; }
.nt-earlier-toggle { align-self:flex-start; background:none; border:none; color:var(--dim); font-size:12px; font-weight:600; cursor:pointer; padding:2px 0; }
.nt-earlier-toggle:hover { color:var(--accent-fg); }
.nt-earlier { display:flex; flex-direction:column; gap:10px; }
.nt-act { display:flex; gap:10px; align-items:flex-start; }
.nt-av { flex:0 0 auto; width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:10px; font-weight:800; margin-top:2px; }
.nt-main { min-width:0; flex:1; background:var(--activity-card); border:1px solid var(--activity-bd); border-radius:9px; padding:9px 12px; box-shadow:0 1px 2px rgba(0,0,0,0.05); }
.nt-head { display:flex; align-items:baseline; gap:6px; font-size:13px; }
.nt-head b { font-weight:700; }
.nt-verb { color:var(--muted); }
.nt-when { margin-left:auto; flex:0 0 auto; color:var(--dim); font-size:11.5px; white-space:nowrap; }
.nt-body { font-size:13px; line-height:1.55; color:var(--text); margin-top:5px; white-space:pre-wrap; word-break:break-word; }
.nt-body a { color:var(--accent-fg); }
.notif-fullbody { background:var(--panel-b); border:1px solid var(--border); border-radius:8px; padding:11px 13px; font-size:13.5px; line-height:1.55; color:var(--text); white-space:pre-wrap; word-break:break-word; }
.notif-fullbody a { color:var(--accent-fg); }
.notif-exp-foot { display:flex; align-items:center; gap:12px; margin-top:11px; }
.notif-goto { background:var(--accent); color:#fff; text-decoration:none; border-radius:999px; padding:8px 18px; font-size:13px; font-weight:600; display:inline-block; }
.notif-goto:hover { filter:brightness(1.05); }
.notif-unread-btn { background:transparent; color:var(--accent); border:1px solid var(--accent); border-radius:999px; padding:7px 16px; font-size:13px; font-weight:600; cursor:pointer; }
.notif-unread-btn:hover { background:var(--accent); color:#fff; }
.notif-unread-btn:disabled { opacity:.5; cursor:default; }
.notif-starform { display:flex; align-items:center; padding-left:8px; }
.notif-star { background:none; border:0; cursor:pointer; font-size:18px; color:var(--dim); line-height:1; }
.notif-star.on { color:#E6B800; }
.notif-star:hover { color:#E6B800; }
.avatar { display:inline-grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--thumb-ico); color:#fff; font-size:11px; font-weight:800; letter-spacing:.3px; }
.avatar.lg { width:40px; height:40px; font-size:14px; }
.acct-wrap { position:relative; }
.acct-btn { background:none; border:0; padding:2px; cursor:pointer; border-radius:50%; }
.acct-btn:hover .avatar { box-shadow:0 0 0 2px var(--accent-bd); }
.acctmenu { position:absolute; top:calc(100% + 8px); right:0; width:250px; background:var(--panel-a);
  border:1px solid var(--border-2); border-radius:12px; box-shadow:0 16px 44px rgba(0,0,0,.35); z-index:60; padding:6px; }
.acctmenu-head { display:flex; align-items:center; gap:10px; padding:10px 8px; text-decoration:none; color:var(--text); border-radius:9px; }
.acctmenu-head:hover { background:var(--hover); }
.acctmenu-id { display:flex; flex-direction:column; overflow:hidden; }
.acctmenu-id b { font-size:13.5px; }
.acctmenu-id small { font-size:11.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.acctmenu-item { display:block; padding:8px 10px; border-radius:8px; text-decoration:none; color:var(--text); font-size:13px; }
.acctmenu-item:hover { background:var(--hover); }
.acctmenu-item.danger { color:#ef5350; }
.acctmenu-sep { height:1px; background:var(--border); margin:5px 2px; }

/* ---- page header / breadcrumb ---- */
header.top { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:4px 2px 16px; border-bottom:1px solid var(--border); margin-bottom:18px; }
header.top h1 { font-size:20px; font-weight:700; }
a.crumb { color:var(--muted); text-decoration:none; font-size:13px; }
.sep { color:var(--thumb-ico); }
.header-badge { background:var(--accent-soft); border:1px solid var(--accent-bd); color:var(--accent-fg); padding:3px 8px; border-radius:999px; font-size:11px; }
/* item header action menu (⋯ → Delete) */
.item-actions { position:relative; margin-left:auto; }
.item-actions > summary { list-style:none; cursor:pointer; width:30px; height:30px; border-radius:8px; border:1px solid var(--border); display:inline-flex; align-items:center; justify-content:center; font-size:18px; line-height:1; color:var(--muted); background:#fff; }
.item-actions > summary::-webkit-details-marker { display:none; }
.item-actions > summary:hover { color:var(--text); border-color:var(--accent-bd); }
.item-actions[open] > summary { color:var(--text); border-color:var(--accent-bd); }
.ia-menu { position:absolute; right:0; top:36px; z-index:40; background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.12); padding:6px; min-width:170px; }
.ia-del { display:block; width:100%; text-align:left; background:none; border:0; cursor:pointer; padding:8px 10px; border-radius:7px; font-size:13px; color:#c0392b; }
.ia-del:hover { background:#fdecea; }
.ia-merge { display:block; width:100%; text-align:left; background:none; border:0; cursor:pointer; padding:8px 10px; border-radius:7px; font-size:13px; color:var(--text, #222); max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ia-merge:hover { background:#f2f4f7; }
.ia-merge-form { display:flex; gap:6px; padding:6px 4px 2px; border-top:1px solid var(--border); margin-top:4px; }
.ia-merge-in { flex:1; min-width:0; font-size:13px; padding:6px 8px; border:1px solid var(--border); border-radius:7px; }
.ia-merge-go { font-size:13px; padding:6px 10px; border:1px solid var(--border); border-radius:7px; background:#fff; cursor:pointer; }
.dupe-warn { flex-basis:100%; margin-top:8px; padding:10px 12px; border-radius:8px; background:#fff4e5; border:1px solid #f5c26b; font-size:13px; line-height:1.5; }
.dupe-warn a { font-weight:600; }
.dupe-warn .dupe-force { margin-left:8px; font-size:12px; background:none; border:0; text-decoration:underline; cursor:pointer; color:#8a5a00; }
.item-headtools { margin-left:auto; display:flex; align-items:center; gap:8px; }
.ih-new-form { display:inline-flex; margin:0; }
.ih-new { height:30px; padding:0 12px; border-radius:8px; border:1px solid var(--accent); background:var(--accent); color:#fff; font-size:13px; font-weight:600; line-height:1; cursor:pointer; font-family:inherit; white-space:nowrap; display:inline-flex; align-items:center; }
.ih-new:hover { filter:brightness(1.08); }
.ih-clone { background:transparent; color:var(--accent); }
.ih-clone:hover { background:var(--accent); color:#fff; filter:none; }
.ih-follow { width:30px; height:30px; border-radius:8px; border:1px solid var(--border); display:inline-flex; align-items:center; justify-content:center; line-height:1; background:#fff; cursor:pointer; padding:0; color:var(--muted); }
.ih-follow svg { width:16px; height:16px; display:block; }
.ih-follow .ic-belloff { display:none; }
.ih-follow.off .ic-bell { display:none; }
.ih-follow.off .ic-belloff { display:block; }
.ih-follow:hover { border-color:var(--accent-bd); color:var(--text); }
.ih-follow[data-appmuted] { cursor:default; }
.ih-follow:disabled { opacity:.4; cursor:progress; }
.ia-close { text-decoration:none; width:30px; height:30px; border-radius:8px; border:1px solid var(--border); display:inline-flex; align-items:center; justify-content:center; font-size:15px; line-height:1; color:var(--muted); background:#fff; }
.ia-close:hover { color:var(--text); border-color:var(--accent-bd); }
.lead { font-size:13px; color:var(--muted); margin-bottom:18px; }

/* ---------- Account settings page ---------- */
.acct-page { max-width:920px; margin:0 auto; padding:26px 20px 60px; }
.acct-top { display:flex; align-items:center; gap:12px; }
.acct-top h1 { font-size:22px; margin:0; }
.acct-saved { color:var(--accent,#3c7a3c); font-size:13px; font-weight:600; transition:opacity .5s; }
.acct-tabs { display:flex; gap:22px; border-bottom:1px solid var(--border); margin:16px 0 24px; }
.acct-tab { background:none; border:0; padding:0 0 10px; margin:0; cursor:pointer; font-size:15px; color:var(--muted); border-bottom:2px solid transparent; }
.acct-tab.on { color:var(--text); border-bottom-color:var(--accent,#3c7a3c); font-weight:600; }
.acct-sec { display:none; }
.acct-sec.on { display:block; }
.acct-row { display:flex; gap:24px; padding:14px 0; border-bottom:1px solid var(--border); align-items:flex-start; }
.acct-lbl { flex:0 0 160px; font-weight:600; font-size:14px; padding-top:6px; }
.acct-val { flex:1; display:flex; flex-direction:column; gap:6px; }
.acct-val > .btn, .acct-val > .acct-select { align-self:flex-start; }
.acct-select { padding:7px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; font-size:14px; }
.acct-val:has(.acct-select) { flex-direction:row; align-items:center; gap:10px; flex-wrap:wrap; }
.acct-hint { font-size:12px; color:var(--muted); flex-basis:100%; }
.acct-note { font-size:12px; color:var(--muted); margin-top:10px; padding:8px 10px; background:var(--surface-2,#f6f7f9); border-radius:8px; }
.acct-email { font-size:14px; }
.acct-badge { font-size:11px; font-weight:700; color:#2c8a3c; background:#e7f6ea; border-radius:6px; padding:2px 7px; vertical-align:middle; }
.acct-link { color:var(--accent,#3c7a3c); text-decoration:none; font-size:14px; }
.acct-link:hover { text-decoration:underline; }
.acct-cols { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:28px; margin-bottom:22px; }
.acct-h3 { font-size:14px; margin:0 0 12px; padding-bottom:6px; border-bottom:1px solid var(--border); }
.acct-count { color:var(--muted); font-weight:400; }
.ck { display:flex; align-items:flex-start; gap:8px; font-size:13.5px; padding:5px 0; cursor:pointer; line-height:1.35; }
.ck input { margin-top:2px; }
.ck-sub { margin:2px 0 8px 20px; padding-left:12px; border-left:2px solid var(--border); }
.ck-sub-h { font-size:12px; color:var(--muted); margin:4px 0 2px; }
.ck-sub.off { opacity:.45; }
.snd-row { display:flex; align-items:center; gap:8px; margin:6px 0; }
.snd-lbl { font-size:12.5px; color:var(--muted); min-width:52px; }
.acct-select.sm { padding:4px 8px; font-size:13px; }
.snd-row input[type=range] { flex:1; max-width:170px; accent-color:var(--accent,#3c7a3c); }
.snd-volval { font-size:12px; color:var(--muted); min-width:34px; text-align:right; }
.mute-list { list-style:none; margin:0 0 14px; padding:0; }
.mute-row { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.mute-name { font-size:14px; color:var(--text); text-decoration:none; font-weight:500; }
.mute-name:hover { text-decoration:underline; }
.mute-where { font-size:12px; color:var(--muted); margin-right:auto; }
.acct-empty { font-size:13px; color:var(--muted); padding:6px 0 14px; }
.btn.sm { padding:5px 11px; font-size:13px; }
.btn.ghost { background:#fff; color:var(--text); border:1px solid var(--border); }
.btn.ghost:hover { border-color:var(--accent-bd); }

/* ---- app grid (workspace landing) ---- */
.apps { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:14px; }
.app { display:block; text-decoration:none; background:linear-gradient(180deg,var(--card-a),var(--card-b)); border:1px solid var(--border); border-radius:14px; padding:18px; transition:border-color .15s, transform .15s; }
.app:hover { border-color:var(--accent-bd); transform:translateY(-2px); }
.app .ico { font-size:22px; margin-bottom:10px; }
.app h2 { font-size:16px; font-weight:700; color:var(--text); }
.app .sub { font-size:12px; color:var(--muted); margin-top:4px; }
.app .count { display:inline-block; margin-top:12px; font-size:12px; color:var(--accent-fg); background:var(--accent-soft); border:1px solid var(--accent-bd); padding:2px 9px; border-radius:999px; }

/* ---- list page: filter rail + main ---- */
.layout { display:flex; gap:20px; align-items:flex-start; }
.filters { flex:0 0 250px; position:sticky; top:64px; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:14px; padding:14px 14px 8px; max-height:calc(100vh - 80px); max-height:calc(100dvh - 80px); overflow:auto; }
.filters .fh { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.filters .fh h3 { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.filters .clear { font-size:11px; color:var(--accent); cursor:pointer; background:none; border:none; font-family:inherit; }
.facet { border-top:1px solid var(--hairline); padding:10px 0 6px; }
.facet > .k { font-size:11.5px; font-weight:600; color:var(--text); margin-bottom:6px; }
.facet label { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--muted); padding:3px 0; cursor:pointer; }
.facet label:hover { color:var(--text); }
.facet input { accent-color:var(--accent); }
.facet .cnt { margin-left:auto; font-size:11px; color:var(--dim); }

.main { flex:1; min-width:0; }
.toolbar { display:flex; gap:10px; align-items:center; margin-bottom:14px; }
.search { flex:1; }
.search input { width:100%; background:var(--input-bg); border:1px solid var(--border-2); border-radius:10px; color:var(--text); padding:10px 12px; font-size:13px; font-family:inherit; }
.views { display:flex; gap:4px; background:var(--input-bg); border:1px solid var(--border-2); border-radius:10px; padding:3px; }
.views button { background:none; border:none; color:var(--muted); font-size:12px; font-weight:500; padding:6px 12px; border-radius:7px; cursor:pointer; font-family:inherit; }
.views button.on { background:var(--accent); color:#fff; }
.resultcount { font-size:12px; color:var(--dim); margin-bottom:12px; }

.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.rec { display:flex; flex-direction:column; text-decoration:none; background:linear-gradient(180deg,var(--card-a),var(--card-b)); border:1px solid var(--border); border-radius:14px; overflow:hidden; transition:border-color .15s, transform .15s; }
.rec:hover { border-color:var(--accent-bd); transform:translateY(-2px); }
.rec .bd { padding:14px; }
.rec h2 { font-size:14.5px; font-weight:700; color:var(--text); line-height:1.3; }
.chips { display:flex; flex-wrap:wrap; gap:5px; margin:9px 0 4px; }
.chip { font-size:10.5px; color:var(--accent-fg); background:var(--accent-soft); border:1px solid var(--accent-bd); padding:2px 7px; border-radius:999px; }
.chip.teal { color:var(--teal); background:var(--teal-soft); border-color:var(--teal-bd); }
.cbadge { font-size:11px; color:var(--muted); margin-top:9px; }

.tbl { display:none; width:100%; border-collapse:collapse; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.tbl th { text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--dim); padding:10px 14px; border-bottom:1px solid var(--border); }
.tbl td { padding:11px 14px; border-bottom:1px solid var(--hairline); font-size:13px; vertical-align:middle; }
.tbl tr:last-child td { border-bottom:none; }
.tbl tr.rowlink:hover { background:var(--hover); cursor:pointer; }
.tbl td a { color:var(--text); text-decoration:none; font-weight:600; }
.tbl .mini-chip { font-size:10px; color:var(--accent-fg); background:var(--accent-soft); border:1px solid var(--accent-bd); padding:1px 7px; border-radius:999px; }
body.listmode .grid { display:none; }
body.listmode .tbl { display:table; }

/* ---- server-driven Sheet view (filters/columns/sort/pagination) ---- */
.viewlink { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--text); text-decoration:none; padding:7px 8px; border-radius:8px; }
.viewlink:hover { background:var(--hover); }
.viewlink.on { background:var(--accent); color:#fff; }
.viewlink .cnt { margin-left:auto; font-size:11px; opacity:.8; }
.facetval { display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--muted); text-decoration:none; padding:4px 6px; border-radius:7px; }
.facetval:hover { background:var(--hover); color:var(--text); }
.facetval .dot2 { width:7px; height:7px; border-radius:50%; background:var(--thumb-ico); flex:0 0 auto; }
.facetval .fv { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.facetval .cnt { margin-left:auto; font-size:11px; color:var(--dim); }
.facmore { font-size:11px; color:var(--dim); padding:3px 6px; }
.filters .fh { display:flex; align-items:center; justify-content:space-between; }
.savev { background:none; border:1px solid var(--border-2); color:var(--accent-fg); font-size:11px; font-weight:600; border-radius:7px; padding:3px 8px; cursor:pointer; font-family:inherit; }
.savev:hover { border-color:var(--accent-bd); }
.savedview { display:flex; align-items:center; gap:2px; }
.savedview .viewlink { flex:1; min-width:0; }
.delv { background:none; border:0; color:var(--dim); cursor:pointer; font-size:15px; padding:0 6px; }
.delv:hover { color:#ef5350; }
.saveviewform { display:flex; flex-direction:column; gap:7px; padding:10px; margin:6px 0; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; }
.saveviewform input[name="name"] { background:var(--panel-b); border:1px solid var(--border-2); color:var(--text); border-radius:7px; padding:7px 9px; font:inherit; font-size:12.5px; }
.svscope { font-size:12px; color:var(--muted); display:flex; align-items:center; gap:5px; }

.sheetbar { display:flex; align-items:center; gap:8px; margin-bottom:10px; flex-wrap:wrap; }
.tbtn { display:inline-flex; align-items:center; gap:6px; background:var(--input-bg); border:1px solid var(--border-2); color:var(--text); border-radius:9px; padding:8px 12px; font:inherit; font-size:12.5px; font-weight:600; cursor:pointer; }
.tbtn:hover { border-color:var(--accent-bd); }
.tbtn.on { background:var(--accent); color:#fff; border-color:var(--accent); }
.tbadge { background:var(--accent); color:#fff; border-radius:999px; font-size:10px; padding:1px 6px; }
.colwrap { position:relative; }
.colmenu { position:absolute; top:calc(100% + 6px); left:0; width:250px; max-height:60vh; overflow:auto; background:var(--panel-a); border:1px solid var(--border-2); border-radius:11px; box-shadow:0 16px 40px rgba(0,0,0,.35); z-index:40; padding:8px; }
.colmenu-h { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); padding:4px 6px 8px; }
.colopt { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text); padding:6px; border-radius:7px; cursor:pointer; }
.colopt:hover { background:var(--hover); }
.colopt input { accent-color:var(--accent); }
.sheetsearch { flex:1 1 220px; max-width:360px; display:flex; gap:6px; }
.sheetsearch input { flex:1; min-width:0; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--text); padding:8px 12px; font:inherit; font-size:13px; }
/* Visible submit so mobile users have a tappable Search (a single-input form's keyboard
   "Go" key doesn't reliably submit on iOS). */
.sheetsearch-go { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; min-width:40px; padding:0 10px; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--muted); cursor:pointer; }
.sheetsearch-go:hover { border-color:var(--accent-bd); color:var(--accent-fg); background:var(--hover); }
.pageinfo { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.pg { background:var(--input-bg); border:1px solid var(--border-2); color:var(--text); border-radius:8px; padding:5px 10px; font:inherit; font-size:13px; cursor:pointer; }
.pg:hover:not(:disabled) { border-color:var(--accent-bd); }
.pg:disabled { opacity:.4; cursor:default; }

.filterpanel { background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:12px; }
.fp-applied { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; }
.fchip { display:inline-flex; align-items:center; gap:6px; background:var(--accent-soft); border:1px solid var(--accent-bd); color:var(--accent-fg); border-radius:999px; padding:4px 10px; font-size:12px; }
.fchip a { color:var(--accent-fg); text-decoration:none; font-weight:700; margin-left:2px; }
.fp-clear { font-size:12px; color:var(--accent); text-decoration:none; }
.fp-add { display:flex; gap:8px; flex-wrap:wrap; }
.fp-add select, .fp-add input { background:var(--input-bg); border:1px solid var(--border-2); color:var(--text); border-radius:8px; padding:7px 10px; font:inherit; font-size:13px; }
.fp-add select { max-width:220px; }

.sheetwrap { overflow-x:auto; border:1px solid var(--border); border-radius:12px; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); }
.sheet { width:100%; border-collapse:collapse; min-width:520px; }
.sheet th { text-align:left; font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); padding:12px 16px; border-bottom:1px solid var(--border); white-space:nowrap; position:sticky; top:0; background:var(--panel-a); }
.sheet th.thsort { cursor:pointer; user-select:none; }
.sheet th.thsort:hover { color:var(--text); }
.sheet th.thc, .sheet td.tdc { text-align:center; color:var(--muted); width:44px; }
/* per-app item number (like old Podio's item #) — leading column */
.sheet th.thnum, .sheet td.tdnum { width:1%; white-space:nowrap; text-align:right; color:var(--dim); font-size:12px; padding-right:12px; font-variant-numeric:tabular-nums; }
.badge-num { color:var(--dim); font-weight:600; font-size:12.5px; margin-right:3px; }
.sheet td { padding:13px 16px; border-bottom:1px solid var(--hairline); font-size:14.5px; line-height:1.4; vertical-align:middle; color:var(--text); max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sheet tr.srow:hover { background:var(--hover); cursor:pointer; }
.sheet td.tdtitle a { color:var(--text); text-decoration:none; font-weight:600; font-size:14.5px; }
.sheet td.tdtitle a:hover { color:var(--accent-fg); }
.sheet .sheet-empty { text-align:center; color:var(--muted); padding:30px; }

/* location fields: the place drawn on a map, like Podio does */
.frow .fv.edt[data-type="location"] { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
/* a location box looks like a box, so it is obvious the place can be changed */
.frow .fv.edt[data-type="location"] input.inline-edit { max-width:420px; background:var(--input-bg); border-color:var(--border-2); }
.frow .fv.edt[data-type="location"] input.inline-edit:focus { border-color:var(--accent-bd); }
.locmap { flex:0 0 100%; margin:6px 0 2px; max-width:560px; }
.locmap iframe { display:block; width:100%; height:220px; border:1px solid var(--border-2); border-radius:10px; background:var(--input-bg); }
.locmap-open { display:inline-block; margin-top:4px; font-size:12px; color:var(--accent-fg); text-decoration:none; }
.locmap-open:hover { text-decoration:underline; }
/* location type-ahead (public/js/item.js) — in-flow list under the input, so no overflow clipping */
.loc-sug { flex:0 0 100%; max-width:560px; margin-top:4px; background:var(--panel-a); border:1px solid var(--border-2); border-radius:6px; box-shadow:0 4px 14px rgba(0,0,0,0.08); overflow:hidden; }
.loc-sug-row { display:flex; align-items:baseline; gap:8px; padding:7px 10px; cursor:pointer; color:var(--text); }
.loc-sug-row small { color:var(--muted); font-size:12px; }
.loc-sug-row:hover, .loc-sug-row.on { background:var(--accent-soft); }
/* multi-city location field: chips + a Leaflet map with a pin per place */
.frow .fv .lnk-list.loc-chips { flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px 10px; }
.loc-home { font-size:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--accent-fg); background:var(--accent-soft); border:1px solid var(--accent-bd); border-radius:8px; padding:0 5px; }
.locmulti { height:240px; max-width:560px; border:1px solid var(--border); border-radius:6px; overflow:hidden; z-index:0; }

/* relative comment times, exact date in a tooltip on hover (Podio behaviour) */
.cmt-time[data-when] { position:relative; }
.cmt-time[data-when]::after {
  content:attr(data-when); position:absolute; bottom:calc(100% + 7px); right:0; z-index:20;
  padding:5px 9px; border-radius:7px; white-space:nowrap; pointer-events:none;
  font-size:11.5px; font-weight:600; letter-spacing:0; text-transform:none;
  background:var(--text); color:var(--panel-a); box-shadow:0 6px 18px rgba(0,0,0,.22);
  opacity:0; transform:translateY(3px); transition:opacity .12s, transform .12s;
}
.cmt-time[data-when]:hover::after { opacity:1; transform:translateY(0); }

/* status chips in list + badge views, coloured from the Podio option colours */
.cchip { display:inline-flex; align-items:center; margin:1px 4px 1px 0; padding:2px 9px; border-radius:999px;
  font-size:12px; font-weight:600; line-height:1.5; white-space:nowrap;
  background:var(--cc,var(--thumb)); color:#14243b; border:1px solid rgba(0,0,0,.06); }
.cchip:only-child { margin-right:0; }
.sheet td .cchip { font-size:11.5px; }

/* faint column dividers */
.sheet th:not(:last-child), .sheet td:not(:last-child) { border-right:1px solid var(--hairline); }
.sheet th:not(:last-child) { border-right-color:var(--border); }

/* resizable columns: drag the right edge of a header, double-click it to reset */
.sheet th { position:sticky; }
.sheet th.thsort { padding-right:20px; }
.colgrip { position:absolute; top:0; right:0; width:10px; height:100%; cursor:col-resize; }
.colgrip::after { content:''; position:absolute; top:6px; bottom:6px; right:4px; width:2px; border-radius:2px; background:transparent; }
.sheet th:hover .colgrip::after { background:var(--border-2); }
.colgrip:hover::after { background:var(--accent); }
.sheet.sized { table-layout:fixed; }
.sheet.sized td, .sheet.sized th { max-width:none; overflow:hidden; text-overflow:ellipsis; }
body.col-resizing { cursor:col-resize; user-select:none; }
.pagerow { display:flex; align-items:center; justify-content:center; gap:14px; margin:14px 0; font-size:12.5px; color:var(--muted); }

/* item Files section (bottom of the left column, Podio-style) */
.files-section { margin-top:18px; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:14px; padding:14px 16px; }
.files-h { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:12px; display:flex; align-items:center; gap:8px; }
.files-n { background:var(--accent-soft); border:1px solid var(--accent-bd); color:var(--accent-fg); border-radius:999px; font-size:11px; padding:1px 8px; }
.files-toggle { margin-left:auto; background:var(--panel-b); border:1px solid var(--border); color:var(--muted); border-radius:999px; font-size:11px; text-transform:uppercase; letter-spacing:.06em; padding:2px 11px; cursor:pointer; font-family:inherit; }
.files-toggle:hover { border-color:var(--accent-bd); color:var(--accent-fg); background:var(--hover); }
.files-add-form { margin-left:auto; display:inline-flex; }
.files-add-form + .files-toggle { margin-left:0; }
.files-add-btn { background:var(--panel-b); border:1px solid var(--border); color:var(--muted); border-radius:999px; font-size:11px; text-transform:uppercase; letter-spacing:.06em; padding:2px 11px; cursor:pointer; font-family:inherit; display:inline-flex; align-items:center; }
.files-add-btn:hover { border-color:var(--accent-bd); color:var(--accent-fg); background:var(--hover); }
.files-section.collapsed .files-h { margin-bottom:0; }
.files-section.collapsed .files-grid { display:none; }
/* Related items (other apps that reference this one, e.g. Video Projects on a Media Lead) */
.related-section { margin-top:18px; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:14px; padding:14px 16px; }
.related-h { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin:0 0 10px; display:flex; align-items:center; gap:8px; }
.related-h:not(:first-child) { margin-top:16px; }
.related-n { background:var(--accent-soft); border:1px solid var(--accent-bd); color:var(--accent-fg); border-radius:999px; font-size:11px; padding:1px 8px; }
.related-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.related-item { display:block; padding:7px 10px; border-radius:8px; color:var(--text); text-decoration:none; border:1px solid transparent; }
.related-item:hover { background:var(--input-bg); border-color:var(--border); }
.related-group + .related-group { margin-top:16px; }
.related-list li { display:flex; align-items:center; gap:4px; }
.related-list li .related-item { flex:1; min-width:0; }
.related-x { flex:none; width:22px; height:22px; padding:0; border:none; background:none; color:var(--dim); font-size:12px; line-height:1; border-radius:6px; cursor:pointer; opacity:0; transition:opacity .12s; }
.related-list li:hover .related-x { opacity:1; }
.related-x:hover { color:var(--text); background:var(--input-bg); }
.related-add { position:relative; margin-top:8px; }
.related-add-btn { display:inline-flex; align-items:center; gap:5px; font-size:12.5px; color:var(--accent-fg); background:var(--accent-soft); border:1px solid var(--accent-bd); border-radius:8px; padding:5px 11px; cursor:pointer; }
.related-add-btn:hover { border-color:var(--accent); }
.related-search { margin-top:8px; max-width:420px; }
.related-input { width:100%; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--text); padding:8px 11px; font-size:13px; font-family:inherit; }
.related-input:focus { outline:none; border-color:var(--accent-bd); }
.related-results { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:30; background:var(--card-a); border:1px solid var(--border-2); border-radius:10px; padding:5px; box-shadow:0 12px 30px rgba(0,0,0,.35); max-height:260px; overflow:auto; max-width:420px; }
/* Forward app-reference picker: make the search box read as an "add" affordance, not a filter. */
.rel-input.add { border-style:dashed; color:var(--accent-fg); }
.rel-input.add::placeholder { color:var(--accent-fg); opacity:.85; }
.rel-input.add:focus { border-style:solid; }
.files-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; }
.filecard { position:relative; display:flex; align-items:center; gap:10px; padding:9px 11px; border:1px solid var(--border); border-radius:9px; background:var(--panel-b); }
.filecard.openable { cursor:pointer; }
.filecard.openable:hover { border-color:var(--accent-bd); background:var(--hover); }
/* Stretched link: click anywhere on the card (icon, name, blank space) opens the
   file in a new tab. Action buttons sit above it (z-index) so they stay clickable. */
.filecard-open { position:absolute; top:0; left:0; right:0; bottom:0; z-index:1; border-radius:inherit; }
.filecard.openable:hover .filecard-name { text-decoration:underline; }
.filecard.pending { opacity:.6; }
.filecard-ico { font-size:18px; flex:0 0 auto; }
.filecard-main { display:flex; flex-direction:column; min-width:0; }
.filecard-name { font-size:13px; font-weight:600; color:var(--accent-fg); text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
a.filecard-name:hover { text-decoration:underline; }
.filecard-meta { font-size:11px; color:var(--muted); }
.filecard-main { flex:1 1 auto; }
.filecard-acts { position:relative; z-index:2; display:flex; align-items:center; gap:2px; flex:0 0 auto; opacity:.45; transition:opacity .12s; }
.filecard:hover .filecard-acts { opacity:1; }
.filecard-acts .fa-form { margin:0; padding:0; display:flex; }
.fa-btn { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border:none;
  background:none; color:var(--muted); font-size:13px; line-height:1; cursor:pointer; border-radius:6px; padding:0; }
.fa-btn:hover { background:var(--hover); color:var(--text); }
.fa-btn.fa-x:hover { background:rgba(239,68,68,.12); color:#e04747; }

/* reports */
.report-ctrls { display:flex; align-items:center; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.report-ctrls label { font-size:13px; color:var(--muted); display:flex; align-items:center; gap:8px; }
.report-ctrls select { background:var(--input-bg); border:1px solid var(--border-2); color:var(--text); border-radius:8px; padding:7px 10px; font:inherit; font-size:13px; }
.chart-toggle { display:flex; gap:4px; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; padding:3px; }
.chart-toggle a { font-size:12.5px; color:var(--muted); text-decoration:none; padding:5px 12px; border-radius:7px; }
.chart-toggle a.on { background:var(--accent); color:#fff; }
.report-body { display:flex; gap:28px; align-items:flex-start; flex-wrap:wrap; }
.pie { width:220px; height:220px; border-radius:50%; flex:0 0 auto; box-shadow:0 8px 30px rgba(0,0,0,.2); }
.report-bars { flex:1; min-width:320px; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
.rep-head { display:flex; justify-content:space-between; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); padding-bottom:10px; border-bottom:1px solid var(--border); margin-bottom:8px; }
.repbar { display:grid; grid-template-columns:150px 1fr 110px; align-items:center; gap:12px; padding:7px 0; text-decoration:none; }
.repbar:hover { background:var(--hover); }
.repbar-lab { font-size:12.5px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.repbar-track { height:16px; background:var(--input-bg); border-radius:5px; overflow:hidden; }
.repbar-fill { display:block; height:100%; border-radius:5px; min-width:2px; }
.repbar-n { font-size:12px; color:var(--muted); text-align:right; }
.repbar.muted .repbar-lab { color:var(--dim); }
.nomatch { display:none; padding:26px; text-align:center; color:var(--dim); font-size:13px; }

/* ---- item detail ---- */
.detail { display:flex; gap:20px; align-items:flex-start; }
.detail .info { flex:1; min-width:0; padding-bottom:30vh; }
.fieldtools { display:flex; justify-content:flex-end; margin-bottom:8px; }
.toggle-empty { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); cursor:pointer; user-select:none; }
.toggle-empty input { accent-color:var(--accent); }
.fieldcard { background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:14px; padding:6px 18px; overflow:hidden; }
/* empty fields hidden until toggled */
.fieldcard .frow.is-empty { display:none; }
.fieldcard.show-empty .frow.is-empty { display:grid; }
.fieldcard.show-empty .frow.is-empty .fv { color:var(--dim); }
/* section header (replaces Podio's dummyimage banner hack) */
.section-head { margin:16px -18px 6px; padding:10px 18px; font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.09em; color:var(--text);
  border-left:3px solid var(--sec,var(--accent));
  background:linear-gradient(90deg, color-mix(in srgb, var(--sec,var(--accent)) 22%, transparent), transparent); }
.section-head:first-child { margin-top:2px; }

/* ---- edit mode ---- */
.editing-note { font-size:12px; color:var(--accent-fg); font-weight:600; }
.edit-btn { padding:6px 14px; font-size:12.5px; }
.editbtns { display:flex; gap:10px; margin-top:16px; }
.edit-input { width:100%; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--text); padding:9px 11px; font-size:13.5px; font-family:inherit; }
textarea.edit-input { resize:vertical; min-height:64px; line-height:1.5; }
.edit-select { width:100%; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--text); padding:9px 11px; font-size:13.5px; font-family:inherit; }
.edit-select[multiple] { min-height:120px; }
/* Podio-style category buttons */
.catbtns { display:flex; flex-wrap:wrap; gap:7px; }
.catbtn { position:relative; display:inline-flex; align-items:center; cursor:pointer; }
.catbtn input { position:absolute; opacity:0; width:0; height:0; }
.catbtn span { display:inline-flex; align-items:center; padding:6px 13px; border-radius:9px; font-size:12.5px; font-weight:500;
  background:var(--input-bg); border:1px solid var(--border-2); color:var(--muted); transition:all .12s; }
/* Buttons render their true stored color (WYSIWYG with the picker). */
.catbtn { --ocv: var(--oc); }
.catbtn span::before { content:''; width:9px; height:9px; border-radius:3px; background:var(--ocv,transparent); margin-right:7px;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.2); }
.catbtn.none span::before { display:none; }
.catbtn:hover span { color:var(--text); border-color:var(--accent-bd); }
.catbtn:has(input:checked) span { background:var(--ocv,var(--accent)); border-color:var(--ocv,var(--accent)); color:#14243b; font-weight:700; }
.catbtn:has(input:checked) span::before { display:none; }
.catbtn.none:has(input:checked) span { background:var(--input-bg); border-color:var(--border-2); color:var(--dim); }

/* long category fields: show what's picked, open the rest in a scroll box */
.catbtns.catbig { flex-direction:column; align-items:flex-start; gap:8px; }
.catbig .cat-chosen { display:flex; flex-wrap:wrap; gap:7px; }
.catbig .cat-chosen .catbtn.picked span { background:var(--ocv,var(--accent)); border-color:var(--ocv,var(--accent)); color:#14243b; font-weight:700; }
.catbig .cat-chosen .catbtn.picked span::before { display:none; }
.catbig .cat-none { font-size:13px; color:var(--dim); }
.catbig .cat-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.catbig .cat-toggle { font-size:12px; color:var(--muted); background:var(--input-bg); border:1px solid var(--border-2);
  border-radius:8px; padding:4px 10px; cursor:pointer; }
.catbig .cat-toggle:hover, .catbig .cat-toggle.on { color:var(--accent-fg); border-color:var(--accent-bd); }
.catbig .cat-filter { font-size:12.5px; padding:5px 10px; border:1px solid var(--border-2); border-radius:8px;
  background:var(--input-bg); color:var(--text); min-width:180px; }
.catbig .cat-filter:focus { outline:none; border-color:var(--accent-bd); }
.catbig .cat-opts { display:flex; flex-wrap:wrap; gap:7px; max-height:230px; overflow-y:auto; width:100%;
  border:1px solid var(--border); border-radius:10px; padding:9px; background:var(--input-bg); align-content:flex-start; }
.ro { color:var(--text); }
.rohint { display:inline-block; margin-left:8px; font-size:10px; font-style:normal; color:var(--dim); text-transform:uppercase; letter-spacing:.04em; border:1px solid var(--border-2); border-radius:6px; padding:1px 6px; vertical-align:middle; }

/* ---- always-on inline editing ---- */
.fieldtools { justify-content:space-between; gap:12px; align-items:center; }
.hint-live { font-size:11.5px; color:var(--dim); }
.saved-pill { opacity:0; font-size:11px; color:#fff; background:#059669; padding:2px 9px; border-radius:999px; transition:opacity .2s; }
.saved-pill.show { opacity:1; }
/* readable value column */
.fieldcard .frow > .fv, .fieldcard .frow > .ro-fv { max-width:820px; }
/* NOT pre-wrap: the value sits inside indented EJS markup, and pre-wrap rendered that template
   whitespace as a huge empty gap (the "Project Name section is too big" bug, all read-only fields).
   Real line breaks in the value are converted to <br> when rendered, so normal wrapping is right. */
.ro-fv { white-space:normal; line-height:1.55; }
/* Keep every field row (incl. the read-only title/name field, which is edited in the header)
   compact and top-left aligned — the value must never render as a large, centered, or tall block.
   Explicit so no stale/intermediate style can balloon the first "title" row. */
.fieldcard .frow { align-items:start; }
.fieldcard .frow > .fv.ro-fv { font-size:15px; line-height:1.55; text-align:left; min-height:0; }
.inline-edit { width:100%; max-width:820px; background:transparent; border:1px solid transparent; border-radius:8px;
  color:var(--text); padding:6px 8px; font-size:13.5px; font-family:inherit; line-height:1.6; transition:background .12s,border-color .12s; }
.inline-edit:hover { background:var(--input-bg); border-color:var(--border); }
.inline-edit:focus { outline:none; background:var(--input-bg); border-color:var(--accent-bd); }
.inline-edit::placeholder { color:var(--dim); }
textarea.inline-edit { resize:none; white-space:pre-wrap; overflow:hidden; min-height:34px; }
/* rich-text field: contenteditable that shows formatted HTML and is editable */
.rich-edit { min-height:34px; cursor:text; overflow-wrap:anywhere; }
.rich-edit:empty:before { content:attr(data-ph); color:var(--dim); }
.rich-edit > :first-child { margin-top:0; }
.rich-edit > :last-child { margin-bottom:0; }
.rich-edit p { margin:.4em 0; }
.rich-edit:focus { outline:none; }
/* rich-text toolbar (item page text fields) — docked permanently above each field */
.rt-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:2px; padding:3px 5px; margin-bottom:6px;
  background:var(--panel-b); border:1px solid var(--border); border-radius:8px; }
.rt-toolbar[hidden] { display:none; }
.rt-b { min-width:26px; height:26px; padding:0 6px; background:none; border:0; border-radius:6px; color:var(--text);
  font-size:13px; line-height:1; cursor:pointer; font-family:inherit; }
.rt-b:hover { background:var(--hover); }
.rt-sel { height:26px; border:1px solid var(--border-2); border-radius:6px; background:var(--input-bg); color:var(--text);
  font:inherit; font-size:12px; padding:0 4px; cursor:pointer; }
.rt-sep { width:1px; height:18px; background:var(--border); margin:0 3px; }
.rt-colors { display:inline-flex; align-items:center; gap:3px; margin:0 2px; }
.rt-color { width:16px; height:16px; padding:0; border:0; border-radius:50%; cursor:pointer; }
.rt-color:hover { outline:2px solid var(--accent-bd); outline-offset:1px; }
select.inline-edit { max-width:340px; cursor:pointer; }
input[type="date"].inline-edit, input[type="number"].inline-edit { max-width:240px; }
/* plain text / big-text field: linkified value shown until you click it to edit (mirrors .inline-edit) */
.txt-live .txt-show { min-height:34px; max-width:820px; padding:6px 8px; font-size:13.5px; line-height:1.6;
  border:1px solid transparent; border-radius:8px; white-space:pre-wrap; overflow-wrap:anywhere; cursor:text;
  transition:background .12s,border-color .12s; }
.txt-live .txt-show:hover { background:var(--input-bg); border-color:var(--border); }
.txt-live .txt-show.empty { color:var(--dim); }
.txt-live .txt-show a, .ro-fv a { color:var(--accent-fg); text-decoration:none; word-break:break-all; }
.txt-live .txt-show a:hover, .ro-fv a:hover { text-decoration:underline; }

/* link fields: clickable value + an open arrow next to the editable input */
.frow .fv a.lnk { color:var(--accent-fg); text-decoration:none; word-break:break-all; }
.frow .fv a.lnk:hover { text-decoration:underline; }
.frow .fv.edt[data-type="embed"] { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.frow .fv a.embed-thumb { flex:0 1 auto; display:block; margin:2px 0; }
.frow .fv a.embed-thumb img { display:block; max-width:min(560px,100%); height:auto; border:1px solid var(--border-2);
  border-radius:10px; background:var(--input-bg); }
.frow .fv a.embed-thumb:hover img { border-color:var(--accent-bd); }
.frow .fv .lnk-list { flex:0 0 100%; display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.frow .fv .lnk-list:empty { display:none; }
.frow .fv .lnk-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; }
.frow .fv .lnk-x { flex:0 0 auto; font-size:11px; line-height:1; color:var(--dim); background:transparent;
  border:1px solid var(--border-2); border-radius:6px; padding:3px 6px; cursor:pointer; opacity:0; transition:opacity .12s; }
.frow .fv .lnk-chip:hover .lnk-x, .frow .fv .lnk-x:focus { opacity:1; }
.frow .fv .lnk-x:hover { color:var(--accent-fg); border-color:var(--accent-bd); }
.frow .fv input.lnk-add { flex:0 0 100%; }
.frow .fv a.lnk-open { flex:0 0 auto; color:var(--accent-fg); text-decoration:none; font-size:13px; line-height:1;
  padding:4px 7px; border:1px solid var(--border-2); border-radius:8px; background:var(--input-bg); }
/* Image fields (Headshot etc.): thumbnails with a remove ✕, plus an upload control. */
.frow .fv.img-fv { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.frow .fv .img-list { display:flex; flex-wrap:wrap; gap:8px; }
.frow .fv .img-list:empty { display:none; }
.frow .fv .img-chip { position:relative; display:inline-block; }
.frow .fv .img-chip img { display:block; width:120px; height:120px; object-fit:cover; border:1px solid var(--border-2);
  border-radius:10px; background:var(--input-bg); }
.frow .fv .img-chip:hover img { border-color:var(--accent-bd); }
.frow .fv .img-x { position:absolute; top:4px; right:4px; font-size:12px; line-height:1; color:#fff;
  background:rgba(0,0,0,.55); border:0; border-radius:6px; padding:3px 6px; cursor:pointer; opacity:0; transition:opacity .12s; }
.frow .fv .img-chip:hover .img-x, .frow .fv .img-x:focus { opacity:1; }
.frow .fv .img-x:hover { background:rgba(0,0,0,.8); }
.frow .fv .img-add { display:inline-block; cursor:pointer; }
.frow .fv .img-add .img-add-btn { display:inline-block; font-size:13px; line-height:1; color:var(--accent-fg);
  padding:6px 10px; border:1px solid var(--border-2); border-radius:8px; background:var(--input-bg); }
.frow .fv .img-add:hover .img-add-btn { border-color:var(--accent-bd); }
.frow .fv a.lnk-open:hover { border-color:var(--accent-bd); }

/* ---- activity stream: change entries ---- */
.cmt.change { border-left:2px solid var(--teal); padding-left:9px; }
.cmt.change .fld { color:var(--accent-fg); font-weight:600; }
.chgline { display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:12.5px; margin-top:3px; }
.chgline .ov { color:var(--dim); text-decoration:line-through; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chgline .nv { color:var(--text); max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chgline .arr { color:var(--dim); }
.chg-group { margin-top:3px; font-size:12.5px; }
.chg-group > summary { cursor:pointer; color:var(--dim); list-style:none; display:inline-block; }
.chg-group > summary::-webkit-details-marker { display:none; }
.chg-group > summary::before { content:'▸ '; }
.chg-group[open] > summary::before { content:'▾ '; }
.chg-list { display:flex; flex-direction:column; gap:4px; margin-top:6px; padding-left:2px; }
.chgrow { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.chgrow .cf { color:var(--accent-fg); font-weight:600; min-width:150px; }
.chgrow .ov { color:var(--dim); text-decoration:line-through; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chgrow .nv { color:var(--text); max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chgrow .arr { color:var(--dim); }
.viewchanges { background:none; border:1px solid var(--border-2); color:var(--muted); font-size:11px; padding:2px 9px; border-radius:7px; cursor:pointer; font-family:inherit; margin-left:2px; }
.viewchanges:hover { color:var(--text); border-color:var(--accent-bd); }

/* ---- image attachment lightbox ----
   Buttons sit below the safe area: in the iPhone app (and Safari with viewport-fit=cover) a
   plain top:18px lands under the status bar, where iOS swallows the tap. env() is 0 on desktop. */
.att-lb { position:fixed; inset:0; z-index:300; background:rgba(0,0,0,.82); display:flex; align-items:center; justify-content:center; padding:24px; cursor:zoom-out; }
.att-lb[hidden] { display:none; }
/* max dims are set inline by att-viewer.js (zoom-aware); these are only a fallback so the
   image never spills past the window if the script hasn't run yet. */
.att-lb-img { max-width:88vw; max-height:84vh; object-fit:contain; border-radius:10px; box-shadow:0 24px 70px rgba(0,0,0,.55); background:#fff; cursor:default; }
.att-lb-x { position:fixed; top:calc(18px + env(safe-area-inset-top, 0px)); right:22px; width:44px; height:44px; border:1px solid rgba(255,255,255,.35); border-radius:50%; background:rgba(18,18,20,.72); color:#fff; font-size:22px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 14px rgba(0,0,0,.4); }
.att-lb-x:hover { background:#000; border-color:#fff; }
.att-lb-nav { position:fixed; top:50%; transform:translateY(-50%); width:48px; height:48px; border:1px solid rgba(255,255,255,.35); border-radius:50%; background:rgba(18,18,20,.72); color:#fff; font-size:30px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 14px rgba(0,0,0,.4); z-index:2; }
.att-lb-nav:hover { background:#000; border-color:#fff; }
.att-lb-prev { left:22px; }
.att-lb-next { right:22px; }
.att-lb-nav[hidden] { display:none; }
.att-lb-count { position:fixed; bottom:calc(20px + env(safe-area-inset-bottom, 0px)); left:50%; transform:translateX(-50%); padding:5px 12px; border-radius:20px; background:rgba(18,18,20,.72); color:#fff; font-size:13px; letter-spacing:.02em; }
.att-lb-count[hidden] { display:none; }
.att-lb-dl { position:fixed; top:calc(18px + env(safe-area-inset-top, 0px)); right:74px; width:44px; height:44px; border:1px solid rgba(255,255,255,.35); border-radius:50%; background:rgba(18,18,20,.72); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 14px rgba(0,0,0,.4); z-index:2; }
.att-lb-dl:hover { background:#000; border-color:#fff; }
.att-lb-dlmenu { position:fixed; top:calc(68px + env(safe-area-inset-top, 0px)); right:74px; display:flex; flex-direction:column; gap:4px; padding:6px; border-radius:12px; background:rgba(18,18,20,.94); border:1px solid rgba(255,255,255,.22); box-shadow:0 10px 30px rgba(0,0,0,.5); z-index:3; }
.att-lb-dlmenu[hidden] { display:none; }
.att-lb-dlopt { min-width:150px; text-align:left; padding:8px 12px; border:0; border-radius:8px; background:transparent; color:#fff; font-size:13px; cursor:pointer; white-space:nowrap; }
.att-lb-dlopt:hover { background:rgba(255,255,255,.14); }
html.att-lb-open { overflow:hidden; }

/* ---- view-changes / revert modal ---- */
.modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.55); display:flex; align-items:center; justify-content:center; z-index:100; }
.modal-backdrop[hidden] { display:none; }
.modal { width:min(680px,92vw); background:var(--card-a); border:1px solid var(--border-2); border-radius:16px; overflow:hidden; box-shadow:0 24px 70px rgba(0,0,0,.45); }
.modal-h { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--hairline); font-weight:700; font-size:14px; color:var(--text); }
.modal-h .mclose { background:none; border:none; color:var(--muted); font-size:16px; cursor:pointer; }
.diff { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:16px 18px; }
.d-col h4 { font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--dim); margin-bottom:6px; }
.d-box { background:var(--input-bg); border:1px solid var(--border); border-radius:10px; padding:11px 13px; font-size:13px; line-height:1.55; white-space:pre-wrap; max-height:340px; overflow:auto; color:var(--text); }
.d-box.before { border-left:3px solid #ef4444; }
.d-box.after { border-left:3px solid #22c55e; }
.modal-f { display:flex; align-items:center; gap:10px; justify-content:flex-end; padding:14px 18px; border-top:1px solid var(--hairline); }
.modal-note { margin-right:auto; font-size:12px; color:var(--muted); }

/* ---- app toolbar: New + Actions dropdown ---- */
header.top .spacer { flex:1; }
.actions-wrap { position:relative; display:inline-block; }
.actions-menu { position:absolute; right:0; top:calc(100% + 6px); min-width:180px; z-index:60;
  background:var(--card-a); border:1px solid var(--border-2); border-radius:12px; padding:6px; box-shadow:0 16px 40px rgba(0,0,0,.35); }
.actions-menu[hidden] { display:none; }
.act-item { display:block; width:100%; text-align:left; background:none; border:none; color:var(--text);
  font-size:13px; font-family:inherit; padding:9px 11px; border-radius:8px; cursor:pointer; text-decoration:none; }
.act-item:hover { background:var(--hover); }
.act-item.danger { color:#f87171; }
.act-item.danger:hover { background:rgba(239,68,68,.12); }
.act-divider { height:1px; background:var(--hairline); margin:5px 4px; }

/* ---- workspace app management ---- */
[hidden] { display:none !important; }
#manageBtn.on { background:var(--accent); color:#fff; border-color:var(--accent); }
.manage-panel { max-width:720px; }
.manage-hint { font-size:12px; color:var(--muted); margin-bottom:12px; }
.manage-sub { font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--dim); margin:22px 0 9px; }
.mlist { list-style:none; display:flex; flex-direction:column; gap:7px; }
.mrow { display:flex; align-items:center; gap:12px; padding:11px 14px; background:linear-gradient(180deg,var(--card-a),var(--card-b)); border:1px solid var(--border); border-radius:12px; transition:border-color .12s, box-shadow .12s; }
.mrow:hover { border-color:var(--accent-bd); }
.mrow.dragging { opacity:.55; border-color:var(--accent); box-shadow:0 8px 24px rgba(0,0,0,.3); }
.mrow.archived { opacity:.72; }
.mhandle { cursor:grab; color:var(--dim); font-size:16px; line-height:1; padding:2px; }
.mhandle:active { cursor:grabbing; }
.mico { font-size:17px; }
.mname { font-weight:600; font-size:14px; color:var(--text); }
.mcount { font-size:12px; color:var(--muted); }
.mspace { flex:1; }
.mrow form { display:inline; margin:0; }
.mini { background:var(--input-bg); border:1px solid var(--border-2); color:var(--muted); font-size:11.5px; font-family:inherit; padding:5px 11px; border-radius:8px; cursor:pointer; }
.mini:hover { color:var(--text); border-color:var(--accent-bd); }
.mini.danger { color:#f87171; }
.mini.danger:hover { border-color:rgba(239,68,68,.4); background:rgba(239,68,68,.1); }

/* ---- section-header manager (Modify app) ---- */
.sec-list { display:flex; flex-direction:column; gap:8px; max-width:720px; }
.sec-item { display:flex; align-items:center; gap:8px; }
.sec-form { display:flex; align-items:center; gap:9px; flex:1; background:linear-gradient(180deg,var(--card-a),var(--card-b)); border:1px solid var(--border); border-radius:11px; padding:8px 12px; margin:0; }
.sec-form.add { max-width:720px; margin-top:12px; border-style:dashed; }
.sec-form input[type="color"] { width:30px; height:30px; padding:0; border:1px solid var(--border-2); border-radius:7px; background:none; cursor:pointer; }
.sec-form .sec-title { flex:1; background:var(--input-bg); border:1px solid var(--border-2); border-radius:8px; color:var(--text); padding:8px 10px; font-size:13px; font-family:inherit; }
.sec-form .add + input, .sec-form.add .sec-title, .sec-form.add input[name="title"] { flex:1; background:var(--input-bg); border:1px solid var(--border-2); border-radius:8px; color:var(--text); padding:8px 10px; font-size:13px; font-family:inherit; }
.sec-pos { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); white-space:nowrap; }
.sec-pos select { background:var(--input-bg); border:1px solid var(--border-2); border-radius:8px; color:var(--text); padding:7px 9px; font-size:12.5px; font-family:inherit; max-width:200px; }

/* ---- editable record title ---- */
.title-edit { outline:none; border-radius:8px; padding:1px 8px; margin:0 -8px; cursor:text; transition:background .12s, box-shadow .12s; }
.title-edit:hover { background:var(--input-bg); }
.title-edit:focus { background:var(--input-bg); box-shadow:0 0 0 1px var(--accent-bd); }
.title-edit:empty::before { content:attr(data-placeholder); color:var(--dim); }

/* ---- sticky Save/Cancel on Modify page ---- */
.settings-main { position:relative; }
.settings-main .editbtns { position:fixed; top:74px; right:26px; z-index:45; flex-direction:column; gap:8px;
  background:var(--card-a); border:1px solid var(--border-2); border-radius:12px; padding:12px; box-shadow:0 14px 34px rgba(0,0,0,.28); }
.settings-main .editbtns .btn { text-align:center; min-width:120px; }
@media (max-width:1180px) { .settings-main .editbtns { position:static; flex-direction:row; padding:0; border:none; background:none; box-shadow:none; } }

/* ---- field-template editor (Modify app) ---- */
.fld-list { display:flex; flex-direction:column; gap:7px; max-width:720px; }
.fld-row { display:flex; flex-direction:column; padding:8px 12px; background:linear-gradient(180deg,var(--card-a),var(--card-b)); border:1px solid var(--border); border-radius:11px; }
.fld-head { display:flex; align-items:center; gap:10px; }
.fld-opts { padding:10px 2px 4px; }
.fopts-btn.on { background:var(--accent); color:#fff; border-color:var(--accent); }
.fld-row:hover { border-color:var(--accent-bd); }
.fld-row.dragging { opacity:.55; border-color:var(--accent); box-shadow:0 8px 24px rgba(0,0,0,.3); }
.fld-name { flex:1; background:transparent; border:1px solid transparent; border-radius:8px; color:var(--text); padding:6px 9px; font-size:13.5px; font-weight:600; font-family:inherit; }
.fld-name:hover { background:var(--input-bg); border-color:var(--border); }
.fld-name:focus { outline:none; background:var(--input-bg); border-color:var(--accent-bd); }
.fld-type { font-size:10.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); background:var(--input-bg); border:1px solid var(--border-2); padding:3px 8px; border-radius:999px; }
.fld-add { display:flex; flex-wrap:wrap; align-items:center; gap:9px; max-width:720px; margin-top:14px; padding:12px; background:linear-gradient(180deg,var(--card-a),var(--card-b)); border:1px dashed var(--border-2); border-radius:12px; }
.fld-add input[name="label"] { flex:1; min-width:180px; background:var(--input-bg); border:1px solid var(--border-2); border-radius:8px; color:var(--text); padding:9px 11px; font-size:13px; font-family:inherit; }
.fld-add select, .fld-add textarea { background:var(--input-bg); border:1px solid var(--border-2); border-radius:8px; color:var(--text); padding:8px 10px; font-size:13px; font-family:inherit; }
.fld-cat { display:flex; flex-direction:column; gap:8px; width:100%; padding-top:4px; }
.fld-cat textarea { width:100%; min-height:70px; resize:vertical; }
.fld-cat .row { display:flex; align-items:center; gap:14px; font-size:12.5px; color:var(--muted); }

/* ---- per-option category editor (Podio-style rows) ---- */
.opt-editor { display:flex; flex-direction:column; gap:9px; padding-top:4px; }
.opt-rows { display:flex; flex-direction:column; gap:6px; }
.opt-row { display:flex; align-items:center; gap:9px; background:var(--input-bg); border:1px solid var(--border); border-radius:10px; padding:5px 8px; }
.opt-row.dragging { opacity:.55; border-color:var(--accent); box-shadow:0 8px 24px rgba(0,0,0,.3); }
.opt-row .ohandle { cursor:grab; color:var(--dim); font-size:15px; line-height:1; padding:2px; flex:none; }
.opt-row .ohandle:active { cursor:grabbing; }
.optlock { opacity:.6; cursor:not-allowed; }
.optlock .locknote { font-size:11px; color:var(--dim); }
.opt-row .opt-color { width:28px; height:28px; padding:0; border:1px solid var(--border-2); border-radius:7px; background:none; cursor:pointer; flex:none; }
.opt-row .opt-text { flex:1; min-width:0; background:transparent; border:1px solid transparent; border-radius:7px; color:var(--text); padding:6px 9px; font-size:13.5px; font-family:inherit; }
.opt-row .opt-text:hover { border-color:var(--border-2); }
.opt-row .opt-text:focus { outline:none; background:var(--bg); border-color:var(--accent-bd); }
.opt-del { background:none; border:none; color:var(--dim); font-size:13px; cursor:pointer; padding:4px 7px; border-radius:6px; flex:none; }
.opt-del:hover { color:#f87171; background:rgba(239,68,68,.12); }
.opt-add { background:var(--input-bg); border:1px dashed var(--border-2); border-radius:10px; color:var(--text); padding:9px 12px; font-size:13px; font-family:inherit; }
.opt-add::placeholder { color:var(--dim); }
.opt-controls { display:flex; align-items:center; flex-wrap:wrap; gap:16px; font-size:12.5px; color:var(--muted); padding-top:3px; }
.opt-controls label { display:flex; align-items:center; gap:7px; }
.opt-controls select { background:var(--input-bg); border:1px solid var(--border-2); border-radius:8px; color:var(--text); padding:6px 9px; font-size:12.5px; font-family:inherit; }
.opt-controls .btn { margin-left:auto; }
.frow { display:grid; grid-template-columns:210px 1fr; gap:14px; padding:13px 0; border-bottom:1px solid var(--hairline); }
.frow:last-child { border-bottom:none; }
.frow .fk { font-size:12px; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); font-weight:700; padding-top:3px; }
.frow .fv { font-size:15px; color:var(--text); line-height:1.55; word-break:break-word; }
.frow .fv.empty { color:var(--dim); }
.frow .fv a { color:var(--accent); text-decoration:none; }
/* Hyperlinks inside content (field values, rich text, comments, statuses) render blue + underline,
   like a normal web link, everywhere on Podio. */
.ro-fv a, .fv-html a, .frow .fv a:not(.lnk-open):not(.embed-thumb):not(.ref), .rich-edit a,
.cmt .body a, .fc-c-body a, .feed-body a, .txt-live .txt-show a {
  color:var(--link); text-decoration:underline; }
.frow .fv .ref { display:inline-block; margin:2px 5px 2px 0; padding:2px 9px; border-radius:999px; font-size:12px; background:var(--accent-soft); border:1px solid var(--accent-bd); color:var(--accent-fg); }
.frow .fv .ref.ext { color:var(--muted); background:var(--input-bg); border-color:var(--border-2); }
.frow .fv img.thumb { max-width:180px; border-radius:8px; border:1px solid var(--border); }

/* comments panel */
.comments { flex:0 0 32%; min-width:360px; max-width:560px; position:sticky; top:64px; background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:14px; display:flex; flex-direction:column; max-height:calc(100vh - 80px); max-height:calc(100dvh - 80px); }
.comments h3 { font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); padding:14px 16px 10px; border-bottom:1px solid var(--hairline); }
.comments .stream { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:12px 16px; }
.cmt { display:flex; gap:10px; padding:12px 0; border-bottom:1px solid var(--border); }
/* brief highlight when a notification click lands on a specific comment */
@keyframes cmtflash { 0%,25%{ background:#fff4c2; } 100%{ background:transparent; } }
.cmt.cmt-flash { animation:cmtflash 2.2s ease-out; border-radius:8px; }
.cmt:last-child { border-bottom:none; }
.cmt-av { flex:0 0 auto; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; color:#fff; font-size:11px; font-weight:800; letter-spacing:.2px; }
.cmt-av.chg { opacity:.7; }
.cmt-c { min-width:0; flex:1; }
.cmt-meta { font-size:11.5px; margin-bottom:4px; display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; }
.cmt-author { color:var(--accent-fg); font-weight:700; font-size:13px; }
.cmt-verb { color:var(--muted); }
.cmt-verb .fld { color:var(--accent-fg); font-weight:600; }
.cmt-time { color:var(--dim); font-size:11px; margin-left:auto; }
/* "· edited" marker next to a comment's timestamp (both item comments and status replies). */
.cmt-edited { color:var(--dim); font-style:italic; }
.cmt .body { font-size:13px; color:var(--text); line-height:1.5; word-break:break-word; white-space:pre-wrap; }
/* Compact bold/italic/underline bar docked above every comment composer (public/js/comment-format.js).
   Scoped with .fmt-bar so it wins over ".comments button { background:var(--accent) }" (green). Buttons
   are muted gray when off; they fill in (".on") when the current selection already has that format. */
.fmt-bar { display:flex; gap:3px; margin-bottom:5px; }
.fmt-bar .fmt-b { display:inline-flex; align-items:center; justify-content:center; width:26px; height:24px; padding:0; border:0; border-radius:5px; background:transparent; color:var(--muted); font-size:12px; line-height:1; cursor:pointer; transition:background .12s, color .12s; }
.fmt-bar .fmt-b b, .fmt-bar .fmt-b i, .fmt-bar .fmt-b u { font-size:12px; }
.fmt-bar .fmt-b:hover { background:rgba(125,134,143,0.16); color:var(--text); }
.fmt-bar .fmt-b.on { background:var(--muted); color:#fff; }
.fmt-bar .fmt-b.on:hover { background:var(--text); color:#fff; }
.cmt.local .cmt-av { box-shadow:0 0 0 2px var(--accent-bd); }
/* comment action row: like ♥ · Reply · Edit · Delete, all on one line */
.cmt-actions { margin-top:5px; font-size:12px; display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.cmt-actions .cmt-more { display:inline; }
.cmt-actions .cmt-more > summary { cursor:pointer; color:#8a8a8a; list-style:none; display:inline; font-weight:normal; }
.cmt-actions .cmt-more > summary::-webkit-details-marker { display:none; }
.cmt-actions .cmt-more[open] { display:block; width:100%; }
.cmt-actions .cmt-more[open] > summary { color:#333; }
.cmt-delform { display:inline; margin:0; }
/* .cmt-actions scoping beats `.comments button` (green submit style) so like + Delete look like Reply/Edit */
.cmt-actions .cmt-act-btn, .cmt-actions .cmt-like { background:none; border:0; border-radius:0; padding:0; margin:0; color:#8a8a8a; font:inherit; font-size:12px; font-weight:normal; line-height:1.4; cursor:pointer; }
.cmt-actions .cmt-act-btn:hover { color:#333; }
.cmt-actions .cmt-like { display:inline-flex; align-items:center; gap:4px; }
.cmt-actions .cmt-like .heart { font-size:14px; line-height:1; }
.cmt-actions .cmt-like .likec { font-size:11.5px; }
.cmt-actions .cmt-like:hover .heart { color:#e0245e; }
.cmt-actions .cmt-like.liked { color:#e0245e; }
/* icon action buttons on comments (reply/edit/delete/like) — specificity beats `.comments button` green style */
.cmt-actions { gap:10px; }
.cmt-actions .cmt-ic { background:none; border:0; border-radius:6px; padding:3px; margin:0; color:#8a8a8a; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; line-height:1; font:inherit; }
.cmt-actions .cmt-ic svg { width:15px; height:15px; display:block; }
.cmt-actions .cmt-ic:hover { color:#333; background:rgba(0,0,0,.06); }
.cmt-actions .cmt-del-btn:hover { color:#e0245e; }
.cmt-actions .cmt-ic.cmt-like { padding:3px 4px; gap:3px; }
.cmt-actions .cmt-ic.cmt-like:hover .heart, .cmt-actions .cmt-ic.cmt-like.liked { color:#e0245e; }
/* inline reply/edit editors under a comment — NOT the main composer, and honor [hidden] */
.comments form.cmt-inline { border:0; padding:0; margin-top:8px; gap:6px; }
.comments form.cmt-inline[hidden] { display:none; }
/* the textarea wrapper anchors the absolute @mention menu to the reply/edit box */
.cmt-inline-box { position:relative; }
/* inline reply/edit textareas: match the composer. Without this the status-feed edit
   boxes (.st-edit-form, outside any .comments container) fall back to the browser's
   default monospace textarea font. */
.cmt-inline-box textarea { width:100%; box-sizing:border-box; background:var(--input-bg); border:1px solid var(--border-2);
  border-radius:8px; color:var(--text); padding:9px 11px; font:inherit; font-size:13.5px; line-height:1.5; resize:vertical; }
.cmt-inline-box textarea:focus { outline:none; border-color:var(--accent-bd); background:var(--panel-b); }
.cmt-inline .cmt-inline-actions { display:flex; flex-direction:row; align-items:center; gap:8px; }
.cmt-inline .cmt-inline-actions .cc-btn { padding:6px 12px; }
.cmt-inline .cmt-cancel { background:none; border:0; color:#8a8a8a; cursor:pointer; font:inherit; padding:0; }
.comments form { border-top:1px solid var(--hairline); padding:12px 16px; display:flex; flex-direction:column; gap:8px; }
/* Desktop: keep the comment composer pinned to the bottom of the activity panel so it's
   always visible without scrolling the whole page (classic-Podio behavior). The stream
   scrolls internally above it. Mobile keeps its own fixed composer (see the ≤820px block). */
@media (min-width:821px){
  .comments form.cmt-form.cc { position:sticky; bottom:0; z-index:3; background:var(--panel-a); box-shadow:0 -8px 16px rgba(0,0,0,.06); }
  .comments .stream { padding-bottom:10px; }
  /* JS fit() sets an exact inline max-height that wins over this. This is only the pre-JS /
     no-JS safety net, divided by the desktop html{zoom:1.4} so it can't paint ~1.4x too tall
     and shove the composer + newest comment off-screen (the base calc(100dvh-80px) does). */
  .comments { max-height: calc((100dvh - 78px) / 1.4); }
}
.cmt-compose { position:relative; }
.mention-menu { position:absolute; left:0; bottom:calc(100% + 4px); width:100%; background:var(--panel-a); border:1px solid var(--border-2); border-radius:9px; box-shadow:0 -8px 30px rgba(0,0,0,.3); z-index:30; overflow:hidden; }
.mention-opt { display:flex; align-items:center; gap:8px; padding:8px 10px; font-size:13px; color:var(--text); cursor:pointer; }
.mention-opt.on, .mention-opt:hover { background:var(--accent-soft); }
.mention-av { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; background:var(--thumb-ico); color:#fff; font-size:9px; font-weight:800; }
.comments select, .comments textarea { background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--text); padding:9px 11px; font-size:13px; font-family:inherit; }
.comments textarea { resize:vertical; min-height:60px; width:100%; box-sizing:border-box; }
.comments button { background:var(--accent); color:#fff; border:none; border-radius:9px; padding:9px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; }
.empty-note { color:var(--dim); font-size:12.5px; padding:8px 0; }

/* ---- login ---- */
.login-wrap { min-height:80vh; display:flex; align-items:center; justify-content:center; }
.login { width:340px; background:linear-gradient(180deg,var(--card-a),var(--card-b)); border:1px solid var(--border); border-radius:16px; padding:26px; }
.login h1 { font-size:19px; font-weight:800; display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.login h1 .dot { width:9px; height:9px; border-radius:50%; background:var(--accent); }
.login p { font-size:12.5px; color:var(--muted); margin-bottom:18px; }
.login label { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--dim); margin:12px 0 5px; }
.login input { width:100%; background:var(--input-bg); border:1px solid var(--border-2); border-radius:10px; color:var(--text); padding:11px 12px; font-size:14px; font-family:inherit; }
.login button { width:100%; margin-top:18px; background:var(--accent); color:#fff; border:none; border-radius:10px; padding:12px; font-size:14px; font-weight:700; cursor:pointer; font-family:inherit; }
.login .err { color:#f87171; font-size:12.5px; margin-top:12px; }
.login-brand { text-align:center; margin-bottom:22px; padding-bottom:18px; border-bottom:1px solid var(--hairline); }
.login-logo { width:96px; height:auto; display:block; margin:0 auto; }
.logo-dark { display:none; }
[data-theme="dark"] .logo-light { display:none; }
[data-theme="dark"] .logo-dark { display:block; }
.login-sub { text-align:center; font-size:10.5px; letter-spacing:.2em; text-transform:uppercase; color:var(--muted); font-weight:600; margin-top:12px; }
.login-lead { font-size:12.5px; color:var(--muted); margin-bottom:16px; }
.login-alt { font-size:12.5px; color:var(--muted); margin-top:16px; text-align:center; }
.login-alt a { color:var(--link); text-decoration:none; font-weight:600; }
.login-alt a:hover { text-decoration:underline; }

/* ---- admin tables ---- */
.adm { background:linear-gradient(180deg,var(--panel-a),var(--panel-b)); border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.adm table { width:100%; border-collapse:collapse; }
.adm th { text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--dim); padding:11px 16px; border-bottom:1px solid var(--border); }
.adm td { padding:11px 16px; border-bottom:1px solid var(--hairline); font-size:13px; }
.adm tr:last-child td { border-bottom:none; }
.pill { font-size:10.5px; padding:2px 9px; border-radius:999px; }
.pill.admin { color:#fff; background:var(--accent); }
.pill.member { color:var(--accent-fg); background:var(--accent-soft); border:1px solid var(--accent-bd); }
.pill.off { color:var(--dim); background:var(--input-bg); border:1px solid var(--border-2); }
.btn { background:var(--accent); color:#fff; border:none; border-radius:9px; padding:8px 14px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; text-decoration:none; display:inline-block; }
.btn.ghost { background:none; border:1px solid var(--border-2); color:var(--muted); }
.formgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin:14px 0; }
.formgrid label { font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--dim); }
.formgrid input, .formgrid select { width:100%; margin-top:5px; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--text); padding:9px 11px; font-size:13px; font-family:inherit; }

/* themed role dropdown (replaces the ugly native white select) */
.role-select { appearance:none; -webkit-appearance:none; -moz-appearance:none;
  background:var(--input-bg); border:1px solid var(--border-2); border-radius:999px;
  color:var(--text); font-family:inherit; font-size:12px; font-weight:600; letter-spacing:.02em;
  padding:5px 30px 5px 13px; cursor:pointer; transition:border-color .12s, background .12s;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 11px center; }
.role-select:hover { border-color:var(--accent-bd); color:var(--text); }
.role-select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft); }
.role-select option { background:var(--panel-a); color:var(--text); font-weight:500; }
.access-cell { display:flex; flex-direction:column; gap:6px; }
.access-item { display:flex; align-items:center; gap:10px; margin:0; }
.access-space { font-size:12px; color:var(--muted); min-width:135px; }

/* ---- contact / people picker ---- */
.people-picker { display:flex; flex-wrap:wrap; gap:7px; }
.person-chip { position:relative; display:inline-flex; align-items:center; cursor:pointer; }
.person-chip input { position:absolute; opacity:0; width:0; height:0; }
.person-chip span { display:inline-flex; align-items:center; gap:6px; padding:6px 12px 6px 10px; border-radius:999px; font-size:12.5px; font-weight:500;
  background:var(--input-bg); border:1px solid var(--border-2); color:var(--muted); transition:all .12s; }
.person-chip span::before { content:''; width:18px; height:18px; border-radius:50%; background:var(--accent-soft); border:1px solid var(--accent-bd); }
.person-chip:hover span { color:var(--text); border-color:var(--accent-bd); }
.person-chip:has(input:checked) span { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
.person-chip:has(input:checked) span::before { background:rgba(255,255,255,.25); border-color:transparent; }
.person-chip.ext { cursor:default; }
.person-chip.ext span { color:var(--muted); font-style:italic; }
/* compact contact: show only the assigned person(s); reveal the full picker via the toggle */
.people-picker.compact .person-chip { display:none; }
.people-picker.compact .person-chip:has(input:checked) { display:inline-flex; }
.people-picker.compact.open .person-chip { display:inline-flex; }
.pp-toggle { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; padding:0;
  border:1px solid var(--accent-bd); background:var(--accent-soft); color:var(--dim); border-radius:999px;
  cursor:pointer; font-size:15px; line-height:1; transition:transform .12s ease, color .12s ease; }
.pp-toggle:hover { color:var(--text); border-color:var(--accent); }
.people-picker.compact.open .pp-toggle { transform:rotate(45deg); color:var(--text); border-color:var(--accent); }
/* single-select contact (Assigned to / Assigned by): no None option — the ＋ shows only when nobody is
   assigned; once someone is assigned their chip is shown and clicking it again un-assigns them. */
.people-picker.compact.single:not(.open):has(.person-chip input:checked) .pp-toggle { display:none; }

/* ---- relationship (app-reference) picker ---- */
.rel-picker { display:flex; flex-direction:column; gap:9px; max-width:560px; }
.rel-chips { display:flex; flex-wrap:wrap; gap:6px; }
.rel-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 7px 4px 11px; border-radius:999px; font-size:12.5px; background:var(--accent-soft); border:1px solid var(--accent-bd); }
.rel-chip a { color:var(--accent-fg); text-decoration:none; }
.rel-chip a:hover { text-decoration:underline; }
.rel-chip .ext { color:var(--muted); font-style:italic; }
.rel-x { background:none; border:none; color:var(--accent-fg); cursor:pointer; font-size:11px; line-height:1; padding:2px 3px; border-radius:4px; opacity:.7; }
.rel-x:hover { opacity:1; color:#f87171; }
.rel-search { position:relative; max-width:340px; }
.rel-input { width:100%; background:var(--input-bg); border:1px solid var(--border-2); border-radius:9px; color:var(--text); padding:8px 11px; font-size:13px; font-family:inherit; }
.rel-input:focus { outline:none; border-color:var(--accent-bd); }
.rel-results { position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:30; background:var(--card-a); border:1px solid var(--border-2); border-radius:10px; padding:5px; box-shadow:0 12px 30px rgba(0,0,0,.35); max-height:260px; overflow:auto; }
.rel-opt { padding:8px 10px; border-radius:7px; font-size:13px; color:var(--text); cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.rel-opt:hover { background:var(--hover); }
.rel-opt-app { font-size:11px; color:var(--dim); white-space:nowrap; }
.rel-empty { padding:8px 10px; font-size:12.5px; color:var(--dim); }

/* ---------- Bookmarks ---------- */
.app { position: relative; }
.bm { position:absolute; top:9px; right:10px; background:none; border:none; cursor:pointer;
  font-size:18px; line-height:1; color:var(--muted); opacity:.5; padding:3px 5px; border-radius:7px;
  transition:opacity .12s, background .12s, color .12s; z-index:2; }
.bm:hover { opacity:1; background:var(--accent-soft); }
.bm.on { color:#f5b301; opacity:1; }
/* labeled bookmark button in the workspace header */
.btn.bm-labeled { position:static; display:inline-flex; align-items:center; gap:6px; opacity:1; font-size:13px; }
.btn.bm-labeled .bm-ic { font-size:15px; line-height:1; }
.btn.bm-labeled.on { color:#f5b301; border-color:var(--accent-bd); }
.btn.bm-labeled.on .bm-ic { color:#f5b301; }
.bm-star { color:#f5b301; }
#bmSection { margin-bottom:26px; }

/* ============ Podio-style left workspace rail ============ */
.pod-rail { position:fixed; left:0; top:0; bottom:0; width:var(--sidebar-w); background:var(--sidebar-bg);
  border-right:1px solid var(--border); display:flex; flex-direction:column; z-index:60; }
.pod-rail-head { display:flex; align-items:center; gap:9px; padding:15px 16px 13px; border-bottom:1px solid var(--hairline); }
.pod-rail-head .dot { width:11px; height:11px; border-radius:50%; background:var(--accent); flex:0 0 auto; }
.pod-rail-head b { font-size:16px; font-weight:800; letter-spacing:-.2px; color:var(--text); }
.pod-rail-head .org { font-size:11px; color:var(--muted); margin-left:auto; text-transform:uppercase; letter-spacing:.4px; }
.pod-rail-scroll { flex:1; overflow-y:auto; padding:8px 8px 12px; }
.pod-rail-sec { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--dim); padding:12px 8px 5px; }
.pod-ws { display:flex; align-items:center; gap:9px; padding:6px 8px; border-radius:7px; text-decoration:none; color:var(--text); font-size:13.5px; font-weight:500; line-height:1.2; }
.pod-ws:hover { background:var(--sidebar-hover); }
.pod-ws.on { background:var(--sidebar-active); font-weight:700; }
.pod-ws-ico { width:22px; height:22px; border-radius:6px; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:12px; font-weight:800; }
.pod-ws-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pod-ws-star { margin-left:auto; color:var(--accent); font-size:12px; opacity:.9; }
.pod-rail-foot { border-top:1px solid var(--hairline); padding:8px; }
.pod-rail-foot a { display:flex; align-items:center; gap:8px; padding:8px; border-radius:7px; text-decoration:none;
  color:var(--muted); font-size:13px; font-weight:600; }
.pod-rail-foot a:hover { background:var(--sidebar-hover); color:var(--text); }

/* ============ Podio-style workspace dropdown selector (top-left) ============ */
.topnav { background:var(--nav-bg); border-bottom:1px solid var(--border); box-shadow:none; }
.topnav .wsswitch-wrap { display:block; }
.wsswitch { display:flex; align-items:center; gap:9px; background:var(--panel-b); border:1px solid var(--border);
  border-radius:8px; padding:7px 12px; min-width:210px; cursor:pointer; color:var(--text); font-size:14px; font-weight:700; }
.wsswitch:hover { border-color:var(--accent-bd); background:var(--hover); }
.wsswitch .wsswitch-ico { color:var(--accent); font-size:14px; }
.wsswitch .wsswitch-label { flex:1; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wsswitch .caret { color:var(--muted); font-size:11px; }
.wsmenu { position:absolute; top:calc(100% + 6px); left:0; width:330px; max-height:70vh; overflow:hidden;
  background:var(--panel-a); border:1px solid var(--border); border-radius:12px; box-shadow:0 12px 34px rgba(0,0,0,.14);
  display:flex; flex-direction:column; z-index:70; }
.wsmenu-search { padding:10px; border-bottom:1px solid var(--hairline); }
.wsmenu-search input { width:100%; background:var(--input-bg); border:1px solid var(--border); border-radius:8px;
  padding:8px 11px; font-size:13.5px; color:var(--text); }
.wsmenu-org { display:flex; align-items:center; gap:8px; font-weight:800; font-size:11px; color:var(--muted);
  text-transform:uppercase; letter-spacing:.5px; padding:11px 12px 5px; }
.wsmenu-logo { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:5px;
  background:var(--accent); color:#fff; font-size:9px; font-weight:900; }
.wsmenu #wsDefault { display:flex; flex-direction:column; flex:1 1 auto; min-height:0; }
.wsmenu-list { flex:1 1 auto; min-height:0; max-height:calc(70vh - 150px); overflow-y:auto; padding:2px 6px 6px; }
.wsmenu-grouphead { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--dim); padding:10px 8px 4px; }
.wsmenu-item { display:flex; align-items:center; gap:9px; padding:7px 8px; border-radius:7px; text-decoration:none;
  color:var(--text); font-size:14px; font-weight:500; }
.wsmenu-item:hover { background:var(--sidebar-hover); }
.wsmenu-item.on { background:var(--sidebar-active); font-weight:700; }
.wsmenu-item .wsmenu-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wsmenu-item .pod-ws-star { margin-left:auto; }
.wsmenu-archived { display:flex; align-items:center; gap:8px; padding:11px 14px; border-top:1px solid var(--hairline);
  text-decoration:none; color:var(--muted); font-size:13.5px; font-weight:600; }
.wsmenu-archived:hover { background:var(--sidebar-hover); color:var(--text); }
.wsmenu-archcount { margin-left:auto; color:var(--dim); font-weight:700; }
.wsmenu-search, .wsmenu-org, .wsmenu-archived { flex:0 0 auto; }
.wsmenu-results { flex:1 1 auto; min-height:0; overflow-y:auto; padding:2px 6px 6px; }

/* ============ readability bumps (Josh: fonts too small / too much text) ============ */
.app-list table, .lv-table { font-size:14px; }
.app-list th, .lv-table th { font-size:12px; letter-spacing:.02em; }
.app-list td, .lv-table td { padding:11px 12px; line-height:1.45; }
.lead { font-size:14.5px; }
.app h2 { font-size:15.5px; }
h1 { letter-spacing:-.3px; }

/* ============ Podio green buttons / accents on white ============ */
.btn { border-radius:7px; }
.btn:not(.ghost):not(.danger) { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn:not(.ghost):not(.danger):hover { background:var(--accent-fg); border-color:var(--accent-fg); }
a { color:var(--link); }

/* ============ Podio workspace app-bar (apps as icons at the top) ============ */
.appbar { display:flex; align-items:flex-start; gap:2px; overflow-x:auto; padding:10px 22px 0; margin:0 -22px 14px; border-bottom:1px solid var(--border); }
.appbar-item { display:flex; flex-direction:column; align-items:center; gap:7px; text-decoration:none; color:var(--muted);
  padding:9px 10px 11px; border-bottom:2.5px solid transparent; width:92px; flex:0 0 auto; border-radius:8px 8px 0 0; }
.appbar-item:hover { background:var(--sidebar-hover); color:var(--text); }
.appbar-item.on { color:var(--accent-fg); border-bottom-color:var(--accent); font-weight:700; }
.appbar-ico { display:flex; align-items:center; justify-content:center; height:24px; }
.appbar-ico svg { width:23px; height:23px; }
.appbar-name { font-size:11.5px; font-weight:600; text-align:center; line-height:1.25; word-break:break-word; hyphens:auto; }

/* ============ Workspace activity feed ============ */
/* 2-column workspace layout: activity feed (left) + tiles (right), like Podio */
.ws-cols { display:grid; grid-template-columns:minmax(0,1fr) 400px; gap:22px; align-items:start; }
.ws-col-main { min-width:0; }
.ws-col-side { min-width:0; }
@media (max-width:960px){ .ws-cols { grid-template-columns:1fr; } .ws-col-side { order:-1; } }
.ws-feed { max-width:none; }
.ws-feed-h { font-size:13px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:12px; }
/* Activity | Statuses feed filter toggle */
.ws-feed-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.ws-feed-head .ws-feed-h { margin-bottom:0; }
.feed-toggle { display:inline-flex; border:1px solid var(--border); border-radius:7px; overflow:hidden; background:var(--card-a); }
.feed-toggle .ft-opt { padding:4px 12px; font-size:12.5px; font-weight:600; color:var(--muted); text-decoration:none; border-left:1px solid var(--border); }
.feed-toggle .ft-opt:first-child { border-left:0; }
.feed-toggle .ft-opt:hover { color:var(--text); }
.feed-toggle .ft-opt.on { background:var(--accent); color:#fff; }
.feed-item { display:flex; gap:11px; padding:12px 14px; text-decoration:none; color:var(--text);
  border:1px solid var(--border); border-radius:11px; background:var(--panel-a); margin-bottom:8px; }
.feed-item:hover { border-color:var(--accent-bd); }
.feed-av { flex:0 0 auto; width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:12px; font-weight:800; }
.feed-c { min-width:0; flex:1; }
.feed-line { font-size:13.5px; color:var(--text); line-height:1.45; }
/* whole status line is a link to the status permalink (click a status to open/share it) */
a.feed-line.feed-open { display:block; flex:1 1 auto; min-width:0; text-decoration:none; color:inherit; cursor:pointer; }
a.feed-line.feed-open:hover .fc-status { text-decoration:underline; }
.feed-line b { font-weight:700; }
.feed-verb { color:var(--muted); }
.feed-fld { color:var(--text); font-weight:600; }
.feed-title { font-weight:600; }
.feed-app { display:inline-block; margin-left:6px; font-size:11px; font-weight:600; color:var(--accent-fg);
  background:var(--accent-soft); border:1px solid var(--accent-bd); border-radius:999px; padding:1px 8px; }
.feed-body { font-size:13.5px; color:var(--text); line-height:1.5; margin-top:4px; white-space:pre-wrap; word-break:break-word; }
.feed-change { font-size:13px; margin-top:4px; }
.feed-change .ov { color:var(--muted); text-decoration:line-through; }
.feed-change .arr { color:var(--dim); margin:0 4px; }
.feed-change .nv { color:var(--text); font-weight:600; }
.feed-meta { font-size:11.5px; color:var(--dim); margin-top:5px; }

/* ---- Podio-style activity cards (header + events + comments + composer) ---- */
.feed-card { border:1px solid var(--border); border-radius:11px; background:var(--panel-a); margin-bottom:12px; padding:14px 16px; }
.feed-card:hover { border-color:var(--border-2); }
/* post (Share composer) */
.feed-card-h { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
/* Share a status (native share sheet on mobile, copy-link on desktop) — small subtle icon */
.fc-share { background:none; border:0; color:var(--dim); cursor:pointer; padding:2px; margin:0; min-height:0; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; line-height:1; position:relative; flex:none; opacity:.65; }
.fc-share svg { width:15px; height:15px; }
.fc-share:hover, .fc-share:active { color:var(--text); opacity:1; background:none; }
.fc-share.shared::after { content:'Copied'; position:absolute; top:calc(100% + 4px); right:0; background:#333; color:#fff; font-size:11px; padding:2px 7px; border-radius:6px; white-space:nowrap; z-index:5; }
@media (max-width:820px){ .fc-share { min-height:0; padding:3px; } .fc-share svg { width:16px; height:16px; } }
.fc-like { background:none; border:0; color:var(--dim); cursor:pointer; padding:2px 4px; margin:0; min-height:0; border-radius:6px; display:inline-flex; align-items:center; gap:3px; line-height:1; flex:none; opacity:.65; font:inherit; }
.fc-like .heart { font-size:15px; line-height:1; }
.fc-like .likec { font-size:12px; }
.fc-like:hover, .fc-like.liked { opacity:1; color:#e0245e; }
.fc-like:disabled { cursor:default; }
.fc-c-like { margin-top:3px; padding:2px 0; opacity:.55; }
.fc-c-like .heart { font-size:13px; }
.fc-c-like .likec { font-size:11px; }

/* object header */
.fc-head { margin-bottom:4px; }
.fc-title { display:inline-block; text-decoration:none; color:var(--accent-fg); font-size:15px; font-weight:600; line-height:1.35; }
.fc-title:hover { text-decoration:underline; }
.fc-sub { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:3px; font-size:12px; color:var(--muted); }
.fc-app { font-size:11px; font-weight:600; color:var(--accent-fg); background:var(--accent-soft); border:1px solid var(--accent-bd); border-radius:999px; padding:1px 8px; }
.fc-by { color:var(--muted); }
.fc-time { color:var(--dim); font-size:11.5px; }

/* activity events list (edited this / commented on this) */
.fc-events { margin-top:10px; display:flex; flex-direction:column; gap:6px; }
.fc-ev { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text); }
.fc-ev-ic { flex:0 0 auto; width:15px; height:15px; color:var(--dim); display:inline-flex; }
.fc-ev-ic svg { width:15px; height:15px; }
.fc-ev-ic.comment { color:var(--muted); }
.fc-ev-tx b { font-weight:700; }
.fc-ev.muted { color:var(--muted); }
.fc-earlier { color:var(--muted); text-decoration:none; }
.fc-show { color:var(--accent-fg); }
.fc-hidden { display:none !important; }
.fc-toggle { background:none; border:0; padding:0; margin:0; font:inherit; cursor:pointer; text-align:left; color:inherit; }
button.fc-ev-toggle { display:flex; align-items:center; gap:8px; }
.fc-ev-toggle:hover .fc-show { text-decoration:underline; }
.fc-cmt-toggle { color:var(--muted); font-weight:600; }
.fc-cmt-toggle:hover { text-decoration:underline; }

/* comments block */
.fc-cbar { display:flex; align-items:center; gap:8px; margin:12px -16px 0; padding:9px 16px; background:var(--panel-b);
  border-top:1px solid var(--hairline); border-bottom:1px solid var(--hairline); font-size:12.5px; color:var(--muted); font-weight:600; }
.fc-cbar-ic { width:15px; height:15px; display:inline-flex; color:var(--dim); } .fc-cbar-ic svg { width:15px; height:15px; }
.fc-cbar a { color:var(--muted); text-decoration:none; } .fc-cbar a:hover { text-decoration:underline; }
.fc-comments { display:flex; flex-direction:column; gap:14px; padding:14px 0 2px; }
.fc-c { display:flex; gap:10px; align-items:flex-start; }
.fc-c-av { flex:0 0 auto; width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:11px; font-weight:800; }
.fc-c-main { min-width:0; flex:1; }
.fc-c-h { font-size:13px; } .fc-c-h b { font-weight:700; margin-right:7px; }
.fc-c-body { font-size:13.5px; line-height:1.55; color:var(--text); margin-top:2px; word-break:break-word; white-space:pre-wrap; }
.fc-c-body a { color:var(--accent-fg); }
.fc-c-edit { margin-left:6px; background:none; border:0; padding:0; cursor:pointer; color:var(--dim); opacity:.55; vertical-align:middle; }
.fc-c-edit:hover { opacity:1; color:var(--accent-fg); }
.fc-c-delform { display:inline; }
.fc-c-del:hover { opacity:1; color:#f87171; }
.st-edit-form { margin-top:6px; }

/* comment composer (textarea + toolbar + Enter-to-send toggle) */
.cc { margin-top:14px; }
.cc.drag-over .cc-text, .cc.drag-over .cmt-compose { outline:2px dashed var(--accent-bd); outline-offset:2px; background:var(--accent-soft); }
.cc-text { width:100%; box-sizing:border-box; min-height:40px; background:var(--input-bg); border:1px solid var(--border-2);
  color:var(--text); border-radius:8px; padding:10px 12px; font:inherit; font-size:13.5px; line-height:1.5; resize:none; overflow-y:auto; max-height:40vh; }
.cc-text:focus { outline:none; border-color:var(--accent-bd); background:var(--panel-b); }
.cc-bar { display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.cc-tools { display:flex; align-items:center; gap:12px; }
.cc-tool { display:inline-flex; align-items:center; color:var(--dim); opacity:.5; cursor:default; user-select:none; }
.cc-tool svg { width:16px; height:16px; display:block; }
.cc-send { display:flex; align-items:center; gap:12px; }
.cc-btn { background:var(--accent); color:#fff; border:0; border-radius:999px; padding:8px 18px; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.cc-btn:hover { filter:brightness(1.05); }
/* uploading state: spinning progress circle + "Uploading NN%" */
.cc-btn.sending { display:inline-flex; align-items:center; gap:8px; opacity:.9; cursor:progress; }
.cc-btn.sending::before { content:''; width:14px; height:14px; border-radius:50%; border:2px solid rgba(255,255,255,.4); border-top-color:#fff; animation:ccspin .7s linear infinite; }
@keyframes ccspin { to { transform:rotate(360deg); } }
/* clickable email fields (mailto → Apple Mail) */
.mailto { color:var(--accent-fg); text-decoration:none; }
.mailto:hover { text-decoration:underline; }
.email-edit { display:inline-flex; align-items:center; gap:8px; width:100%; }
.email-edit .inline-edit { flex:1 1 auto; min-width:0; }
.mailto-ico { flex:none; text-decoration:none; color:var(--muted); font-size:16px; line-height:1; }
.mailto-ico:hover { color:var(--accent-fg); }
.cc-enter { display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.cc-enter input { margin:0; width:15px; height:15px; accent-color:var(--accent); cursor:pointer; }
.cc-enter-ic { width:17px; height:17px; color:var(--dim); display:inline-flex; }
.cc-enter-ic svg { width:17px; height:17px; }
.cc.enter-on .cc-enter-ic { color:var(--accent-fg); }

/* ============ Workspace tiles (Podio dashboard widgets) ============ */
.ws-tiles { display:flex; flex-direction:column; gap:14px; }
.tile { background:var(--panel-a); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.tile-h { font-size:14px; font-weight:700; color:var(--text); padding:13px 15px 10px; border-bottom:1px solid var(--hairline); }
.tile-body { padding:13px 15px; font-size:13.5px; line-height:1.6; color:var(--text); word-break:break-word; }
.tile-body a { color:var(--link); }
.tile-links { padding:11px 15px; display:flex; flex-direction:column; gap:8px; }
.tile-links a { color:var(--link); font-size:13.5px; text-decoration:none; word-break:break-all; }
.tile-links a:hover { text-decoration:underline; }
.tile-img { background:#2b2b2b; display:flex; align-items:center; justify-content:center; }
.tile-img img { display:block; max-width:100%; height:auto; }
/* Tile header lays out title + admin action icons; icons reveal on tile hover. */
.tile-h { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tile-h-title { flex:1; min-width:0; }
.tile-h-actions { display:flex; align-items:center; gap:1px; flex:none; opacity:0; transition:opacity .12s; }
.tile:hover .tile-h-actions, .tile-h-actions:focus-within { opacity:1; }
.tile-h-actions form { margin:0; display:inline-flex; }
.tile-ic { display:inline-flex; align-items:center; justify-content:center; background:transparent; border:none; cursor:pointer;
  padding:4px; border-radius:6px; line-height:0; color:var(--muted); opacity:.8; }
.tile-ic:hover { opacity:1; background:var(--hover); color:var(--text); }
.licon { display:block; }
/* List tiles: each line is its own row. */
.tile-lines { display:flex; flex-direction:column; gap:7px; }
.tile-line { word-break:break-word; }
.tile-line a { color:var(--link); }
/* Inline editor (admin). */
.tile-editor { border-top:1px solid var(--hairline); padding:12px 13px; display:flex; flex-direction:column; gap:8px; }
.tile-edit-title, .tile-edit-row input, .tile-edit-filewrap input { width:100%; border:1px solid var(--border); border-radius:8px;
  padding:8px 10px; font-size:13.5px; font-family:inherit; background:var(--input-bg); color:var(--text); }
.tile-edit-lines { display:flex; flex-direction:column; gap:6px; }
.tile-edit-row { display:flex; align-items:center; gap:6px; }
.tile-edit-row input { flex:1; min-width:0; }
.tile-line-add { align-self:flex-start; display:inline-flex; align-items:center; gap:5px; background:transparent; border:1px dashed var(--border-2);
  border-radius:7px; padding:5px 10px; font-size:12.5px; font-weight:700; color:var(--muted); cursor:pointer; font-family:inherit; }
.tile-line-add:hover { border-color:var(--accent-bd); color:var(--accent-fg); }
.tile-edit-hint { font-size:11.5px; color:var(--muted); }
.tile-edit-filewrap { display:flex; flex-direction:column; gap:5px; }
.tile-edit-actions { display:flex; gap:8px; margin-top:2px; }

/* ============ Workspace members row + Share composer + Add Tile ============ */
.ws-members { margin-bottom:14px; }
.ws-members-h { font-size:16px; margin-bottom:9px; color:var(--text); }
.ws-members-h b { font-weight:800; }
.ws-mcount { color:var(--muted); font-weight:600; margin-left:5px; }
.ws-avatars { display:flex; flex-wrap:wrap; }
.ws-av { width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-size:11.5px; font-weight:800; border:2px solid var(--panel-b); margin-left:-5px; }
.ws-av:first-child { margin-left:0; }
.ws-av-more { background:var(--thumb) !important; color:var(--muted); }

.ws-composer { background:var(--panel-a); border:1px solid var(--border); border-radius:12px; padding:12px 14px; margin-bottom:18px; }
.ws-composer textarea { width:100%; border:none; background:transparent; resize:vertical; min-height:42px; font-size:14.5px;
  color:var(--text); font-family:inherit; outline:none; }
.ws-composer textarea::placeholder { color:var(--muted); }
.ws-composer-foot { display:flex; justify-content:flex-end; margin-top:8px; }

.tile-add { margin-top:2px; }
.tile-add-btn { width:100%; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:13px; border:1.5px dashed var(--border-2);
  background:transparent; border-radius:12px; color:var(--muted); font-size:13.5px; font-weight:700; cursor:pointer; }
.tile-add-btn:hover { border-color:var(--accent-bd); color:var(--accent-fg); background:var(--hover); }
.tile-add-form { background:var(--panel-a); border:1px solid var(--border); border-radius:12px; padding:13px; display:flex; flex-direction:column; gap:9px; }
.tile-add-form select, .tile-add-form input, .tile-add-form textarea { width:100%; border:1px solid var(--border); border-radius:8px;
  padding:9px 11px; font-size:13.5px; font-family:inherit; background:var(--input-bg); color:var(--text); }
.tile-add-form textarea { resize:vertical; min-height:72px; }
.tile-add-actions { display:flex; gap:8px; }

/* ============ Workspace members actions (Invite + Settings gear) ============ */
.ws-members-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.ws-members-actions { display:flex; align-items:center; gap:6px; }
.ws-iconbtn { width:32px; height:32px; border:1px solid var(--border-2); background:var(--panel-b); border-radius:8px; color:var(--muted); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.ws-iconbtn:hover { color:var(--text); border-color:var(--accent-bd); }
.ws-invitebtn { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--border-2); background:var(--panel-b); border-radius:8px; color:var(--accent-fg); font-size:13px; font-weight:700; padding:6px 12px; cursor:pointer; }
.ws-invitebtn:hover { background:var(--hover); border-color:var(--accent-bd); }
.ws-gear-wrap { position:relative; }
.ws-gearmenu { position:absolute; right:0; top:calc(100% + 6px); width:224px; background:var(--panel-a); border:1px solid var(--border); border-radius:10px; box-shadow:0 12px 30px rgba(0,0,0,.14); padding:5px; z-index:40; display:flex; flex-direction:column; }
.ws-gearmenu form { margin:0; }
.ws-gm-item { display:block; width:100%; text-align:left; background:none; border:none; padding:9px 11px; border-radius:7px; font-size:13.5px; color:var(--text); cursor:pointer; font-family:inherit; }
.ws-gm-item:hover { background:var(--sidebar-hover); }
.ws-gm-item.danger { color:#e04747; }
.ws-gm-item.danger:hover { background:rgba(239,68,68,.1); }
.ws-gm-div { height:1px; background:var(--hairline); margin:5px 4px; }
.ws-invite-form { display:flex; gap:8px; margin-top:10px; }
.ws-invite-form input { flex:1; border:1px solid var(--border); border-radius:8px; padding:8px 11px; font-size:13.5px; background:var(--input-bg); color:var(--text); }
.ws-members-manage { margin-top:12px; border:1px solid var(--border); border-radius:10px; background:var(--panel-a); padding:8px; }
.ws-mm-h { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); padding:4px 6px 8px; }
.ws-mm-list { max-height:300px; overflow-y:auto; }
.ws-mm-row { display:flex; align-items:center; gap:9px; padding:5px 6px; border-radius:7px; }
.ws-mm-row:hover { background:var(--sidebar-hover); }
.ws-mm-row .ws-av { margin-left:0; width:28px; height:28px; }
.ws-mm-row form { margin:0; }
.ws-mm-name { flex:1; font-size:13.5px; color:var(--text); }
.ws-mm-x { display:inline-flex; align-items:center; justify-content:center; background:none; border:none; color:var(--muted); cursor:pointer; line-height:0; padding:5px; border-radius:6px; }
.ws-mm-x:hover { background:rgba(239,68,68,.12); color:#e04747; }

/* ============ Item list: Table/Badge view toggle + Badge (card) view ============ */
.viewtoggle { display:inline-flex; border:1px solid var(--border-2); border-radius:8px; overflow:hidden; }
.vtbtn { border:none; background:var(--panel-b); color:var(--muted); padding:6px 11px; font-size:14px; cursor:pointer; line-height:1; }
.vtbtn:not(:last-child) { border-right:1px solid var(--border-2); }
.vtbtn:hover { color:var(--text); }
.vtbtn.on { background:var(--accent-soft); color:var(--accent-fg); }
.badge-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; }
.badge-card { display:flex; flex-direction:column; gap:9px; padding:15px 16px; text-decoration:none; background:var(--panel-a);
  border:1px solid var(--border); border-radius:12px; transition:border-color .12s, transform .12s; }
.badge-card:hover { border-color:var(--accent-bd); transform:translateY(-2px); }
.badge-title { font-size:15.5px; font-weight:700; color:var(--text); line-height:1.35; }
.badge-fields { display:flex; flex-direction:column; gap:7px; }
.badge-f { display:flex; flex-direction:column; gap:1px; }
.badge-k { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--dim); }
.badge-v { font-size:13.5px; color:var(--text); line-height:1.4; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.badge-foot { margin-top:auto; font-size:12px; color:var(--muted); padding-top:4px; border-top:1px solid var(--hairline); }
.badge-empty { grid-column:1/-1; text-align:center; color:var(--muted); padding:40px; }

/* ============ Item prev/next navigation arrows (Podio-style) ============ */
.item-nav { position:fixed; top:50%; transform:translateY(-50%); z-index:45; width:42px; height:66px;
  display:flex; align-items:center; justify-content:center; font-size:30px; line-height:1; color:var(--muted);
  background:var(--panel-a); border:1px solid var(--border); text-decoration:none; transition:color .12s, border-color .12s; }
.item-nav:hover { color:var(--accent-fg); border-color:var(--accent-bd); background:var(--panel-b); }
.item-nav-prev { left:6px; border-radius:12px; }
.item-nav-next { right:6px; border-radius:12px; }
/* extra side gutter on the item page so the prev/next arrows never overlap the content */
.item-page header.top, .item-page .detail { padding-left:38px; padding-right:38px; }
@media (max-width:960px){ .item-page header.top, .item-page .detail { padding-left:0; padding-right:0; } }
@media (max-width:960px){ .item-nav { display:none; } }

/* ============ Podio-style Views sidebar (split-by views, Team/Private, wrench) ============ */
.filters .fh { display:flex; align-items:center; justify-content:space-between; }
.vtabs { display:flex; gap:2px; margin:10px 0 8px; border-bottom:1px solid var(--border); }
.vtab { background:none; border:none; padding:7px 12px; font-size:13px; font-weight:700; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; }
.vtab.on { color:var(--accent-fg); border-bottom-color:var(--accent); }
.allview { font-weight:700; }
.addviewform { display:flex; flex-direction:column; gap:6px; background:var(--panel-a); border:1px solid var(--border); border-radius:10px; padding:11px; margin:8px 0; }
.avf-l { font-size:12px; font-weight:700; color:var(--muted); }
.addviewform input, .addviewform select { border:1px solid var(--border); border-radius:8px; padding:8px 10px; font-size:13.5px; background:var(--input-bg); color:var(--text); font-family:inherit; width:100%; }
.avf-scope { display:flex; gap:14px; font-size:13px; color:var(--text); align-items:center; }
.avf-actions { display:flex; gap:8px; margin-top:2px; }
.viewgroup { margin-top:13px; }
.viewgroup-h { display:flex; align-items:center; justify-content:space-between; padding:2px 2px 5px; }
.vg-name { font-size:13px; font-weight:800; color:var(--accent-fg); }
.vg-wrap { position:relative; }
.vg-wrench { background:none; border:none; cursor:pointer; opacity:.45; font-size:12px; padding:2px 4px; }
.viewgroup-h:hover .vg-wrench { opacity:1; }
.vg-menu { position:absolute; right:0; top:calc(100% + 4px); width:172px; background:var(--panel-a); border:1px solid var(--border); border-radius:9px; box-shadow:0 10px 26px rgba(0,0,0,.14); padding:4px; z-index:30; }
.vg-menu form { margin:0; }
.vg-mi { display:block; width:100%; text-align:left; background:none; border:none; padding:8px 10px; border-radius:6px; font-size:13px; color:var(--text); cursor:pointer; font-family:inherit; }
.vg-mi:hover { background:var(--sidebar-hover); }
.vg-mi.danger { color:#e04747; }
.vg-owner { font-size:11px; color:var(--dim); padding:6px 10px 3px; border-top:1px solid var(--hairline); margin-top:3px; font-style:italic; }
.facetval.on { background:var(--accent-soft); border-radius:6px; }

/* ============ Podio-style Filter panel (field list -> values) ============ */
.filterpanel { background:var(--panel-a); border:1px solid var(--border); border-radius:12px; margin-bottom:12px; overflow:hidden; }
.fp-head { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--hairline); }
.fp-title { font-size:14px; font-weight:800; color:var(--text); display:flex; align-items:center; gap:8px; }
.fp-count { background:var(--dim); color:#fff; font-size:11px; font-weight:800; border-radius:50%; width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; }
.fp-clear { color:var(--link); font-size:13px; font-weight:600; text-decoration:none; }
.fp-clear:hover { text-decoration:underline; }
.fp-applied { display:flex; flex-wrap:wrap; gap:7px; padding:11px 16px; border-bottom:1px solid var(--hairline); }
.fp-body { display:flex; min-height:220px; max-height:360px; }
.fp-fields { flex:0 0 220px; border-right:1px solid var(--hairline); overflow-y:auto; padding:6px; }
.fp-field { display:block; width:100%; text-align:left; background:none; border:none; padding:10px 12px; border-radius:8px; font-size:13.5px; color:var(--text); cursor:pointer; font-family:inherit; }
.fp-field:hover { background:var(--sidebar-hover); }
.fp-field.on { background:var(--accent-soft); color:var(--accent-fg); font-weight:700; }
.fp-values { flex:1; overflow-y:auto; padding:12px 16px; }
.fp-vempty { color:var(--dim); font-size:13px; padding:20px 4px; }
.fp-vopt { display:flex; align-items:center; gap:9px; padding:7px 8px; border-radius:8px; cursor:pointer; font-size:13.5px; color:var(--text); }
.fp-vopt:hover { background:var(--sidebar-hover); }
.fp-vopt.on { background:var(--accent-soft); }
.fp-vopt input { margin:0; }
.fp-vname { flex:1; }
.fp-vfree { display:flex; flex-direction:column; gap:9px; }
.fp-vin { border:1px solid var(--border); border-radius:8px; padding:9px 11px; font-size:13.5px; background:var(--input-bg); color:var(--text); }
.fp-vfree-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* ---- view filter condition rows (Only show items where …) ---- */
.vf-rows { display:flex; flex-direction:column; gap:6px; }
.vf-row { display:flex; align-items:center; gap:6px; }
.vf-row select { flex:1; min-width:0; border:1px solid var(--border); border-radius:7px; padding:6px 8px; font-size:12.5px; background:var(--input-bg); color:var(--text); font-family:inherit; }
.vf-is { font-size:12px; color:var(--muted); flex:0 0 auto; }
.vf-rm { background:none; border:none; color:var(--muted); cursor:pointer; font-size:15px; padding:0 4px; flex:0 0 auto; }
.vf-rm:hover { color:#e04747; }
.vf-addrow { align-self:flex-start; background:none; border:none; color:var(--link); font-size:12.5px; font-weight:600; cursor:pointer; padding:2px 0; }
a.vg-name { text-decoration:none; }
a.vg-name:hover { text-decoration:underline; }

/* ---- Actions dropdown: grouped sections ---- */
.act-sec { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--dim); padding:9px 14px 3px; }
.actions-menu form { margin:0; }
.actions-menu label.act-item { cursor:pointer; display:block; }

/* Unified team avatar initials text style — 2026-09-01 (Bebas Neue) */
.avatar, .avatar.lg, .cmt-av, .cmt-av.chg, .pc-avatar, .pc-avatar.lg, .act-avatar, .notif-av, .belln-av, .mention-av,
.feed-av, .fc-c-av, .ws-av, .nt-av, .notif-part, .sr-av {
  font-family: "Bebas Neue", "Lato", sans-serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* avatar fill sizes — 2026-09-01 (Bebas nearly fills circle) */
.avatar { font-size: 19px; letter-spacing: 0; }
.avatar.lg { font-size: 26px; }
.cmt-av { font-size: 19px; letter-spacing: 0; }
.cmt-av.chg { font-size: 19px; }
.act-avatar { font-size: 22px; }
.notif-av { font-size: 23px; }
.belln-av { font-size: 22px; }
.pc-avatar { font-size: 60px; }
.pc-avatar.lg { font-size: 70px; }
/* 3-letter initials need a smaller face to fit the profile circle */
.pc-avatar.ini3 { font-size: 40px; letter-spacing: 0; }
.pc-avatar.lg.ini3 { font-size: 46px; letter-spacing: 0; }
.mention-av { font-size: 14px; }
.feed-av { font-size: 20px; letter-spacing: 0; }
.fc-c-av { font-size: 19px; letter-spacing: 0; }
.ws-av { font-size: 21px; letter-spacing: 0; }
.nt-av { font-size: 17px; letter-spacing: 0; }
.notif-part { font-size: 11px; letter-spacing: 0; }
.sr-av { font-size: 21px; letter-spacing: 0; }

/* comment gifs/images — 2026-09-01 */
.cmt .body .cmt-gif { max-width:220px; max-height:220px; border-radius:10px; margin-top:6px; display:block; }

/* :: giphy picker — 2026-09-01 */
.gif-menu { position:absolute; left:0; bottom:calc(100% + 4px); width:100%; max-height:300px; overflow-y:auto; background:var(--panel-a); border:1px solid var(--border-2); border-radius:9px; box-shadow:0 -8px 30px rgba(0,0,0,.3); z-index:31; padding:8px; }
.gif-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; }
.gif-pick { width:100%; height:82px; object-fit:cover; border-radius:6px; cursor:pointer; background:var(--panel-b); }
.gif-pick:hover { outline:2px solid var(--accent); }
.gif-msg { padding:14px; text-align:center; color:var(--muted); font-size:13px; }
.gif-attrib { text-align:right; font-size:10px; color:var(--muted); padding:4px 2px 0; }

/* global UI scale (baked-in zoom so no manual browser zoom needed) — 2026-09-01 */
html { zoom: 1.4; }

/* centered confirm dialog — 2026-09-01 */
.cfm-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.55); display:flex; align-items:center; justify-content:center; z-index:200; }
.cfm-backdrop[hidden] { display:none; }
.cfm { width:min(440px,92vw); background:var(--card-a); border:1px solid var(--border-2); border-radius:16px; box-shadow:0 24px 70px rgba(0,0,0,.45); padding:22px 22px 18px; }
.cfm-msg { font-size:15px; color:var(--text); line-height:1.5; white-space:pre-line; margin-bottom:18px; }
.cfm-actions { display:flex; justify-content:flex-end; gap:10px; }
.cfm-cancel { background:var(--input-bg); color:var(--text); border:1px solid var(--border-2); border-radius:999px; padding:9px 20px; font:inherit; font-size:14px; font-weight:600; cursor:pointer; }
.cfm-ok { background:var(--accent); color:#fff; border:0; border-radius:999px; padding:9px 22px; font:inherit; font-size:14px; font-weight:600; cursor:pointer; }

/* applied filter chip bar (top) — 2026-09-01 */
.applied-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:8px 2px 4px; }
.applied-bar .applied-lbl { font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; margin-right:2px; }
.applied-bar .fchip { display:inline-flex; align-items:center; gap:6px; background:var(--accent-soft); border:1px solid var(--accent-bd); color:var(--text); border-radius:999px; padding:4px 10px; font-size:12.5px; }
.applied-bar .fchip a { text-decoration:none; color:var(--muted); font-weight:700; font-size:14px; line-height:1; }
.applied-bar .fchip a:hover { color:var(--text); }
.applied-clear { font-size:12px; color:var(--accent); text-decoration:none; margin-left:4px; }

/* filter summary (X of Y + Show all) — 2026-09-01 */
.filtsummary { font-size:13px; color:var(--muted); font-weight:600; margin:0 2px; }
.showall { font-size:13px; color:var(--accent); text-decoration:none; }
.showall:hover { text-decoration:underline; }

/* Search results — Podio-style rows + type facets  (2026-09-01) */
.srch-layout { display:flex; gap:30px; align-items:flex-start; }
.srch-results { flex:1 1 auto; min-width:0; max-width:840px; display:flex; flex-direction:column; }
.sr-row { display:flex; gap:13px; padding:14px 6px; text-decoration:none; color:var(--text); border-bottom:1px solid var(--hairline); }
.sr-row:hover { background:var(--hover); }
.sr-av { flex:0 0 auto; display:inline-grid; place-items:center; width:34px; height:34px; border-radius:50%; color:#fff; font-size:13px; font-weight:800; margin-top:2px; }
.sr-body { display:flex; flex-direction:column; gap:3px; min-width:0; }
.sr-title { font-size:14.5px; font-weight:600; color:var(--link); line-height:1.3; }
.sr-row:hover .sr-title { text-decoration:underline; }
.sr-snip { font-size:12.5px; color:var(--muted); line-height:1.45; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.sr-meta { font-size:11.5px; color:var(--dim); margin-top:2px; }
.sr-meta b { color:var(--muted); font-weight:700; }
/* finished-status chip on search results (Solved / Closed / Complete…) — muted so active items read first */
.sr-done { display:inline-block; font-size:10.5px; font-weight:700; color:var(--muted); background:var(--input-bg);
  border:1px solid var(--border-2); border-radius:999px; padding:0 7px; margin-right:4px; vertical-align:1px; }
.sr-ws { color:var(--accent-fg); font-weight:600; }
.sr-title mark, .sr-snip mark { background:#fde68a; color:#3a2f00; border-radius:2px; padding:0 1px; }
.sr-more { font-size:12px; color:var(--muted); padding:12px 6px; }
.sr-group { margin-bottom:14px; }
.sr-group-h { display:flex; align-items:center; gap:10px; padding:9px 6px 6px; border-bottom:2px solid var(--border); position:sticky; top:0; background:var(--bg); z-index:1; }
.sr-group-ws { font-size:13px; font-weight:700; color:var(--accent-fg); }
.sr-group-c { font-size:11px; font-weight:700; color:var(--muted); background:var(--panel-b); border-radius:10px; padding:1px 8px; }
.sr-group-only { margin-left:auto; font-size:11.5px; font-weight:600; color:var(--accent-fg); text-decoration:none; }
.sr-group-only:hover { text-decoration:underline; }
.srch-facets { flex:0 0 214px; position:sticky; top:14px; }
.fac-h { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--dim); margin:0 0 8px; padding-bottom:8px; border-bottom:1px solid var(--border); }
.fac-h-sub { margin-top:18px; }
.fac-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 9px; border-radius:8px; text-decoration:none; color:var(--text); font-size:13px; }
.fac-row:hover { background:var(--hover); }
.fac-row.on { background:var(--accent-soft); border:1px solid var(--accent-bd); }
.fac-n { display:flex; flex-direction:column; line-height:1.25; min-width:0; }
.fac-n .sr-ws, .fac-ws { font-size:10.5px; color:var(--dim); font-weight:400; }
.fac-c { flex:0 0 auto; font-size:12px; color:var(--muted); font-weight:700; }
@media (max-width:820px){ .srch-layout { flex-direction:column; } .srch-facets { position:static; flex-basis:auto; width:100%; } }

/* ---------- @mentions ---------- */
/* The chip in rendered bodies. Blue reads as a link-ish reference in both themes; the
   group chip is green so "@partners hit 6 people" is distinguishable at a glance. */
.mention { color:var(--mention-fg); background:var(--mention-bg); border-radius:3px;
  padding:0 3px; font-weight:600; white-space:nowrap; }
/* Workspace/personal-space mentions (which is how a person tag often resolves) render like a
   normal @mention — no boxed outline around the name (Josh: the boxes are unwanted). */
.mention-ico { font-size:.85em; margin-right:3px; vertical-align:baseline; }

/* menu additions only - .mention-menu/.mention-opt/.mention-av are already themed above */
.mention-av.grp { background:var(--mention-grp-fg); }
.mention-nm { flex:1; }
.mention-grp { color:var(--muted); font-size:11px; }
/* picker: clearly label whether an option is a Person or a Workspace/Group */
.mention-kind { font-size:10.5px; font-weight:700; letter-spacing:.03em; padding:2px 7px; border-radius:999px; white-space:nowrap; }
.mention-kind.person { color:var(--muted); background:var(--panel-b); }
.mention-kind.team { color:var(--mention-grp-fg); background:var(--mention-grp-bg); box-shadow:inset 0 0 0 1px var(--mention-grp-fg); }
.mention-opt.is-team { background:var(--mention-grp-bg); }
.mention-opt.is-team.on, .mention-opt.is-team:hover { background:var(--mention-grp-bg); box-shadow:inset 3px 0 0 var(--mention-grp-fg); }
/* the two composers that were not already positioning contexts for the popup */
.ws-composer, form.cc { position:relative; }

/* ---------- attachments on statuses and comments ---------- */
.att-list { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 2px; }
.att-img { display:block; line-height:0; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.att-img img { max-width:220px; max-height:220px; object-fit:cover; }
.att-file { display:inline-flex; align-items:center; gap:7px; max-width:320px; padding:6px 10px;
  border:1px solid var(--border); border-radius:8px; background:var(--panel-b); color:var(--text);
  font-size:12.5px; text-decoration:none; }
.att-file:hover { border-color:var(--accent-bd); }
.att-ic { color:var(--muted); display:flex; }
.att-file .att-nm { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.att-file .att-sz { color:var(--muted); flex:0 0 auto; }

/* files chosen in a composer but not sent yet */
.att-picked { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 0; }
.att-chip { display:inline-flex; align-items:center; gap:6px; padding:3px 6px 3px 9px;
  background:var(--accent-soft); border:1px solid var(--accent-bd); border-radius:999px;
  font-size:12px; color:var(--text); }
.att-chip .att-nm { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.att-chip .att-sz { color:var(--muted); }
.att-x { border:0; background:none; cursor:pointer; color:var(--muted); font-size:15px; line-height:1; padding:0 2px; }
.att-x:hover { color:#d9534f; }

/* the paperclip is a real control now, not a disabled hint */
label.cc-tool { cursor:pointer; }
label.cc-tool:hover { color:var(--accent-fg); }
.ws-composer-foot { display:flex; align-items:center; gap:10px; }
.ws-composer-foot .spacer { flex:1; }

/* Posting a reply returns you to that card's anchor. Keep it clear of the sticky
   header so the card lands in view instead of tucked under the top bar. */
.feed-card { scroll-margin-top: 84px; }

/* =====================================================================
   MOBILE (iPhone / ≤820px) — additive, desktop untouched.
   Phase 1: foundation only (installable app shell, no-zoom inputs,
   safe-area, touch sizing). Nav/item/list treatments land in later phases.
   ===================================================================== */

/* Never let iOS rescale our type on rotation. */
html { -webkit-text-size-adjust: 100%; }

@media (max-width: 820px) {
  /* Desktop bakes in `html { zoom: 1.4 }` for readability on big screens. On a
     phone that scales EVERYTHING 1.4x (icons, type, spacing) — the single biggest
     reason mobile felt oversized and "desktop-shoehorned". Reset to true 1:1. */
  html { zoom: 1; }

  /* Tighter side gutters; keep bottom room so content clears the (P2) tab bar
     and the iOS home indicator. */
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  /* 16px is the threshold below which iOS Safari auto-zooms on focus.
     Force every focusable form control to 16px so tapping a field never
     zooms the viewport. */
  input, textarea, select,
  .compose textarea, .wsmenu-search input, .nav-search input {
    font-size: 16px;
  }

  /* Comfortable thumb targets for primary tap controls. */
  button, .btn, a.btn, input[type="submit"] { min-height: 44px; }

  /* Kill the grey tap flash; we style :active states ourselves. */
  a, button { -webkit-tap-highlight-color: rgba(0,0,0,0); }
}

/* ---------- P2: navigation (bottom tab bar + full-screen sheets) ---------- */
/* Hidden on desktop; only shown inside the ≤820px query below. */
.mobilebar { display: none; }
.mobile-only { display: none; }
.sheet-head { display: none; }
.sheet-x { display: none; }

@media (max-width: 820px) {
  /* --- Slim top bar: keep brand + workspace switcher, drop the rest --- */
  .topnav { gap: 8px; padding-top: max(6px, env(safe-area-inset-top)); }
  .topnav .nav-search { display: none; }              /* revealed via Search tab */
  /* Hide the top-right triggers (bell/theme/avatar) — they live in the tabs / Me
     sheet now. IMPORTANT: hide the buttons only, NOT .acct-wrap / .bell-wrap: the
     acctMenu and bellMenu sheets live inside those wraps, so a display:none wrap
     would keep the sheet hidden even when opened. */
  .topnav #bellBtn, .topnav #themeBtn, .topnav #acctBtn { display: none; }
  .topnav .nav-left { flex: 1 1 auto; min-width: 0; }
  .wsswitch-wrap { flex: 1 1 auto; min-width: 0; }
  .wsswitch { width: 100%; }

  /* --- Bottom tab bar --- */
  .mobilebar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    background: var(--nav-bg, var(--panel-a));
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 14px rgba(0,0,0,.10);
    -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px);
  }
  .mbtab {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 7px 2px 5px; min-height: 50px; margin: 3px 5px;
    background: none; border: 0; border-radius: 14px; color: var(--muted); text-decoration: none;
    font: inherit; font-size: 10.5px; letter-spacing: .1px; cursor: pointer;
    -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
    transition: background .12s ease, transform .07s ease, color .12s ease;
  }
  .mbtab .mbtab-lbl { line-height: 1; }
  /* immediate tap feedback: the tab fills with a soft accent pill and presses in,
     so it's obvious the tap registered even before the sheet/page appears. */
  .mbtab:active { color: var(--accent-fg, var(--accent)); background: var(--accent-soft); transform: scale(.9); }
  /* the current section stays highlighted so you always know where you are. */
  .mbtab.on { color: var(--accent-fg, var(--accent)); background: var(--accent-soft); }
  .mbtab-ico { position: relative; display: inline-flex; }
  .mb-badge {
    position: absolute; top: -5px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--nav-bg, var(--panel-a));
  }

  /* --- Search tab: reveal the global search as a full-width bar --- */
  body.mb-search .topnav .nav-search {
    display: flex; position: fixed; left: 0; right: 0; top: calc(48px + env(safe-area-inset-top));
    margin: 0; max-width: none; padding: 8px 12px; z-index: 70;
    background: var(--nav-bg, var(--panel-a)); border-bottom: 1px solid var(--border);
  }
  body.mb-search .topnav .nav-search .search-drop { left: 12px; right: 12px; }

  /* --- Full-screen sheets: workspace switcher, notifications, account --- */
  .wsmenu, .bellmenu, .acctmenu {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: auto; max-width: none;
    max-height: 88dvh; max-height: 88vh;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--border-2); border-bottom: 0;
    box-shadow: 0 -12px 40px rgba(0,0,0,.35);
    z-index: 90;
    padding-bottom: env(safe-area-inset-bottom);
    display: flex; flex-direction: column;
    animation: sheet-up .18s ease-out;
  }
  @keyframes sheet-up { from { transform: translateY(12px); opacity: .6; } to { transform: none; opacity: 1; } }

  /* dim + lock the page behind an open sheet */
  body.sheet-open { overflow: hidden; }
  body.sheet-open::after {
    content: ""; position: fixed; inset: 0; z-index: 85;
    background: rgba(0,0,0,.35);
  }
  /* Sheets (z-index 90) are relocated to <body> by mobile.js, so they sit above
     this backdrop (85) in the root stacking context. */

  /* the ws switcher list needs to breathe full-height in sheet form */
  .wsmenu { overflow: hidden; }
  .wsmenu-list { max-height: none; flex: 1 1 auto; }

  /* Workspace switcher = FULL-height sheet, not a bottom sheet. When it opened as
     a bottom sheet the search field auto-focused, the keyboard slid up and covered
     the whole thing, so the list was never visible. Full-height keeps the search
     pinned at the top and the list scrolling above the keyboard. */
  .wsmenu { top: 0; bottom: auto; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border-bottom: 0; }
  .wsmenu-search { flex: 0 0 auto; }
  .wsmenu #wsDefault { flex: 1 1 auto; min-height: 0; }
  .wsmenu-archived { flex: 0 0 auto; }

  /* sheet header (title + close) */
  .sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 10px; border-bottom: 1px solid var(--hairline); flex: 0 0 auto;
  }
  .sheet-title { font-weight: 800; font-size: 15px; }
  .sheet-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border-2);
    background: var(--input-bg); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
  }
  /* bell sheet already has its own top row — float the close there */
  .bellmenu .bellmenu-top { position: relative; padding-right: 46px; }
  .bellmenu .sheet-x { position: absolute; top: 10px; right: 12px; }
  /* account sheet close */
  .acctmenu { padding-top: 10px; }
  .acctmenu .sheet-x { position: absolute; top: 10px; right: 12px; }

  /* comfortable tap rows in the account + workspace sheets */
  .acctmenu-item, .wsmenu-item { min-height: 46px; display: flex; align-items: center; }
  #acctTheme.mobile-only { display: flex; }
  .bellmenu-list { max-height: none; flex: 1 1 auto; }
}

/* ---------- P3: item page (stack + Details/Activity toggle + composer) ---------- */
/* Hidden on desktop; revealed only inside the ≤820px query. */
.item-segmented { display: none; }
.ihnav { display: none; }

@media (max-width: 820px) {
  /* Fields and Activity become one stacked column. */
  .item-page .detail { flex-direction: column; gap: 0; }
  .item-page .detail .info { width: 100%; }
  .item-page .comments {
    flex: 1 1 auto; width: 100%; min-width: 0; max-width: none;
    position: static; max-height: none; border-radius: 12px; margin-top: 4px;
  }

  /* Segmented control, sticky just under the top nav. */
  .item-segmented {
    display: flex; gap: 6px; position: sticky; z-index: 40;
    top: calc(50px + env(safe-area-inset-top));
    background: var(--bg); padding: 8px 0 10px; margin: 0 0 4px;
  }
  .iseg {
    flex: 1 1 0; min-height: 42px; border: 1px solid var(--border-2);
    background: var(--panel-b); color: var(--muted); border-radius: 10px;
    font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  }
  .iseg.on { background: var(--accent-soft); color: var(--accent-fg, var(--accent)); border-color: var(--accent-bd); }
  .iseg-count { font-size: 12px; opacity: .75; font-weight: 700; }

  /* Default view = Details (fields). Activity tab flips it. */
  .detail .comments { display: none; }
  .detail.show-activity .info { display: none; }
  .detail.show-activity .comments { display: flex; flex-direction: column; }

  /* Activity view: page owns the scroll; composer pinned above the tab bar. */
  .detail.show-activity .comments .stream { overflow: visible; max-height: none; min-height: 0; padding: 6px 2px; }
  .detail.show-activity .comments { padding-bottom: 150px; }   /* clear the fixed composer */
  .detail.show-activity .cmt-form.cc {
    position: fixed; left: 0; right: 0; bottom: calc(54px + env(safe-area-inset-bottom));
    z-index: 78; margin: 0; padding: 8px 12px;
    background: var(--nav-bg, var(--panel-a)); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(0,0,0,.12);
  }
  /* While typing, composer drops to the very bottom and the tab bar steps aside. */
  body.composing .mobilebar { display: none; }
  body.composing .detail.show-activity .cmt-form.cc { bottom: env(safe-area-inset-bottom); }

  /* Comment Reply / Edit / Delete actions: easier to tap. */
  .cmt-actions summary, .cmt-actions button, .cmt-actions [type="submit"] {
    min-height: 30px; display: inline-flex; align-items: center;
  }

  /* Header prev/next arrows (the fixed side arrows are hidden ≤960px). */
  .ihnav { display: inline-flex; gap: 6px; margin-right: 2px; }
  .ihbtn {
    width: 34px; height: 34px; border: 1px solid var(--border-2); border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); text-decoration: none; font-size: 18px; background: var(--input-bg);
  }
}

/* ---------- P4: lists, app bar, search ---------- */
@media (max-width: 820px) {
  /* App list: single column, hide the heavy facet sidebar + admin actions. */
  .layout { flex-direction: column; gap: 0; }
  .layout .filters { display: none; }
  .layout .main { width: 100%; min-width: 0; }
  header.top .actions-wrap { display: none; }

  /* Spreadsheet table -> tappable cards (bold title + wrapped value chips). */
  table.sheet, table.sheet tbody, table.sheet tr, table.sheet td { display: block; width: auto; }
  table.sheet thead { display: none; }
  table.sheet { border: 0; }
  table.sheet tr.srow {
    border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px;
    padding: 11px 13px; background: var(--card-a);
  }
  table.sheet tr.srow td { border: 0; padding: 1px 0; }
  table.sheet td.tdtitle { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
  table.sheet td.tdtitle a { color: var(--text); text-decoration: none; }
  table.sheet tr.srow td:not(.tdtitle):not(.tdc) {
    display: inline-block; margin: 2px 8px 2px 0; color: var(--muted); font-size: 13px;
  }
  table.sheet tr.srow td:empty { display: none; }
  table.sheet td.tdc { color: var(--dim); font-size: 12px; margin-top: 3px; }
  table.sheet td.sheet-empty { text-align: center; color: var(--muted); padding: 24px 0; }

  /* "+ New" becomes a floating action pill above the tab bar. */
  header.top form[action$="new-item"] {
    position: fixed; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom));
    z-index: 75; margin: 0; display: block;
  }
  header.top form[action$="new-item"] .btn {
    height: 50px; padding: 0 20px; border-radius: 26px; font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
  }

  /* App bar: fix the desktop edge-bleed (assumes 22px gutters) to the 12px mobile gutter. */
  .appbar { margin: 0 -12px 14px; padding: 10px 12px 0; scrollbar-width: none; }
  .appbar::-webkit-scrollbar { display: none; }
  .appbar-item { flex: 0 0 auto; }

  /* Search: type-filter facets tuck under the results (layout already stacks). */
  .srch-facets { margin-top: 12px; }

  /* ---- Login page: stack the two cards instead of a fixed side-by-side row ---- */
  .login-wrap { flex-direction: column; align-items: stretch; justify-content: flex-start;
    min-height: auto; gap: 6px; padding: 24px 0 40px; }
  .login { width: 100%; max-width: 440px; margin: 0 auto; }
  .login input { font-size: 16px; }   /* beat the 14px rule so iOS doesn't zoom on focus */
  .login-or {
    display: flex; align-items: center; gap: 10px; width: 100%; max-width: 440px;
    margin: 2px auto; padding: 4px 4px; color: var(--dim);
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  }
  .login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
  .login-or span { white-space: nowrap; }
}

/* ---------- P5 device-QA fixes ---------- */
@media (max-width: 820px) {
  /* Item fields: stack label above value. The desktop 210px label + 1fr value
     grid crammed every value into a narrow right column on a phone. */
  .fieldcard .frow { grid-template-columns: 1fr; gap: 3px; padding: 11px 0; }
  .fieldcard .frow .fk { padding-top: 0; }
  .fieldcard .frow > .fv, .fieldcard .frow > .ro-fv { max-width: none; }

  /* Notifications sheet: no sideways scroll; long domains wrap instead of
     forcing the row wider than the screen. */
  .bellmenu-list { overflow-x: hidden; }
  .belln-line, .belln-ctx, .belln-snip { overflow-wrap: anywhere; word-break: break-word; }
  .bellmenu-top { flex-wrap: wrap; gap: 8px 10px; }
}

/* Rich-HTML field values (calculation fields / automation reports) render as HTML.
   Keep wide content (tables) contained so it scrolls inside the field, not the page. */
.fv-html { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fv-html img { max-width: 100%; height: auto; }
.fv-html table { max-width: 100%; }
.fv-html div, .fv-html p, .fv-html span, .fv-html td, .fv-html th { max-width: 100%; overflow-wrap: anywhere; }

/* Dark-mode readability for pasted rich content + native date pickers (2026-10-14).
   Pasted field/description HTML often carries inline color:rgb(0,0,0) from the source
   doc, which is unreadable on the dark navy. In dark mode, make inline-colored text
   (links keep their own color) inherit the theme text color; light mode is untouched.
   The browser's native calendar-picker glyph is a dark SVG, so invert it to stay visible. */
[data-theme="dark"] .fv-html [style*="color"]:not(a),
[data-theme="dark"] .ro-fv [style*="color"]:not(a),
[data-theme="dark"] .rich-edit [style*="color"]:not(a) { color: var(--text) !important; }
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1) brightness(1.6); cursor: pointer; }


/* Users & Access — compact collapsible member cards (2026-09-08) */
.mem-list{display:flex;flex-direction:column;gap:8px;margin-bottom:24px;}
.mem{background:linear-gradient(180deg,var(--panel-a),var(--panel-b));border:1px solid var(--border);border-radius:12px;overflow:hidden;}
.mem>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:12px 16px;}
.mem>summary::-webkit-details-marker{display:none;}
.mem>summary::before{content:'\25B8';color:var(--dim);font-size:12px;transition:transform .15s ease;}
.mem[open]>summary::before{transform:rotate(90deg);}
.mem-name{font-weight:600;min-width:150px;}
.mem-email{color:var(--muted);font-size:13px;min-width:210px;}
.mem-sum{color:var(--muted);font-size:12px;margin-left:auto;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46%;}
.mem-body{padding:4px 16px 16px;border-top:1px solid var(--hairline);}
.access-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:9px 20px;margin:14px 0 10px;}
.access-grid .access-item{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;}
.access-grid .access-item .access-space{min-width:0;flex:1;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.access-grid .access-item.has .access-space{color:var(--text);font-weight:600;}
.access-grid .role-select{flex:0 0 auto;}
.mem-actions{margin-top:4px;}

/* Users & Access — batch save (2026-09-08) */
.mem-actions{display:flex;align-items:center;gap:12px;margin-top:8px;}
.access-item.changed .access-space{color:var(--accent-fg);font-weight:600;}
.access-item.changed .role-select{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft);}
.mem-saved{color:#3a9a4e;font-size:12px;font-weight:600;}
.mem-save[disabled]{opacity:.5;cursor:default;}

/* Workspace activity: Status tag + load-older (2026-09-08) */
.fc-status{ display:inline-block; vertical-align:middle; }
.feed-loadmore{ display:inline-block; margin:8px 2px 2px; font-size:12.5px; font-weight:600; color:var(--accent-fg); }
.feed-loadmore:hover{ text-decoration:underline; }
/* While infinite-scroll is fetching the next page, show a quiet "loading" state instead of the link text. */
.feed-loadmore.is-loading{ color:var(--muted); pointer-events:none; }
.feed-loadmore.is-loading:hover{ text-decoration:none; }

/* Draft-then-Save item creation */
/* Right-column card (takes the place of the comments panel) so the item fields stay
   in their normal left position in both draft and published modes. */
.draftbar { flex:0 0 32%; min-width:300px; max-width:560px; align-self:flex-start;
  position:sticky; top:64px; display:flex; flex-direction:column; gap:12px; margin:0;
  padding:16px 18px; background:#fff8e1; border:1px solid #ffe082; border-radius:14px; }
.draftbar-label { font-size:13px; line-height:1.5; color:#795548; }
.draft-actions { align-self:flex-end; display:flex; gap:10px; align-items:center; }
.draft-save { background:#f59e0b; color:#fff; border:none; border-radius:5px;
  padding:8px 22px; font-size:13px; font-weight:600; cursor:pointer; }
.draft-save:disabled { opacity:.45; cursor:default; }
.draft-save:not(:disabled):hover { background:#d97706; }
/* (0,4,0) selector so it beats .btn:not(.ghost):not(.danger) which paints the accent green */
.draftbar .draft-actions .draft-cancel.btn { background:#eceff1; color:#546e7a; border:1px solid #cfd8dc; border-radius:5px;
  padding:8px 18px; font-size:13px; font-weight:600; cursor:pointer; }
.draftbar .draft-actions .draft-cancel.btn:hover { background:#dfe4e7; border-color:#b0bec5; color:#37474f; }
.draftbar .draft-actions .draft-cancel.btn:disabled { opacity:.45; cursor:default; }
@media (max-width:960px){ .draftbar { flex-basis:auto; width:100%; max-width:none; position:static; margin:0 0 14px; } }
.req-field > .fk { font-weight:600; }
.req-star { color:#e53935; margin-left:3px; font-weight:700; font-size:14px; }

/* Issue #834354 — item fields "squished / can't read the info" on mid-width
   (or zoomed) desktop windows. Between the ≤820px mobile segmented layout and a
   comfortable desktop, the fields column and the sticky comments panel
   (min-width:360px) share one row, squeezing the 210px-label + 1fr-value grid
   until values wrapped one character per line. In that band, stack the layout —
   fields full width on top, comments full width below — and stack each field's
   label above its value so values always get the full page width. Desktop
   (>1024px) and mobile (≤820px) are unchanged. */
@media (min-width:821px) and (max-width:1024px){
  .item-page .detail{ flex-direction:column; }
  .item-page .detail .comments{ flex:0 0 auto; width:100%; max-width:none; min-width:0; position:static; max-height:none; top:auto; }
  .fieldcard .frow{ grid-template-columns:1fr; gap:4px; }
  .fieldcard .frow > .fv, .fieldcard .frow > .ro-fv{ max-width:none; }
}

/* Field rows respond to the ACTUAL rendered width of the fields column, not the
   viewport. The @media band above keys on the viewport, but html{zoom:1.4} makes
   viewport media queries fire on PHYSICAL px while the layout squishes on ZOOMED px
   — so a narrow or half-width desktop window whose physical width is still >1024px
   never triggered the stack, the 210px-label + 1fr-value grid collapsed the value
   track to near-zero, and long values wrapped one character per line
   (Amy, issue 834354 — "the left side bar is squished, can't read the info").
   A container query measures the fields column itself, so labels stack above values
   whenever the value column would actually be too narrow, at any zoom or window size. */
.detail .info { container-type:inline-size; container-name:fieldcol; }
@container fieldcol (max-width:460px){
  .fieldcard .frow, .fieldcard.show-empty .frow.is-empty { grid-template-columns:1fr; gap:4px; }
  .fieldcard .frow > .fv, .fieldcard .frow > .ro-fv { max-width:none; }
  .fieldcard .frow .fk { padding-top:0; }
}
/* multi-city: "make home" moves a city to the front (first = home base) */
.frow .fv .loc-mkhome { font-size:10px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); background:none; border:1px solid var(--border-2); border-radius:8px; padding:0 5px; cursor:pointer; opacity:0; transition:opacity .15s; }
.frow .fv .loc-chip:hover .loc-mkhome, .frow .fv .loc-mkhome:focus { opacity:1; }
.frow .fv .loc-mkhome:hover { color:var(--accent-fg); border-color:var(--accent-bd); }

/* ---------- P6 mobile UX audit fixes (2026-11-11) ----------
   Everything below is inside the phone query, so desktop (>820px) is untouched. */
@media (max-width: 820px) {
  /* 1. Top bar bled 22px past each side (desktop gutter) while the phone gutter is
        12px, so every page was 10px wider than the screen and wobbled sideways. */
  .topnav {
    margin-left: calc(-1 * max(12px, env(safe-area-inset-left)));
    margin-right: calc(-1 * max(12px, env(safe-area-inset-right)));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  /* 2. Notifications page: the list is a flex child with min-width:auto, so its
        no-wrap sub line forced it to 760px (2x the phone). Let it shrink. */
  .notif-layout { display: block; }
  .notif-layout .notif-list { max-width: none; min-width: 0; }
  .notif, .notif-top, .notif-hit, .notif-main { min-width: 0; }
  .notif-tabs { flex-wrap: wrap; }

  /* Account settings: label above value (the desktop 160px label column pushed the
     timezone list and its help text off the right edge). */
  .acct-page { padding-left: 0; padding-right: 0; }
  .acct-row { flex-direction: column; gap: 8px; }
  .acct-lbl { flex: 0 0 auto; padding-top: 0; }
  .acct-val { width: 100%; min-width: 0; }
  .acct-select { max-width: 100%; }

  /* 3. iOS zooms in on any field under 16px. The earlier 16px rule lost to more
        specific component rules (comment box 13px, fields 13.5px, list search 13px). */
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
  textarea, select, [contenteditable="true"] { font-size: 16px !important; }

  /* 4. The 44px button rule stretched the 13px unread dot into a tall oval.
        Keep it a 13px circle, with an invisible larger tap area around it. */
  .belln-circle { min-height: 0; height: 13px; width: 13px; top: 16px; right: 16px; }
  .belln-circle::after { content: ""; position: absolute; inset: -14px; }
  .belln-go { padding-right: 46px; }

  /* 6. Alerts header: room between "Show all" and the close X. */
  .bellmenu .bellmenu-top { padding-right: 60px; row-gap: 10px; }
  .bellmenu-showall { padding: 6px 2px; }

  /* 7. Comment box: phones have no Shift+Enter, so Enter adds a line and the
        Send button is always shown (compose.js); the desktop toggle is hidden. */
  form.cc .cc-enter { display: none; }
  form.cc .cc-btn { display: inline-flex !important; align-items: center; min-height: 40px; padding: 8px 20px; font-size: 15px; }
  /* Auto-grow ran while the Activity tab was hidden and set height:0. */
  .cc-text { min-height: 48px; }

  /* 8. Comment box sits at the end of the comments instead of floating over them. */
  .detail.show-activity .cmt-form.cc {
    position: static; left: auto; right: auto; bottom: auto; z-index: auto;
    margin: 8px 0 0; padding: 10px 0 0; background: none; box-shadow: none;
    border-top: 1px solid var(--border);
  }
  .detail.show-activity .comments { padding-bottom: 12px; }
  .detail .cmt-form.cc { scroll-margin-bottom: calc(80px + env(safe-area-inset-bottom)); }   /* clear the tab bar */
  /* The floating "+ New <item>" pill sat on top of the Add comment button. On an item
     page you're working that item, so drop the pill there (lists still have it). */
  body.item-page header.top form[action$="new-item"] { display: none; }

  /* 9. Bigger Reply / Delete / Like and formatting buttons. */
  .cmt-actions { gap: 4px; }
  .cmt-actions .cmt-ic { min-width: 40px; min-height: 40px; padding: 8px; }
  .cmt-actions .cmt-ic svg { width: 18px; height: 18px; }
  .fmt-bar .fmt-b { width: 38px; height: 36px; }
  .fmt-bar .fmt-b b, .fmt-bar .fmt-b i, .fmt-bar .fmt-b u { font-size: 15px; }
}
