.user-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-weight: 650 !important;
  color: #fff !important;
  line-height: 1.15 !important;
}
.user-chip .user-avatar {
  width: 48px !important;
  height: 48px !important;
  object-fit: cover !important;
  border-radius: 6px !important;
  border: 1px solid #2a3646 !important;
  background: #0f1419 !important;
}
.user-chip .user-chip-meta {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1.15 !important;
}
.user-chip .user-chip-name {
  font-size: 1rem !important;
  font-weight: 650 !important;
  color: #fff !important;
}
.user-chip .user-chip-sub {
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  color: #7f93a8 !important;
}

.user-chip-wrap { position: relative; }
.user-chip-wrap > summary { list-style: none; cursor: pointer; }
.user-chip-wrap > summary::-webkit-details-marker { display: none; }
.user-chip-list {
  position: absolute;
  left: 0;
  top: calc(100% + 0.4rem);
  min-width: 17.5rem;
  background: #1a2330;
  border: 1px solid #2a3646;
  border-radius: 8px;
  padding: 0.3rem;
  z-index: 80;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.user-chip-list a,
.user-chip-lang > span {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) 1.1rem;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  padding: 0.42rem 0.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.user-chip-list a:hover { background: #243044; }
.user-chip-ico {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.user-chip-lang { border-top: 1px solid #2a3646; margin-top: 0.25rem; padding-top: 0.25rem; }
.user-chip-lang > a {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  padding-left: 1.9rem;
}

.user-chip-list button.user-chip-account {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) 1.1rem;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.42rem 0.5rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.user-chip-list button.user-chip-account:hover { background: #243044; }
.user-account {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(8, 12, 18, 0.62);
  padding: 1rem;
}
.user-account[hidden] { display: none; }
.user-account-card {
  width: min(52rem, 100%);
  background: #1a2330;
  color: #e8eef6;
  border: 1px solid #2a3646;
  border-radius: 12px;
  padding: 0.9rem 1rem 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.user-account-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.user-account-x {
  width: fit-content;
  margin: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.user-account-cols { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1.4rem; }
.user-account-card h2 { margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid #2a3646; font-size: 0.95rem; color: #9aa8b8; text-transform: uppercase; letter-spacing: 0.04em; }
.user-account-card section + h2, .user-account-card h2 + .user-account-row + h2 { margin-top: 1.1rem; }
.user-account-row { display: grid; grid-template-columns: 8.2rem minmax(0, 14rem); align-items: center; gap: 0.55rem; margin: 0.4rem 0; }
.user-account-row > span, .user-account-row > label { font-size: 0.9rem; margin: 0; }
.user-account-row input, .user-account-row select {
  width: 100%;
  max-width: 14rem;
  background: #0f1419 !important;
  color: #e8eef6 !important;
  border: 1px solid #2a3646 !important;
}
.user-account-row input[readonly] { opacity: 0.75; }
.user-account-photo-row { display: flex; align-items: center; gap: 0.5rem; }
.user-account-photo { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.user-account-photo-empty { display: inline-block; background: #0f1419; border: 1px solid #2a3646; }
.user-account-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.user-account-actions .btn { width: fit-content; }
.user-account-form footer { margin-top: 0.8rem; }
.user-account-form button[type="submit"] { width: fit-content; }
.user-account-msg { color: #f87171; margin: 0.6rem 0 0; }

.user-chip-sep { height: 0; margin: 0.3rem 0.4rem; border-top: 1px solid #2a3646; }
.user-account-btn,
.user-account-btn:hover,
.user-account-btn:visited {
  display: inline-block;
  width: fit-content;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: #3d8bfd !important;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}
.user-account a.btn-2fa,
.user-account a.btn-2fa-off,
.user-account a.btn-2fa-off:hover {
  background: #b42318 !important;
  color: #fff !important;
  border-color: #b42318 !important;
  text-decoration: none !important;
  width: fit-content;
}
.user-account a.btn-2fa-on,
.user-account a.btn-2fa-on:hover {
  background: #166534 !important;
  color: #fff !important;
  border-color: #166534 !important;
  text-decoration: none !important;
  width: fit-content;
}
.user-account-msg { color: #86efac; }

.user-account-photo-wrap { position: relative; display: inline-block; }
.user-account-photo-pick { width: fit-content; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.user-account-photo-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
}
.user-lang { position: relative; }
.user-lang-btn, .user-lang-list button {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0;
  padding: 0.3rem 0.5rem;
  border: 1px solid #2a3646;
  border-radius: 6px;
  background: #0f1419;
  color: #fff;
  cursor: pointer;
}
.user-lang-list {
  position: absolute;
  z-index: 5;
  left: 0;
  top: calc(100% + 0.25rem);
  max-height: 14rem;
  overflow: auto;
  background: #1a2330;
  border: 1px solid #2a3646;
  border-radius: 8px;
  padding: 0.25rem;
}
.user-lang-list button { width: 100%; border: 0; background: transparent; text-align: left; }
.user-lang-list button:hover { background: #243044; }

.user-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0;
  padding: 0.3rem 0.6rem;
  border: 1px solid #2a3646;
  border-radius: 6px;
  background: #0f1419;
  color: #fff;
}
.user-lang .dropdown-menu { min-width: 12rem; }
.user-lang .dropdown-item { display: flex; align-items: center; gap: 0.45rem; }
