/* Auth and account pages */

body.auth-entry {
  --auth-accent: #38b7ee;
  --auth-accent-hover: #2aa8e8;
  --auth-accent-rgb: 56, 183, 238;
  --auth-bg-base: #3d5670;
  --auth-container: #5686ac;
  --auth-header-top: rgba(32, 52, 78, 0.92);
  --auth-header-bottom: rgba(24, 42, 64, 0.88);
  --auth-card-border: rgba(56, 183, 238, 0.25);
  background-color: var(--auth-bg-base);
  min-height: 100vh;
}

body.auth-entry .main-container {
  background: var(--auth-container);
  min-height: 100vh;
}

body.auth-entry .main-header {
  background: linear-gradient(180deg, var(--auth-header-top) 0%, var(--auth-header-bottom) 100%);
}

body.auth-entry #header {
  background: transparent;
  box-shadow: none;
}

body.auth-entry.messenger-facebook {
  --auth-accent: #4267b2;
  --auth-accent-hover: #365899;
  --auth-accent-rgb: 66, 103, 178;
  --auth-bg-base: #4267b2;
  --auth-container: #3b5998;
  --auth-header-top: rgba(48, 72, 130, 0.92);
  --auth-header-bottom: rgba(40, 62, 115, 0.88);
  --auth-card-border: rgba(66, 103, 178, 0.4);
}

body.auth-entry.messenger-whatsapp {
  --auth-accent: #25d366;
  --auth-accent-hover: #1da851;
  --auth-accent-rgb: 37, 211, 102;
  --auth-bg-base: #075e54;
  --auth-container: #128c7e;
  --auth-header-top: rgba(8, 75, 68, 0.92);
  --auth-header-bottom: rgba(6, 58, 52, 0.88);
  --auth-card-border: rgba(37, 211, 102, 0.35);
}

body.auth-entry.messenger-instagram {
  --auth-accent: #c13584;
  --auth-accent-hover: #a02a6c;
  --auth-accent-rgb: 193, 53, 132;
  --auth-bg-base: #5b2d82;
  --auth-container: #833ab4;
  --auth-header-top: rgba(70, 30, 105, 0.92);
  --auth-header-bottom: rgba(50, 20, 80, 0.88);
  --auth-card-border: rgba(193, 53, 132, 0.4);
}

body.auth-entry.messenger-telegram {
  --auth-accent: #38b7ee;
  --auth-accent-hover: #2aa8e8;
  --auth-accent-rgb: 56, 183, 238;
}

body.auth-entry #logo .header-logo-img {
  width: auto !important;
  height: 40px !important;
  max-width: min(220px, 52vw);
  display: block;
  object-fit: contain;
}

.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 28px;
  border-radius: 16px;
  background: rgba(17, 35, 58, 0.96);
  border: 1px solid var(--auth-card-border, rgba(56, 183, 238, 0.25));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.auth-card h1 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 28px;
}

.auth-card p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.auth-form label {
  display: block;
  margin-bottom: 14px;
  color: #d8e8f8;
  font-size: 14px;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
}

.auth-form select {
  color-scheme: dark;
  cursor: pointer;
}

.auth-form select option {
  background: #1a2f45;
  color: #e8f4ff;
}

.auth-form input::placeholder,
.auth-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.auth-form textarea {
  min-height: 90px;
  resize: vertical;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  outline: none;
  border-color: var(--auth-accent, #38b7ee);
}

.auth-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--auth-accent, #38b7ee);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-btn:hover {
  background: var(--auth-accent-hover, #2aa8e8);
}

.auth-btn--ghost {
  background: rgba(255, 255, 255, 0.1);
}

.auth-links {
  margin-top: 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
}

.auth-links a {
  color: #8fd6f8;
}

.auth-error {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 53, 69, 0.18);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #ffb3bd;
}

.auth-error.is-visible {
  display: block;
}

.auth-success {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(47, 158, 98, 0.18);
  border: 1px solid rgba(47, 158, 98, 0.35);
  color: #b8f5d0;
}

.auth-success.is-visible {
  display: block;
}

.site-userbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0 4px;
}

.mail-inbox-mount {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 1;
}

.mail-inbox {
  position: relative;
}

.mail-inbox__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #d8f3ff;
  cursor: pointer;
  gap: 8px;
}

.mail-inbox__btn svg {
  display: block;
  flex-shrink: 0;
}

.mail-inbox__btn-label {
  display: none;
  white-space: nowrap;
}

.mail-inbox__btn:hover {
  background: rgba(56, 183, 238, 0.22);
  border-color: rgba(56, 183, 238, 0.5);
}

.mail-inbox__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d6d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.mail-inbox__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(56, 183, 238, 0.28);
  background: rgba(10, 24, 42, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 1200;
  overflow: hidden;
}

.mail-inbox__panel[hidden] {
  display: none !important;
}

body.is-rtl .mail-inbox__panel {
  right: auto;
  left: 0;
}

.mail-inbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mail-inbox__readall {
  border: 0;
  background: transparent;
  color: #7fd4f7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.mail-inbox__list {
  overflow: auto;
  max-height: 420px;
}

.mail-inbox__empty {
  padding: 18px 14px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.mail-inbox__item {
  display: block;
  padding: 12px 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
}

.mail-inbox__item:hover {
  background: rgba(56, 183, 238, 0.1);
}

.mail-inbox__item.is-unread {
  background: rgba(56, 183, 238, 0.08);
}

.mail-inbox__item-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.mail-inbox__item-body {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.mail-inbox__item-time {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.main-header #header {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 10px 16px;
  padding: 8px 15px;
  box-sizing: border-box;
  float: none !important;
}

body.catalog-home .main-header #header,
body.catalog-legacy-hidden .main-header #header {
  justify-content: flex-start !important;
  flex-wrap: nowrap;
}

.main-header #header.has-header-back {
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-content: stretch;
  gap: 10px;
}

.main-header #header.has-header-back .header-brand {
  justify-self: center;
}

.main-header #header.has-header-back .site-userbar,
.main-header #header.has-header-back .header-actions {
  justify-self: end;
}

/* Login / register: no add-channel CTA; top row = back | logo | flag */
body.auth-entry .header-add-channel {
  display: none !important;
}

body.auth-entry .main-header #header.has-header-back {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "back brand lang"
    "actions actions actions";
  align-items: center;
  column-gap: 8px;
  row-gap: 10px;
}

body.auth-entry .main-header #header.has-header-back .header-back-btn {
  grid-area: back;
  justify-self: start;
}

body.auth-entry .main-header #header.has-header-back .header-brand {
  grid-area: brand;
  justify-self: center;
  width: auto;
  max-width: 100%;
  justify-content: center;
  padding-top: 0;
}

body.auth-entry .main-header #header.has-header-back .header-lang-top {
  grid-area: lang;
  justify-self: end;
  align-self: center;
  z-index: 1200;
}

body.auth-entry .main-header #header.has-header-back .header-actions,
body.auth-entry .main-header #header.has-header-back .site-userbar {
  grid-area: actions;
  justify-self: stretch;
  width: 100%;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  /* Keep mail → language order identical for ru/en/he/ar */
  direction: ltr;
}

.header-actions .site-userbar {
  order: 0;
}

.header-actions .mail-inbox-mount {
  order: 1;
}

.header-actions .lang-switch-mount {
  order: 2;
}

/* Language switcher on auth pages */
.lang-switch-mount {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1100;
  order: 2;
}

.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-switch__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: auto;
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  line-height: 0;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-switch__toggle-label {
  display: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
}

.lang-switch__toggle:hover,
.lang-switch.is-open .lang-switch__toggle {
  background: rgba(56, 183, 238, 0.22);
  border-color: rgba(56, 183, 238, 0.45);
}

.lang-switch__flag,
.secondary-navigation .lang-switch__flag,
.secondary-navigation img.lang-switch__flag {
  display: block !important;
  width: 22px !important;
  height: 16px !important;
  max-width: 22px !important;
  max-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover;
  border: 0;
  border-radius: 3px;
  flex-shrink: 0;
  align-self: center;
  vertical-align: middle;
  overflow: hidden;
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(10, 22, 38, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  z-index: 1200;
  box-sizing: border-box;
}

.lang-switch__option {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font: 600 13px/1.2 "Segoe UI", Tahoma, sans-serif;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-switch__option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-switch__option.is-active {
  background: rgba(56, 183, 238, 0.28);
  color: #fff;
}

.lang-switch__option-label {
  white-space: nowrap;
}

body.is-rtl .lang-switch__menu {
  right: auto;
  left: 0;
}

.header-back-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(56, 183, 238, 0.35);
  background: rgba(56, 183, 238, 0.15);
  color: #8fd6f8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  justify-self: start;
}

.header-back-btn:hover {
  background: rgba(56, 183, 238, 0.28);
  border-color: rgba(56, 183, 238, 0.55);
  color: #fff;
  text-decoration: none;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header-brand #logo a {
  display: block;
  float: none !important;
}

.header-brand .header-logo-img,
.header-brand #logo img {
  height: 44px !important;
  width: auto !important;
  max-width: 300px;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  display: block;
  object-fit: contain;
}

.header-brand #logo img[hidden],
.header-brand .header-logo-img[hidden] {
  display: none !important;
}

.header-brand .brand-logo {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #fff !important;
}

.header-brand .brand-logo__inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header-brand .brand-logo__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  line-height: 0;
}

.header-brand .brand-logo__icon svg {
  display: block;
  width: 40px;
  height: 40px;
}

.header-brand .brand-logo__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-brand .brand-logo__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}

.header-brand .brand-logo__sub {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: rgba(143, 214, 248, 0.92);
  white-space: nowrap;
}

.header-add-channel {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 8px 14px;
  border-radius: 10px;
  background: #38b7ee;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-add-channel:hover {
  background: #2aa8e8;
  transform: translateY(-1px);
}

.site-userbar a,
.site-userbar button {
  font-family: inherit;
}

.site-userbar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.site-userbar__btn--admin,
.site-userbar__btn--register {
  background: var(--auth-accent, #38b7ee);
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(var(--auth-accent-rgb, 56, 183, 238), 0.28);
}

.site-userbar__btn--admin:hover,
.site-userbar__btn--register:hover {
  background: var(--auth-accent-hover, #2aa8e8);
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 183, 238, 0.34);
}

.site-userbar__btn--login {
  background: rgba(56, 183, 238, 0.15);
  border-color: rgba(56, 183, 238, 0.35);
  color: #8fd6f8 !important;
}

.site-userbar__btn--login:hover {
  background: rgba(56, 183, 238, 0.28);
  border-color: rgba(56, 183, 238, 0.55);
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
}

.site-userbar__btn--logout {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92) !important;
}

.site-userbar__btn--logout:hover {
  background: rgba(220, 72, 72, 0.24);
  border-color: rgba(255, 120, 120, 0.45);
  color: #fff !important;
  transform: translateY(-1px);
}

.site-userbar__name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 0 4px;
}

.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.admin-header h1 {
  margin: 0;
  color: #fff;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
}

.admin-panel {
  padding: 18px;
  border-radius: 14px;
  background: rgba(17, 35, 58, 0.96);
  border: 1px solid rgba(56, 183, 238, 0.2);
}

.admin-panel h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 20px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 620px;
  overflow: auto;
}

.admin-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.admin-item__meta {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-item__title {
  color: #fff;
  font-weight: 700;
}

.admin-item__sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  margin-top: 4px;
  word-break: break-word;
}

.admin-item__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  margin-left: 8px;
}

.admin-item__actions button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.admin-item__actions .edit {
  background: rgba(56, 183, 238, 0.2);
  color: #d8f3ff;
}

.admin-item__actions .delete {
  background: rgba(220, 53, 69, 0.2);
  color: #ffb3bd;
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-toolbar input,
.admin-toolbar select {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #1a2f45;
  color: #e8f4ff;
  color-scheme: dark;
}

.admin-toolbar select {
  flex: 0 1 170px;
  max-width: 220px;
  cursor: pointer;
}

.admin-toolbar select option,
.admin-page select option {
  background-color: #ffffff;
  color: #111111;
}

.admin-country-dist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.admin-country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(56, 183, 238, 0.35);
  background: rgba(56, 183, 238, 0.1);
  color: #d8f3ff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-country-chip:hover {
  background: rgba(56, 183, 238, 0.2);
  border-color: #38b7ee;
}

.admin-country-chip.is-active {
  background: linear-gradient(180deg, #45c4ff 0%, #2aa8e8 100%);
  border-color: transparent;
  color: #fff;
}

.admin-country-chip__count {
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

.admin-list-meta {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .main-header #header.has-header-back {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "back brand"
      "actions actions";
    align-items: center;
    column-gap: 8px;
    row-gap: 10px;
    padding: 10px 12px;
    direction: ltr;
  }

  .main-header #header.has-header-back .header-back-btn {
    grid-area: back;
    justify-self: start;
  }

  .main-header #header.has-header-back .header-brand {
    grid-area: brand;
    min-width: 0;
    justify-self: start;
  }

  .main-header #header.has-header-back .header-actions,
  .main-header #header.has-header-back .site-userbar {
    grid-area: actions;
    width: 100%;
    justify-self: stretch;
  }

  body.auth-entry .main-header #header.has-header-back {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "back brand lang"
      "actions actions actions";
    row-gap: 10px;
  }

  body.auth-entry .main-header #header.has-header-back .header-brand {
    justify-self: center;
    width: auto;
    max-width: 100%;
    justify-content: center;
    padding-top: 0;
    min-width: 0;
  }

  body.auth-entry .main-header #header.has-header-back .header-lang-top {
    grid-area: lang;
    justify-self: end;
  }

  body.auth-entry .header-lang-top .lang-switch__toggle {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }

  body.auth-entry .header-lang-top .lang-switch__toggle-label {
    display: none !important;
  }

  body.auth-entry .header-lang-top .lang-switch__menu {
    left: auto;
    right: 0;
    width: max-content;
    min-width: 160px;
    max-width: min(320px, calc(100vw - 24px));
  }

  .header-actions {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    direction: ltr;
  }

  .header-actions .site-userbar {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-actions .site-userbar__name {
    flex: 1 1 100%;
  }

  .header-actions .site-userbar__btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    min-height: 42px;
    justify-content: center;
    box-shadow: none !important;
  }

  .header-actions .mail-inbox-mount,
  .header-actions .lang-switch-mount {
    flex: 0 0 auto;
  }

  .header-actions .mail-inbox__btn,
  .header-actions .lang-switch__toggle {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }

  .header-actions .lang-switch__toggle-label {
    display: none !important;
  }

  .header-actions .mail-inbox__panel,
  .header-actions .lang-switch__menu {
    left: auto;
    right: 0;
    width: max-content;
    min-width: 160px;
    max-width: min(320px, calc(100vw - 24px));
  }

  .header-brand .header-add-channel {
    font-size: 12px;
    padding: 0 10px;
    min-height: 36px;
    white-space: nowrap;
    width: auto !important;
    box-shadow: none !important;
  }
}

@media (max-width: 480px) {
  .header-brand {
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-brand .header-add-channel {
    width: 100%;
    justify-content: center;
  }

  .site-userbar__name {
    width: 100%;
    text-align: start;
  }

  .auth-page {
    padding: 16px 12px 28px;
  }

  .auth-card {
    padding: 18px 14px;
  }
}


.auth-card--wide {
  max-width: 760px;
}

.add-channel-page .auth-card h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
}

.add-steps {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.add-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.add-step.is-active {
  border-color: rgba(56, 183, 238, 0.45);
  background: rgba(56, 183, 238, 0.08);
}

.add-step__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #38b7ee;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.add-step p {
  margin: 4px 0 0;
  font-size: 13px;
}

.add-section {
  margin-bottom: 22px;
}

.add-section__hint,
.add-instructions {
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
}

.add-instructions {
  padding-left: 18px;
  margin: 10px 0 16px;
}

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

.add-actions .auth-btn {
  display: inline-block;
  width: auto;
  text-decoration: none;
  text-align: center;
}

.add-divider {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.add-guest p {
  margin-bottom: 14px;
}

.admin-panel--full {
  grid-column: 1 / -1;
}

.admin-item__actions .approve {
  background: rgba(40, 167, 69, 0.25);
  color: #b8f5c6;
}

.admin-item__actions .reject {
  background: rgba(220, 53, 69, 0.2);
  color: #ffb3bd;
}

.site-userbar__add {
  background: #38b7ee;
  color: #fff !important;
  border-radius: 8px;
  padding: 6px 12px !important;
  font-weight: 600;
}
