:root {
  --talk-blue: #0d6efd;
  --talk-blue-dark: #084fc7;
  --talk-text: #111827;
  --talk-muted: #6b7280;
  --talk-border: rgba(15, 23, 42, .10);
  --talk-bg: #f4f7fb;
  --talk-card: rgba(255, 255, 255, .92);
  --talk-shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--talk-text);
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, .16), transparent 34rem),
    linear-gradient(135deg, #ffffff 0%, #f4f7fb 46%, #eaf2ff 100%);
}

a { color: inherit; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(440px, 100%);
  background: var(--talk-card);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  box-shadow: var(--talk-shadow);
  padding: 32px;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--talk-blue), #5bbcff);
  box-shadow: 0 16px 32px rgba(13, 110, 253, .28);
}

.brand-title {
  font-size: 25px;
  font-weight: 820;
  letter-spacing: -.04em;
}

.brand-subtitle {
  color: var(--talk-muted);
  margin-top: 2px;
  font-size: 14px;
}

.field {
  margin: 16px 0;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: #374151;
  font-weight: 650;
  font-size: 14px;
}

.input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--talk-border);
  border-radius: 16px;
  padding: 0 15px;
  font-size: 16px;
  outline: none;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.input:focus {
  border-color: rgba(13, 110, 253, .55);
  box-shadow: 0 0 0 5px rgba(13, 110, 253, .10);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 16px;
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 760;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--talk-blue), #4aa3ff);
  box-shadow: 0 16px 32px rgba(13, 110, 253, .27);
}

.btn-primary:hover {
  box-shadow: 0 18px 40px rgba(13, 110, 253, .34);
}

.btn-ghost {
  background: rgba(13, 110, 253, .08);
  color: var(--talk-blue);
}

.alert {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.35;
}

.alert.show { display: block; }
.alert.error { color: #991b1b; background: #fee2e2; }
.alert.success { color: #065f46; background: #d1fae5; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 360px 1fr;
  padding: 18px;
  gap: 18px;
}

.sidebar, .workspace {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .10);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  padding: 20px;
  border-bottom: 1px solid var(--talk-border);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--talk-blue), #69c1ff);
  box-shadow: 0 10px 24px rgba(13, 110, 253, .20);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-weight: 800;
  letter-spacing: -.02em;
}

.user-meta {
  color: var(--talk-muted);
  font-size: 13px;
  margin-top: 2px;
}

.search-box {
  margin-top: 16px;
}

.contacts {
  padding: 12px;
  overflow: auto;
}

.contact {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 20px;
  padding: 12px;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.contact:hover {
  background: rgba(13, 110, 253, .08);
}

.contact-name {
  font-weight: 760;
}

.contact-meta {
  color: var(--talk-muted);
  font-size: 13px;
  margin-top: 3px;
}

.online-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  display: inline-block;
  margin-left: 6px;
}

.workspace {
  display: grid;
  grid-template-rows: auto 1fr;
}

.workspace-head {
  min-height: 74px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--talk-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workspace-title {
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.workspace-body {
  padding: 28px;
  display: grid;
  place-items: center;
}

.empty-state {
  max-width: 520px;
  text-align: center;
}

.empty-icon {
  width: 82px;
  height: 82px;
  border-radius: 28px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 32px;
  font-weight: 850;
  background: linear-gradient(135deg, var(--talk-blue), #7dd3fc);
  box-shadow: 0 22px 52px rgba(13, 110, 253, .24);
}

.empty-title {
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.empty-text {
  color: var(--talk-muted);
  line-height: 1.6;
  margin-top: 10px;
}

.profile-card {
  width: min(560px, 100%);
  background: #fff;
  border: 1px solid var(--talk-border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .10);
}

.profile-top {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  border-radius: 24px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--talk-border);
}

.kv-key {
  color: var(--talk-muted);
}

.kv-val {
  font-weight: 650;
  min-width: 0;
  overflow-wrap: anywhere;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sidebar {
    min-height: 48vh;
  }

  .workspace {
    min-height: 44vh;
  }

  .login-card {
    padding: 24px;
    border-radius: 24px;
  }

  .workspace-body {
    padding: 18px;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* TALK2_DIRECT_CHATS_V1 */
.contact-self {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(13, 110, 253, .10);
  color: var(--talk-blue);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.chat-panel {
  width: min(920px, 100%);
  height: calc(100vh - 148px);
  min-height: 520px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at top right, rgba(13, 110, 253, .10), transparent 28rem),
    #fff;
  border: 1px solid var(--talk-border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .10);
}

.chat-top {
  min-height: 74px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--talk-border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px);
}

.chat-title {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -.03em;
}

.chat-subtitle {
  margin-top: 2px;
  color: var(--talk-muted);
  font-size: 13px;
}

.chat-messages {
  padding: 22px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(244, 247, 251, .70), rgba(255, 255, 255, .55)),
    radial-gradient(circle at bottom left, rgba(13, 110, 253, .09), transparent 32rem);
}

.chat-loading,
.chat-empty {
  height: 100%;
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--talk-muted);
}

.empty-icon.small {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 24px;
}

.small-title {
  font-size: 22px;
}

.msg-row {
  display: flex;
  margin: 9px 0;
}

.msg-row.mine {
  justify-content: flex-end;
}

.msg-row.their {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: min(620px, 82%);
  padding: 11px 13px 8px;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg-row.mine .msg-bubble {
  color: #fff;
  background: linear-gradient(135deg, var(--talk-blue), #4aa3ff);
  border-bottom-right-radius: 7px;
}

.msg-row.their .msg-bubble {
  color: var(--talk-text);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 23, 42, .08);
  border-bottom-left-radius: 7px;
}

.msg-text {
  font-size: 15px;
}

.msg-time {
  margin-top: 5px;
  font-size: 11px;
  opacity: .72;
  text-align: right;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--talk-border);
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(14px);
}

.chat-input {
  width: 100%;
  min-height: 48px;
  max-height: 140px;
  resize: vertical;
  border: 1px solid var(--talk-border);
  border-radius: 18px;
  padding: 13px 15px;
  font: inherit;
  outline: none;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.chat-input:focus {
  border-color: rgba(13, 110, 253, .55);
  box-shadow: 0 0 0 5px rgba(13, 110, 253, .10);
}

.chat-send {
  width: auto;
  min-width: 128px;
}

@media (max-width: 860px) {
  .chat-panel {
    height: calc(100vh - 110px);
    min-height: 500px;
    border-radius: 22px;
  }

  .chat-messages {
    padding: 14px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-send {
    width: 100%;
  }

  .msg-bubble {
    max-width: 88%;
  }
}

/* TALK2_DIRECT_CHATS_READSTATE_V1 */
.sidebar-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(13, 110, 253, .07);
}

.sidebar-tab {
  border: 0;
  min-height: 40px;
  border-radius: 14px;
  background: transparent;
  color: var(--talk-muted);
  font-weight: 820;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.sidebar-tab.active {
  background: #fff;
  color: var(--talk-blue);
  box-shadow: 0 10px 24px rgba(13, 110, 253, .12);
}

.tab-badge,
.unread-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--talk-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.tab-badge {
  margin-left: 5px;
}

.d-none {
  display: none !important;
}

.dialog-item {
  align-items: flex-start;
}

.dialog-row-top,
.dialog-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dialog-row-top {
  justify-content: space-between;
}

.dialog-row-bottom {
  margin-top: 4px;
}

.dialog-preview {
  min-width: 0;
  flex: 1;
  color: var(--talk-muted);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dialog-time {
  flex: 0 0 auto;
  color: var(--talk-muted);
  font-size: 12px;
}

.unread-badge {
  flex: 0 0 auto;
}

.sidebar-empty {
  padding: 34px 18px;
  color: var(--talk-muted);
  text-align: center;
}

.empty-icon.mini {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  margin-bottom: 12px;
  font-size: 21px;
}

.sidebar-empty-title {
  color: var(--talk-text);
  font-weight: 850;
  letter-spacing: -.03em;
}

.sidebar-empty-text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
}

/* TALK2_ATTACHMENTS_V1 */
.chat-panel {
  position: relative;
}

.drop-overlay {
  display: none;
  position: absolute;
  inset: 12px;
  z-index: 20;
  border: 2px dashed rgba(13, 110, 253, .55);
  border-radius: 26px;
  background: rgba(255, 255, 255, .80);
  color: var(--talk-blue);
  font-weight: 900;
  font-size: 20px;
  place-items: center;
  backdrop-filter: blur(10px);
}

.chat-panel.drag-over .drop-overlay {
  display: grid;
}

.file-input-hidden {
  display: none;
}

.file-btn {
  min-width: 86px;
}

.attachments {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.attachment {
  border-radius: 16px;
  overflow: hidden;
}

.image-attachment {
  background: rgba(255, 255, 255, .18);
}

.image-attachment img {
  display: block;
  max-width: min(360px, 100%);
  max-height: 320px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255, 255, 255, .88);
}

.attachment-caption {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 7px;
  font-size: 12px;
  opacity: .86;
}

.attachment-caption a,
.file-attachment a {
  font-weight: 850;
  text-decoration: none;
}

.msg-row.mine .attachment-caption a,
.msg-row.mine .file-attachment a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.msg-row.their .attachment-caption a,
.msg-row.their .file-attachment a {
  color: var(--talk-blue);
}

.file-attachment {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: min(360px, 76vw);
  padding: 10px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .24);
}

.msg-row.their .file-attachment {
  background: rgba(13, 110, 253, .06);
  border-color: rgba(13, 110, 253, .10);
}

.file-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(13, 110, 253, .10);
}

.file-meta {
  min-width: 0;
  font-size: 13px;
}

.file-meta a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.file-meta div {
  margin-top: 3px;
  opacity: .72;
}

.file-download {
  font-size: 13px;
}

@media (max-width: 860px) {
  .chat-form {
    grid-template-columns: auto 1fr;
  }

  .chat-send {
    grid-column: 1 / -1;
  }

  .file-attachment {
    grid-template-columns: 38px 1fr;
  }

  .file-download {
    grid-column: 2;
  }
}

/* TALK2_ATTACHMENTS_POLISH_V1 */
.upload-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 8px 2px 0;
}

.upload-status-text {
  color: var(--talk-muted);
  font-size: 12px;
  font-weight: 750;
}

.upload-bar {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(13, 110, 253, .12);
}

.upload-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--talk-blue), #4aa3ff);
  transition: width .16s ease;
}

.file-attachment {
  border-radius: 18px;
}

.file-icon {
  color: var(--talk-blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.msg-row.mine .file-icon {
  color: #fff;
  background: rgba(255, 255, 255, .18);
}

.msg-row.mine .file-meta div {
  color: rgba(255, 255, 255, .82);
}

.msg-row.their .file-meta div {
  color: var(--talk-muted);
}

.image-attachment img {
  box-shadow: 0 10px 26px rgba(15, 23, 42, .10);
}

.attachment-caption span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* TALK2_ADMIN_USERS_V1 */
.admin-page {
  min-height: 100vh;
  padding: 18px;
}

.admin-shell {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.admin-head,
.admin-card {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .10);
  backdrop-filter: blur(18px);
}

.admin-head {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-card {
  overflow: hidden;
}

.admin-card-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--talk-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-card-title {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.admin-refresh {
  width: auto;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--talk-border);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--talk-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(13, 110, 253, .04);
}

.admin-user-name {
  font-weight: 850;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-small {
  min-height: 34px;
  border-radius: 12px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-small:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.admin-badge {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  margin: 0 4px 4px 0;
}

.admin-badge.good {
  color: #065f46;
  background: #d1fae5;
}

.admin-badge.warn {
  color: #92400e;
  background: #fef3c7;
}

.admin-badge.bad {
  color: #991b1b;
  background: #fee2e2;
}

.audit-list {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.audit-item {
  border: 1px solid var(--talk-border);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}

.audit-title {
  font-weight: 850;
}

.audit-item pre {
  margin: 10px 0 0;
  padding: 10px;
  overflow: auto;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
}

@media (max-width: 860px) {
  .admin-page {
    padding: 10px;
  }

  .admin-head,
  .admin-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-head .top-actions,
  .admin-card-head .btn {
    width: 100%;
  }

  .admin-head .top-actions {
    display: grid;
  }
}

/* TALK2_SERV_NOTIFICATIONS_SYNC_V1 */
.serv-notification-item.unread {
  background: rgba(13, 110, 253, .08);
}

.serv-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13, 110, 253, .13), rgba(74, 163, 255, .18));
  color: var(--talk-blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: -.03em;
}

.serv-icon.big {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 14px;
}

.unread-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--talk-blue);
  box-shadow: 0 0 0 5px rgba(13, 110, 253, .12);
}

.serv-detail-card {
  max-width: 900px;
}

.serv-detail-text {
  margin: 18px 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(13, 110, 253, .06);
  color: var(--talk-text);
  line-height: 1.55;
}

.serv-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.serv-detail-actions .btn {
  width: auto;
}

@media (max-width: 860px) {
  .serv-detail-actions .btn {
    width: 100%;
  }
}

/* TALK2_PROFILE_MODAL_MOBILE_POLISH_V1 */
.talk2-profile-chip {
  border: 0;
  outline: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  max-width: 100%;
  padding: 6px 10px 6px 7px;
  border-radius: 999px;
  background: rgba(13, 110, 253, .08);
  color: var(--talk-text, #111827);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.talk2-profile-chip:hover {
  transform: translateY(-1px);
  background: rgba(13, 110, 253, .13);
  box-shadow: 0 10px 26px rgba(13, 110, 253, .12);
}

.talk2-profile-chip-text {
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 850;
  font-size: 13px;
}

.talk2-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .10);
}

.talk2-profile-avatar.big {
  width: 88px;
  height: 88px;
  border-radius: 28px;
}

.talk2-profile-avatar.fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(13, 110, 253, .98), rgba(74, 163, 255, .9));
  color: #fff;
  font-weight: 950;
  letter-spacing: -.04em;
}

.talk2-profile-mini {
  width: 24px;
  height: 24px;
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(13, 110, 253, .10);
  color: var(--talk-blue, #0d6efd);
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}

.talk2-profile-mini:hover {
  transform: scale(1.06);
  background: rgba(13, 110, 253, .18);
}

.talk2-profile-modal.hidden {
  display: none;
}

.talk2-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
}

.talk2-profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(12px);
}

.talk2-profile-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  border-radius: 30px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 34px 100px rgba(15, 23, 42, .26);
  border: 1px solid rgba(13, 110, 253, .10);
}

.talk2-profile-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .06);
  color: #111827;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.talk2-profile-body {
  padding: 28px;
}

.talk2-profile-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 8px 48px 22px 0;
}

.talk2-profile-hero-text {
  min-width: 0;
}

.talk2-profile-name {
  font-size: 25px;
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -.04em;
  color: #111827;
  overflow-wrap: anywhere;
}

.talk2-profile-email {
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.talk2-profile-status-row {
  margin-top: 12px;
}

.talk2-profile-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.talk2-profile-status.active {
  background: rgba(34, 197, 94, .12);
  color: #15803d;
}

.talk2-profile-status.hidden-user {
  background: rgba(245, 158, 11, .14);
  color: #92400e;
}

.talk2-profile-status.blocked {
  background: rgba(239, 68, 68, .12);
  color: #b91c1c;
}

.talk2-profile-grid {
  display: grid;
  grid-template-columns: minmax(120px, .65fr) minmax(0, 1fr);
  gap: 8px 14px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(13, 110, 253, .06), rgba(74, 163, 255, .08));
}

.talk2-profile-k {
  color: #64748b;
  font-size: 13px;
}

.talk2-profile-v {
  color: #111827;
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.talk2-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.talk2-profile-loading,
.talk2-profile-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #64748b;
}

.talk2-profile-loader {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 4px solid rgba(13, 110, 253, .14);
  border-top-color: var(--talk-blue, #0d6efd);
  animation: talk2ProfileSpin .9s linear infinite;
  margin: 0 auto 14px;
}

@keyframes talk2ProfileSpin {
  to {
    transform: rotate(360deg);
  }
}

.talk2-mobile-back {
  display: none;
}

@media (max-width: 860px) {
  html,
  body {
    overscroll-behavior: none;
  }

  .talk2-profile-chip {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    z-index: 80;
    min-height: 40px;
    padding-right: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .16);
    backdrop-filter: blur(14px);
  }

  .talk2-profile-chip-text {
    display: none;
  }

  .talk2-profile-dialog {
    width: 100%;
    max-height: calc(100dvh - 22px);
    border-radius: 28px;
  }

  .talk2-profile-body {
    padding: 22px;
  }

  .talk2-profile-hero {
    align-items: flex-start;
    padding-right: 44px;
  }

  .talk2-profile-avatar.big {
    width: 72px;
    height: 72px;
    border-radius: 24px;
  }

  .talk2-profile-name {
    font-size: 21px;
  }

  .talk2-profile-grid {
    grid-template-columns: 1fr;
  }

  .talk2-profile-k {
    margin-top: 8px;
  }

  .talk2-profile-actions .btn {
    width: 100%;
  }

  .talk2-mobile-back {
    position: fixed;
    left: 12px;
    top: max(10px, env(safe-area-inset-top));
    z-index: 90;
    display: none;
    min-height: 40px;
    padding: 8px 13px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: #111827;
    font-weight: 850;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .16);
    backdrop-filter: blur(14px);
  }

  body.talk2-mobile-workspace-open .talk2-mobile-back {
    display: inline-flex;
    align-items: center;
  }

  body.talk2-mobile-workspace-open .talk2-profile-chip {
    display: none;
  }

  .contact,
  .dialog-item,
  .serv-notification-item {
    min-height: 58px;
    touch-action: manipulation;
  }

  input,
  textarea,
  button {
    font-size: 16px;
  }
}
