@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/***GOODs***/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;

}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-image: url("php/images/2089149.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  padding: 0 10px;
}

body.users-page {
  background: radial-gradient(circle at 18% 20%, rgba(153, 178, 255, 0.24), transparent 38%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 24% 82%, rgba(118, 210, 255, 0.14), transparent 40%),
    linear-gradient(180deg, #0c1024 0%, #0b1125 44%, #080b1a 100%);
  color: #e9edf7;
  align-items: stretch;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.chat-page {
  align-items: stretch;
  background: radial-gradient(circle at 18% 20%, rgba(153, 178, 255, 0.24), transparent 38%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.08), transparent 30%),
    radial-gradient(circle at 24% 82%, rgba(118, 210, 255, 0.14), transparent 40%),
    linear-gradient(180deg, #0c1024 0%, #0b1125 44%, #080b1a 100%);
  color: #e9edf7;
}

.wrapper {
  /* use dark backdrop */
  background: #18191e;

  max-width: 450px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 0 128px 0 rgba(236, 233, 233, 0.1),
    0 32px 64px -48px rgba(0, 0, 0, 0.5);
}

body.users-page .wrapper {
  max-width: 560px;
  min-height: 100vh;
  background: linear-gradient(170deg, rgba(18, 22, 46, 0.94), rgba(11, 14, 32, 0.96)) padding-box,
    linear-gradient(145deg, rgba(160, 186, 255, 0.26), rgba(116, 209, 255, 0.18)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 40px 90px -48px rgba(0, 0, 0, 0.82), 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(1.05);
}

.chat-page .wrapper {
  background: linear-gradient(170deg, rgba(18, 22, 46, 0.94), rgba(11, 14, 32, 0.96)) padding-box,
    linear-gradient(145deg, rgba(160, 186, 255, 0.26), rgba(116, 209, 255, 0.18)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 40px 90px -48px rgba(0, 0, 0, 0.82), 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(1.05);
}

body.p2p-active .wrapper {
  background: linear-gradient(170deg, rgba(14, 25, 34, 0.96), rgba(10, 18, 26, 0.98)) padding-box,
    linear-gradient(145deg, rgba(0, 255, 191, 0.24), rgba(34, 198, 178, 0.18)) border-box;
  box-shadow: 0 40px 110px -52px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(0, 255, 191, 0.24);
}


.form {
  padding: 25px 30px;
}

.form header {
  font-size: 25px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6e6e6;
  color: #fff;
}

.form form {
  margin: 20px 0;
}

.form form .error-text {
  color: #721c24;
  padding: 8px 10px;
  text-align: center;
  border-radius: 5px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  margin-bottom: 10px;
  display: none;
}

.form form .name-details {
  display: flex;
}

.form .name-details .field:first-child {
  margin-right: 10px;
}

.form .name-details .field:last-child {
  margin-left: 10px;
}

.form form .field {
  display: flex;
  margin-bottom: 10px;
  flex-direction: column;
  position: relative;
}

.form form .field label {
  margin-bottom: 2px;
  color: #fff;
}

.form form .input input {
  height: 40px;
  width: 100%;
  font-size: 16px;
  padding: 0 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.form form .field input {
  outline: none;
}

.form form .image input {
  font-size: 17px;
}

.form form .button input {
  height: 45px;
  border: none;
  color: #fff;
  font-size: 17px;
  background: #333;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 13px;
}

.form form .field i {
  position: absolute;
  right: 15px;
  top: 70%;
  color: #ccc;
  cursor: pointer;
  transform: translateY(-50%);
}

.form form .field i.active::before {
  color: #333;
  content: "\f070";
}

.form .link {
  text-align: center;
  margin: 10px 0;
  font-size: 17px;
  color: #fff;
}

.form .link a {
  color: #fff;
}

.form .link a:hover {
  text-decoration: underline;
}



.users {
  padding: 18px 18px 22px;
}

.users-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.users-card {
  background: linear-gradient(165deg, rgba(20, 23, 46, 0.9), rgba(13, 15, 30, 0.94));
  border: 1px solid rgba(186, 197, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 18px 54px -42px rgba(0, 0, 0, 0.92), 0 8px 28px -26px rgba(0, 0, 0, 0.64),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  padding: 14px 15px;
}

.users-list a {
  display: flex;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #2a2b30;
  justify-content: space-between;
}


.wrapper img {
  object-fit: cover;
  border-radius: 50%;
}


.users header {
  background: transparent;
  color: #fff;
}

.users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  background: linear-gradient(135deg, rgba(26, 29, 60, 0.92), rgba(18, 20, 44, 0.96));
  border: 1px solid rgba(176, 188, 255, 0.28);
  box-shadow: 0 12px 24px -20px rgba(0, 0, 0, 0.86), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.users-header .profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.users-header .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
  transform: translateY(4px);
}

.users-header .avatar-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 2px;
  border-radius: 50%;
  border: 1px solid rgba(154, 166, 255, 0.38);
  background: linear-gradient(185deg, #363f7c, #151b3a);
  cursor: pointer;
  box-shadow: 0 8px 20px -18px rgba(0, 0, 0, 0.8);
}

.users-header .avatar-wrapper img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.users-header .avatar-wrapper:focus-visible {
  outline: 2px solid rgba(120, 132, 255, 0.8);
  outline-offset: 3px;
}

.users-header .details {
  color: #e9ecf4;
  width: 100%;
  min-width: 0;
}

.users-header .name-row {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
}

.users-header .name {
  font-size: 19px;
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
  color: #f8faff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.users-header .status-line {
  margin-top: 6px;
}

.users-header .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(143, 172, 255, 0.18), rgba(102, 209, 255, 0.16));
  border: 1px solid rgba(170, 184, 255, 0.38);
  font-size: 12px;
  color: #f4f7ff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.users-header .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5de4a6;
  box-shadow: 0 0 0 4px rgba(93, 228, 166, 0.15);
}

.users-header .status-dot.status-offline {
  background: #a4acb5;
  box-shadow: 0 0 0 4px rgba(164, 172, 181, 0.14);
}

.users-header .status-dot.status-busy {
  background: #ff5a5f;
  box-shadow: 0 0 0 4px rgba(255, 90, 95, 0.18);
}

.users-header .status-dot.status-meeting {
  background: #f6a609;
  box-shadow: 0 0 0 4px rgba(246, 166, 9, 0.18);
}

.status-menu {
  position: absolute;
  background: #181920;
  border: 1px solid #292b34;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 190px;
  z-index: 9999;
}

.status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: #f0f2ff;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.status-option:hover,
.status-option:focus-visible {
  outline: none;
  background: #222430;
}

.status-option .status-dot {
  width: 10px;
  height: 10px;
  box-shadow: none;
}

.status-check {
  margin-left: auto;
  color: #7af0c7;
  font-size: 12px;
}

.users-header .subtle {
  display: none;
}

.users-header .settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  color: #e7ebff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.users-header .settings-btn:hover {
  transform: translateY(-1px);
  color: #bfc7ff;
  box-shadow: 0 10px 20px -18px rgba(0, 0, 0, 0.9);
}

.users-header .settings-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(126, 136, 255, 0.6);
}

.users-header .settings-btn .menu-dots {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transform: translateY(7px);
}

.users-header .settings-btn .menu-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(12, 16, 35, 0.35);
}

.users-controls {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px 10px;
  background: linear-gradient(165deg, rgba(25, 28, 60, 0.9), rgba(13, 14, 34, 0.92));
  border: 1px solid rgba(176, 188, 255, 0.26);
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.controls-row .tab-buttons {
  flex: 1;
  min-width: 0;
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #f7f9ff;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  min-height: 36px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.search-toggle:hover,
.users-controls.search-open .search-toggle {
  background: linear-gradient(135deg, rgba(162, 186, 255, 0.24), rgba(116, 210, 255, 0.2));
  border-color: rgba(198, 210, 255, 0.48);
}

.search-toggle i {
  font-size: 16px;
}

.users .search {
  position: relative;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(198, 210, 255, 0.34);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 36px;
}

.users-controls.search-open .search {
  display: flex;
}

.users-controls.search-open .controls-row {
  display: none;
}

.users .search input {
  flex: 1;
  height: 26px;
  font-size: 14px;
  padding: 0 6px;
  border: none;
  background: transparent;
  color: #f8fbff;
  outline: none;
}

.users .search input::placeholder {
  color: #d1dbff;
}

.users .search .search-icon {
  position: absolute;
  left: 14px;
  color: #d1dbff;
  font-size: 16px;
}

.users .search button {
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid rgba(184, 194, 255, 0.3);
  background: rgba(178, 193, 255, 0.12);
  color: #f8f4ff;
  outline: none;
  border-radius: 10px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.users .search button:hover,
.users .search button:focus-visible {
  background: rgba(178, 193, 255, 0.2);
  border-color: rgba(184, 194, 255, 0.44);
  outline: none;
}

.tab-buttons {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 4px;
  background: linear-gradient(135deg, rgba(118, 94, 214, 0.18), rgba(86, 138, 224, 0.12));
  border: 1px solid rgba(186, 202, 255, 0.28);
  border-radius: 12px;
  padding: 4px 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tab-buttons.hidden {
  display: none;
}

.tab-buttons .tab,
.tab-buttons .search-toggle {
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #f6f1ff;
  cursor: pointer;
  font-size: 12px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  flex: 0 0 42px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.tab-buttons .tab .tab-label,
.tab-buttons .search-toggle .button-label {
  font-weight: 600;
  display: none;
}

.tab-buttons .tab.active,
.tab-buttons .tab[aria-selected="true"],
.users-controls.search-open .search-toggle {
  background: linear-gradient(135deg, rgba(132, 118, 224, 0.42), rgba(102, 170, 232, 0.34));
  border-color: rgba(178, 188, 255, 0.58);
  color: #f7f6ff;
  box-shadow: 0 10px 24px -22px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(160, 148, 210, 0.26);
  flex: 0 1 auto;
  min-width: 40px;
}

.tab-buttons .tab .tab-icon,
.tab-buttons .search-toggle i {
  font-size: 16px;
  color: inherit;
  opacity: 0.96;
}

.tab-buttons .tab.active .tab-label,
.tab-buttons .tab[aria-selected="true"] .tab-label,
.users-controls.search-open .search-toggle .button-label {
  display: inline;
}

.search-toggle .button-label {
  display: none;
}

.users-controls.search-open .search-toggle .button-label {
  display: inline;
}

.tab-buttons .tab:hover {
  background: linear-gradient(135deg, rgba(130, 116, 214, 0.16), rgba(108, 162, 230, 0.14));
  border-color: rgba(182, 192, 255, 0.32);
  box-shadow: 0 10px 18px -22px rgba(0, 0, 0, 0.82);
  transform: translateY(-1px);
}

.tab-buttons .tab:focus-visible {
  outline: none;
  border-color: #9a8bcf;
  box-shadow: 0 0 0 2px rgba(154, 139, 207, 0.62);
}

.tab-buttons .tab.active .tab-icon,
.tab-buttons .tab[aria-selected="true"] .tab-icon {
  color: #fff7ff;
}

.tab-badge {
  background: linear-gradient(135deg, rgba(152, 134, 232, 0.64), rgba(108, 154, 225, 0.6));
  color: #0b0d1e;
  border-radius: 50%;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 6px;
  right: 10px;
}

.users-list-card {
  padding: 10px 12px 12px;
  background: linear-gradient(175deg, rgba(18, 22, 48, 0.94), rgba(11, 13, 30, 0.98));
  border: 1px solid rgba(190, 200, 255, 0.22);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.users-list {
  max-height: 72vh;
  overflow-y: auto;
  background: transparent;
  padding: 10px 6px 6px;
  box-shadow: none;
  border-radius: 12px;
  border: none;
  flex: 1;
  min-height: 0;
}

@media (max-width: 540px) {
  body.users-page {
    padding: 0;
    justify-content: stretch;
    background: linear-gradient(170deg, rgba(18, 22, 46, 0.98), rgba(11, 14, 32, 0.98));
  }

  .wrapper {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .users {
    padding: 16px 14px 18px;
    min-height: 100vh;
  }

  .users-shell {
    gap: 12px;
    min-height: calc(100vh - 32px);
  }

  .users-card {
    padding: 14px 14px;
    border-radius: 16px;
  }

  .users-header {
    padding: 12px 14px 10px;
    align-items: center;
    gap: 8px;
  }

  .users-header .avatar-wrapper {
    width: 56px;
    height: 56px;
  }

  .users-header .avatar-wrapper img {
    height: 48px;
    width: 48px;
  }

  .users-header .name {
    font-size: 18px;
  }

  .users-header .status-chip {
    padding: 5px 9px;
    font-size: 12px;
  }

  .users-controls {
    gap: 10px;
  }

  .users-controls .controls-row {
    gap: 8px;
  }

  .tab-buttons {
    gap: 4px;
    flex: 1 1 auto;
    width: 100%;
  }

  .tab-buttons .tab,
  .tab-buttons .search-toggle {
    gap: 5px;
    min-height: 36px;
    font-size: 12px;
    padding-inline: 8px;
    flex-basis: 42px;
  }

  .users-list-card {
    padding: 8px 10px 10px;
    flex: 1;
  }

  .users-list {
    max-height: none;
    height: 100%;
  }
}

.users-list .empty-state,
.users .empty-state {
  color: #f8f9ff;
  opacity: 1;
  text-align: center;
  padding: 24px 12px;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.dateTimet {
  color: #fff;
  font-size: 10px;
  max-height: 100px;
  overflow-y: auto;
}

:is(.users-list, .chat-box)::-webkit-scrollbar {
  width: 0px;
}

.users-list a {
  padding: 10px 0;
  page-break-inside: avoid;
  border-bottom: 1px solid #2a2b30;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.users-list a .content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.users-list a .content .avatar-presence {
  --presence-color: #9ca3af;
  --presence-glow: rgba(148, 163, 184, 0.25);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(10, 14, 26, 0.65));
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.users-list a .content .avatar-presence img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.users-list a .content .presence-indicator {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--presence-color);
  border: 2px solid #0b1222;
  box-shadow: 0 0 0 4px var(--presence-glow), 0 6px 12px rgba(0, 0, 0, 0.25);
}

.users-list a .content .avatar-presence.status-online { --presence-color: #34d399; --presence-glow: rgba(52, 211, 153, 0.28); }
.users-list a .content .avatar-presence.status-offline { --presence-color: #94a3b8; --presence-glow: rgba(148, 163, 184, 0.22); }
.users-list a .content .avatar-presence.status-busy { --presence-color: #f472b6; --presence-glow: rgba(244, 114, 182, 0.28); }
.users-list a .content .avatar-presence.status-meeting { --presence-color: #fbbf24; --presence-glow: rgba(251, 191, 36, 0.28); }

.users-list a .content .details {
  color: #fff;
}

.users-list a .content .details span {
  font-size: 18px;
  font-weight: 500;
}

.users-list a .content .details p {
  font-size: 15px;
  color: #9fa4ab;
}

.users-list a .message-indicator {
  min-width: 42px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
}

.users-list a .message-indicator .indicator-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
}

.users-list a .message-indicator .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 13px;
  color: #cdd3df;
  border-radius: 50%;
}

.users-list a .message-indicator.delivered .check-icon::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

.users-list a .message-indicator.read .check-icon {
  color: #a78bfa;
}

.users-list a .message-indicator.read .check-icon::before {
  content: "\f560";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

.users-list a .message-indicator .message-time {
  font-size: 11px;
  color: #a6acbc;
  line-height: 1.1;
}

.call-subline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #9fa4ab;
  font-size: 13px;
}

.call-label {
  font-weight: 500;
}

.call-duration-note {
  margin-top: 2px;
  color: #aeb4c7;
  font-size: 12px;
}

.users-list a.call-history-item {
  align-items: center;
  gap: 10px;
}

.call-history-item .content img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.call-history-item .details span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.call-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
}

.call-direction {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cdd2e3;
}

.call-direction.call-outgoing {
  color: #6ee7b7;
}

.call-direction.call-incoming {
  color: #93c5fd;
}

.call-direction.call-missed,
.call-direction.call-unanswered {
  color: #f87171;
}

.call-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.call-arrow {
  font-size: 14px;
}

.call-separator {
  opacity: 0.5;
  font-size: 12px;
}

.call-duration {
  font-size: 13px;
  color: #b6bbd4;
}

.users-list a.non-contact-chat .content .details span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.users-list a .non-contact-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 193, 7, 0.2);
  color: #ffd166;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.users-list a .status-dot {
  font-size: 12px;
  color: #3dce3d;
}

.users-list a .status-dot.offline {
  color: #ccc;
}

.users-list a .status-dot.status-online { color: #3dce3d; }
.users-list a .status-dot.status-offline { color: #9aa0a6; }
.users-list a .status-dot.status-busy { color: #ff5a5f; }
.users-list a .status-dot.status-meeting { color: #f6a609; }

/* Request item styles */
.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  page-break-inside: avoid;
  border-bottom: 1px solid #2a2b30;
}

.request-item .content {
  display: flex;
  align-items: center;
}

.request-item .content img {
  height: 40px;
  width: 40px;
  margin-right: 15px;
}

.request-item .content .details {
  color: #fff;
}

.request-item .content .details span {
  font-size: 18px;
  font-weight: 500;
}

.request-item .content .details p {
  font-size: 15px;
  color: #9fa4ab;
}

.request-actions {
  display: flex;
  gap: 10px;
}

.confirm-btn,
.reject-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  outline: none;
}

.confirm-btn {
  background: #6857ff;
  box-shadow: 0 10px 20px rgba(104, 87, 255, 0.35);
}

.confirm-btn:hover,
.confirm-btn:focus-visible {
  background: #7b6cff;
  box-shadow: 0 16px 24px rgba(104, 87, 255, 0.45);
  transform: translateY(-1px);
}

.reject-btn {
  background: #d64545;
  box-shadow: 0 10px 20px rgba(214, 69, 69, 0.35);
}

.reject-btn:hover,
.reject-btn:focus-visible {
  background: #f05454;
  box-shadow: 0 16px 24px rgba(240, 84, 84, 0.45);
  transform: translateY(-1px);
}

.confirm-btn i,
.reject-btn i {
  pointer-events: none;
}


.chat-area header {
  display: flex;
  align-items: center;
  padding: 18px 12px;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(26, 29, 60, 0.92), rgba(18, 20, 44, 0.96));
  color: #e9edf7;
  box-shadow: 0 12px 24px -20px rgba(0, 0, 0, 0.86);

}

.chat-area.p2p-active header {
  background: linear-gradient(135deg, rgba(23, 43, 74, 0.94), rgba(13, 64, 90, 0.98));
  border-bottom: 1px solid rgba(0, 255, 191, 0.45);
  box-shadow: 0 18px 36px -18px rgba(0, 216, 190, 0.22);
}

.chat-area header .back-icon {
  margin-right: 15px;

  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(162, 186, 255, 0.18), rgba(116, 210, 255, 0.14));
  color: #f8faff;
  box-shadow: 0 10px 20px -18px rgba(0, 0, 0, 0.86);


}

.chat-area header .content {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.chat-area header .chat-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.chat-area header img {
  height: 45px;
  width: 45px;
  margin-right: 15px;
  border-radius: 50%;
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.9);
}

.chat-area header .chat-avatar img {
  margin-right: 0;
}

.chat-area header .details {
  margin-right: auto;
  color: #e9edf7;
}

.chat-area header .settings-btn {
  background: linear-gradient(135deg, rgba(162, 186, 255, 0.18), rgba(116, 210, 255, 0.14)) !important;
  color: #e9edf7 !important;
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 24px !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  appearance: none !important;
  margin-left: auto !important;
  box-shadow: 0 10px 20px -18px rgba(0, 0, 0, 0.86) !important;
}

.chat-area header .settings-btn:hover {
  opacity: 1 !important;
  color: #f6fbff !important;
  box-shadow: 0 12px 22px -16px rgba(0, 0, 0, 0.9) !important;
}

.chat-area header .details span {
  font-size: 18px;
  font-weight: 500;
  color: #f8faff;
}

.chat-presence {
  --presence-color: #94a3b8;
  --presence-glow: rgba(148, 163, 184, 0.22);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--presence-color);
  border: 2px solid #0b1222;
  box-shadow: 0 0 0 3px var(--presence-glow), 0 5px 10px rgba(0, 0, 0, 0.22);
  position: absolute;
  bottom: -1px;
  right: -2px;
}

.chat-presence.status-online {
  --presence-color: #34d399;
  --presence-glow: rgba(52, 211, 153, 0.28);
}

.chat-presence.status-offline {
  --presence-color: #94a3b8;
  --presence-glow: rgba(148, 163, 184, 0.22);
}

.chat-presence.status-busy {
  --presence-color: #f472b6;
  --presence-glow: rgba(244, 114, 182, 0.28);
}

.chat-presence.status-meeting {
  --presence-color: #fbbf24;
  --presence-glow: rgba(251, 191, 36, 0.28);
}

.chat-area header .details p {
  color: #b7c4e5;
}

.chat-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 12px;
}

.p2p-pill {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-right: 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(34, 198, 178, 0.18), rgba(0, 255, 191, 0.16));
  color: #9ffbe8;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(0, 255, 191, 0.4);
  box-shadow: 0 12px 28px -18px rgba(0, 216, 190, 0.3);
}

.chat-area.p2p-active .p2p-pill {
  display: inline-flex;
}

.chat-actions #callBtn {
  margin-left: 4px;
}

.chat-actions .round-btn {
  width: 36px;
  height: 36px;
  box-shadow: 0 10px 20px -18px rgba(0, 0, 0, 0.86);
}

.chat-actions .menu-btn {
  background: linear-gradient(135deg, rgba(136, 158, 255, 0.2), rgba(114, 205, 255, 0.18));
  font-size: 16px;
}

.chat-box {
  position: relative;
  overflow-y: auto;
  padding: 10px 15px 20px 15px;
  background: linear-gradient(175deg, rgba(16, 19, 40, 0.9), rgba(10, 12, 28, 0.96));
  box-shadow: inset 0 -32px 32px -32px rgba(7, 7, 7, 0.35);
  color: #e9edf7;
}

.chat-area.p2p-active .chat-box {
  background: linear-gradient(175deg, rgba(10, 32, 46, 0.94), rgba(6, 20, 26, 0.98));
  box-shadow: inset 0 -24px 36px -36px rgba(0, 216, 190, 0.35);
  border-top: 1px solid rgba(0, 255, 191, 0.18);
}

.p2p-banner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(10, 32, 46, 0.92), rgba(6, 29, 41, 0.94));
  border-bottom: 1px solid rgba(0, 255, 191, 0.22);
  color: #d9f9f2;
  box-shadow: inset 0 1px 0 rgba(0, 255, 191, 0.1);
}

.p2p-banner.visible {
  display: flex;
}

.p2p-banner__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(0, 255, 191, 0.16), rgba(34, 198, 178, 0.22));
  color: #9ffbe8;
  box-shadow: 0 10px 20px -18px rgba(0, 216, 190, 0.4);
  font-size: 18px;
}

.p2p-banner__label {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.p2p-banner__status {
  color: #a8d8cf;
  font-size: 14px;
  line-height: 1.4;
}

.chat-box .text {
  position: absolute;
  top: 45%;
  left: 50%;
  width: calc(100% - 50px);
  text-align: center;
  transform: translate(-50%, -50%);
  color: #aab6e9;
}

.chat-box .chat {
  margin: 9px 0;

}

.chat-box .chat p {
  margin: 0;
  padding: 0;
  font-size: 15px;
  color: #e9edf7;


}

.chat-box .outgoing {
  display: flex;
  justify-content: flex-end;
}

.chat-box .outgoing .details {
  max-width: 50%;
  background: linear-gradient(135deg, rgba(126, 110, 232, 0.92), rgba(112, 176, 240, 0.9));
  color: #0a1026;
  border-radius: 12px;
  padding: 0;
  position: relative;
  border: 1px solid rgba(186, 197, 255, 0.3);
  box-shadow: 0 10px 28px -18px rgba(120, 162, 250, 0.7);
}

.outgoing .details p {
  background: linear-gradient(135deg, rgba(126, 110, 232, 0.92), rgba(112, 176, 240, 0.9));
  color: #0a1026;
  border-radius: 18px;
}

.chat-box .incoming {
  display: flex;
  align-items: flex-start;
}

.chat-box .incoming img {
  height: 35px;
  width: 35px;
  margin-right: 10px;
}

.chat-box .incoming .details {
  max-width: 50%;
  background: linear-gradient(135deg, rgba(26, 29, 60, 0.92), rgba(18, 20, 44, 0.96));
  color: #e9edf7;
  border-radius: 12px;
  padding: 0;
  position: relative;
  box-shadow: 0 10px 28px -24px rgba(0, 0, 0, 0.85);
}

.incoming .details p {
  background: linear-gradient(135deg, rgba(26, 29, 60, 0.92), rgba(18, 20, 44, 0.96));
  color: #e9edf7;
  border-radius: 18px 18px 18px 0;
}

.typing-area {
  padding: 12px 20px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;

  background: linear-gradient(180deg, rgba(22, 26, 54, 0.94), rgba(12, 14, 32, 0.96));
  box-shadow: 0 -10px 32px -30px rgba(0, 0, 0, 0.8);

}

.input-wrapper {

  flex: 1;
  position: relative;
}

.typing-area .input-field {
  width: 100%;
  min-height: 44px;
  max-height: 50vh;
  font-size: 16px;
  padding: 8px 12px;


  border: none;

  outline: none;
  border-radius: 10px;

  resize: none;
  overflow-y: auto;

  background: rgba(18, 22, 46, 0.72);
  color: #e9edf7;


}

.resize-btn {
  position: absolute;
  top: 4px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;

  border: none;
  color: #c8d6ff;
  font-size: 12px;
  padding: 0 4px;
  height: 16px;
  line-height: 16px;
  border-radius: 4px;
  cursor: pointer;
  display: none;
  z-index: 2;

}

.round-btn {

  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(136, 158, 255, 0.22), rgba(114, 205, 255, 0.18));
  color: #f8faff;
  font-size: 18px;
  cursor: pointer;
  border: none;
  outline: none;
  appearance: none;
  box-shadow: 0 12px 20px -18px rgba(0, 0, 0, 0.85);
}

.chat-area header .round-btn {
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: linear-gradient(135deg, rgba(136, 158, 255, 0.2), rgba(114, 205, 255, 0.18));
}

.round-btn.active {

  background: #333;
}

.p2p-toggle {
  font-size: 12px;
}

.chat-area header .p2p-toggle.active {
  background: #5145bf;
}

.hangup-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #c62828;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  outline: none;
  appearance: none;
}

#remoteVideos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.typing-indicator {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.typing-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 6px;
  color: #a0a8b5;
  font-size: 13px;
  font-weight: 500;
}

.typing-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.typing-bubble .typing-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.typing-body {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.typing-ellipsis {
  display: inline-flex;
  gap: 5px;
  margin-left: 1px;
}

.typing-ellipsis span {
  width: 7px;
  height: 7px;
  background: #b3bac6;
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1s infinite ease-in-out;
}

.typing-ellipsis span:nth-child(2) { animation-delay: 0.15s; }
.typing-ellipsis span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.typing-area .send-btn {
  background: linear-gradient(135deg, rgba(126, 110, 232, 0.9), rgba(112, 176, 240, 0.9));
}

.typing-area .send-btn.loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}

.typing-area .send-btn.loading i {
  opacity: 0;
}

.typing-area .send-btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #f4f6ff;
  animation: spin 0.8s linear infinite;
}

.typing-area .send-btn.active {
  background: linear-gradient(135deg, rgba(126, 110, 232, 0.96), rgba(112, 176, 240, 0.94));
}

.send-feedback {
  min-height: 18px;
  padding: 0 24px 6px;
  color: #f6b6b6;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1px;
  display: none;
}

.send-feedback.show {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
.chat-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.chat-area .chat-box {
  flex: 1;
  min-height: 0;
  max-height: none;
}


.typing-area .attach-btn {
  padding: 0;
  margin-right: 0;

}


@media screen and (max-width: 450px) {

  .form,
  .users {
    padding: 20px;
  }

  .form header {
    text-align: center;
  }

  .form form .name-details {
    flex-direction: column;
  }

  .form .name-details .field:first-child {
    margin-right: 0px;
  }

  .form .name-details .field:last-child {
    margin-left: 0px;
  }

  .users-header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .users-header .header-actions {
    margin-left: 6px;
  }

  .users-header .avatar-wrapper {
    width: 56px;
    height: 56px;
  }

  .users-header .avatar-wrapper img {
    width: 48px;
    height: 48px;
  }

  .users-header .settings-btn {
    width: 36px;
    height: 36px;
  }

  .tab-buttons {
    gap: 6px;
    flex: 1 1 auto;
  }

  .users-list a {
    padding-right: 10px;
  }

  .chat-area header {
    padding: 15px 20px;
  }

  .chat-box {
    min-height: 400px;
    padding: 10px 10px 15px 10px;
  }

  .chat-box .chat p {
    font-size: 14px;

  }

  .chat-box .outogoing .details {
    max-width: 200px;

  }

  .chat-box .incoming .details {
    max-width: 230px;

  }

  .incoming .details img {
    height: 30px;
    width: 30px;
  }

  .chat-area form {
    padding: 20px;
  }

  .chat-area form input {
    height: 40px;
    width: calc(100% - 48px);
  }

  .chat-area form button {
    width: 40px;
  }
}




.groups-list {
  margin-top: 20px;
}

.groups-list h2 {
  margin-bottom: 10px;
  padding-left: 15px;
}

.group {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e6e6e6;
}

.group a {
  flex-grow: 1;
  text-decoration: none;
  color: #333;
}

.creator-tag {
  background-color: #4CAF50;
  color: white;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
}

.create-group {
  margin-top: 20px;
  text-align: center;
}

.create-group-btn {
  display: inline-block;
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
}

.create-group-btn:hover {
  background-color: #45a049;
}

.typing-area {
  position: relative;
}

.typing-area .attach-btn {
  position: static;
}

.typing-area button {
  position: static;
}

.typing-area .resize-btn {
  position: absolute;
  left: 50%;
  top: 4px;
  bottom: auto;
  transform: translateX(-50%);
}

.chat-box .chat .details .time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
  display: block;
}

.chat-box .delivery-status {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.9;
  vertical-align: middle;
}

.chat-box .delivery-status.sent {
  color: rgba(255, 255, 255, 0.65);
}

.chat-box .delivery-status.delivered {
  color: #c1ccff;
}

.chat-box .delivery-status.read {
  color: #7fc4ff;
  font-weight: 600;
}

.chat-box .outgoing .details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-box .incoming .details {
  display: flex;
  flex-direction: column;
}

.chat-box .chat .details .sender-name {
  font-size: 13px;
  font-weight: 500;
  display: block;
  padding: 5px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-box .outgoing .details .sender-name {
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-box .incoming .details .sender-name {
  color: rgba(0, 0, 0, 0.5);
}

.chat-box .chat .details p {
  margin: 0;
  padding: 6px 10px;
}

.chat-box .chat .details .time {
  font-size: 11px;
  opacity: 0.7;
  display: block;
  padding: 0 12px 8px;
}

.chat-box .outgoing .details .time {
  color: rgba(255, 255, 255, 0.7);
}

.chat-box .incoming .details .time {
  color: rgba(0, 0, 0, 0.5);
}

.dropbtn {
  background-color: #1d743700;
  color: #fff;

  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}


.dropdown-content {
  display: none;
  position: absolute;
  background-color: #1f2025;
  min-width: 160px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  border: 1px solid #2a2b30;
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
}


.dropdown-content a {
  color: #f8f9ff;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
}


.dropdown-content a:hover {
  background-color: #292a30;
}


.dropdown:hover .dropdown-content {
  display: block;
}

.menu-item.menu-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.menu-item.menu-toggle .switch {
  position: relative;
  display: inline-flex;
  width: 42px;
  height: 22px;
  align-items: center;
}

.menu-item.menu-toggle .switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.menu-item.menu-toggle .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  transition: 0.2s ease;
  border-radius: 999px;
}

.menu-item.menu-toggle .slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #e9edf7;
  transition: 0.2s ease;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.menu-item.menu-toggle input:checked + .slider {
  background: linear-gradient(135deg, rgba(126, 110, 232, 0.96), rgba(112, 176, 240, 0.94));
}

.menu-item.menu-toggle input:checked + .slider::before {
  transform: translateX(18px);
  background: #0c1024;
}




.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 9, 14, 0.7);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: #1f2025;
  color: #f8f9ff;
  margin: 10% auto;
  padding: 24px;
  width: min(480px, 90vw);
  border-radius: 18px;
  border: 1px solid #2a2b30;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -24px -24px 20px;
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(39, 40, 48, 0.9), rgba(29, 30, 36, 0.9));
  border-bottom: 1px solid #2a2b30;
}
.modal-header span,
.modal-header .modal-title {
  color: #f8f9ff;
  font-weight: 600;
  font-size: 16px;
}
.modal-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}
.modal-close:hover,
.modal-close:focus-visible {
  color: #ffffff;
  transform: scale(1.05);
  outline: none;
}
.close {
  color: #9ca3af;
  float: right;
  font-size: 28px;
  font-weight: bold;
  transition: color 0.2s ease;
}
.close:hover,
.close:focus {
  color: #f8f9ff;
  text-decoration: none;
  cursor: pointer;
}

.attach-btn {
  color: #ccc;

  font-size: 1.1rem;
  cursor: pointer;
  margin-right: 10px;
}

.attach-btn:hover {
  color: #fff;

}

.attachment-preview {
  display: none;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 8px;
  margin: 0 0 8px 24px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.attachment-preview.show {
  display: flex;
}

.preview-item {
  position: relative;
}

.attachment-preview .preview-thumb {
  width: 60px;
  height: 60px;
  border-radius: 0;
  border: none;
}

.remove-attachment {
  background: #c62828;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 20px;
  padding: 0;
  position: absolute;
  top: -6px;
  right: -6px;
}


.file-sheet {
  width: 60px;
  height: 60px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.file-sheet .ext {
  font-weight: bold;
  text-transform: uppercase;
}

.file-sheet .name {
  font-size: 8px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}


.msg-menu {
  position: absolute;
  top: 2px;
  right: -20px;

}

.outgoing .msg-menu {
  right: auto;
  left: -20px;

}

.msg-menu-btn {
  border: none;
  background: transparent;
  color: #888;
  cursor: pointer;
  font-size: 18px;
}



.msg-menu-options {
  display: none;
  position: absolute;
  top: 20px;
  right: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  min-width: 90px;
  font-size: 14px;
}

.outgoing .msg-menu-options {
  right: auto;
  left: 0;
}

.msg-menu-options button {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.msg-menu-options button:hover {
  background-color: #f5f5f5;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 6px;
}

.msg-avatar.initials {
  background: #7ba4ff;
  color: #fff;
  font: 13px/28px Inter, sans-serif;
  text-align: center;
}


.edited-tag {
  color: #000;
  font-style: italic;
}

.msg-text.editing {
  outline: 1px dashed #888;
  background: #fff7;
}

.edit-actions {
  margin-top: 4px;
  display: flex;
  gap: 6px;
}

.edit-actions button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #1b1c1e;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.edit-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.edit-actions .save-edit {
  background: #28a745;
  color: #fff;
}

.edit-actions .cancel-edit {
  background: #f15959;
  color: #fff;
}

.edit-actions button i {
  pointer-events: none;
}

.perm {
  margin-left: 6px;
  font-size: 12px;
}

.perm input {
  margin-right: 2px;
}


.chat-box .chat-thumb {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 0;
  border: none;
  margin-top: 6px;
  display: block;
}

.message-file {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #fff;
  margin-top: 6px;
  max-width: 80px;
}

.message-file .name {
  font-size: 10px;
  margin-top: 4px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}


.create-group {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 15px;
}

.create-group-btn,
.upload-files-btn {
  display: inline-block;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  background-color: #333;
}

.create-group-btn:hover,
.upload-files-btn:hover {
  background-color: #555;
}









.unread-badge {
  background: linear-gradient(135deg, rgba(134, 122, 226, 0.92), rgba(98, 154, 230, 0.86));
  color: #fff;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

.users-list a {
  position: relative;
}

.users-list a:hover .unread-badge {
  background: linear-gradient(135deg, rgba(152, 138, 236, 0.95), rgba(112, 170, 236, 0.9));
}









/* Styles for member listing */
.member-list {
  max-height: 350px;
  overflow-y: auto;
  padding: 10px;
  background: #fff;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px;
  border-bottom: 1px solid #2a2b30;
  background: #1f2025;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.member-item:hover {
  background-color: #282a30;
  transform: translateY(-1px);
}

.member-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.member-info .details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-info .details span {
  font-weight: 500;
  color: #f3f4ff;
}

.role-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4ff;
}

.role-tag.creator {
  background: rgba(114, 74, 232, 0.25);
  color: #c7b9ff;
}

.role-tag.admin {
  background: rgba(50, 70, 90, 0.35);
  color: #d6e4ff;
}

.role-tag.member {
  background: rgba(248, 249, 254, 0.1);
  color: #f3f4ff;
}

.member-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-joined {
  color: #b4b7c5;
  font-size: 12px;
}

/* Estilos para el modal */
.modal-header h3 {
  color: #f8f9ff;
  margin: 0;
}

.remove-member {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.remove-member:hover {
  background-color: rgba(255, 107, 107, 0.15);
  color: #ff8d8d;
}

/* font tweaks for group chat  */
.group-chat .chat-box .msg-text,
.group-chat .chat-box .chat p {
  font-size: 15px;
}

@media screen and (max-width: 450px) {

  .group-chat .chat-box .msg-text,
  .group-chat .chat-box .chat p {
    font-size: 15px;
  }
}

@media screen and (max-width:600px) {
  body.chat-page {

    align-items: stretch;
    justify-content: stretch;
    background-image: none;

    padding: 0;
    overflow: auto;


  }

  .chat-page .wrapper {

    max-width: none;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    border-radius: 0;
    box-shadow: none;
  }

  .chat-page .chat-area {

    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .chat-page .chat-box {

    flex: 1;
    min-height: 0;
    max-height: none;
  }

}








/* Reply indicator styles */
.reply-indicator {
  background: #05335c;
  border-left: 3px solid #4a76a8;
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 4px;
  max-width: calc(100% - 20px);
  position: relative;
}

.reply-indicator .reply-sender {
  font-size: 12px;
  color: #e3f2fd;
  margin-bottom: 4px;
  font-weight: bold;
}

.reply-indicator .reply-message {
  font-size: 14px;
  color: #bbdefb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-indicator .cancel-reply {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: #bbdefb;
  cursor: pointer;
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------- avatar edit ------- */
.avatar-wrapper {
  position: relative;
  cursor: pointer;
}

.avatar-wrapper .edit-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0008;
  color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .2s;
}

.avatar-wrapper:hover .edit-icon {
  opacity: 1;
}

.avatar-modal {
  position: fixed;
  inset: 0;
  background: #0008;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.avatar-modal.active {
  display: flex;
}

.avatar-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.avatar-modal-content img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.avatar-modal-content button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #333;
  color: #fff;
  cursor: pointer;
}

.message-fab {
  position: fixed;
  right: 86px;
  bottom: 96px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(126, 110, 232, 0.66), rgba(112, 176, 240, 0.54));
  box-shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.84), 0 6px 14px rgba(122, 168, 236, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a1026;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  z-index: 30;
}

.message-fab .fab-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #f6fbff;
  font-size: 20px;
}

.message-fab:hover,
.message-fab:focus-visible {
  background: linear-gradient(145deg, rgba(140, 126, 238, 0.74), rgba(122, 190, 244, 0.66));
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.88), 0 8px 16px rgba(134, 186, 246, 0.44);
  transform: translateY(-2px);
  outline: none;
}

.new-message-page .wrapper {
  position: relative;
  max-width: 640px;
}

.new-message-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: 10px 12px;
}

.quick-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(122, 150, 255, 0.35);
  color: #f4f7ff;
  background: linear-gradient(140deg, rgba(122, 150, 255, 0.2), rgba(62, 110, 255, 0.2));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-action .icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: inherit;
}

.quick-action strong {
  display: block;
  font-size: 13px;
}

.quick-action:hover,
.quick-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(122, 150, 255, 0.6);
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.9);
  outline: none;
}

.quick-action.is-disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: linear-gradient(140deg, rgba(122, 150, 255, 0.12), rgba(62, 110, 255, 0.12));
}

.new-message-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(122, 150, 255, 0.35);
  border-radius: 12px;
  background: rgba(10, 12, 27, 0.7);
}

.new-message-search i {
  color: #a8b7ff;
}

.new-message-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f4f7ff;
  font-size: 14px;
}

.new-message-list .content img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.new-message-list .section-title {
  color: #cdd8ff;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 8px 0 4px;
}

@media (max-width: 540px) {
  .message-fab {
    right: 44px;
    bottom: 78px;
    width: 66px;
    height: 66px;
  }

  .new-message-actions {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}
