/* Scoped to the address book, leaving company and import screens intact. */
main:has(.addressbook){max-width:1500px;margin-top:22px;padding:0 28px}
.addressbook .page-heading{margin-bottom:14px}.addressbook .eyebrow{margin:0}.addressbook h1{margin:4px 0}.ab-count{font-size:14px;font-weight:400;color:var(--muted);margin-left:8px}
.ab-search{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;gap:12px;align-items:end;background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 18px}.ab-search label{font-size:13px;margin-bottom:5px}.ab-search input{background:#fafcfb}.ab-guide{margin:12px 0}
.ab-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}.has-panel .ab-workspace{grid-template-columns:minmax(0,1fr) 420px}.ab-list{min-width:0;overflow-x:auto}.ab-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden;font-size:13px;min-width:740px}.ab-table th{text-align:left;background:#e7f0eb;font-size:12px;font-weight:700;color:#47645b;padding:12px 10px;border-bottom:1px solid var(--line)}.ab-table th:nth-child(1){width:5%}.ab-table th:nth-child(2){width:27%}.ab-table th:nth-child(3){width:18%}.ab-table th:nth-child(4){width:21%}.ab-table th:nth-child(5){width:18%}.ab-table th:nth-child(6){width:11%}.ab-table td{padding:13px 10px;vertical-align:top;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.ab-table tr:last-child td{border-bottom:0}.ab-row{cursor:pointer}.ab-row:hover td{background:#f5faf7}.ab-row.is-selected td{background:#e9f5ee}.ab-row.is-selected .ab-identity{box-shadow:inset 3px 0 var(--accent)}.ab-person-name{display:inline-block;font-size:17px;font-weight:700;text-decoration:none;line-height:1.5;margin-bottom:4px}.ab-company{font-weight:500;line-height:1.6}.ab-position{font-size:12px}.ab-rank{text-align:center!important;padding-left:4px!important;padding-right:4px!important}.ab-rank-value{font-size:12px}.ab-contact-label{display:block;font-size:11px;color:var(--muted);line-height:1.6}.ab-phones>div,.ab-emails>div,.ab-address>div{margin-bottom:5px}.ab-phones a,.ab-emails a{text-decoration:none}.ab-phones a:hover,.ab-emails a:hover{text-decoration:underline}.ab-empty td{text-align:center;padding:40px}.ab-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ab-panel{position:sticky;top:12px;max-height:calc(100dvh - 24px);overflow:auto;background:#fff;border:1px solid #b8d3c5;border-radius:12px;box-shadow:0 8px 28px #12362f12}.ab-panel-toolbar{display:flex;align-items:center;justify-content:space-between;padding:9px 18px;background:#edf5ef;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1;font-size:12px;font-weight:700}.ab-panel-toolbar button{font-size:13px;min-height:38px}.ab-panel-content{padding:0 20px 18px;overflow-wrap:anywhere}.ab-panel-content[aria-busy=true]{padding-top:20px;min-height:200px}.ab-detail-heading{display:flex;justify-content:space-between;align-items:start;gap:14px;padding-top:18px}.ab-detail-heading h1{font-size:25px;margin:0}.ab-detail-heading p{margin:4px 0}.ab-detail-heading .button-link{padding:8px 16px;min-width:70px;text-align:center;width:auto}.ab-current-affiliations{padding:12px 0 16px}.ab-current-company{padding:6px 0}.ab-current-company p{margin:2px 0;font-size:14px}.ab-company-link{font-weight:700;text-decoration:none;font-size:15px}.person-summary h2{font-size:15px;margin:0 0 10px}.ab-current-contacts,.ab-notes{padding:16px 0;border-top:1px solid var(--line)}.ab-contact-list{grid-template-columns:100px minmax(0,1fr);gap:10px;font-size:13px;margin:0 0 14px}.ab-contact-list dt{font-size:12px;padding-top:1px}.ab-contact-list a{overflow-wrap:anywhere}.ab-small-edit{margin-left:10px;font-size:11px}.ab-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.ab-section-heading a{font-size:12px;white-space:nowrap}.ab-section-heading h2{margin:0}.ab-note-item{border-bottom:1px solid #edf1ee;padding:10px 0}.ab-note-item:last-child{border-bottom:0}.ab-note-item .note-time{font-size:11px;margin:0 0 4px}.ab-note-item .memo{font-size:14px;margin:0 0 6px;line-height:1.75}.ab-note-item>a{font-size:11px}.ab-note-form{margin:14px 0;padding:14px;background:#f3f8f4;border-radius:8px}.ab-note-form label{font-size:13px}.ab-note-form textarea{height:6em;resize:vertical}.ab-note-form button{font-size:13px;padding:8px 12px;min-height:40px}.ab-fold{border-top:1px solid var(--line);padding:12px 0;font-size:13px}.ab-fold>summary{font-weight:700;cursor:pointer;min-height:26px}.ab-fold>summary .muted{font-weight:400;margin-left:5px}.ab-history-record{padding:12px 0;border-bottom:1px solid var(--line)}.ab-history-record h3{font-size:14px;margin:8px 0 4px}.ab-history-record p{margin:5px 0}.ab-history-record .contact-value{font-size:14px}.person-summary .ab-fold .card{border:0;border-radius:0;box-shadow:none;padding:12px 0;margin:0}.person-summary .metadata{margin:12px 0;padding:0;border:0;grid-template-columns:80px minmax(0,1fr);gap:10px;font-size:12px}.ab-standalone{max-width:680px;background:white;border:1px solid var(--line);border-radius:12px;margin-top:16px;padding:4px 24px 20px}.ab-standalone .ab-detail-heading h1{font-size:28px}.ab-standalone .ab-note-form{display:none}
@media(min-width:761px){.ab-panel{position:fixed;top:16px;bottom:16px;right:max(28px,calc((100vw - 1444px)/2));width:420px;max-height:calc(100dvh - 32px)}.has-panel .page-heading,.has-panel .ab-search,.has-panel .ab-guide{max-width:calc(100% - 438px)}.ab-table th:nth-child(1){width:6%}.ab-table th:nth-child(2){width:26%}.ab-table td{padding-top:10px;padding-bottom:10px}.ab-phones .ab-contact-label{font-size:10px;line-height:1.3}.ab-phones a{font-size:12px;line-height:1.4}.ab-date{white-space:nowrap;font-size:11px}}
@media(min-width:1500px){.has-panel .ab-workspace{grid-template-columns:minmax(0,1fr) 460px}.has-panel .page-heading,.has-panel .ab-search,.has-panel .ab-guide{max-width:calc(100% - 478px)}.ab-panel{width:460px}}
@media(min-width:761px) and (max-width:900px){.has-panel .ab-workspace{grid-template-columns:minmax(0,1fr)}.has-panel .page-heading,.has-panel .ab-search,.has-panel .ab-guide{max-width:none}.ab-panel{position:fixed;inset:0;width:auto;max-height:none;border:0;border-radius:0;z-index:60;display:flex;flex-direction:column;overflow:hidden}.ab-panel-toolbar{flex-shrink:0}.ab-panel-content{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ab-mobile-open{overflow:hidden}}
@media(max-width:760px){main:has(.addressbook){padding:0 16px;margin-top:18px}.addressbook .page-heading .button-link{width:auto;font-size:13px;padding:10px 12px}.ab-search{grid-template-columns:minmax(0,1fr) auto;padding:12px;gap:10px}.ab-search>div:first-child{grid-column:1/-1}.ab-search label{font-size:12px}.ab-guide{font-size:11px}.has-panel .ab-workspace{grid-template-columns:minmax(0,1fr)}.ab-table{display:block;min-width:0;background:transparent;border:0;border-radius:0}.ab-table thead{display:none}.ab-table tbody{display:block}.ab-table .ab-row{display:grid;grid-template-columns:minmax(0,1fr);background:#fff;border:1px solid var(--line);border-radius:10px;margin-bottom:10px;padding:12px 14px}.ab-table td{display:block;border:0;padding:0;min-width:0}.ab-table .ab-rank{display:none}.ab-table .ab-identity{margin-bottom:6px}.ab-person-name{font-size:17px}.ab-company{font-size:13px}.ab-position{font-size:12px}.ab-table .ab-phones,.ab-table .ab-emails{font-size:12px}.ab-phones>div{display:inline-block;margin:0 12px 2px 0}.ab-phones .ab-contact-label{display:inline;margin-right:5px;font-size:10px}.ab-table .ab-address,.ab-table .ab-date{display:none}.ab-row.is-selected .ab-identity{box-shadow:none}.ab-row.is-selected{border-color:var(--accent)}.ab-empty,.ab-empty td{display:block}.ab-panel{position:fixed;inset:0;max-height:none;border:0;border-radius:0;z-index:60;display:flex;flex-direction:column;overflow:hidden}.ab-panel-toolbar{flex-shrink:0;padding:8px 18px}.ab-panel-content{flex:1;min-height:0;overflow-y:auto;padding:0 20px calc(24px + env(safe-area-inset-bottom));overscroll-behavior:contain}.ab-mobile-open{overflow:hidden}.ab-contact-list{grid-template-columns:90px minmax(0,1fr)}.ab-standalone{padding:4px 16px 18px}.ab-detail-heading .button-link{width:auto}.ab-note-form button{min-height:44px}.ab-fold>summary{min-height:36px;padding-top:4px}}

/* Normal operation: five columns, no state selector or rank column. */
.ab-search{grid-template-columns:minmax(0,1fr) auto}
.ab-table th:nth-child(1){width:30%}.ab-table th:nth-child(2){width:20%}.ab-table th:nth-child(3){width:23%}.ab-table th:nth-child(4){width:16%}.ab-table th:nth-child(5){width:11%}
.ab-current-contacts{border-top:0;padding-top:0}
.ab-main-choice{display:inline-block;margin:6px 8px 4px 0}.ab-main-choice button{font-size:12px;min-height:36px;padding:6px 10px}.ab-contact-list dd>.badge{margin-left:8px}
.ab-current-card{padding:12px 0;border-bottom:1px solid var(--line)}.ab-current-card h3{margin:0 0 8px}.ab-current-card .actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.ab-current-card button{min-height:44px}.ab-current-card form{margin:0}
@media(max-width:760px){.ab-search>button{grid-column:1/-1;justify-self:end;min-width:90px}}

.ab-current-card .actions{gap:12px;margin-top:18px}.ab-current-card .card-action{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:1px solid var(--accent);border-radius:7px;font:inherit;font-size:14px;font-weight:700;line-height:1.5;text-decoration:none;cursor:pointer;white-space:normal;text-align:center}.ab-current-card .card-action-primary{background:var(--accent);color:#fff}.ab-current-card .card-action-secondary{background:#fff;color:var(--accent)}.ab-current-card .card-action:hover{box-shadow:0 0 0 2px #12685b20}.ab-current-card .card-action-secondary:hover{background:#eef7f2}@media(max-width:600px){.ab-current-card .actions>*{flex:1 1 180px;max-width:100%}.ab-current-card .actions form .card-action{width:100%}}
.ab-list-tabs{display:flex;gap:10px;margin:12px 0 20px}.ab-list-tabs a{padding:8px 16px;border:1px solid var(--line);border-radius:7px;text-decoration:none;background:#fff}.ab-list-tabs a[aria-current="page"]{background:var(--accent);color:#fff;border-color:var(--accent)}
.ab-table:has(.ab-selection-heading) th.ab-selection-heading,.ab-table .ab-selection{width:40px;min-width:40px;max-width:40px;padding-left:9px;padding-right:9px;box-sizing:border-box;text-align:center}
.ab-selection-heading input,.ab-selection input{width:22px;height:22px;min-height:22px;padding:0;cursor:pointer;accent-color:var(--accent)}
.ab-operation-bar{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:80;display:flex;align-items:center;gap:14px;max-width:calc(100% - 32px);padding:14px 20px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 5px 24px #16322f33;flex-wrap:wrap}.ab-operation-bar[hidden]{display:none}.ab-operation-secondary{color:var(--accent);background:#fff;border:1px solid var(--accent)}.ab-operation-danger{background:#b63232;color:#fff}.has-people-selection main{padding-bottom:110px}
.ab-table:has(.ab-selection-heading) th:nth-child(2){width:auto}.ab-table:has(.ab-selection-heading) th:nth-child(3){width:19%}.ab-table:has(.ab-selection-heading) th:nth-child(4){width:22%}.ab-table:has(.ab-selection-heading) th:nth-child(5){width:16%}.ab-table:has(.ab-selection-heading) th:nth-child(6){width:11%}
@media(max-width:760px){.ab-table .ab-row:has(.ab-selection){grid-template-columns:22px minmax(0,1fr);column-gap:8px}.ab-table .ab-selection{grid-column:1;grid-row:1/-1;text-align:left;width:auto;min-width:0;max-width:none;padding:0}.ab-table .ab-row:has(.ab-selection) td:not(.ab-selection){grid-column:2}.ab-operation-bar{bottom:max(12px,env(safe-area-inset-bottom));padding:10px 12px;gap:10px;width:calc(100% - 24px)}.ab-operation-bar>span{flex:1 0 100%;font-size:13px}.ab-operation-bar button{flex:1;min-height:44px;font-size:14px}}

@media(max-width:760px){.ab-table:has(.ab-selection-heading) thead{display:block;margin-bottom:8px}.ab-table:has(.ab-selection-heading) thead tr{display:block}.ab-table:has(.ab-selection-heading) th:not(.ab-selection-heading){display:none}.ab-table .ab-selection-heading{display:block;width:40px;min-width:40px;max-width:40px;margin-left:6px;padding:8px 9px;background:transparent;border:0}}

[data-scroll-loader]{min-height:24px;text-align:center;padding:12px;color:var(--muted);font-size:13px}
.visit-person-add{margin:8px 0}.visit-person-add button{font-size:13px;min-height:38px;padding:7px 12px;background:#fff;color:var(--accent);border:1px solid var(--accent);border-radius:7px}.visit-managed{display:inline-block;font-size:12px;margin:8px 0}
