/* ===================== DANH BẠ (.ct-) + HỒ SƠ (.pf-) ===================== */
.ct-root { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--bg); }
.ct-head { padding: 20px 24px 8px; display: flex; flex-direction: column; gap: 12px; flex: none; }
.ct-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.ct-mobile-tabs { display: none; gap: 6px; overflow-x: auto; }
.ct-mtab { position: relative; flex: none; padding: 7px 14px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.ct-mtab.is-active { background: var(--accent); color: var(--accent-text); }
.ct-mtab__dot { position: absolute; top: 4px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.ct-body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; max-width: 760px; width: 100%; margin: 0 auto; }
.ct-toolbar { padding: 8px; }
.ct-letter { padding: 14px 10px 4px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.ct-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); cursor: pointer; }
.ct-row:hover { background: var(--hover); }
.ct-row__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ct-row__txt small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-row__time { color: var(--text-3); font-size: var(--fs-xs); }
.ct-row__act { display: flex; gap: 2px; opacity: 0; transition: opacity var(--dur-fast); }
.ct-row:hover .ct-row__act, .ct-row:focus-within .ct-row__act { opacity: 1; }
@media (hover: none) { .ct-row__act { opacity: 1; } }
.ct-req { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); margin: 6px 0; padding: 4px 6px 10px; }
.ct-req__msg { margin: 0 12px 8px 66px; color: var(--text-2); font-size: var(--fs-sm); }
.ct-req__act { display: flex; gap: 8px; margin-left: 66px; }
.ct-bday { margin: 8px 4px 4px; padding: 12px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--border); display: grid; gap: 6px; }
.ct-bday__head { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--accent); }
.ct-bday__item { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-sm); }
.ct-bday__item > span { flex: 1; }
.ct-bday__item:hover { background: var(--hover); }

.ct-add { display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.ct-add__lead { color: var(--text-2); font-size: var(--fs-sm); }
.ct-add__label { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); margin-top: 4px; }
.ct-msg, .pf-input { width: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); resize: vertical; outline: 0; }
.ct-msg:focus, .pf-input:focus { border-color: var(--accent); background: var(--surface); }
.ct-results { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow: auto; }
.ct-person { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-md); }
.ct-person:hover { background: var(--hover); }
.ct-person__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ct-person__txt small { color: var(--text-3); }
.ct-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--success); }
.ct-tag.is-muted { color: var(--text-3); }
.ct-hint, .ct-loading { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px; color: var(--text-3); text-align: center; }

/* ---- Hồ sơ ---- */
.pf-modal-shell { max-width: 420px !important; overflow: hidden; }
.pf-modal__cover { height: 130px; background: linear-gradient(135deg, var(--accent-2), var(--accent-strong)) center/cover; position: relative; }
.pf-modal__close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .35); }
.pf-modal__head { margin-top: -48px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 20px; text-align: center; }
.pf-modal__avatar { border-radius: 50%; padding: 4px; background: var(--surface); }
.pf-modal__head h2 { font-size: var(--fs-xl); margin-top: 6px; }
.pf-modal__real, .pf-modal__presence { color: var(--text-3); }
.pf-modal__status { color: var(--text-2); font-style: italic; }
.pf-modal__bio { padding: 10px 24px 0; text-align: center; color: var(--text-2); line-height: 1.5; }
.pf-modal__rows { margin: 14px 20px 0; border: 1px solid var(--border); border-radius: var(--r-md); }
.pf-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text-2); }
.pf-row + .pf-row { border-top: 1px solid var(--border); }
.pf-row__k { flex: 1; font-size: var(--fs-sm); }
.pf-row__v { color: var(--text); font-weight: 600; }
.pf-modal__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; justify-content: center; }
.pf-modal__diary { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 40px; color: var(--accent); font-weight: 600; }
.pf-modal__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; padding: 0 20px 18px; }
.pf-modal__more button { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); padding: 4px; }
.pf-modal__more button:hover { color: var(--text); }
.pf-modal__more .is-danger { color: var(--danger); }
.pf-modal__comp { padding: 14px 20px 0; }

.pf-comp { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: var(--accent-soft); }
.pf-comp.is-full { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.pf-comp__txt { display: flex; flex-direction: column; }
.pf-comp__txt small { color: var(--text-2); }
.pf-comp__head { display: flex; justify-content: space-between; align-items: center; }
.pf-comp__pct { font-weight: 800; color: var(--accent); }
.pf-comp__list { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-comp__item { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--r-pill); font-size: var(--fs-xs); background: var(--surface); color: var(--text-3); }
.pf-comp__item.is-done { color: var(--success); }
.pf-comp__cta { display: inline-flex; align-items: center; gap: 6px; justify-content: center; padding: 9px; border-radius: var(--r-md); background: var(--accent); color: var(--accent-text); font-weight: 700; }

.pf-edit__hero { position: relative; margin: -4px -4px 56px; }
.pf-edit__cover { height: 120px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-2), var(--accent-strong)) center/cover; }
.pf-edit__cover-btn { position: absolute; right: 10px; top: 10px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: var(--r-pill); color: #fff; background: rgba(0, 0, 0, .45); font-size: var(--fs-sm); }
.pf-edit__avatar-wrap { position: absolute; left: 20px; bottom: -48px; border-radius: 50%; padding: 4px; background: var(--surface); }
.pf-edit__avatar-btn { position: absolute; right: 0; bottom: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-text); background: var(--accent); border: 3px solid var(--surface); }
.pf-edit__form { display: flex; flex-direction: column; gap: 12px; }
.pf-edit__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-hint { display: block; min-height: 16px; margin-top: 4px; color: var(--text-3); }
.pf-hint.is-error { color: var(--danger); } .pf-hint.is-ok { color: var(--success); }
@media (max-width: 720px) { .ct-mobile-tabs { display: flex; } .ct-head { padding: 14px 14px 6px; } .ct-body { padding: 4px 8px 20px; } .pf-edit__grid { grid-template-columns: 1fr; } }
