/* my.kontentferma — пользователи, профиль, статусы, дни рождения (см. people.js) */

/* ---------- аватарки и статусы ---------- */
.pp-av { position: relative; overflow: visible; }
.pp-av.has-img { background: transparent; }
.pp-av img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.av.xl { width: 56px; height: 56px; font-size: 18px; }
.av.xxl { width: 96px; height: 96px; font-size: 30px; }
.pp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9aa8a6; flex-shrink: 0; }
.pp-av .pp-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid var(--card); }
.pp-dot.st-online { background: #2fb36d; }
.pp-dot.st-away { background: var(--amber); }
.pp-dot.st-dnd { background: var(--coral); }
.pp-dot.st-offline { background: #9aa8a6; }

/* ---------- блок «я» внизу меню ---------- */
.me .me-open { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; min-width: 0; flex-grow: 1; cursor: pointer; border-radius: 12px; padding: 2px; }
.me .me-open:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.me .me-open:hover .me-t b { text-decoration: underline; text-underline-offset: 3px; }
.me .me-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.me .me-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.me .me-t small { font-size: 12px; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .pp-av .pp-dot { border-color: var(--green-deep); }

/* ---------- мини-попап ---------- */
.pp-pop-ov { align-items: flex-end; justify-content: flex-start; padding: 16px 16px 16px 24px; }
.pp-pop { max-width: 440px; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 16px; border-radius: 24px; }
@media (max-width: 720px) { .pp-pop-ov { align-items: flex-end; justify-content: center; padding: 8px; } .pp-pop { max-width: 100%; } }
.pp-pop-head { display: flex; align-items: center; gap: 14px; }
.pp-pop-head > div { flex-grow: 1; min-width: 0; }
.pp-pop-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.pp-pop-head small { color: var(--muted-2); font-size: 13px; }
.pp-sec { display: flex; flex-direction: column; gap: 10px; }
.pp-sec h3 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.pp-status { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-status.col { grid-template-columns: 1fr; }
.pp-status button { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--card); font-weight: 700; font-size: 13px; text-align: left; }
.pp-status button:hover { border-color: var(--green-ink); }
.pp-status button[aria-pressed="true"] { border-color: var(--green-ink); background: var(--mint-bg); color: var(--green-ink); }
.pp-moods { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { border: 1.5px solid var(--border-strong); background: var(--card); border-radius: var(--pill); min-height: 34px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.pp-chip:hover { border-color: var(--green-ink); }
.pp-chip[aria-pressed="true"] { background: var(--green); border-color: var(--green-ink); color: #fff; }
.pp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pp-row > .input { flex: 1 1 140px; min-width: 0; }
.pp-row.between { justify-content: space-between; }
.pp-row .pp-emoji { flex: 0 0 64px; text-align: center; font-size: 18px; }
.pp-row .pp-exp { flex: 0 0 auto; width: auto; }
.pp-msg { width: 100%; min-height: 64px; padding: 10px 14px; resize: vertical; line-height: 1.4; height: auto; }
.pp-note { font-size: 12px; color: var(--muted-2); }
.pp-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.pp-actions .btn-cta { height: 44px; }
.btn-cta.danger { background: var(--coral-dark); box-shadow: none; }
.pp-edit { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--soft); font-weight: 800; font-size: 14px; color: var(--green-ink); }
.pp-edit span { font-weight: 600; font-size: 12px; color: var(--muted-2); }
.pp-edit:hover { background: var(--chip-hover); }
.pp-edit:focus-visible { outline: 3px solid var(--coral); }
.pp-bday-again { all: unset; cursor: pointer; text-align: center; padding: 10px; border-radius: 14px; background: var(--amber-bg); color: var(--amber-ink); font-weight: 800; }

/* ---------- форма профиля ---------- */
.pp-avedit { display: flex; align-items: center; gap: 18px; }
.pp-avedit > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-avedit .pp-note { flex-basis: 100%; }
.pp-file { cursor: pointer; }
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pp-grid input[readonly] { background: var(--soft); color: var(--muted); }
@media (max-width: 560px) { .pp-grid { grid-template-columns: 1fr; } }

/* ---------- главная: команда сейчас и дни рождения ---------- */
.pp-team { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.pp-team h2 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.pp-team-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.pp-tm { display: flex; gap: 10px; align-items: flex-start; flex: 0 0 auto; max-width: 280px; padding: 10px 12px; border-radius: 16px; background: var(--soft); }
.pp-tm.me { background: var(--mint-bg); }
.pp-tm > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-tm b { font-size: 13px; }
.pp-tm p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.pp-mood { font-size: 13px; color: var(--ink-2); }
.pp-bday-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--radius);
  background: linear-gradient(120deg, #fff0cc 0%, #ffe1e1 100%); color: #3b2a00; border: 1px solid #f3d78f; }
.pp-bday-banner .ic { font-size: 28px; }
.pp-bday-banner > span:nth-child(2) { flex-grow: 1; font-size: 15px; }
.pp-bday-banner .btn-cta { height: 40px; padding: 0 18px; font-size: 14px; }
.ach-feed li.ach-bday { background: linear-gradient(90deg, rgba(255,210,122,.25), transparent); border-radius: 12px; }
.pp-feed-btn { height: 30px; padding: 0 12px; font-size: 12px; }

/* ---------- праздничная страница ---------- */
.bday-ov { padding: 0; background: rgba(0,30,28,.75); }
.bday { position: relative; width: 100%; height: 100%; overflow-y: auto; display: grid; place-items: center; }
.bday-bg { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; pointer-events: none; }
.bday-in { position: relative; z-index: 1; width: 100%; max-width: 640px; margin: 24px 16px; padding: 28px 24px 32px; border-radius: 32px; text-align: center;
  background: rgba(255,255,255,.92); color: var(--ink); box-shadow: 0 40px 100px rgba(0,20,18,.4); display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: bday-pop .6s cubic-bezier(.2,1.4,.4,1) both; }
.bday-kote { width: 220px; max-width: 60vw; height: auto; margin-top: -90px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); animation: bday-bounce 2.4s ease-in-out infinite; }
.bday-cap { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--coral-dark); }
.bday h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.05; font-weight: 800; letter-spacing: -1px; color: var(--green); }
.bday-wish { margin: 4px 0 0; font-size: 18px; line-height: 1.45; color: var(--ink-2); max-width: 520px; }
.bday-note { margin: 0; font-size: 14px; color: var(--muted-2); }
.bday-wishes { width: 100%; text-align: left; margin-top: 8px; }
.bday-wishes h2 { margin: 0 0 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); text-align: center; }
.bday-wishes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 34vh; overflow-y: auto; }
.bday-wishes li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: var(--soft); }
.bday-wishes li p { margin: 2px 0 0; font-size: 14px; line-height: 1.4; }
.bday-go { margin-top: 8px; }
@keyframes bday-pop { from { transform: scale(.8) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bday-bounce { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .bday-in, .bday-kote { animation: none; } }

/* ---------- вкладка «Пользователи» ---------- */
.pp-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.pp-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 0 20px 14px; }
.pp-filters .search { flex: 1 1 260px; }
.pp-filters select.input { width: auto; height: 42px; }
.pp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pp-table-wrap { overflow-x: auto; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pp-table th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 10px 12px; background: var(--soft); border-top: 1px solid var(--line-2); white-space: nowrap; }
.pp-table td { padding: 10px 12px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.pp-table tr:hover td { background: var(--hover); }
.pp-table tr.off td { opacity: .55; }
.pp-table th:first-child, .pp-table td:first-child { padding-left: 20px; }
.pp-table.small td, .pp-table.small th { padding: 8px 10px; }
.pp-who { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.pp-who > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-who small { color: var(--muted-2); font-size: 12px; }
.pp-id { font-size: 11px; color: var(--muted); background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.pp-role { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: var(--pill); background: var(--chip); color: var(--ink-2); white-space: nowrap; margin: 1px 4px 1px 0; }
.pp-role.r-ceo { background: var(--coral); color: #fff; }
.pp-role.r-lead { background: var(--mint-bg); color: var(--green-ink); }
.pp-role.r-off { background: var(--amber-bg); color: var(--amber-ink); }
.pp-empty { color: var(--muted-2); }
.pp-st { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; margin-right: 6px; }
.pp-tmsg { display: block; color: var(--muted-2); font-size: 12px; max-width: 240px; }
.pp-acts { display: grid; grid-template-columns: repeat(3, 32px); gap: 4px; justify-content: end; }
.pp-table td.nw { white-space: nowrap; }
.pp-table td:last-child { padding-right: 16px; }
.pp-ib { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; font-size: 14px; padding: 0; }
.pp-ib:hover { border-color: var(--green-ink); background: var(--chip); }
.pp-ib.danger:hover { border-color: var(--coral-dark); background: #ffe8e8; }
.pp-old { color: var(--muted-2); text-decoration: line-through; }
.pp-newtoken { padding: 14px 16px; border-radius: 16px; background: var(--amber-bg); color: var(--amber-ink); display: flex; flex-direction: column; gap: 8px; }
.pp-newtoken .input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.pp-confirm { max-width: 460px; }
.pp-confirm p { margin: 0; line-height: 1.5; }

/* тёмная тема: карточки и подложки берут переменные; поправляем только светлые градиенты */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bday-in { background: rgba(20,36,35,.94); color: #fff; }
  :root:not([data-theme="light"]) .bday h1 { color: #8fe0d3; }
  :root:not([data-theme="light"]) .bday-wish { color: #d6e4e2; }
  :root:not([data-theme="light"]) .pp-bday-banner { background: linear-gradient(120deg, #4a3a10 0%, #4a2424 100%); color: #ffe7b0; border-color: #6b5420; }
}
:root[data-theme="dark"] .bday-in { background: rgba(20,36,35,.94); color: #fff; }
:root[data-theme="dark"] .bday h1 { color: #8fe0d3; }
:root[data-theme="dark"] .bday-wish { color: #d6e4e2; }
:root[data-theme="dark"] .pp-bday-banner { background: linear-gradient(120deg, #4a3a10 0%, #4a2424 100%); color: #ffe7b0; border-color: #6b5420; }

.pp-contacts a, .pp-contacts span { display: block; }
.pp-contacts .nw { white-space: nowrap; }
.pp-table td.pp-contacts { font-size: 12.5px; line-height: 1.5; }
.pp-bd { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
