/* Compact theme (v1.5, owner 16 Nov 2026: "everything is too big… make it compact, learn the UI from Apple and Pixel").
   Loaded LAST, so it wins over every older layer. Cues taken from iOS / Pixel:
   system font, 17px bar titles, grouped grey background with white rounded groups, hairline lines instead of
   shadows, 40px controls (still real buttons, server rule), small grey section headers, line icons in the tab bar.
   Inputs keep 16px text so iPhones do not zoom in on tap. */
:root {
  --bg: #f2f2f7; --surface: #ffffff; --surface-2: #f2f2f7; --border: #e5e5ea; --hair: rgba(60,60,67,.14);
  --text: #1c1c1e; --text-dim: #6c6c70; --slate: #48484a; --faint: #8e8e93;
  --accent: #3e63dd; --primary: #3e63dd; --primary-dark: #3451c6; --primary-tint: #eef1fd;
  --radius: 12px; --shadow-sm: none; --shadow-md: 0 4px 14px rgba(0,0,0,.12);
}
body, body.jmode { background: var(--bg) !important; color: var(--text); font-size: 15px; line-height: 1.38;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Google Sans Text", "Google Sans", Roboto, "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: -0.005em; }
main#viewport { padding: 10px 14px 24px !important; }

/* ---- top bar: 17px title like iOS / Pixel ---- */
header.topbar { min-height: 0 !important; padding-top: calc(8px + env(safe-area-inset-top)) !important; padding-bottom: 8px !important; background: rgba(255,255,255,.92) !important;
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: .5px solid var(--hair) !important; }
header.topbar h1 { font-size: 17px !important; font-weight: 650 !important; letter-spacing: -0.01em; }
.installbtn { min-height: 30px !important; padding: 5px 11px !important; font-size: 13px !important; font-weight: 600 !important; border-radius: 8px !important; }
.homebtn { min-height: 30px !important; padding: 5px 10px !important; font-size: 13px !important; border-radius: 8px !important; }

/* ---- type ---- */
.section-title, .t-sec { font-size: 13px !important; font-weight: 600 !important; color: var(--text-dim) !important; margin: 16px 4px 6px !important; letter-spacing: 0 !important; }
.t-date { font-size: 22px !important; font-weight: 700 !important; letter-spacing: -0.02em; }
.sheet h2 { font-size: 17px !important; font-weight: 650 !important; }
.profile-section h3 { font-size: 15px !important; font-weight: 650 !important; }

/* ---- groups / cards: white, 12px corners, hairline, no shadow ---- */
.card, .metric-tile, .action-tile, .todo-strip, .profile-section, .intel-card, .filter-panel, .pe-headline, .followup-chip, .pf-step, .pf-result, .pe-fold-head, .pe-detail-toggle,
.enq-list-btn, .pl-item, .q-item, .eq-card, .td-card, .attach-item, .jfolder, .ti, .tw-row, .t-clear, .bk-card, .bk-stats > div, .t-stat, .rv-intro {
  box-shadow: none !important; border-radius: 12px !important; }
.card { padding: 10px 12px !important; margin-bottom: 8px !important; gap: 10px !important; flex-wrap: nowrap !important; align-items: center !important; }
.card .info { min-width: 0; flex: 1; }
.card .info .name { font-size: 15.5px !important; font-weight: 600 !important; }
.card .info .sub { font-size: 13px !important; }
.card .thumb { width: 38px !important; height: 38px !important; font-size: 13.5px !important; font-weight: 600 !important; }
.card .actions { flex-basis: auto !important; padding-left: 0 !important; gap: 6px !important; flex: none; }
.card .actions .iconbtn { width: 34px !important; height: 34px !important; font-size: 15px !important; }
.profile-section { padding: 12px 14px !important; margin-bottom: 10px !important; }
.badge { font-size: 11px !important; font-weight: 600 !important; padding: 1px 7px !important; }

/* ---- buttons: 40px, 10px corners, semibold, flat ---- */
.btn { min-height: 40px !important; border-radius: 10px !important; font-size: 15px !important; font-weight: 600 !important; padding: 8px 14px !important; }
.btn.small { min-height: 34px !important; font-size: 14px !important; padding: 6px 12px !important; }
.btn.primary, .btn.primary:hover { box-shadow: none !important; }
.inline-add, .inline-add.big { min-height: 40px !important; border-radius: 10px !important; font-size: 14.5px !important; font-weight: 600 !important; padding: 0 12px !important; color: #fff !important; background: var(--primary) !important; opacity: 1 !important; }

/* ---- inputs: 40px tall, 16px text ---- */
input[type=text], input[type=tel], input[type=email], input[type=url], input[type=date], input[type=time], input[type=number], input[type=search], select {
  min-height: 40px !important; height: auto; padding-top: 8px !important; padding-bottom: 8px !important; border-radius: 10px !important; font-size: 16px !important; border-color: #d8d8de !important; }
textarea { border-radius: 10px !important; font-size: 16px !important; border-color: #d8d8de !important; }
input:focus, textarea:focus, select:focus { box-shadow: 0 0 0 3px rgba(62,99,221,.16) !important; }

/* ---- segmented controls / chips ---- */
.chips, .toggle-row, .pe-seg, .tl-filter { border-radius: 10px !important; padding: 2px !important; }
.chip, .toggle-row button, .pe-seg button, .tl-filter .chip { border-radius: 8px !important; font-size: 13px !important; padding: 5px 9px !important; min-height: 30px; }

/* ---- Today ---- */
.t-head { margin: 0 0 8px !important; gap: 6px !important; }
.t-stat { padding: 3px 10px !important; font-size: 13px !important; border: .5px solid var(--hair); }
.t-stat b { font-size: 14px !important; }
.t-review { padding: 10px 12px !important; border-radius: 12px !important; border-width: 1px !important; }
.t-review > span:first-child { font-size: 20px !important; }
.ti { margin-bottom: 8px !important; }
.ti.late { border-left-width: 3px !important; }
.ti-open { padding: 10px 12px 8px !important; }
.ti-ic { width: 28px !important; height: 28px !important; font-size: 14px !important; }
.ti-main b { font-size: 15px !important; font-weight: 600 !important; }
.ti-sub { font-size: 13px !important; } .ti-meta { font-size: 12px !important; }
.ti-chev, .bk-chev { width: 22px !important; height: 22px !important; font-size: 15px !important; background: none !important; color: #c4c4c7 !important; }
.ti-acts { gap: 6px !important; padding: 0 12px 10px !important; }
.ti-acts button { min-height: 32px !important; border-radius: 8px !important; font-size: 13px !important; font-weight: 600 !important; border-width: 1px !important; }
.t-add .action-tile { padding: 10px 4px !important; } .t-add .action-tile .lbl { font-size: 12px !important; font-weight: 600 !important; }
.action-tile .ic { width: 36px !important; height: 36px !important; border-radius: 10px !important; }
.metric-tile { padding: 10px 6px !important; } .metric-tile .num, .followup-chip .num { font-size: 20px !important; }
.t-more { min-height: 38px !important; border-radius: 10px !important; border-width: 1px !important; font-size: 14px !important; }
.tw-row { padding: 9px 12px !important; margin-bottom: 6px !important; }

/* ---- Relationships list ---- */
.bk-stats { gap: 8px !important; }
.bk-stats > div { padding: 8px 6px !important; }
.bk-stats b { font-size: 19px !important; font-weight: 700 !important; }
.bk-stats span { font-size: 11.5px !important; }
.bk-card { padding: 10px 10px 10px 12px !important; margin-bottom: 8px !important; gap: 10px !important; }
.bk-av { width: 38px !important; height: 38px !important; font-size: 13.5px !important; font-weight: 600 !important; }
.bk-top { font-size: 15px !important; } .bk-top b { font-weight: 600; }
.bk-pill { font-size: 11px !important; font-weight: 600 !important; padding: 2px 8px !important; }
.bk-line, .bk-next { font-size: 13px !important; } .bk-ago { font-size: 12px !important; }
.bk-sec { margin-top: 14px !important; }

/* ---- More sheet + sheets ---- */
.sheet { border-radius: 14px 14px 0 0 !important; padding: 10px 14px calc(18px + env(safe-area-inset-bottom)) !important; }
.more-grid { gap: 8px !important; }
.more-btn { min-height: 44px !important; padding: 8px 12px !important; border-radius: 10px !important; border-width: 1px !important; font-size: 14.5px !important; font-weight: 600 !important; }
.more-btn .ic { font-size: 18px !important; }
.more-help { min-height: 42px !important; border-radius: 10px !important; font-size: 15px !important; margin-top: 10px !important; }

/* ---- bottom tab bar: line icons (set in zc.js), 10.5px labels, Pixel-style pill on the active tab ---- */
nav.bottomnav { background: rgba(255,255,255,.94) !important; -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-top: .5px solid var(--hair) !important; padding-top: 4px !important; }
nav.bottomnav button { font-size: 10.5px !important; font-weight: 500 !important; gap: 2px !important; padding: 2px 0 4px !important; color: #6c6c70 !important; letter-spacing: 0; }
nav.bottomnav button .ic { width: 52px !important; height: 26px !important; border-radius: 13px !important; display: grid !important; place-items: center; filter: none !important; opacity: 1 !important; font-size: 0 !important; }
nav.bottomnav button .ic svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav.bottomnav button.active { color: var(--primary-dark) !important; font-weight: 600 !important; }
nav.bottomnav button.active .ic { background: var(--primary-tint) !important; }
nav.bottomnav button.active .ic svg { stroke-width: 2.1; }
.ck-fab, .fab-back { transform: scale(.88); transform-origin: bottom right; }
/* the + button: Pixel-size 52px, softer shadow */
.plus-fab { width: 52px !important; height: 52px !important; right: 14px !important; bottom: calc(72px + env(safe-area-inset-bottom)) !important; box-shadow: 0 3px 10px rgba(0,0,0,.18) !important; border-radius: 16px !important; }
.plus-fab span { font-size: 28px !important; }
.plus-item { min-height: 42px !important; }
/* Today: rows a little tighter */
.t-review { min-height: 0 !important; }
.tw-row { min-height: 0 !important; }
/* contact page: smaller head */
.profile-photo, .profile-photo-fallback { width: 64px !important; height: 64px !important; font-size: 22px !important; box-shadow: none !important; }
.profile-top { padding: 4px 0 2px !important; }
.profile-name { font-size: 20px !important; font-weight: 700 !important; }
.kn-edit, .linkbtn { min-height: 32px !important; padding: 4px 10px !important; font-size: 13.5px !important; border-radius: 8px !important; }
.profile-photo-fallback { background: var(--primary-tint) !important; color: var(--primary-dark) !important; border-radius: 50% !important; display: grid !important; place-items: center; margin: 0 auto 8px !important; font-weight: 600 !important; }
