/* SuiteCRM (Django edition) — clean SaaS theme */
:root {
  /* surfaces & text */
  --bg: #f3f6fb; --card: #ffffff; --sunken: #eef2f8; --line: #e3e9f2; --line-2: #cfd8e6; --text: #0f1f38; --muted: #5d6b82;
  /* brand */
  --accent: #2e7fcb; --accent-2: #2671bd; --accent-soft: #edf4fd; --accent-ink: #1d5fa3; --link: #2671bd;
  /* chrome */
  --nav: #ffffff; --nav-2: #f2f2f5; --nav-text: #52525b; --nav-text-hover: #18181b;
  /* status */
  --ok: #16a34a; --ok-soft: #e9f8ef; --ok-ink: #166534;
  --warn: #d97706; --warn-soft: #fff6e5; --warn-ink: #92400e;
  --bad: #dc2626; --bad-soft: #fdeeee; --bad-ink: #991b1b;
  --neutral-soft: #f0f0f3; --neutral-ink: #3f3f46;
  /* shape */
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15,31,56,.04), 0 4px 14px -6px rgba(15,31,56,.08);
  --shadow-lg: 0 12px 32px -6px rgba(16,16,24,.16), 0 4px 10px -4px rgba(16,16,24,.08);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c10; --card: #15151a; --sunken: #1b1b21; --line: #26262e; --line-2: #34343e; --text: #ececf1; --muted: #9b9ba7;
    --accent: #4f9be3; --accent-2: #8cc0f0; --accent-soft: #11253b; --accent-ink: #bcdcf8; --link: #8cc0f0;
    --nav: #111115; --nav-2: #1d1d24; --nav-text: #a1a1aa; --nav-text-hover: #fafafa;
    --ok-soft: #10261a; --ok-ink: #86efac; --warn-soft: #2a1e0b; --warn-ink: #fcd34d; --bad-soft: #2c1214; --bad-ink: #fca5a5;
    --neutral-soft: #222229; --neutral-ink: #d4d4d8;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 40px -8px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c10; --card: #15151a; --sunken: #1b1b21; --line: #26262e; --line-2: #34343e; --text: #ececf1; --muted: #9b9ba7;
  --accent: #4f9be3; --accent-2: #8cc0f0; --accent-soft: #11253b; --accent-ink: #bcdcf8; --link: #8cc0f0;
  --nav: #111115; --nav-2: #1d1d24; --nav-text: #a1a1aa; --nav-text-hover: #fafafa;
  --ok-soft: #10261a; --ok-ink: #86efac; --warn-soft: #2a1e0b; --warn-ink: #fcd34d; --bad-soft: #2c1214; --bad-ink: #fca5a5;
  --neutral-soft: #222229; --neutral-ink: #d4d4d8;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 40px -8px rgba(0,0,0,.6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: 14.5px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-feature-settings: "cv11", "ss01"; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
svg.i { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); } .pad { padding: 16px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--nav) 88%, transparent); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); color: var(--text); display: flex; align-items: center; gap: 4px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 650; font-size: 1.02rem; letter-spacing: -.01em; color: var(--text); margin-right: 18px; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .logo { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #5ab0ee)); color: #fff; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.2); }
.tools { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.side-toggle { margin-right: 6px; }
.tools .search { position: relative; display: flex; align-items: center; margin: 0 auto 0 8px; }
.tools .search svg.i { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.tools .search input { background: var(--sunken); border: 1px solid transparent; color: var(--text); padding: 7px 12px 7px 32px; border-radius: 8px; width: 300px; font-size: .88rem; transition: width .18s, background .12s, border-color .12s; }
.tools .search input::placeholder { color: var(--muted); }
.tools .search input:focus { outline: none; background: var(--card); border-color: var(--accent); box-shadow: var(--ring); width: 380px; }
.iconbtn { background: none; border: 0; color: var(--nav-text); font-size: 1.05rem; cursor: pointer; padding: 7px; border-radius: 8px; position: relative; display: inline-grid; place-items: center; transition: background .12s, color .12s; }
.iconbtn:hover, .dd.open > .iconbtn { background: var(--nav-2); color: var(--nav-text-hover); text-decoration: none; }
.badge { position: absolute; top: 1px; right: 0; background: var(--bad); color: #fff; font-size: .62rem; font-weight: 600; line-height: 1; border-radius: 10px; padding: 3px 5px; border: 2px solid var(--nav); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #5ab0ee)); color: #fff; display: inline-grid; place-items: center; font-weight: 600; font-size: .82rem; }

/* dropdowns */
.dd { position: relative; display: inline-flex; align-items: center; }
.dd-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 5px; z-index: 80; max-height: 70vh; overflow: auto; }
.dd-menu.right { left: auto; right: 0; } .dd.open > .dd-menu { display: block; animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd-menu a, .dd-menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 7px 10px; color: var(--text); border-radius: 6px; font-size: .88rem; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; }
.dd-menu a svg.i, .dd-menu button svg.i { color: var(--muted); }
.dd-menu a:hover svg.i, .dd-menu button:hover svg.i { color: var(--accent); }
.dd-menu a:hover, .dd-menu button:hover { background: var(--sunken); text-decoration: none; }
.dd-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; } .dd-menu .hd { padding: 6px 10px 4px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }

/* shell */
.shell { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 244px; flex: none; padding: 12px 10px 24px; border-right: 1px solid var(--line); background: var(--card); position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; overflow-x: hidden; transition: width .18s ease; }
.sidebar h4 { margin: 18px 10px 6px; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
.sidebar a { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-radius: 7px; color: var(--text); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .12s; }
.sidebar a:hover { background: var(--sunken); text-decoration: none; }
.sidebar a .ic { width: 24px; display: inline-flex; color: var(--muted); flex: none; }

/* main navigation */
.side-nav { display: flex; flex-direction: column; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.side-nav .nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--nav-text); font-size: .89rem; font-weight: 500; cursor: pointer; list-style: none; position: relative; }
.side-nav .nav-item::-webkit-details-marker { display: none; }
.side-nav .nav-item .ic { width: 20px; justify-content: center; color: color-mix(in srgb, var(--muted) 85%, transparent); }
.side-nav .nav-item .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav .nav-item:hover { background: var(--sunken); color: var(--nav-text-hover); text-decoration: none; }
.side-nav .nav-item:hover .ic { color: var(--text); }
.side-nav .nav-item.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side-nav .nav-item.on .ic { color: var(--accent); }
.side-more summary .ic svg { transition: transform .15s; transform: rotate(-90deg); }
.side-more[open] summary .ic svg { transform: none; }
.side-more[open] summary { margin-bottom: 1px; }
.side-ctx { padding-top: 4px; }
.side-backdrop { display: none; }

/* collapsed rail (desktop) */
@media (min-width: 901px) {
  :root[data-sidebar="collapsed"] .sidebar { width: 64px; padding-left: 10px; padding-right: 10px; }
  :root[data-sidebar="collapsed"] .side-nav .nav-item { justify-content: center; padding: 9px 0; }
  :root[data-sidebar="collapsed"] .side-nav .nav-item .lb, :root[data-sidebar="collapsed"] .side-ctx { display: none; }
  :root[data-sidebar="collapsed"] .side-nav { border-bottom: 0; }
}

main { flex: 1; min-width: 0; padding: 24px 28px 64px; max-width: 1600px; }
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 90; top: 56px; left: 0; bottom: 0; height: auto; width: min(280px, 86vw); transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .side-backdrop { display: block; position: fixed; inset: 56px 0 0; background: rgba(9,9,14,.4); z-index: 85; }
  main { padding: 16px; } .tools .search { display: none; } .tools { justify-content: flex-end; }
}

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; margin: 0; }
.page-head h1 > span:first-child:not(:empty) { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: inline-grid; place-items: center; font-size: 1.15rem; flex: none;  color: var(--accent-ink); }
.page-head .crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.page-head .crumbs a { color: var(--muted); } .page-head .crumbs a:hover { color: var(--text); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); border-radius: var(--radius-sm); cursor: pointer; font-size: .88rem; font-weight: 500; font-family: inherit; line-height: 1.25; box-shadow: 0 1px 1px rgba(16,16,24,.04); transition: background .12s, border-color .12s, box-shadow .12s; white-space: nowrap; }
.btn:hover { background: var(--sunken); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { box-shadow: var(--ring); border-radius: var(--radius-sm); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--card); box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line-2)); } .btn-danger:hover { background: var(--bad-soft); }
.btn-sm { padding: 4px 10px; font-size: .8rem; } .btn-link { border: 0; background: none; color: var(--link); padding: 2px 4px; cursor: pointer; font-family: inherit; font-size: inherit; display: inline-flex; align-items: center; }
.btn-link:hover { text-decoration: underline; }
.star { cursor: pointer; font-size: 1.25rem; color: var(--line-2); background: none; border: 0; padding: 0 4px; transition: color .12s, transform .12s; } .star:hover { transform: scale(1.12); } .star.on { color: #f5b301; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card > .card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: .95rem; }
.card > .card-b { padding: 18px; }
.card > .tbl-wrap:last-child, .card > table.grid:last-child { border-radius: 0 0 var(--radius) var(--radius); }

/* messages */
.msgs { margin-bottom: 16px; } .msg { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; border: 1px solid; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .9rem; animation: pop .18s ease-out; }
.msg.success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ok-ink); }
.msg.error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad-ink); }
.msg.warning, .msg.info { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn-ink); }
.msg button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 1.1rem; opacity: .7; display: inline-grid; padding: 2px; border-radius: 4px; } .msg button:hover { opacity: 1; }

/* toasts */
.toasts { position: fixed; top: 68px; right: 16px; z-index: 130; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; margin: 0; justify-content: flex-start; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 11px 12px 11px 14px; animation: toast-in .22s cubic-bezier(.2,.9,.3,1.2); transition: opacity .2s, transform .2s; }
.toast > span { flex: 1; } .toast > svg.i { margin-top: 1px; }
.toast.success > svg.i { color: var(--ok); } .toast.error > svg.i { color: var(--bad); } .toast.warning > svg.i, .toast.info > svg.i { color: var(--warn); }
.toast.error { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--card); color: var(--text); }
.toast.success, .toast.warning, .toast.info { background: var(--card); color: var(--text); border-color: var(--line); }
.toast.out { opacity: 0; transform: translateX(16px); }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* empty states */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .empty-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; margin-bottom: 12px; }
.empty h3 { color: var(--text); font-size: 1rem; margin: 0 0 4px; }
.empty p { margin: 0 auto 16px; max-width: 380px; font-size: .9rem; }
.empty .actions { justify-content: center; }
.empty.sm { padding: 22px 16px; } .empty.sm .empty-ic { width: 38px; height: 38px; border-radius: 10px; margin-bottom: 8px; } .empty.sm p { margin-bottom: 10px; }

/* filter panel toggle */
.searchbox.collapsed { display: none; }
.btn.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); color: var(--accent-ink); }

/* record header meta */
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: .84rem; color: var(--muted); }
.meta > span { display: inline-flex; align-items: center; gap: 6px; }
.meta .avatar { width: 20px; height: 20px; font-size: .66rem; }

/* tables */
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); }
table.grid th { text-align: left; font-size: .76rem; font-weight: 600; letter-spacing: .01em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--sunken); white-space: nowrap; }
table.grid th a { color: inherit; } table.grid th a:hover { color: var(--text); text-decoration: none; } table.grid th .arr { color: var(--accent); }
table.grid td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .9rem; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr { transition: background .08s; }
table.grid tbody tr:hover { background: color-mix(in srgb, var(--sunken) 70%, transparent); }
table.grid td a:not(.btn) { font-weight: 500; }
table.grid td.sel, table.grid th.sel { width: 38px; padding-right: 0; }
.tbl-wrap { overflow-x: auto; }
.chk.on { color: var(--ok); }
.tag { display: inline-block; font-size: .72rem; font-weight: 500; line-height: 1.5; padding: 1px 8px; border-radius: 999px; background: var(--neutral-soft); color: var(--neutral-ink); }
.tag-warn { background: var(--warn-soft); color: var(--warn-ink); } .tag-bad { background: var(--bad-soft); color: var(--bad-ink); } .tag-ok { background: var(--ok-soft); color: var(--ok-ink); }
.thumb { max-height: 60px; border-radius: 6px; } .email-primary { font-weight: 600; }
pre.json { background: var(--sunken); padding: 10px; border-radius: var(--radius-sm); font-size: .8rem; overflow: auto; margin: 0; }

/* list toolbar / search */
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pager { display: flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); }
.pager a, .pager span.cur { min-width: 30px; text-align: center; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--text); background: var(--card); }
.pager span.cur { background: var(--accent); border-color: var(--accent); color: var(--card); }
.pager a:hover { background: var(--sunken); text-decoration: none; } .pager .dis { opacity: .4; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; }
.searchbox { padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.searchbox .tabs { display: flex; gap: 4px; margin-bottom: 12px; font-size: .86rem; }
.searchbox .tabs a { padding: 4px 10px; color: var(--muted); border-radius: 6px; } .searchbox .tabs a:hover { color: var(--text); text-decoration: none; }
.searchbox .tabs a.on { color: var(--text); background: var(--card); font-weight: 600; box-shadow: var(--shadow); }
.searchgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; align-items: end; }
.searchgrid label { font-size: .78rem; font-weight: 500; color: var(--muted); display: block; margin-bottom: 4px; }
.searchrow-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.range { display: flex; gap: 6px; align-items: center; } .range input { width: 100%; }
.filter-chip { display: inline-flex; align-items: center; background: var(--accent-soft); color: var(--accent-ink); padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 500; margin-right: 6px; }

/* forms */
input[type=text], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=password], input[type=tel], input[type=url], input[type=search], input[type=time], select, textarea, input:not([type]) {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font-size: .9rem; font-family: inherit; line-height: 1.35; box-shadow: 0 1px 1px rgba(16,16,24,.03); transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line-2)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; accent-color: var(--accent); vertical-align: -2px; cursor: pointer; }
select[multiple] { min-height: 90px; }
.field-table { width: 100%; border-collapse: collapse; }
.field-table td { padding: 10px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.field-table tr:last-child td { border-bottom: 0; }
.field-table td.lbl { width: 15%; color: var(--muted); font-size: .82rem; font-weight: 500; padding-top: 12px; }
.field-table td.val { width: 35%; word-break: break-word; }
.field-table td.val.editable { cursor: text; border-radius: 6px; transition: background .1s; } .field-table td.val.editable:hover { background: var(--sunken); }
.field-table td.val.full { width: 85%; }
.req { color: var(--bad); } .errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--bad); font-size: .8rem; } .helptext { color: var(--muted); font-size: .78rem; display: block; margin-top: 3px; }
.tabs-h { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; flex-wrap: wrap; }
.tabs-h button { background: none; border: 0; padding: 12px 12px 10px; cursor: pointer; font-family: inherit; font-size: .88rem; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s; }
.tabs-h button:hover { color: var(--text); }
.tabs-h button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab-pane { display: none; } .tab-pane.on { display: block; }
.form-actions { position: sticky; bottom: 0; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 8px; align-items: center; border-radius: 0 0 var(--radius) var(--radius); z-index: 5; }

/* edit form: stacked sections + labels-above grid */
.fsec + .fsec { border-top: 1px solid var(--line); }
.fsec-h { display: flex; align-items: center; gap: 8px; padding: 14px 20px; font-weight: 600; font-size: .95rem; cursor: pointer; list-style: none; user-select: none; }
.fsec-h::-webkit-details-marker { display: none; }
.fsec-h:hover { background: color-mix(in srgb, var(--sunken) 60%, transparent); }
.fsec-h .chev { display: inline-flex; color: var(--muted); transition: transform .15s; transform: rotate(-90deg); }
.fsec[open] > .fsec-h .chev { transform: none; }
.fsec-more { margin-left: auto; font-weight: 500; font-size: .84rem; }
.edit-card .when-full { display: none; } .edit-card:not(.compact) .when-full { display: inline; } .edit-card:not(.compact) .when-compact { display: none; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding: 4px 20px 22px; }
.fcell { min-width: 0; } .fcell.full { grid-column: 1 / -1; }
.edit-card.compact .fcell.extra { display: none; }
.flbl { display: block; font-size: .84rem; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.fcell.has-error input, .fcell.has-error select, .fcell.has-error textarea { border-color: var(--bad); }
.fcell.has-error .flbl { color: var(--bad-ink); }
.fcell input[type=checkbox] { margin-top: 6px; }
.form-errors { flex-direction: column; align-items: flex-start; } .form-errors a { color: inherit; text-decoration: underline; font-weight: 500; }
.duration { display: flex; align-items: center; gap: 8px; } .duration input, .duration select { width: 90px; flex: none; } .duration span { color: var(--muted); font-size: .88rem; margin-right: 8px; }
.relate .rbtn { display: inline-grid; place-items: center; padding: 0 10px; color: var(--muted); } .relate .rbtn:hover { color: var(--text); }
.form-hint { font-size: .8rem; } .form-hint kbd { margin-right: 1px; }
@media (max-width: 700px) { .fgrid { grid-template-columns: 1fr; padding: 4px 16px 18px; } .fsec-h { padding: 14px 16px; } .form-hint { display: none; } }

/* relate widget / autocomplete */
.relate { position: relative; display: flex; gap: 4px; } .relate .rtext { flex: 1; } .relate .rbtn { padding: 5px 9px; }
.ac-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 70; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 260px; overflow: auto; padding: 4px; }
.ac-list div { padding: 7px 10px; cursor: pointer; font-size: .88rem; border-radius: 5px; } .ac-list div:hover, .ac-list div.on { background: var(--accent-soft); color: var(--accent-ink); }
.email-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; } .email-row input[type=email], .email-row input[type=text] { flex: 1 1 200px; min-width: 180px; } .email-row label { font-size: .78rem; white-space: nowrap; color: var(--muted); }
.parent-row { display: grid; grid-template-columns: 150px 1fr; gap: 6px; }

/* subpanels */
.subpanel { margin-bottom: 14px; } .subpanel .sp-h { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; cursor: pointer; user-select: none; border-radius: var(--radius); }
.subpanel .sp-h:hover { background: color-mix(in srgb, var(--sunken) 60%, transparent); }
.subpanel .sp-h h3 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: 8px; } .subpanel .sp-h .chev { transition: transform .15s; display: inline-flex; color: var(--muted); } .subpanel.collapsed .chev { transform: rotate(-90deg); }
.subpanel:not(.collapsed) .sp-h { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.subpanel.collapsed .sp-body { display: none; } .sp-actions { display: flex; gap: 6px; } .sp-empty { padding: 20px 18px; color: var(--muted); font-size: .88rem; text-align: center; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(9,9,14,.5); backdrop-filter: blur(2px); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding-top: 7vh; }
.modal-bg.open { display: flex; } .modal { background: var(--card); border: 1px solid var(--line); border-radius: 14px; width: min(860px, 94vw); max-height: 84vh; overflow: auto; box-shadow: 0 24px 64px rgba(0,0,0,.3); animation: pop .15s ease-out; }
.modal-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 600; position: sticky; top: 0; background: var(--card); z-index: 1; } .modal-h .btn-link { color: var(--muted); border-radius: 6px; padding: 4px; } .modal-h .btn-link:hover { background: var(--sunken); color: var(--text); }
.modal-b { padding: 0; }

/* command palette */
.cmdk-bg { position: fixed; inset: 0; z-index: 120; background: rgba(9,9,14,.45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.cmdk-bg[hidden] { display: none; }
.cmdk { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.35); overflow: hidden; animation: pop .14s ease-out; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-in input { border: 0 !important; box-shadow: none !important; background: transparent; padding: 16px 0; font-size: 1rem; flex: 1; }
.cmdk-list { overflow-y: auto; padding: 6px; }
.cmdk-h { padding: 10px 10px 4px; font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.cmdk-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-size: .9rem; scroll-margin: 6px; }
.cmdk-list a svg.i { color: var(--muted); }
.cmdk-list a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-list a small { color: var(--muted); font-size: .76rem; flex: none; }
.cmdk-list a:hover { text-decoration: none; }
.cmdk-list a.on { background: var(--accent-soft); color: var(--accent-ink); } .cmdk-list a.on svg.i { color: var(--accent); }
.cmdk-empty { padding: 28px; text-align: center; color: var(--muted); font-size: .9rem; }
.cmdk-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); background: var(--sunken); }
kbd { font-family: inherit; font-size: .7rem; font-weight: 500; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--card); color: var(--muted); margin-right: 3px; }
body.cmdk-open { overflow: hidden; }
.search-btn { display: none; } @media (max-width: 900px) { .search-btn { display: inline-grid; } }
@media (max-width: 600px) { .cmdk-foot { display: none; } .cmdk-bg { padding-top: 8px; } }

/* dashboard */
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; } @media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
.dashlet .card-h .acts { display: flex; gap: 2px; } .dashlet table.grid td, .dashlet table.grid th { padding: 8px 12px; }
.bars .bar-row { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 10px; margin: 8px 0; font-size: .85rem; } .bars .track { background: var(--sunken); border-radius: 999px; height: 10px; overflow: hidden; } .bars .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.pie { width: 150px; height: 150px; border-radius: 50%; flex: none; } .legend { font-size: .85rem; } .legend div { display: flex; align-items: center; gap: 8px; margin: 4px 0; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .n { font-size: 1.75rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .kpi .l { color: var(--muted); font-size: .8rem; font-weight: 500; }

/* calendar */
.cal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); } .cal-dow { padding: 9px; font-size: .75rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--sunken); text-align: center; }
.cal-cell { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5px 6px; position: relative; } .cal-cell.other { background: color-mix(in srgb, var(--sunken) 60%, transparent); color: var(--muted); }
.cal-cell.today .dn > :first-child { background: var(--accent); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; }
.cal-cell .dn { font-size: .8rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; } .cal-cell .dn a.add { opacity: 0; color: var(--muted); } .cal-cell:hover .dn a.add { opacity: 1; }
.ev { display: block; font-size: .75rem; font-weight: 500; padding: 2px 7px; border-radius: 5px; margin: 2px 0; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; }
.ev.Calls { background: #3b82f6; } .ev.Meetings { background: #0d9488; } .ev.Tasks { background: #16a34a; } .ev.FP_events { background: #ea580c; } .ev:hover { text-decoration: none; filter: brightness(1.08); }
.cal-week { display: grid; grid-template-columns: 56px repeat(7, 1fr); } .cal-week .hr { height: 48px; border-bottom: 1px solid var(--line); font-size: .72rem; color: var(--muted); padding: 2px 6px; text-align: right; }
.cal-week .col { border-left: 1px solid var(--line); position: relative; } .cal-week .slot { height: 48px; border-bottom: 1px solid var(--line); } .cal-week .evb { position: absolute; left: 2px; right: 2px; border-radius: 5px; padding: 2px 6px; font-size: .74rem; color: #fff; overflow: hidden; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* misc */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } @media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.admin-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); color: var(--text); box-shadow: var(--shadow); transition: border-color .12s, box-shadow .12s, transform .12s; }
.admin-item:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.admin-item .ic { font-size: 1.2rem; width: 38px; height: 38px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; } .admin-item b { display: block; font-weight: 600; margin-bottom: 1px; } .admin-item span { font-size: .82rem; color: var(--muted); }
.stage-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.stage-col { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; } .stage-col h4 { margin: 2px 4px 10px; font-size: .84rem; font-weight: 600; }
.stage-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; font-size: .86rem; box-shadow: var(--shadow); transition: box-shadow .12s, border-color .12s; } .stage-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.gantt { display: grid; font-size: .8rem; } .gantt .row { display: grid; border-bottom: 1px solid var(--line); align-items: center; } .gantt .bar { height: 16px; background: var(--accent); border-radius: 5px; position: relative; } .gantt .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(0,0,0,.25); border-radius: 5px; }
.progress { background: var(--sunken); border-radius: 999px; height: 8px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(60rem 40rem at 10% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
  radial-gradient(50rem 36rem at 110% 110%, color-mix(in srgb, #5ab0ee 12%, transparent), transparent 60%), var(--bg); }
.login-card { background: var(--card); padding: 36px 34px 28px; border: 1px solid var(--line); border-radius: 16px; width: min(400px, 100%); box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 1.4rem; margin-bottom: 2px; } .login-card > p.muted { margin-top: 0; }
.login-card .logo { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #5ab0ee)); width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; margin-bottom: 16px; color: #fff; box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--accent) 55%, transparent); }
.login-card label { display: block; margin: 14px 0 5px; font-size: .84rem; font-weight: 500; color: var(--text); }

.li-table input, .li-table select { padding: 5px 7px; font-size: .86rem; } .li-table td { padding: 4px; } .li-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; } .li-group > .gh { padding: 8px 12px; background: var(--sunken); display: flex; gap: 8px; align-items: center; }
.totals { margin-left: auto; width: 320px; } .totals td { padding: 5px 8px; font-variant-numeric: tabular-nums; } .totals tr.grand td { font-weight: 700; border-top: 1px solid var(--line-2); padding-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); font-size: .82rem; margin: 2px 4px 2px 0; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0; } .chip button:hover { color: var(--bad); }
.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 18px; } .timeline .item { position: relative; margin-bottom: 16px; } .timeline .item:before { content: ''; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.dup-box { border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; color: var(--warn-ink); }
@media print { .topbar, .sidebar, .actions, .sp-actions, .form-actions { display: none !important; } main { padding: 0; } .card { box-shadow: none; } }

.li-table th:nth-child(3), .li-table td:nth-child(3) { min-width: 80px; } .li-table td:nth-child(8) select { min-width: 84px; } .li-table td:nth-child(5) select { min-width: 70px; } .li-table td input { min-width: 70px; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .topbar { padding: 0 10px; } .page-head h1 { font-size: 1.25rem; } .field-table td.lbl, .field-table td.val { display: block; width: 100%; } .field-table tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .field-table td { border: 0 !important; padding: 2px 16px !important; } .grid2, .dash { grid-template-columns: 1fr; } .parent-row { grid-template-columns: 1fr; }
}

/* platform owner working inside an organization */
.support-bar { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 7px 16px; background: var(--warn-soft); color: var(--warn-ink); border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); font-size: .86rem; }
.support-bar form { margin: 0; }
.support-bar.bad { background: var(--bad-soft); color: var(--bad-ink); border-bottom-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.star svg.i { vertical-align: -3px; } .star.on svg.i { fill: currentColor; }
/* stored HTML (e-mail / PDF templates): sandboxed preview + source */
.html-preview { display: block; width: 100%; min-height: 160px; height: 240px; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.html-source { margin-top: 6px; font-size: .82rem; } .html-source summary { cursor: pointer; color: var(--muted); }
.html-source pre { white-space: pre-wrap; word-break: break-word; background: var(--bg-2, var(--card)); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin: 6px 0 0; max-height: 240px; overflow: auto; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
/* platform: delete organization page */
.del-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; } @media (max-width: 900px) { .del-layout { grid-template-columns: 1fr; } }
.del-steps .card { margin-bottom: 14px; } .del-steps p { margin: 8px 0 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; } .stat .n { font-size: 1.35rem; font-weight: 650; font-variant-numeric: tabular-nums; } .stat .l { color: var(--muted); font-size: .8rem; }
.step-h { display: flex; align-items: center; gap: 10px; } .step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: .8rem; font-weight: 650; }
.step.danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); } .step.danger .step-n { background: var(--bad-soft); color: var(--bad-ink); }
.step-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; } .btn-danger-solid:hover { filter: brightness(.95); } .btn-danger-solid:disabled { opacity: .45; cursor: not-allowed; filter: none; }
code.pick { user-select: all; }
.step form { margin-top: 14px; } .step form label { display: block; margin-bottom: 6px; font-size: .9rem; }
/* sign in with Google */
.or-sep { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: .8rem; } .or-sep::before, .or-sep::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.google-btn { width: 100%; justify-content: center; gap: 10px; padding: 10px; background: #fff; color: #1f1f1f; border-color: #dadce0; } .google-btn:hover { background: #f8f9fa; }
/* visual report builder */
.rb-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; } @media (max-width: 1100px) { .rb-layout { grid-template-columns: 1fr; } }
.rb-steps .card { margin-bottom: 14px; } .rb-help { margin: 6px 0 12px; font-size: .85rem; }
.rb-add { display: flex; gap: 8px; margin-bottom: 10px; } .rb-add select { flex: 1; }
.rb-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) 46px minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, .9fr) auto; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.rb-col-head { color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding-top: 0; }
.rb-col input:not([type=checkbox]), .rb-col select { width: 100%; min-width: 0; padding: 5px 6px; font-size: .82rem; } .rb-col .center { text-align: center; }
.rb-col-name { display: flex; flex-direction: column; line-height: 1.25; } .rb-col-name small { font-size: .75rem; }
.rb-col-acts { display: flex; gap: 3px; } .rb-col-acts .btn { padding: 4px 5px; }
@media (max-width: 700px) { .rb-col { grid-template-columns: 1fr 1fr; } .rb-col-head { display: none; } .rb-col-name { grid-column: 1 / -1; } }
.rb-empty { margin: 4px 0 0; font-size: .85rem; }
.rb-filter { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; } .rb-filter > select, .rb-filter > input { flex: 1 1 0; min-width: 0; width: auto; } .rb-filter > .btn { flex: none; }
@media (max-width: 700px) { .rb-filter { flex-wrap: wrap; } .rb-filter > select, .rb-filter > input { flex-basis: 140px; } }
.rb-filter .rb-logic { flex: 0 0 70px; } .rb-filter .rb-narrow { flex: 0 1 130px; }
.rb-preview { position: sticky; top: 72px; } .rb-preview svg { max-width: 100%; height: auto; margin-bottom: 10px; } .rb-total td { border-top: 2px solid var(--line-2); font-weight: 600; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } @media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
.rb-params { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; } .rb-params label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.rb-ask { display: flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); white-space: nowrap; flex: none; margin: 0; }
/* task discussion */
.task-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; } .task-actions form { margin: 0; } .task-actions .muted { margin-right: auto; }
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.msg-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; max-width: 85%; } .msg-item.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.msg-item .who { display: flex; align-items: center; gap: 6px; font-size: .82rem; margin-bottom: 4px; } .msg-item .text { font-size: .92rem; }
.avatar.sm { width: 20px; height: 20px; font-size: .7rem; }
.thread-form textarea { width: 100%; } .thread-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
/* delegation */
.delegate summary { list-style: none; display: inline-flex; } .delegate summary::-webkit-details-marker { display: none; } .delegate[open] summary { display: none; }
.delegate-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; max-height: 220px; overflow: auto; }
.chip-check { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 10px; font-weight: 400; font-size: .88rem; margin: 0; cursor: pointer; }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); } .chip-check .muted { font-size: .78rem; }

/* departments & roles */
.dr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; } @media (max-width: 1150px) { .dr-layout { grid-template-columns: 1fr; } }
.dr-side { display: grid; gap: 16px; } .dr-side .card { margin: 0; }
.dr-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(190px, 230px) minmax(0, 1.5fr); gap: 18px; align-items: start; padding: 14px 18px; border-top: 1px solid var(--line); transition: background .15s; }
.dr-head { padding-top: 10px; padding-bottom: 10px; background: var(--sunken); color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dr-row:not(.dr-head):hover { background: color-mix(in srgb, var(--sunken) 55%, transparent); }
.dr-fallback, .dr-fallback:not(.dr-head):hover { background: var(--sunken); }
.dr-changed, .dr-changed:not(.dr-head):hover { background: var(--accent-soft); } .dr-changed select { border-color: var(--accent); }
@media (max-width: 760px) { .dr-row { grid-template-columns: 1fr; gap: 8px; } .dr-head { display: none; } }
.dr-dept { display: flex; gap: 10px; align-items: center; min-width: 0; } .dr-dept b { display: block; font-weight: 600; } .dr-dept a, .dr-dept .muted { font-size: .8rem; }
.dr-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.dr-access { padding-top: 2px; min-width: 0; }
.dr-bar { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--sunken); margin: 2px 0 7px; }
.k-Full { background: var(--ok); } .k-Edit { background: var(--accent); } .k-Own { background: var(--warn); } .k-Read { background: var(--line-2); }
.dr-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .78rem; color: var(--muted); } .dr-legend b { color: var(--text); font-weight: 600; }
.dr-legend i, .dr-mods i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.dr-mods { margin-top: 4px; font-size: .82rem; } .dr-mods summary { cursor: pointer; color: var(--link); font-size: .78rem; width: max-content; }
.dr-mods dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 8px 0 2px; } .dr-mods dt { color: var(--muted); white-space: nowrap; } .dr-mods dd { margin: 0; }
.dr-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--card); border-radius: 0 0 var(--radius) var(--radius); }
.dr-foot .muted { font-size: .82rem; } .dr-foot .dr-dirty { color: var(--accent-ink); font-weight: 500; }
.dr-pending { list-style: none; padding: 0; margin: 0; } .dr-pending li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .86rem; } .dr-pending li:first-child { border-top: 0; }
.dr-ok { display: flex; gap: 10px; align-items: flex-start; color: var(--ok-ink); } .dr-ok b { color: var(--text); } .dr-ok .muted { font-size: .85rem; }
.dr-missing { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); }
.dr-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; } .dr-steps li { counter-increment: s; position: relative; padding-left: 32px; margin-bottom: 12px; font-size: .86rem; } .dr-steps li:last-child { margin-bottom: 0; }
.dr-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; font-size: .74rem; display: grid; place-items: center; }

/* login: marketing panel beside the form */
.login-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-split .login-wrap { min-height: 100vh; }
.login-pitch { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px clamp(28px, 5vw, 72px); color: #fff;
  background: radial-gradient(40rem 28rem at 110% -10%, rgba(255,255,255,.16), transparent 60%), radial-gradient(36rem 30rem at -20% 120%, rgba(10,40,90,.35), transparent 60%), linear-gradient(135deg, #2671bd, #2e7fcb 50%, #398bd8); }
.login-pitch::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%); }
.login-pitch > * { position: relative; z-index: 1; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.lp-logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28); }
.lp-body { max-width: 540px; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-size: .8rem; font-weight: 500; }
.login-pitch h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; margin: 18px 0 14px; color: #fff; }
.login-pitch h2 span { color: #cfe6fb; }
.lp-lead { font-size: 1.05rem; line-height: 1.6; color: rgba(255,255,255,.88); margin: 0 0 28px; }
.lp-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.lp-points li { display: flex; gap: 14px; align-items: flex-start; font-size: .92rem; line-height: 1.5; color: rgba(255,255,255,.82); }
.lp-points li > span { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.lp-points b { display: block; color: #fff; font-weight: 600; font-size: .98rem; }
.lp-foot { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .82rem; color: rgba(255,255,255,.8); } .lp-foot span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 960px) {
  .login-split { grid-template-columns: 1fr; align-content: start; }
  .login-pitch { padding: 24px 20px 26px; gap: 18px; justify-content: flex-start; }
  .login-pitch h2 { font-size: 1.7rem; margin: 12px 0 8px; } .lp-lead { margin: 0; font-size: .95rem; }
  .lp-points, .lp-foot, .lp-eyebrow { display: none; }
  .login-split .login-wrap { min-height: auto; padding: 24px 16px 40px; }
}
.login-split .login-card .logo { display: none; }
.login-split { background: radial-gradient(50rem 36rem at 110% 110%, color-mix(in srgb, #5ab0ee 12%, transparent), transparent 60%), var(--bg); }
.login-split .login-wrap { background: transparent; }
.login-split-wide .login-card { width: min(560px, 100%); }
.login-split .login-wrap { padding: 32px 24px; }
@media (min-width: 961px) { .login-pitch { position: sticky; top: 0; min-height: 100vh; align-self: start; } }
.lp-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 26px; display: grid; gap: 14px; }
.lp-steps li { counter-increment: s; position: relative; padding-left: 50px; font-size: .92rem; line-height: 1.5; color: rgba(255,255,255,.82); min-height: 38px; }
.lp-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.lp-steps b { display: block; color: #fff; font-weight: 600; font-size: .98rem; }
.lp-included { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); border-radius: 14px; padding: 16px 18px; }
.lp-included > b { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.75); margin-bottom: 10px; font-weight: 600; }
.lp-included ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: .88rem; }
.lp-included li { display: flex; gap: 7px; align-items: flex-start; } .lp-included li svg { flex: none; margin-top: 3px; color: #cfe6fb; }
@media (max-width: 960px) { .lp-steps, .lp-included { display: none; } .login-split .login-wrap { padding: 24px 16px 40px; } }

/* public site: menu on login pages, pricing, terms, privacy */
.login-split .login-wrap { position: relative; }
.login-wrap > .site-nav { position: absolute; top: 22px; right: 28px; }
.site-nav { display: flex; gap: 4px; } .site-nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .9rem; }
.site-nav a:hover { color: var(--text); background: var(--sunken); text-decoration: none; } .site-nav a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); }
.auth-legal { width: min(400px, 100%); text-align: center; font-size: .78rem; color: var(--muted); margin: 14px auto 0; }
.login-split-wide .auth-legal { width: min(560px, 100%); }
@media (max-width: 960px) { .login-wrap > .site-nav { position: static; justify-content: center; margin: 0 0 14px; } .login-split .login-wrap { display: flex; flex-direction: column; align-items: center; } }
body.site { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.site-in { width: min(1120px, 100%); margin: 0 auto; padding: 0 20px; }
.site-head { background: linear-gradient(90deg, #2671bd, #2e7fcb 55%, #398bd8); color: #fff; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.site-head .site-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.site-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.05rem; } .site-brand:hover { text-decoration: none; }
.site-brand .lp-logo { width: 32px; height: 32px; }
.site-head .site-nav { margin-left: auto; } .site-head .site-nav a { color: rgba(255,255,255,.88); } .site-head .site-nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.site-head .site-nav a[aria-current] { background: rgba(255,255,255,.2); color: #fff; }
.site-cta { display: flex; align-items: center; gap: 10px; } .site-login { color: #fff; font-weight: 500; padding: 7px 14px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; } .site-login:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.btn.site-btn-light { background: #fff; color: #1d5fa3; border-color: #fff; border-radius: 999px; font-weight: 600; } .btn.site-btn-light:hover { background: #edf4fd; }
.site-main { flex: 1; padding-bottom: 56px; }
.site-hero { background: linear-gradient(180deg, var(--accent-soft), var(--bg)); padding: 56px 0 36px; text-align: center; }
.site-hero .lp-eyebrow { background: var(--card); border-color: var(--line); color: var(--accent-ink); }
.site-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -.03em; line-height: 1.1; margin: 16px auto 12px; max-width: 760px; } .site-hero h1 span { color: var(--accent); }
.site-hero p { color: var(--muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto; }
.site-hero-sm { padding: 44px 0 28px; } .site-hero-sm h1 { margin-top: 0; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 8px 0 28px; align-items: stretch; }
.price-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.price-card h3 { margin: 0; font-size: 1.1rem; } .price-card .muted { margin: 0; font-size: .9rem; flex: 1; } .price-card .btn { justify-content: center; margin-top: 8px; padding: 10px; }
.price-card.is-popular { border: 2px solid var(--accent); box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--accent) 45%, transparent); }
.price-badge { position: absolute; top: -12px; left: 24px; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.price-amount { font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; } .price-amount .cur { font-size: 1rem; font-weight: 600; color: var(--muted); } .price-amount .per { font-size: .9rem; font-weight: 500; color: var(--muted); margin-left: 4px; }
.price-users { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--accent-ink); }
.price-included h2, .price-faq h2, .price-cta h2 { font-size: 1.2rem; margin: 0 0 14px; }
.price-included ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 24px; }
.price-included li { display: flex; gap: 8px; align-items: center; } .price-included li svg { color: var(--ok); flex: none; }
.price-faq { margin: 32px 0; max-width: 780px; } .price-faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.price-faq summary { cursor: pointer; font-weight: 600; } .price-faq details p { margin: 10px 0 0; color: var(--muted); }
.price-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px 32px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #2671bd, #2e7fcb 50%, #398bd8); }
.price-cta h2 { color: #fff; margin-bottom: 4px; } .price-cta p { margin: 0; color: rgba(255,255,255,.85); }
.legal { max-width: 820px; margin: 0 auto; padding: 32px 40px; line-height: 1.7; } .legal h2 { font-size: 1.1rem; margin: 26px 0 8px; } .legal h2:first-child { margin-top: 0; } .legal ul { padding-left: 22px; } .legal li { margin-bottom: 4px; }
.site-foot { border-top: 1px solid var(--line); background: var(--card); font-size: .85rem; color: var(--muted); }
.site-foot .site-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 18px; padding-bottom: 18px; } .site-foot a { color: var(--muted); margin-left: 16px; } .site-foot a:hover { color: var(--text); }
@media (max-width: 760px) {
  .site-head .site-in { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 8px 12px; }
  .site-head .site-nav { order: 3; width: 100%; margin: 0; justify-content: center; } .site-cta { margin-left: auto; }
  .legal { padding: 22px 18px; } .site-foot a { margin: 0 14px 0 0; }
}
.login-split .login-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; }
main.site-main { padding: 0 0 56px; max-width: none; }
@media (max-width: 960px) { .site-hero .lp-eyebrow { display: inline-flex; } }
.team-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; } .team-quick .muted { font-size: .78rem; margin-left: 2px; }
.team-filter { max-width: 280px; margin-bottom: 10px; }
.chip-check[hidden] { display: none; }
.tag[hidden] { display: none; }


/* ==== Redesign: navy navigation, stronger hierarchy ==== */
:root { --side-bg: #0d2440; --side-bg-2: #123157; --side-text: #b9c8dc; --side-w: 244px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; }
.topbar { background: linear-gradient(90deg, var(--side-bg) var(--side-w), var(--card) var(--side-w)); backdrop-filter: none; -webkit-backdrop-filter: none; padding-left: 12px; }
:root[data-sidebar="collapsed"] { --side-w: 64px; }
.topbar .side-toggle { color: #fff; } .topbar .side-toggle:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar .brand { color: #fff; font-weight: 800; width: calc(var(--side-w) - 62px); min-width: 0; overflow: hidden; }
:root[data-sidebar="collapsed"] .topbar .brand { color: var(--text); width: auto; margin-left: 18px; }
.sidebar { background: linear-gradient(180deg, var(--side-bg), var(--side-bg-2)); border-right: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.sidebar a, .side-nav .nav-item { color: var(--side-text); }
.sidebar a:hover, .side-nav .nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar a .ic, .side-nav .nav-item .ic { color: #8ea3bf; }
.side-nav .nav-item:hover .ic { color: #fff; }
.side-nav { border-bottom-color: rgba(255,255,255,.1); }
.side-nav .nav-item { padding: 8px 10px; }
.side-nav .nav-item.on { background: linear-gradient(135deg, #2e7fcb, #2671bd); color: #fff; box-shadow: 0 6px 14px -6px rgba(46,127,203,.8); }
.side-nav .nav-item.on .ic { color: #fff; }
.sidebar h4, .side-recent summary { color: #7f95b2; text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; }
.side-recent summary { margin: 18px 10px 6px; cursor: pointer; font-weight: 600; }
.btn { font-weight: 600; }
.btn-primary { background: linear-gradient(180deg, #2e7fcb, #2671bd); border-color: #2671bd; color: #fff; }
.btn-primary:hover { background: #1f65ab; border-color: #1f65ab; }
.page-head h1 { font-size: 1.65rem; font-weight: 800; }
.page-head h1 > span:first-child:not(:empty) { background: linear-gradient(135deg, #2e7fcb, #2671bd); color: #fff; border-radius: 12px; }
.page-head h1 > span:first-child:not(:empty) svg { color: #fff; }
.card { border-color: transparent; box-shadow: var(--shadow); }
.card > .card-h { font-weight: 700; }
.tag:empty { display: none; }
table.grid th { background: transparent; text-transform: uppercase; font-size: .68rem; letter-spacing: .07em; }
table.grid tbody tr:hover { background: var(--accent-soft); }
.list-grid td { white-space: nowrap; }
.list-grid td a:not(.btn) { color: var(--text); font-weight: 400; }
.list-grid td a:not(.btn):hover { color: var(--link); }
.list-grid td:nth-child(3), .list-grid td:nth-child(3) a:not(.btn) { color: var(--text); font-weight: 700; white-space: normal; min-width: 170px; }
.list-grid td.has-av { position: relative; padding-left: 58px; }
.list-grid td.has-av::before { content: attr(data-initial); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); text-transform: uppercase; }
.list-grid tbody tr:nth-child(3n+2) td.has-av::before { background: var(--ok-soft); color: var(--ok-ink); }
.list-grid tbody tr:nth-child(3n) td.has-av::before { background: var(--warn-soft); color: var(--warn-ink); }
.list-grid tbody tr:hover td.has-av::before { background: var(--card); }
@media (hover: hover) { .row-acts .btn { opacity: 0; } tr:hover .row-acts .btn, .row-acts .btn:focus-visible { opacity: 1; } }
.field-table td.lbl { font-size: .78rem; font-weight: 600; }
/* home */
.home-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding: 28px 30px; margin-bottom: 18px; border-radius: 18px; color: #fff; background: radial-gradient(36rem 20rem at 95% -20%, rgba(255,255,255,.2), transparent 60%), linear-gradient(120deg, #17406f, #2671bd 55%, #398bd8); box-shadow: 0 16px 34px -18px rgba(23,64,111,.7); }
.home-hero h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; margin: 2px 0 4px; color: #fff; }
.home-hero p { margin: 0; color: rgba(255,255,255,.86); } .hh-date { font-size: .82rem; font-weight: 600; color: #cfe6fb; }
.hh-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.hh-btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); color: #fff; } .btn.hh-btn:hover { background: #fff; color: #1d5fa3; }
.home-kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi-link { display: flex; align-items: center; gap: 14px; color: var(--text); border-color: transparent; transition: transform .15s, box-shadow .15s; }
.kpi-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-link .n, .kpi-link .l { display: block; } .kpi-link .n { font-weight: 800; line-height: 1.15; }
.kpi-ic { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; }
.tone-blue { background: var(--accent-soft); color: var(--accent-ink); } .tone-green { background: var(--ok-soft); color: var(--ok-ink); } .tone-amber { background: var(--warn-soft); color: var(--warn-ink); } .tone-navy { background: #e4e9f2; color: #17406f; }
.dashlet .bars .fill { background: linear-gradient(90deg, #2671bd, #5ab0ee) !important; }
.bars .bar-row { grid-template-columns: 130px 1fr auto; } .bar-row > span:last-child { white-space: nowrap; }
@media (hover: hover) { .dashlet .card-h .acts { opacity: 0; transition: opacity .12s; } .dashlet:hover .card-h .acts, .dashlet .card-h .acts:focus-within { opacity: 1; } }
.home-custom { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 900px) {
  .topbar { background: var(--side-bg); }
  .topbar .brand { width: auto; } .topbar .iconbtn { color: #fff; } .topbar .iconbtn:hover { background: rgba(255,255,255,.12); color: #fff; }
  .home-hero { padding: 22px 20px; }
}
@media print { .home-hero { display: none; } }
.topbar { border-bottom: 0; background: linear-gradient(90deg, var(--side-bg) var(--side-w), transparent var(--side-w)), linear-gradient(0deg, var(--line) 1px, var(--card) 1px); }
.dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash > div { min-width: 0; }
.tone-navy { background: var(--sunken); color: var(--accent-ink); }
@media (max-width: 1100px) { .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .topbar { background: var(--side-bg); } }
@media (max-width: 600px) {
  .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-kpis .kpi-link { padding: 12px; gap: 10px; } .home-kpis .kpi-ic { width: 38px; height: 38px; border-radius: 11px; }
}

/* compact menu, dashlet options, install button */
.dashlet .card-h .acts { opacity: 1 !important; }
.dashlet .dd-menu { font-weight: 400; z-index: 20; }
.sidebar { display: flex; flex-direction: column; } .side-ctx { flex: none; }
.side-ctx:empty { display: none; }
.side-install { margin-top: auto; flex: none; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(255,255,255,.08); border: 0; border-radius: 8px; color: #fff; font: inherit; font-size: .89rem; font-weight: 600; cursor: pointer; }
.side-install[hidden], .auth-install[hidden] { display: none; } .side-install:hover { background: rgba(255,255,255,.16); } .side-install .ic { display: inline-flex; width: 20px; justify-content: center; }
.auth-install { margin-top: 12px; }
@media (min-width: 901px) { :root[data-sidebar="collapsed"] .side-install { justify-content: center; padding: 9px 0; } :root[data-sidebar="collapsed"] .side-install .lb { display: none; } }
.dash.dash-single { grid-template-columns: minmax(0, 1fr); } .dash > div:not(:has(.dashlet)) { display: none; }

/* side menu search */
.side-search { position: relative; display: flex; align-items: center; flex: none; margin-bottom: 10px; color: #8ea3bf; }
.side-search svg.i { position: absolute; left: 10px; pointer-events: none; }
.side-search input { width: 100%; padding: 7px 10px 7px 31px; font-size: .86rem; background: rgba(255,255,255,.08); border: 1px solid transparent; border-radius: 8px; color: #fff; }
.side-search input::placeholder { color: #8ea3bf; }
.side-search input:hover { background: rgba(255,255,255,.12); border-color: transparent; }
.side-search input:focus { background: rgba(255,255,255,.14); border-color: #5ab0ee; box-shadow: none; }
.side-nav .nav-item[hidden] { display: none; }
.side-searching .side-more > summary, .side-searching .side-ctx { display: none; }
.side-nav .nav-item.side-first { background: rgba(255,255,255,.1); color: #fff; }
.side-none { padding: 8px 10px; color: #8ea3bf; font-size: .86rem; } .side-none[hidden] { display: none; }
@media (min-width: 901px) { :root[data-sidebar="collapsed"] .side-search { display: none; } }

/* side menu categories */
.side-group > summary { list-style: none; } .side-group > summary::-webkit-details-marker { display: none; }
.side-group .chev { margin-left: auto; display: inline-flex; color: #7f95b2; transition: transform .15s; transform: rotate(-90deg); }
.side-group[open] > summary .chev { transform: none; }
.side-group[open] > summary, .side-nav .nav-item.has-on { color: #fff; } .side-group[open] > summary .ic { color: #fff; }
.side-subs { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.14); }
.side-subs .nav-item { padding: 6px 9px; font-size: .84rem; font-weight: 500; gap: 8px; }
.side-group[hidden] { display: none; }
.side-searching .side-group > summary { pointer-events: none; }
@media (min-width: 901px) {
  :root[data-sidebar="collapsed"] .side-group .chev { display: none; }
  :root[data-sidebar="collapsed"] .side-subs { margin: 2px 0; padding: 0; border: 0; }
}

/* filter panel */
.searchbox { background: var(--card); padding: 16px 20px 18px; }
.fp-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.searchbox .tabs { margin: 0; padding: 3px; background: var(--sunken); border-radius: 10px; gap: 2px; }
.searchbox .tabs a { padding: 5px 14px; border-radius: 8px; font-weight: 500; }
.fp-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.fp-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: .84rem; }
.fp-saved-item { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 10px; background: var(--accent-soft); border-radius: 999px; } .fp-saved-item .btn-link { color: var(--muted); }
.searchgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
.searchgrid label { font-weight: 600; font-size: .76rem; }
.searchgrid:empty { display: none; }
.fp-group { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: start; border: 0; margin: 14px 0 0; padding: 0; min-width: 0; }
.fp-group legend { float: left; padding: 5px 0 0; font-size: .76rem; font-weight: 600; color: var(--muted); }
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 112px; overflow-y: auto; padding: 2px; }
.f-chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.f-chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.f-chip span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .84rem; font-weight: 500; color: var(--text); background: var(--card); transition: background .1s, border-color .1s; white-space: nowrap; }
.f-chip:hover span { background: var(--sunken); }
.f-chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.f-chip input:focus-visible + span { box-shadow: var(--ring); }
.searchrow-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.fp-save { margin-left: auto; font-weight: 600; }
@media (max-width: 700px) { .fp-group { display: block; } .fp-group legend { float: none; padding: 0 0 6px; } .fp-save { margin-left: 0; } }
.f-chip input:checked + span { background: #2671bd; border-color: #2671bd; color: #fff; }
.fp-save { gap: 6px; }

/* app header: long company names */
.topbar .brand .logo { flex: none; } .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
a.lp-brand, a.lp-brand:hover { color: #fff; text-decoration: none; }

/* landing page */
html:has(.ld-hero) { scroll-behavior: smooth; }
.ld-hero { background: radial-gradient(50rem 26rem at 85% -5%, rgba(90,176,238,.32), transparent 65%), linear-gradient(170deg, #0d2440, #17406f 60%, #2671bd); color: #fff; text-align: center; padding: 64px 0 0; }
.ld-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-size: .82rem; font-weight: 500; }
.ld-hero h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.06; margin: 18px auto 16px; max-width: 860px; color: #fff; } .ld-hero h1 span { color: #8cc8f7; }
.ld-hero > .site-in > p { font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.6; color: rgba(255,255,255,.85); max-width: 660px; margin: 0 auto 26px; }
.ld-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.btn.ld-btn-main, .btn.ld-btn-ghost { padding: 12px 22px; font-size: .98rem; border-radius: 999px; }
.btn.ld-btn-main { background: #fff; border-color: #fff; color: #1d5fa3; } .btn.ld-btn-main:hover { background: #edf4fd; }
.btn.ld-btn-ghost { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; } .btn.ld-btn-ghost:hover { background: rgba(255,255,255,.12); }
.ld-note { margin-top: 12px; font-size: .84rem; color: rgba(255,255,255,.72); }
.ld-shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--card); } .ld-shot img { display: block; width: 100%; height: auto; }
.ld-shot-hero { max-width: 1000px; margin: 40px auto -90px; position: relative; z-index: 1; border-color: rgba(255,255,255,.25); box-shadow: 0 30px 60px -20px rgba(9,25,48,.55); }
.ld-facts { padding: 130px 0 34px; border-bottom: 1px solid var(--line); }
.ld-facts .site-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 24px; }
.ld-facts .site-in > div { display: flex; gap: 12px; color: var(--accent); } .ld-facts svg { margin-top: 2px; }
.ld-facts span { color: var(--muted); font-size: .86rem; } .ld-facts b { display: block; color: var(--text); font-size: .94rem; }
.ld-sec { padding: 68px 0; scroll-margin-top: 60px; } .ld-alt { background: var(--card); }
.ld-head { text-align: center; max-width: 680px; margin: 0 auto 44px; } .ld-head h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; } .ld-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }
.ld-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; margin-bottom: 64px; }
.ld-flip .ld-copy { order: 2; } .ld-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ld-kicker { color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.ld-copy h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; letter-spacing: -.025em; margin: 6px 0 10px; } .ld-copy p { color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
.ld-copy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .ld-copy li { display: flex; gap: 8px; align-items: flex-start; } .ld-copy li svg { color: var(--ok); margin-top: 3px; }
.ld-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.ld-grid > div { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); color: var(--accent); } .ld-grid h4 { color: var(--text); font-size: 1.02rem; margin: 10px 0 4px; } .ld-grid p { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.5; }
.ld-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.ld-steps li { counter-increment: s; text-align: center; } .ld-steps li::before { content: counter(s); display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; background: linear-gradient(135deg, #2e7fcb, #2671bd); color: #fff; font-weight: 800; font-size: 1.1rem; }
.ld-steps b { display: block; font-size: 1.05rem; margin-bottom: 4px; } .ld-steps span { color: var(--muted); font-size: .92rem; }
.ld-more { text-align: center; margin: 0 0 32px; font-weight: 600; } .ld-more svg { vertical-align: -2px; }
@media (max-width: 900px) {
  .ld-hero { padding-top: 40px; } .ld-row, .ld-flip { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 44px; } .ld-flip .ld-copy { order: 0; }
  .ld-shot-hero { margin: 28px auto -44px; } .ld-facts { padding-top: 74px; } .ld-sec { padding: 46px 0; }
}
.ld-hero h1 span { display: block; }

/* login & registration: tidy links */
.login-split .login-wrap { justify-content: flex-start; padding: 0 24px; min-height: 100vh; }
.auth-top { width: 100%; display: flex; justify-content: space-between; padding: 20px 4px; flex: none; }
.auth-top a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-weight: 600; font-size: .88rem; } .auth-top a:hover { color: var(--text); text-decoration: none; }
.login-split .login-card { margin: auto 0; box-shadow: var(--shadow-lg); border-color: transparent; padding: 28px 30px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; margin-bottom: 22px; background: var(--sunken); border-radius: 10px; }
.auth-tabs a { padding: 7px 8px; text-align: center; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .88rem; } .auth-tabs a:hover { color: var(--text); text-decoration: none; }
.auth-tabs a[aria-current] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.login-card h1 { font-weight: 800; }
.auth-pwlabel { display: flex !important; justify-content: space-between; } .auth-pwlabel a { font-weight: 500; }
.pw-wrap { position: relative; } .pw-wrap input { padding-right: 58px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 3px 7px; border: 0; background: none; color: var(--link); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; border-radius: 6px; } .pw-toggle:hover { background: var(--sunken); }
.auth-sec { display: flex; align-items: center; gap: 8px; margin: 20px 0 2px; font-weight: 700; font-size: .92rem; }
.auth-num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: .74rem; font-weight: 800; }
.auth-grid { gap: 12px; }
.auth-more { margin-top: 8px; font-size: .82rem; color: var(--muted); } .auth-more summary { cursor: pointer; }
.auth-submit { width: 100%; justify-content: center; padding: 11px; margin-top: 20px; }
.login-split .auth-legal, .login-split-wide .auth-legal { width: auto; margin: 10px 0 0; }
.auth-back { margin: 16px 0 0; text-align: center; font-size: .88rem; font-weight: 600; } .auth-back svg { vertical-align: -2px; }
.auth-foot { width: 100%; flex: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; padding: 18px 4px; font-size: .8rem; color: var(--muted); }
.auth-foot a { color: var(--muted); } .auth-foot a:hover { color: var(--text); } .auth-foot .btn-link { font-size: inherit; font-weight: 600; gap: 4px; } .auth-foot .btn-link[hidden] { display: none; }
@media (max-width: 960px) {
  .login-split .login-wrap { padding: 0 16px; min-height: auto; }
  .login-pitch { padding: 16px 20px; gap: 8px; } .login-pitch h2 { font-size: 1.25rem; margin: 0; } .lp-lead { display: none; }
  .login-split .login-card { padding: 22px 20px; margin: 0; }
  .auth-top { padding: 12px 2px; }
}

/* ==== sales pages: landing, login, registration ==== */
.site-head { background: #0d2440; box-shadow: none; }
.site-head .site-in { width: min(1200px, 100%); } .ld-hero .site-in, .ld-sec .site-in, .ld-facts .site-in, .ld-mobile .site-in, .ld-final .site-in { width: min(1200px, 100%); }
.ld-hero { background: radial-gradient(60rem 30rem at 80% 0, rgba(90,176,238,.3), transparent 65%), linear-gradient(180deg, #0d2440, #17406f 70%, #2671bd); padding-top: 72px; }
.ld-shot-hero { max-width: 1080px; }
.ld-sec { padding: 84px 0; } .ld-head { margin-bottom: 48px; } .ld-head .ld-kicker { display: block; margin-bottom: 8px; }
.ld-facts { background: var(--card); padding-bottom: 38px; }
.ld-alt { background: var(--card); } .ld-alt .ld-grid > div { background: var(--bg); }
.ld-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; max-width: 980px; margin: 0 auto; }
.ld-compare > div { border-radius: 16px; padding: 28px; }
.ld-compare h3 { display: flex; align-items: center; gap: 9px; font-size: 1.1rem; font-weight: 800; margin: 0 0 16px; }
.ld-compare ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ld-before { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--muted); } .ld-before h3 { color: var(--text); } .ld-before h3 svg { color: var(--bad); }
.ld-after { background: linear-gradient(145deg, #17406f, #2671bd); color: #fff; box-shadow: 0 18px 40px -18px rgba(23,64,111,.7); } .ld-after h3 svg { color: #8cc8f7; } .ld-after h3 { color: #fff; }
.ld-row:last-child { margin-bottom: 0; }
.ld-mobile { background: linear-gradient(135deg, #0d2440, #17406f); color: #fff; overflow: hidden; }
.ld-mobile .site-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 64px; }
.ld-mobile h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; color: #fff; margin: 8px 0 12px; } .ld-mobile .ld-kicker { color: #8cc8f7; }
.ld-mobile p { color: rgba(255,255,255,.82); } .ld-mobile li { color: #fff; } .ld-mobile li svg { color: #8cc8f7; }
.ld-phone { width: min(300px, 80%); margin: 0 auto -100px; border: 9px solid #060f1c; border-bottom: 0; border-radius: 34px 34px 0 0; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); max-height: 500px; } .ld-phone img { display: block; width: 100%; height: auto; }
.ld-mobile { padding-bottom: 0; } .ld-mobile .ld-phone { margin-bottom: 0; }
.ld-faq { margin: 0 auto; }
.ld-final { background: radial-gradient(40rem 20rem at 50% 0, rgba(90,176,238,.35), transparent 70%), linear-gradient(180deg, #17406f, #0d2440); color: #fff; text-align: center; padding: 72px 0; }
.ld-final h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; color: #fff; margin: 0 0 8px; } .ld-final p { color: rgba(255,255,255,.82); font-size: 1.05rem; margin: 0 0 24px; }
.site-main { padding-bottom: 0 !important; } .site-main > .site-in:last-child { padding-bottom: 56px; }
.site-foot { background: #0a1c33; color: #9fb2cb; border: 0; }
.site-foot .site-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding-top: 40px; padding-bottom: 20px; width: min(1200px, 100%); }
.sf-brand b { color: #fff; font-size: 1.05rem; font-weight: 800; } .sf-brand p { margin: 8px 0 0; max-width: 300px; line-height: 1.5; }
.site-foot h4 { margin: 0 0 10px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.site-foot nav a { display: block; margin: 0 0 8px; color: #9fb2cb; overflow-wrap: anywhere; } .site-foot nav a:hover { color: #fff; }
.site-foot .sf-copy { display: block; padding-top: 16px; padding-bottom: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }
/* login & registration */
.login-split { background: var(--card); }
.login-split .login-card { background: transparent; box-shadow: none; padding: 8px 4px; }
.login-pitch { background: radial-gradient(40rem 26rem at 100% 0, rgba(90,176,238,.3), transparent 60%), linear-gradient(160deg, #0d2440, #17406f 65%, #2671bd); }
.login-pitch::after { display: none; }
.lp-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 500; font-size: .93rem; } .lp-ticks li { display: flex; align-items: center; gap: 8px; } .lp-ticks svg { color: #8cc8f7; }
.lp-shot { flex: none; height: 34vh; margin: 0 calc(-1 * clamp(28px, 5vw, 72px)) -40px 0; border-radius: 12px 0 0 0; overflow: hidden; box-shadow: 0 20px 50px -14px rgba(5,15,30,.7); border: 1px solid rgba(255,255,255,.2); } .lp-shot img { display: block; width: 100%; height: auto; }
@media (max-width: 960px) { .lp-ticks, .lp-shot { display: none; } .login-split { background: var(--card); } }
@media (max-width: 760px) {
  .ld-sec { padding: 52px 0; } .ld-mobile .site-in { grid-template-columns: minmax(0, 1fr); padding-top: 44px; }
  .site-foot .site-in { grid-template-columns: 1fr 1fr; } .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) { .topbar .brand { flex: 0 1 auto; min-width: 0; margin-right: 8px; } .topbar .tools { flex: 0 0 auto; margin-left: auto; } }

/* sending documents to colleagues */
.dr-wait { padding: 14px 16px; margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); border-radius: var(--radius-sm); }
.dr-wait-row { margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; padding: 16px 18px; }
.dr-msg { margin: 8px 0 0; padding: 8px 12px; background: var(--card); border-radius: 8px; white-space: pre-wrap; }
.dr-respond { margin-top: 10px; } .dr-respond-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dr-forward { margin-top: 10px; font-size: .88rem; } .dr-forward summary { cursor: pointer; font-weight: 600; color: var(--link); } .dr-forward form { margin-top: 8px; }
.dr-h { margin: 18px 0 8px; font-size: .9rem; } .dr-late { color: var(--bad); font-weight: 600; font-size: .82rem; }

/* documents on tasks */
.td-list { list-style: none; margin: 0 0 12px; padding: 0; } .td-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); } .td-list li:last-child { border-bottom: 0; }
.td-ic { color: var(--accent); display: inline-flex; } .td-name { flex: 1; min-width: 160px; font-weight: 600; } .td-name .muted { font-weight: 400; font-size: .84rem; }
.td-inputs { gap: 14px; } .td-inputs input[type=file] { padding: 6px; }
