.journal-table-scroll{max-height:none;min-height:0;overflow-x:auto;overscroll-behavior-x:contain}body #content .journal-table{border-collapse:separate;border-spacing:0;min-width:800px}.journal-table thead th{position:static;background:var(--surface-soft,#f5f7f5);box-shadow:0 1px 0 var(--border,#dce3de)}.journal-table .journal-party{display:block;max-width:360px;white-space:normal;overflow-wrap:anywhere;line-height:1.5}.journal-table td:last-child,.journal-table th:last-child{width:132px;text-align:center}.journal-blacklist-button{display:inline-flex;justify-content:center;align-items:center;gap:6px;min-width:105px;white-space:nowrap}.journal-blacklist-button.is-blocked{color:var(--danger,#b63845);border-color:currentColor}.journal-blacklist-button:disabled{opacity:.55}.journal-table-scroll:focus-visible{outline:2px solid var(--green,#609d40);outline-offset:-2px}[data-theme="dark"] .journal-table thead th{background:#27343b;color:#dce6e9;box-shadow:0 1px 0 #45555d}[data-theme="dark"] .journal-blacklist-button.is-blocked{color:#ffb1b7}@media(max-width:650px){.journal-table .journal-party{max-width:260px}}

.journal-sticky-header{position:fixed;z-index:24;overflow:hidden;pointer-events:none;box-shadow:0 2px 4px #0002}.journal-sticky-header[hidden]{display:none}.journal-sticky-header .journal-header-table{table-layout:fixed;margin:0}.call-journal-card [data-journal-records]{overflow-anchor:none}

.journal-party-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 4px}
.journal-party-picker{position:relative;min-width:0}.journal-party-picker>label{display:block;margin-bottom:7px;font-size:12px;font-weight:600;color:var(--ui-muted,var(--muted))}
.journal-party-entry{display:flex;align-items:center;gap:6px;min-width:0;border:1px solid var(--ui-input-line,#c6d2c8);border-radius:8px;background:var(--ui-panel,#fff)}
.journal-party-entry:focus-within{border-color:var(--ui-accent,#518432);box-shadow:0 0 0 2px var(--ui-focus,#639f4030)}
.journal-party-entry input{flex:1;min-width:0;width:100%;height:40px;border:0!important;box-shadow:none!important;outline:none!important;background:transparent!important;padding:8px 10px;color:var(--ui-ink);font:inherit}
.journal-party-entry>button{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;padding:5px;margin-right:4px;border:0;border-radius:6px;background:transparent;color:var(--ui-muted);cursor:pointer}.journal-party-entry>button:hover{background:var(--ui-soft);color:var(--ui-ink)}.journal-party-entry .icon{width:15px;height:15px}
.journal-party-options{position:absolute;z-index:35;left:0;right:0;top:calc(100% + 5px);max-height:300px;overflow-y:auto;overscroll-behavior:contain;padding:5px;border:1px solid var(--ui-input-line,#c6d2c8);border-radius:10px;background:var(--ui-panel,#fff);box-shadow:0 10px 28px #142c2026}
.journal-party-options[hidden]{display:none!important}.journal-party-options>button[role=option]{display:flex;align-items:center;gap:10px;width:100%;padding:10px;border:0;border-radius:7px;background:transparent;color:var(--ui-ink);text-align:left;cursor:pointer}
.journal-party-options>button[role=option]:is(:hover,[aria-selected=true]){background:var(--ui-selected,#eef5e8)}.journal-party-options>button>span:first-child{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;background:var(--ui-soft);border-radius:7px;color:var(--ui-accent)}.journal-party-options .icon{width:16px;height:16px}
.journal-party-options>button>span:last-child{min-width:0}.journal-party-options strong{display:block;overflow-wrap:anywhere;font-size:12px;font-weight:600}.journal-party-options small{display:block;margin-top:4px;overflow-wrap:anywhere;font-size:11px;color:var(--ui-muted)}.journal-party-options p{margin:7px;padding:7px;color:var(--ui-muted);font-size:11px;line-height:1.5}
@media(max-width:650px){.journal-party-filters{grid-template-columns:minmax(0,1fr);gap:12px}.journal-party-options{max-height:250px}}
/* Suggestions may extend below a short result list without being clipped by the card. */
body #content .call-journal-card{overflow:visible}
body #content .call-journal-card>.toolbar{border-radius:12px 12px 0 0}

/* Compact call-history tools, shared between the personal and admin views. */
.call-history-filter-panel{padding:12px 16px;min-width:0}
.personal-calls>.call-history-filter-panel{padding:0;margin-bottom:12px}
.call-history-searches{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end;min-width:0}
.call-history-searches>.journal-party-filters{display:contents}
.call-history-searches .journal-search-picker{min-width:0}
.call-history-searches :is(.journal-search-picker>label:not(.search),.journal-party-picker>label){display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:600;color:var(--ui-muted);margin:0 0 5px;line-height:16px;gap:8px}
.journal-search-picker [data-journal-count]{font-weight:400;font-size:10px;white-space:nowrap}
body #content .call-history-searches .search{display:flex;align-items:center;gap:8px;max-width:none;min-width:0;width:100%;height:34px;min-height:34px;padding:6px 10px;margin:0;border:1px solid var(--ui-input-line);border-radius:8px;background:var(--ui-panel);color:var(--ui-muted)}
body #content .call-history-searches .search input{width:100%;min-width:0;height:20px;min-height:0;line-height:20px;padding:0;border:0;box-shadow:none;background:transparent;color:var(--ui-ink);font-size:12px}
.call-history-searches .search>.icon{width:16px;height:16px}
.call-history-searches .journal-party-entry input{height:32px;min-height:0;padding:6px 9px;font-size:12px;line-height:20px}
.call-history-searches .journal-party-entry>button{flex-basis:26px;width:26px;height:26px;padding:5px;margin-right:3px}
.call-history-filter-panel>.history-filters{padding:8px 0 0;margin:0;gap:10px}
.call-history-filter-panel>.history-filters>label{gap:5px;font-size:11px;line-height:16px;flex-basis:145px;min-width:0}
.call-history-filter-panel>.history-filters :is(select,input){height:34px;min-height:34px;padding:6px 9px;font-size:12px}
.call-history-filter-panel>.history-filters>.button{height:34px;min-height:34px;padding:6px 10px;font-size:11px}
body #content:has(>.call-journal-card)>.page-heading,body #content:has(>.personal-calls)>.page-heading{min-height:54px;margin-bottom:12px;padding-bottom:12px}
body #content:has(>.call-journal-card)>.system-tabs{margin-top:0;margin-bottom:12px;gap:8px}
body #content:has(>.call-journal-card)>.system-tabs>a{padding:10px 13px;min-height:38px}
@media(max-width:850px){.call-history-searches{grid-template-columns:repeat(2,minmax(0,1fr))}.call-history-searches>.journal-search-picker{grid-column:1/-1}}
@media(max-width:520px){.call-history-filter-panel{padding:10px}.call-history-searches{gap:8px}.call-history-filter-panel>.history-filters{gap:8px}.call-history-filter-panel>.history-filters>label{flex-basis:calc(50% - 8px)}.call-history-filter-panel>.history-filters>.button{width:auto;margin-left:auto}}


/* Persistent, full-width search above the journal column headings. */
.journal-sticky-search{position:fixed;z-index:25;box-sizing:border-box;padding:9px 16px;background:var(--ui-panel,#fff);border:1px solid var(--ui-line,#dce3de);box-shadow:0 2px 4px #0001}
.journal-sticky-search[hidden]{display:none!important}
body #content .journal-sticky-search .journal-search-picker{width:100%;padding:0;margin:0;min-width:0}
.journal-sticky-search .journal-search-picker>label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
body #content :is(.journal-sticky-search,.journal-event-search) .search{display:flex;align-items:center;gap:8px;width:100%;min-width:0;max-width:none;height:36px;min-height:36px;margin:0;padding:6px 10px;border:1px solid var(--ui-input-line);border-radius:8px;background:var(--ui-panel);color:var(--ui-muted)}
body #content :is(.journal-sticky-search,.journal-event-search) .search input{flex:1;width:100%;min-width:0;padding:0;height:22px;line-height:22px;min-height:0;border:0;box-shadow:none;background:transparent;color:var(--ui-ink);font-size:12px}
.journal-event-search{padding:12px 20px 0}.journal-event-search>label{display:block;margin:0 0 5px;font-size:11px;font-weight:600;color:var(--ui-muted)}
.journal-search-space{visibility:hidden;pointer-events:none;box-sizing:border-box}
body #content .journal-sticky-header .journal-header-table{table-layout:fixed;margin:0;border-collapse:separate;border-spacing:0}
.journal-sticky-header .journal-header-table th{position:static}
.journal-sticky-header .journal-header-table button{pointer-events:auto}
body #content .event-journal-card{overflow:visible}
@media(max-width:700px){.journal-event-search{padding:12px 14px 0}.journal-sticky-search{padding:8px 10px}}
body #content :is(.journal-sticky-search,.journal-event-search) .search input:focus{outline:0!important;border:0!important;box-shadow:none!important}
