/* Personal account page (/profile/): identity header, Telegram steps, notification matrix. */
.profile-hero { margin-bottom: 18px; padding: 20px 22px; }
.identity { display: flex; gap: 16px; align-items: center; min-width: 0; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-deep); color: #fff; font-size: 22px; font-weight: 800; }
.identity-text { display: grid; gap: 4px; min-width: 0; }
.identity-text strong { font-size: 20px; }
.identity-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.profile-tabs h2 { margin: 0 0 8px; font-size: 20px; }

.profile-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.tg-block { display: grid; gap: 14px; }
.tg-status { display: flex; gap: 12px; align-items: center; }
.tg-status > div { display: grid; gap: 2px; }
.tg-icon { display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #2aa3df; color: #fff; font-size: 18px; }
.tg-unlink { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid rgba(155, 60, 53, .35); border-radius: 10px; background: #fbf1ef; }
.tg-unlink p { margin: 0; }
.btn.btn-outline-danger { border: 1px solid rgba(155, 60, 53, .45); background: #fff; color: var(--danger); box-shadow: none; }
.tg-steps { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.tg-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.tg-step > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.tg-step > div > .btn, .tg-step form .btn { justify-self: start; }
.tg-step .form-actions { margin-top: 4px; }
.tg-step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e3ecef; color: var(--brand-deep); font-weight: 800; }
.tg-step.is-done .tg-step-num { background: var(--ok); color: #fff; }
.code-input { max-width: 220px; font-size: 24px; font-weight: 800; letter-spacing: .35em; text-align: center; }
.tg-example { display: grid; gap: 8px; margin: 0; align-content: start; }
.tg-bubble { display: grid; gap: 3px; max-width: 360px; padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: #eef6fb; font-size: 14px; box-shadow: 0 1px 2px rgba(23, 33, 38, .12); }
.tg-link { color: #1f7fb5; }

/* Channel cards above the matrix: status and a test button per channel. */
.notify-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 0 18px; }
.notify-channel { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; align-items: center; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.notify-channel strong { font-size: 16px; }
.notify-channel .muted { font-size: 13px; overflow-wrap: anywhere; }
.notify-channel > form, .notify-channel > .btn { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
.notify-channel-icon { grid-row: span 2; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 19px; font-weight: 800; }
.notify-channel-icon--telegram { background: #2aa3df; }
.notify-channel-icon--mail { background: var(--brand-deep); }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--line); vertical-align: middle; }
.status-dot--ok { background: var(--ok); }

.notify-matrix { width: 100%; margin: 8px 0 0; border-collapse: collapse; }
.notify-matrix th, .notify-matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; vertical-align: middle; }
.notify-matrix thead th { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.notify-matrix thead th + th, .notify-matrix td { width: 110px; text-align: center; }
.notify-matrix tbody th { color: var(--ink); font-size: 15px; font-weight: 400; letter-spacing: normal; text-transform: none; }
.notify-matrix tbody tr:last-child th, .notify-matrix tbody tr:last-child td { border-bottom: 0; }
.notify-event { display: grid; gap: 2px; }
.notify-event .muted { font-size: 13px; }
.notify-foot { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.notify-matrix .switch { justify-content: center; min-height: 36px; }
.notify-matrix.is-telegram-off td[data-label="Telegram"] { opacity: .45; }

@media (max-width: 1050px) {
  .profile-split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .avatar { flex-basis: 52px; width: 52px; height: 52px; font-size: 18px; }
  .identity-text strong { font-size: 18px; }
  .notify-matrix thead { display: none; }
  .notify-matrix, .notify-matrix tbody { display: block; }
  .notify-matrix tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
  .notify-matrix tbody th { grid-column: 1 / -1; padding: 0 0 6px; border: 0; }
  .notify-matrix td { width: auto; padding: 0; border: 0; text-align: left; }
  .notify-matrix tbody tr:last-child { border-bottom: 0; }
  .notify-channels { grid-template-columns: 1fr; }
  .notify-channel > form, .notify-channel > form .btn, .notify-channel > .btn, .notify-foot .btn { width: 100%; justify-content: center; }
  .notify-matrix td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
  .notify-matrix .switch { justify-content: flex-start; }
  .tg-block .flex-actions form, .tg-block .flex-actions .btn, .tg-step .btn { width: 100%; justify-content: center; }
}
