/* Contacts: the groups column, the list column (letters, rows, search, bulk bar). Calm: subtle separators, one
 * accent for the selection and the primary action. */
.groups { display: flex; flex-direction: column; gap: 18px; }
.grp-sec { padding: 0 8px; }
.grp-h { font-size: 12px; font-weight: 600; color: var(--mute); margin: 0 10px 6px; letter-spacing: .01em; }
.grp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.grp { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; padding: 4px 10px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; font-size: 14px; }
.grp:hover { background: var(--panel-2); }
.grp.on { background: var(--accent-soft); font-weight: 600; }
.grp.drop-on { outline: 2px solid var(--focus); outline-offset: -2px; background: var(--accent-soft); }
.grp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grp-n { color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.grp-empty { font-size: 12px; color: var(--mute); padding: 2px 10px; }

.list-head { padding: 10px 14px 6px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.list-bar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.list-title { font-size: 18px; font-weight: 700; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.list-count { margin: -4px 2px 0; font-size: 12px; color: var(--mute); }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 17px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.text-btn { border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.text-btn:hover { background: var(--panel-2); }
.text-btn.on { background: var(--accent-soft); }
.text-btn.danger { color: var(--danger); }
.search input { width: 100%; min-height: 34px; padding: 0 12px; border-radius: 9px; border: 0; background: var(--panel-2); font-size: 15px; }
.search input::placeholder { color: var(--mute); }

.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 8px; border-radius: 9px; background: var(--accent-soft); font-size: 13px; }
.bulk-n { font-weight: 600; margin-right: auto; }
.bulk-stage select { min-height: 28px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); padding: 0 6px; font-size: 13px; }

.list-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 40px; }
.rows-wrap { outline: none; }
.rows { list-style: none; margin: 0; padding: 0; }
.row-new { padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.row-new-input { width: 100%; font: inherit; font-size: 15px; padding: 6px 8px; border: 1px solid var(--focus); border-radius: 6px; background: var(--panel); color: var(--ink); box-sizing: border-box; }
.letter-sec { position: relative; }
.letter { position: sticky; top: 0; z-index: 1; margin: 0; padding: 6px 16px 3px; font-size: 12px; font-weight: 700; color: var(--mute); background: var(--panel); border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 16px; cursor: pointer; border-bottom: 1px solid var(--line); user-select: none; }
.row:hover { background: var(--panel-2); }
.row.is-open { background: var(--accent-soft); }
.row.is-sel { background: var(--accent-soft); }
.row.is-focus { box-shadow: inset 3px 0 0 var(--focus); }
.row.is-open:hover, .row.is-sel:hover { background: var(--accent-soft); }
.row-check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--mute); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.row-check.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.row-text { display: flex; flex-direction: column; min-width: 0; }
.row-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2); color: var(--mute); font-size: 13px; font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.av-big { width: 96px; height: 96px; font-size: 32px; }
.empty { padding: 28px 24px; color: var(--mute); text-align: center; font-size: 14px; }
.empty-h { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.empty-acts { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
