/* Shared styles for Contact and Vendor detail pages -- both have the same
   tabbed structure with five panes (info / addresses / phones / web / logins). */

body { background: #F2F2F4; }

.page-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

.ed-header {
    background: #3C3C3C; color: #fff;
    padding: 10px 16px;
    display: flex; align-items: center; gap: 12px;
    flex: 0 0 auto;
}
.ed-header h1 { margin: 0; font-size: 14pt; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-header a {
    color: #B6D4FF; text-decoration: none;
    font: inherit;
    border: 1px solid #6A6A6A; border-radius: 3px;
    padding: 4px 10px;
}
.ed-header a:hover { background: #5A5A5A; color: #fff; }

.ed-tabs {
    background: #2A2A2A;
    display: flex; gap: 0;
    flex: 0 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab {
    background: transparent; color: #BBB;
    border: none; border-bottom: 3px solid transparent;
    padding: 10px 18px;
    font: 12pt "Segoe UI", system-ui, sans-serif;
    cursor: pointer; white-space: nowrap;
}
.ed-tab:hover { color: #fff; background: #3C3C3C; }
.ed-tab.active { color: #fff; border-bottom-color: #4FA3F7; }

.ed-body { flex: 1; overflow-y: auto; background: #fff; }

.ed-pane { display: none; padding: 16px; }
.ed-pane.active { display: block; }
/* This Entity's Dashboard: the framed dashboard fills the body exactly, so the
   body itself never scrolls -- the dashboard scrolls inside its frame, and the
   record's header, tabs and the icon band above them stay put. */
.ed-pane.ed-pane-frame { padding: 0; height: 100%; box-sizing: border-box; overflow: hidden; }
.ed-dash-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

.ed-loading { text-align: center; color: #888; padding: 40px 20px; font-size: 13px; }
.ed-empty   { text-align: center; color: #888; padding: 40px 20px; font-size: 13px; font-style: italic; }
.ed-error   { color: #C00000; padding: 12px; font-size: 13px; }

/* Info pane -- label/value rows */
.ed-field { display: flex; padding: 8px 0; border-bottom: 1px solid #EEE; }
.ed-field .lbl { width: 130px; color: #666; font-size: 12px; }
.ed-field .val { flex: 1; color: #111; font-size: 13px; word-break: break-word; }

/* Sub-list cards -- one per address / phone / web / login */
.ed-card {
    background: #FAFAFC; border: 1px solid #E2E2E5;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.ed-card .head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.ed-card .head .badge {
    background: #E0EAF5; color: #2454A6;
    font-size: 10px; font-weight: 600;
    padding: 1px 7px; border-radius: 10px;
    text-transform: uppercase;
}
.ed-card .head .name { font-size: 13px; font-weight: 600; color: #111; flex: 1; word-break: break-word; }
.ed-card .head .dates { font-size: 10px; color: #888; }
.ed-card .body { font-size: 13px; color: #333; word-break: break-word; }
.ed-card .body .row { padding: 1px 0; }
.ed-card .body a { color: #0A66C2; text-decoration: none; }
.ed-card .body a:hover { text-decoration: underline; }
.ed-card .notes { font-size: 11px; color: #888; margin-top: 6px; font-style: italic; }
.ed-card .pw {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    background: #FFF; border: 1px solid #DDD;
    padding: 2px 6px; border-radius: 3px;
    cursor: pointer; user-select: all;
}
.ed-card .pw.masked { color: transparent; text-shadow: 0 0 6px #000; }

.ed-statusbar {
    background: #2A2A2A; color: #BBB;
    padding: 4px 12px; font-size: 11px;
    flex: 0 0 auto;
}

/* ---- Pane action bar (Edit / +Add / Delete) ---- */
.ed-pane-actions {
    display: flex; gap: 8px; align-items: center;
    padding: 0 0 12px 0; border-bottom: 1px solid #EEE; margin-bottom: 12px;
    flex-wrap: wrap;
}
.ed-btn {
    background: #fff; color: #0A66C2;
    border: 1px solid #C9D7E8; border-radius: 3px;
    padding: 6px 12px; font: 12px "Segoe UI", system-ui, sans-serif;
    cursor: pointer;
}
.ed-btn:hover { background: #ECF4FD; }
.ed-btn.primary  { background: #0A66C2; color: #fff; border-color: #0A66C2; }
.ed-btn.primary:hover  { background: #084FA1; }
.ed-btn.danger   { color: #C00000; border-color: #E2B0B0; }
.ed-btn.danger:hover   { background: #FCE8E8; }
.ed-card-actions { margin-top: 8px; display: flex; gap: 6px; justify-content: flex-end; }
.ed-card-actions .ed-btn { padding: 4px 10px; font-size: 11px; }

/* ---- Modal ---- */
.ed-modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    /* Align to top instead of vertically centered: with a typeahead picker
       inside, the dropdown opens DOWNWARD and needs the modal as close to
       the top of the viewport as possible. Centered modals leave the
       picker mid-screen, forcing the dropdown into the bottom half. */
    align-items: flex-start; justify-content: center;
    padding-top: 6vh;
    z-index: 1000;
}
.ed-modal-bg.open { display: flex; }
.ed-modal {
    background: #fff; border-radius: 6px;
    width: min(440px, 92vw);
    max-height: 92vh; overflow-y: auto;
    /* dvh = the visible phone screen, so the sticky Save row (Story 3490)
       never ends up under the browser's URL bar. */
    max-height: 90dvh;
    /* No bottom padding: the sticky .actions row below carries it. Chrome
       measures a sticky bottom:0 against the padded box, so a bottom padding
       here lifted the Save row 18px onto the last field and clipped it on
       every dialog (Link Web Address, Link Vendor, ...; 2026-09-18). */
    padding: 18px 20px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.ed-modal h2 { margin: 0 0 14px 0; font-size: 14pt; font-weight: 600; color: #1A1A1A; }
.ed-modal .field { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.ed-modal .field label { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 0.4px; }
.ed-modal .field input,
.ed-modal .field select,
.ed-modal .field textarea {
    width: 100%; padding: 7px 9px;
    border: 1px solid #C9C9CC; border-radius: 3px;
    font: 13px "Segoe UI", system-ui, sans-serif;
    box-sizing: border-box;
}
.ed-modal .field textarea { min-height: 180px; font-family: inherit; resize: vertical; }
.ed-modal .field input:focus,
.ed-modal .field select:focus,
.ed-modal .field textarea:focus { outline: none; border-color: #0A66C2; }
.ed-modal .field-row { display: flex; gap: 10px; }
.ed-modal .field-row .field { flex: 1; }
.ed-modal .checkbox-field { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ed-modal .checkbox-field input { width: auto; }
/* Tight to the last field. The button row hugs the content; no reserved
   empty space sits between them. */
.ed-modal form#lwedForm > .field:last-child,
.ed-modal form#lwedForm > .checkbox-field:last-child,
.ed-modal form#lwedForm > .field-row:last-child { margin-bottom: 0; }
/* Optional toolbar above the form (e.g. the address clipboard-paste buttons). */
.ed-modal .lwed-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px 0; }
.ed-modal .lwed-toolbar-btn { padding: 5px 12px; font-size: 12px; }
.ed-modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
/* Story 3490: a long Notes box now grows to show all its text, so the modal
   scrolls -- keep Save / Cancel pinned to its bottom edge the whole time. The
   row owns the modal's bottom padding (see .ed-modal), so it never overlaps. */
.ed-modal .actions {
    position: sticky; bottom: 0;
    background: #fff;
    margin: 8px -20px 0; padding: 10px 20px 18px;
    border-top: 1px solid #EEE;
    z-index: 1;
}
.ed-modal .err { color: #C00000; font-size: 12px; padding: 4px 0; }
/* Collapse the error placeholder entirely when there's no message -- otherwise
   it reserves ~24px between the last field and the buttons even when fine. */
.ed-modal .err:empty { display: none; padding: 0; }

/* ---- Edit form on Info pane (Contact/Vendor main edit) ---- */
.ed-info-form .field { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.ed-info-form .field label { font-size: 11px; color: #555; text-transform: uppercase; letter-spacing: 0.4px; }
.ed-info-form .field input,
.ed-info-form .field select,
.ed-info-form .field textarea {
    width: 100%; padding: 7px 9px;
    border: 1px solid #C9C9CC; border-radius: 3px;
    font: 13px "Segoe UI", system-ui, sans-serif;
    box-sizing: border-box;
}
.ed-info-form .field textarea { min-height: 80px; font-family: inherit; resize: vertical; }
.ed-info-form .field-row { display: flex; gap: 10px; }
.ed-info-form .field-row .field { flex: 1; }
.ed-info-form .checkbox-field { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ed-info-form .checkbox-field input { width: auto; }
.ed-info-form .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; padding-top: 12px; border-top: 1px solid #EEE; }
.ed-info-form .err { color: #C00000; font-size: 12px; min-height: 16px; padding: 4px 0; }

/* ---- Typeahead picker (for fields with >12 options -- see leonardo-programming skill) ---- */
.ed-modal .picker-wrap { position: relative; }
.ed-modal .picker-input { width: 100%; }
.ed-modal .picker-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #C9C9CC; border-radius: 0 0 4px 4px;
    /* Tall enough to be useful on a phone in the Move-to-list flow.
       Was 220px which was too short to scan more than ~7 items at once.
       min(60vh, 600px) gives ~half the phone screen and caps the desktop. */
    max-height: min(60vh, 600px); overflow-y: auto; z-index: 1100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.ed-modal .picker-dropdown.open { display: block; }
.ed-modal .picker-option { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #F0F0F2; }
.ed-modal .picker-option:hover, .ed-modal .picker-option.active { background: #ECF4FD; }
.ed-modal .picker-option mark { background: #FFF3CD; font-style: normal; }
.ed-modal .picker-option.no-match { color: #888; font-style: italic; cursor: default; }
/* Add-in-place row (Story 3550) -- the house green "+ Add". Stated here too so
   a page that loads entity-detail.css without picasso-picker.css still shows it. */
.ed-modal .picker-option.picker-add { color: #15803d; font-weight: 700; background: #f0fdf4; }
.ed-modal .picker-option.picker-add:hover,
.ed-modal .picker-option.picker-add.active { background: #dcfce7; }

/* ---- Link-existing sort toggle: Newest first | A to Z ---- */
.ed-modal .lwed-sort { display: flex; gap: 0; margin: 0 0 2px 0; }
.ed-modal .lwed-sort-btn {
    padding: 3px 10px; font-size: 11px;
    border: 1px solid #C9C9CC; background: #fff; color: #444;
    border-radius: 0; cursor: pointer;
}
.ed-modal .lwed-sort-btn:first-child { border-radius: 3px 0 0 3px; }
.ed-modal .lwed-sort-btn:last-child  { border-radius: 0 3px 3px 0; border-left: none; }
.ed-modal .lwed-sort-btn.active { background: #0A66C2; border-color: #0A66C2; color: #fff; }

/* ---- Login panel (web address -> manage logins) ---- */
.ed-login-panel-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: flex-start; justify-content: center;
    padding-top: 6vh;
    z-index: 999;
}
.ed-login-panel-bg.open { display: flex; }
.ed-login-panel {
    background: #fff; border-radius: 6px;
    width: min(480px, 94vw);
    max-height: 88vh; overflow-y: auto;
    padding: 18px 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.ed-login-panel-head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid #EEE;
}
.ed-login-panel-head h2 {
    margin: 0; font-size: 14pt; font-weight: 600;
    color: #1A1A1A; flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Read-only viewer (Events View popup) ----
   Separate shell from .ed-modal -- this is a reader, not a form, so it gets
   notes-card typography: warm cream paper, serif body, generous whitespace. */
.ed-viewer-bg {
    position: fixed; inset: 0;
    background: rgba(20, 20, 28, 0.55);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    padding: 16px;
    box-sizing: border-box;
}
.ed-viewer-bg.open { display: flex; }
/* Story 5705: the head and the Close row stay in sight; only the note scrolls. */
.ed-viewer {
    background: #FFFEF7;
    border-radius: 8px;
    width: min(620px, 100%);
    max-height: 92vh; max-height: 92dvh; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    display: flex; flex-direction: column;
    position: relative;
}
.ed-viewer-head {
    flex: 0 0 auto;
    padding: 22px 28px 16px;
    border-bottom: 1px solid #EEE4C9;
    background: linear-gradient(180deg, #FFFCEB 0%, #FFFEF7 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
    padding-right: 112px;   /* room for the Print icon and the X */
}
/* Story 5705: the X at the top right of every sepia sheet (ED.sheetCloseX). */
.ed-sheet-x {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; color: #7A6B3C;
    border: 1px solid #E2D6B0; border-radius: 8px;
    font: 400 26px/1 "Segoe UI", system-ui, sans-serif;
    cursor: pointer; padding: 0 0 2px;
}
.ed-sheet-x:hover, .ed-sheet-x:focus-visible { background: #F5ECD2; color: #4A3F1E; }
/* Story 5618: Print icon, top right of the reader (left of the X) -> the Leonardo Print Menu. */
.ed-viewer-print {
    position: absolute; top: 14px; right: 62px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; color: #7A6B3C;
    border: 1px solid #E2D6B0; border-radius: 8px;
    cursor: pointer; padding: 0;
}
.ed-viewer-print:hover, .ed-viewer-print:focus-visible { background: #F5ECD2; color: #4A3F1E; }
.ed-viewer-badge {
    display: inline-block;
    background: #2454A6; color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 3px 10px; border-radius: 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.ed-viewer-title {
    margin: 0 0 6px 0;
    font: 600 22px/1.25 "Segoe UI", system-ui, sans-serif;
    color: #1A1A1A;
    word-break: break-word;
}
.ed-viewer-dates {
    font-size: 12px;
    color: #7A6B3C;
    letter-spacing: 0.3px;
}
.ed-viewer-body {
    padding: 22px 28px;
    font: 15px/1.65 Georgia, "Iowan Old Style", "Segoe UI", system-ui, serif;
    color: #2A2A2A;
    white-space: pre-wrap;
    word-break: break-word;
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.ed-viewer-body.empty {
    color: #999; font-style: italic; text-align: center; padding: 32px 28px;
}
.ed-viewer-actions {
    flex: 0 0 auto;
    padding: 12px 22px 18px;
    display: flex; justify-content: flex-end; gap: 8px;
    border-top: 1px solid #EEE4C9;
}
@media (max-width: 520px) {
    .ed-viewer-head { padding: 18px 104px 12px 18px; }
    .ed-viewer-print { top: 10px; right: 56px; }
    .ed-sheet-x { top: 10px; right: 10px; }
    .ed-viewer-body { padding: 18px; font-size: 14px; }
    .ed-viewer-title { font-size: 19px; }
    .ed-viewer-actions { padding: 10px 14px 14px; }
}

/* ---- Record View (ED.showRecordView) ----
   The edit dialog's fields as a page to read, on the Leonardo Reader's sepia
   (the same palette as Solutions' and The Thinker's View). The scroller is the
   body; the Close / Edit row stays pinned at the bottom of the sheet. */
.ed-rview-bg {
    position: fixed; inset: 0;
    background: rgba(20, 20, 28, 0.55);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    padding: 16px;
    box-sizing: border-box;
}
.ed-rview-bg.open { display: flex; }
.ed-rview {
    width: min(720px, 100%);
    max-height: 92vh; max-height: 92dvh;
    display: flex; flex-direction: column; overflow: hidden;
    background: #f7f0df; color: #3b3323;
    border: 1px solid #d8c9a6; border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    position: relative;   /* the X (ED.sheetCloseX) sits in its top right, outside the scroller */
}
.ed-rview-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 26px 14px; -webkit-overflow-scrolling: touch; }
.ed-rview-scroll { padding-right: 64px; }
.ed-rview .ed-sheet-x { color: #6f6144; border-color: #d8c9a6; }
.ed-rview .ed-sheet-x:hover, .ed-rview .ed-sheet-x:focus-visible { background: #efe4c8; color: #3b3323; }
.ed-rview-badge {
    display: inline-block;
    background: #9a6b2f; color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 3px 10px; border-radius: 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.ed-rview-badge:empty { display: none; }
.ed-rview-title {
    margin: 0 0 14px; padding-bottom: 12px;
    border-bottom: 1px solid #d8c9a6;
    font: 800 22px/1.25 "Segoe UI", system-ui, sans-serif; color: #3b3323;
    overflow-wrap: anywhere;
}
.ed-rview-fields { margin: 0; }
.ed-rview-row { padding: 9px 0; border-bottom: 1px dotted #d8c9a6; }
.ed-rview-row:last-child { border-bottom: 0; }
.ed-rview-row dt {
    font: 600 11px "Segoe UI", system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: 0.5px; color: #6f6144;
    margin-bottom: 3px;
}
.ed-rview-val {
    margin: 0;
    font: 16px/1.6 Georgia, "Iowan Old Style", "Times New Roman", serif; color: #3b3323;
    overflow-wrap: anywhere;
}
.ed-rview-val.long { white-space: pre-wrap; }
.ed-rview-val.none { color: #9c8c6a; }
/* A section heading inside the sheet (Story 5641: the insurance card's benefits and phones). */
.ed-rview-head {
    margin: 18px 0 2px; padding-top: 10px; border-top: 1px solid #d8c9a6;
    font: 700 13px "Segoe UI", system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.6px; color: #6f4e1f;
}
.ed-rview-actions {
    flex: 0 0 auto;
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 10px 18px 14px;
    border-top: 1px solid #d8c9a6; background: #f3ead6;
}
.ed-rview-actions [hidden] { display: none; }
@media (max-width: 520px) {
    .ed-rview-scroll { padding: 18px 58px 10px 18px; }
    .ed-rview .ed-sheet-x { top: 10px; right: 10px; }
    .ed-rview-title { font-size: 19px; }
    .ed-rview-val { font-size: 15px; }
}

/* ---- Email View (ED.viewGmail, the Gmail tab's View button) ----
   The Record View's sepia shell, taller so a whole email has room. The body is the
   one scroller; Open in Gmail Client / Close stay pinned at the bottom. */
.ed-rview-bg.ed-gview-bg { z-index: 1100; }
.ed-rview.ed-gview { width: min(900px, 100%); height: 92vh; height: 92dvh; max-height: none; }
.ed-gview-head { flex: 0 0 auto; padding: 16px 64px 12px 22px; border-bottom: 1px solid #d8c9a6; }
.ed-gview-title {
    margin: 0;
    font: 800 20px/1.25 "Segoe UI", system-ui, sans-serif; color: #3b3323;
    overflow-wrap: anywhere;
}
.ed-gview-meta { margin-top: 4px; font: 13px "Segoe UI", system-ui, sans-serif; color: #6f6144; }
.ed-gview-meta:empty { display: none; }
.ed-gview-body {
    flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column;
}
.ed-gview-frame { flex: 1 1 auto; width: 100%; min-height: 300px; border: 0; background: #f7f0df; }
.ed-gview-text {
    margin: 0; padding: 18px 22px; white-space: pre-wrap; overflow-wrap: anywhere;
    font: 15px/1.6 Georgia, "Iowan Old Style", "Times New Roman", serif; color: #3b3323;
}
.ed-gview-wait { padding: 22px; color: #6f6144; }
.ed-gview-attach {
    flex: 0 0 auto; padding: 10px 22px; border-top: 1px dotted #d8c9a6;
    font: 13px "Segoe UI", system-ui, sans-serif; color: #3b3323; overflow-wrap: anywhere;
}
.ed-gview-attach-note { color: #6f6144; }
.ed-rview-actions a.ed-btn { text-decoration: none; }
@media (max-width: 520px) {
    .ed-rview-bg.ed-gview-bg { padding: 8px; }
    .ed-rview.ed-gview { height: 96vh; height: 96dvh; }
    .ed-gview-head { padding: 12px 58px 10px 14px; }
    .ed-gview-title { font-size: 17px; }
    .ed-gview-text { padding: 14px 16px; }
}

/* Lists / Task Lists tab -- simple stack of name + chip rows. */
.ed-stack { list-style: none; padding: 0; margin: 10px 0 0; }
.ed-stack-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #E0E0E2; border-radius: 6px;
    padding: 10px 14px; margin-bottom: 6px;
}
.ed-stack-row:hover { background: #F5F8FD; }
.ed-stack-name {
    flex: 1 1 auto;
    font: 600 13px "Segoe UI", system-ui, sans-serif;
    color: #0A66C2; text-decoration: none; word-break: break-word; min-width: 0;
}
.ed-stack-name:hover { text-decoration: underline; }
.ed-stack-meta {
    flex: 1 1 100%;
    font: 11px "Segoe UI", system-ui, sans-serif;
    color: #777; margin-top: 4px; word-break: break-word;
}
.ed-chip {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    background: #F5F5F7; color: #555; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.3px; flex: 0 0 auto;
}
/* ---- Communications card ----
   The subject owns a full line of its own. It must NEVER share a flex row with
   the meta: on a phone the meta wins the space, the title collapses to a
   one-character column, and word-break stacks it vertically down the screen.
   The message body is not on the card at all -- View and Edit show the words. */
.ed-card.ed-comm .comm-title {
    display: block; width: 100%;
    font-size: 14px; font-weight: 600; color: #111;
    line-height: 1.3; margin-bottom: 4px;
    overflow-wrap: break-word; word-break: normal;
}
.ed-card.ed-comm .comm-star { color: #C8901A; }
.ed-card.ed-comm .comm-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.ed-card.ed-comm .comm-meta .badge {
    background: #E0EAF5; color: #2454A6;
    font-size: 10px; font-weight: 600;
    padding: 1px 7px; border-radius: 10px;
    text-transform: uppercase; flex: 0 0 auto;
}
.ed-card.ed-comm .comm-meta .dates { font-size: 10px; color: #888; }

/* Topic tags on a Communications card -- wraps to as many rows as it needs. */
.ed-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ed-chip-blue   { background: #ECF4FD; color: #0A4575; }
.ed-chip-green  { background: #DFF5E5; color: #156822; }
.ed-chip-red    { background: #FBEAEC; color: #B00020; }
.ed-chip-yellow { background: #FFEFC8; color: #5A4214; }

/* Leonardo Find deep-link flash (Story 2358). A Find result for a list item
   opens its list and briefly lights the row so the eye lands on it. */
.ed-card.ed-find-flash {
    animation: ed-find-flash 1.6s ease-out 1;
}

@keyframes ed-find-flash {
    0%   { background: #FFF3C4; box-shadow: 0 0 0 3px #F4C430; }
    70%  { background: #FFF9E3; box-shadow: 0 0 0 3px rgba(244, 196, 48, 0.35); }
    100% { background: transparent; box-shadow: none; }
}

/* ---- The Entity Report (Story 2464 rework round 3) ---- */
.ed-report-modal { max-width: 640px; }
.ed-report { font-size: 13px; color: #222; max-height: 62dvh; overflow: auto; }
.ed-rp-title { margin: 0 0 8px; font-size: 16pt; }
.ed-rp-field { padding: 2px 0; }
.ed-rp-lbl { font-weight: 600; color: #555; }
.ed-rp-head { font-size: 11px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: #8A8A93; margin: 14px 0 6px;
    border-bottom: 1px solid #E7E7EC; padding-bottom: 3px; }
.ed-rp-group { font-weight: 600; margin-top: 6px; }
.ed-rp-row { padding: 3px 0 3px 10px; }
.ed-rp-when { color: #7A7A83; font-size: 12px; margin-right: 6px; }
.ed-rp-dim { color: #8A8A93; }
.ed-rp-desc { font-size: 12px; color: #555; margin: 2px 0 2px 14px; white-space: pre-wrap; }

/* ---- Needs attention band (Story 3496) ----------------------------------
   Unresolved matters and open call logs, first thing on the record. Amber on
   purpose: it is the one block on the page that is asking for something. */
.ed-attn {
    margin: 10px 12px 4px;
    border: 1px solid #E0B252;
    border-left: 4px solid #C98A12;
    border-radius: 6px;
    background: #FFF8E6;
    overflow: hidden;
}
.ed-attn-head {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7A5200;
    background: #FCEBC0;
}
.ed-attn-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-top: 1px solid #F0DCA8;
    text-decoration: none;
    color: #111;
}
.ed-attn-row:hover { background: #FDF0CC; }
.ed-attn-kind {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #8A5A00;
}
.ed-attn-kind.calls { background: #2F6B8F; }
.ed-attn-main { display: flex; flex-direction: column; min-width: 0; }
.ed-attn-title { font-size: 14px; font-weight: 600; word-break: break-word; }
.ed-attn-sub { font-size: 12px; color: #5C5C66; word-break: break-word; }
.ed-attn-row.overdue .ed-attn-sub { color: #A12A1E; font-weight: 600; }

/* ---- Needs attention is a TAB, plus pins (Story 3504) ---------------------
   The band above the tabs ate the phone screen; it is now the first tab,
   amber so it still reads as the one asking for something, and hidden
   outright when there is nothing in it. */
.ed-tab[hidden] { display: none !important; }
.ed-tab.ed-tab-attn { color: #FFC857; font-weight: 600; }
.ed-tab.ed-tab-attn:hover { color: #FFD98A; }
.ed-tab.ed-tab-attn.active { color: #FFD98A; border-bottom-color: #E0A52B; }
.ed-pane[data-pane="attention"] .ed-attn { margin: 0; }

/* A pinned row: the kind chip, the row itself (tap to open), and Unpin. */
.ed-attn-row.pinned { align-items: center; }
.ed-attn-row.pinned .ed-attn-main { flex: 1 1 auto; text-decoration: none; color: inherit; }
.ed-attn-kind.pin { background: #6B4FA0; }
.ed-attn-unpin { flex: 0 0 auto; }

/* The Pin toggle on every tab row: quiet when off, amber when on. */
.ed-pin-btn.on { background: #FFF3D6; border-color: #E0B252; color: #7A5200; }
.ed-pin-btn.on:hover { background: #FCEBC0; }

/* Call Logs tab: each log folds open to show its calls (2026-09-29). */
.ed-cl-toggle {
    background: none; border: none; cursor: pointer;
    font-size: 17px; line-height: 1; color: #555;
    padding: 2px 4px; min-width: 22px; min-height: 22px;
}
.ed-cl-foldall { font-size: 17px; line-height: 1; padding: 4px 10px; }
.ed-cl-foldall[hidden] { display: none; }
.ed-cl-calls { margin: 6px 0 4px 22px; border-left: 2px solid #E2E2E5; padding-left: 10px; }
.ed-cl-calls[hidden] { display: none; }
.ed-cl-call { font-size: 12px; color: #333; padding: 4px 0; border-bottom: 1px dotted #E2E2E5; }
.ed-cl-call:last-child { border-bottom: none; }
.ed-cl-date { color: #666; margin-right: 8px; }
.ed-cl-party { font-weight: 600; margin-right: 8px; }
.ed-cl-status { background: #EEF0F3; color: #444; font-size: 10px; padding: 1px 6px; border-radius: 8px; }
.ed-cl-note { margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.ed-cl-empty { font-size: 12px; color: #888; padding: 4px 0; }
