/* =====================================================================
   extra.css — небольшие добавления поверх исходной вёрстки:
   - контейнер сообщений Django (messages framework)
   - блок ошибок формы входа/регистрации
   - недостающий модификатор .status-pill.failed (в исходной вёрстке был
     только .status-pill (зелёный) и .status-pill.wait (жёлтый))
   ===================================================================== */

.django-messages {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(410px, calc(100vw - 36px));
  pointer-events: none;
}

.django-message {
  --message-accent: #2f8a43;
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 11px 11px 11px 13px;
  overflow: hidden;
  border: 1px solid rgba(42, 111, 55, .16);
  border-radius: 20px;
  color: #1e3023;
  background: linear-gradient(145deg, #fffefa, #fbf6ed);
  box-shadow: 0 18px 44px rgba(65, 48, 27, .12), 0 3px 10px rgba(65, 48, 27, .06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  animation: django-message-in .28s ease-out both;
}

.django-message::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--message-accent);
  transform-origin: left center;
  animation: django-message-life 7s linear both;
}

.django-message-success { --message-accent: #2f8a43; }
.django-message-error { --message-accent: #c94943; border-color: rgba(190, 56, 48, .16); }
.django-message-warning { --message-accent: #b87512; border-color: rgba(184, 117, 18, .18); }
.django-message-info { --message-accent: #477b72; border-color: rgba(71, 123, 114, .17); }

.django-message-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(47, 138, 67, .20);
  border-color: color-mix(in srgb, var(--message-accent) 24%, transparent);
  border-radius: 13px;
  color: var(--message-accent);
  background: #f0f7f1;
  background: color-mix(in srgb, var(--message-accent) 10%, #fff);
  font-size: 15px;
}

.django-message-content {
  min-width: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.django-message-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(33, 58, 40, .08);
  border-radius: 10px;
  color: #617067;
  background: rgba(35, 58, 42, .045);
  cursor: pointer;
  font-size: 12px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.django-message-close:hover {
  color: #24382a;
  background: rgba(35, 58, 42, .09);
  transform: translateY(-1px);
}

.django-message-close:focus-visible {
  outline: 3px solid rgba(47, 138, 67, .24);
  outline-color: color-mix(in srgb, var(--message-accent) 28%, transparent);
  outline-offset: 2px;
}

.django-message.is-leaving {
  pointer-events: none;
  animation: django-message-out .26s ease-in forwards;
}

.django-message.is-leaving::after {
  animation-play-state: paused;
}

@keyframes django-message-in {
  from { opacity: 0; transform: translate3d(18px, -5px, 0) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes django-message-out {
  to { opacity: 0; transform: translate3d(18px, -4px, 0) scale(.98); }
}

@keyframes django-message-life {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 560px) {
  .django-messages {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    width: auto;
  }

  .django-message {
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    gap: 10px;
    min-height: 62px;
    border-radius: 17px;
  }

  .django-message-icon {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .django-message,
  .django-message::after,
  .django-message.is-leaving {
    animation-duration: .01ms;
  }
}

/* Обязательное уведомление о cookie и технических данных. */
.cookie-notice {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10020;
  width: min(880px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 16px 17px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border: 1px solid rgba(49, 88, 57, .20);
  border-radius: 22px;
  color: #203126;
  background: rgba(255, 253, 247, .97);
  box-shadow: 0 22px 60px rgba(29, 40, 31, .22);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: opacity .24s ease, transform .24s ease;
}
.cookie-notice.is-hidden { opacity: 0; transform: translateY(18px); pointer-events: none; }
.cookie-notice-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: #2f7839; font-size: 20px; }
.cookie-notice-copy strong { display: block; font-size: 14px; font-weight: 950; }
.cookie-notice-copy p { margin: 4px 0 0; color: #526058; font-size: 11px; line-height: 1.45; }
.cookie-notice-copy a { display: inline-block; margin-top: 5px; color: #23692f; font-size: 10px; font-weight: 850; text-decoration: underline; text-underline-offset: 2px; }
.cookie-notice-button { min-width: 112px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 14px; color: #fff; background: #2f7839; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.cookie-notice-button:hover { background: #225f2c; }
.cookie-notice-button:disabled { opacity: .65; cursor: wait; }

html[data-theme="dark"] .cookie-notice { border-color: rgba(121, 195, 135, .25); color: #f4f8f4; background: rgba(17, 23, 19, .97); box-shadow: 0 22px 60px rgba(0, 0, 0, .48); }
html[data-theme="dark"] .cookie-notice-copy p { color: #b7c3ba; }
html[data-theme="dark"] .cookie-notice-copy a { color: #8bd398; }

@media (max-width: 650px) {
  .cookie-notice { grid-template-columns: 42px minmax(0, 1fr); padding: 15px; gap: 12px; border-radius: 19px; }
  .cookie-notice-icon { width: 42px; height: 42px; border-radius: 14px; }
  .cookie-notice-button { grid-column: 1 / -1; width: 100%; }
}

/* Shared design for reusable client-side toasts (cart, payment and profile). */
.site-toast,
.cart-toast,
.pay-toast,
.save-toast {
  --message-accent: #2f8a43;
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9998;
  width: min(390px, calc(100vw - 36px));
  min-height: 66px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  padding: 11px 11px 11px 13px;
  overflow: hidden;
  border: 1px solid rgba(42, 111, 55, .16);
  border-radius: 20px;
  color: #1e3023;
  background: linear-gradient(145deg, #fffefa, #fbf6ed);
  box-shadow: 0 18px 44px rgba(65, 48, 27, .12), 0 3px 10px rgba(65, 48, 27, .06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translate3d(18px, 8px, 0) scale(.98);
  pointer-events: none;
  transition: opacity .26s ease, transform .26s ease;
  font: inherit;
}

.site-toast.show,
.cart-toast.show,
.pay-toast.show,
.save-toast.show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.site-toast::after,
.cart-toast::after,
.pay-toast::after,
.save-toast::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--message-accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.site-toast.show::after,
.cart-toast.show::after,
.pay-toast.show::after,
.save-toast.show::after {
  animation: django-message-life 7s linear both;
}

.site-toast.is-leaving,
.cart-toast.is-leaving,
.pay-toast.is-leaving,
.save-toast.is-leaving {
  opacity: 0;
  transform: translate3d(18px, 8px, 0) scale(.98);
  pointer-events: none;
}

.site-toast-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 138, 67, .20);
  border-radius: 13px;
  color: var(--message-accent);
  background: #f0f7f1;
  font-size: 15px;
}

.site-toast-content {
  min-width: 0;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.site-toast-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(33, 58, 40, .08);
  border-radius: 10px;
  color: #617067;
  background: rgba(35, 58, 42, .045);
  cursor: pointer;
  font-size: 12px;
}

.site-toast-close:hover {
  color: #24382a;
  background: rgba(35, 58, 42, .09);
}

@media (max-width: 560px) {
  .site-toast,
  .cart-toast,
  .pay-toast,
  .save-toast {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    gap: 10px;
    min-height: 62px;
    border-radius: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-toast,
  .cart-toast,
  .pay-toast,
  .save-toast {
    transition-duration: .01ms;
  }

  .site-toast.show::after,
  .cart-toast.show::after,
  .pay-toast.show::after,
  .save-toast.show::after {
    animation-duration: .01ms;
  }
}

.auth-error {
  background: rgba(209, 52, 47, .1);
  color: #a4241f;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.auth-error[hidden] { display: none; }

.status-pill.failed {
  color: #a4241f;
  background: rgba(209, 52, 47, .12);
}

.field-error {
  color: #a4241f;
  font-size: 12px;
  font-weight: 600;
  margin-top: -8px;
}

.promo-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.promo-form input {
  flex: 1;
}

/* Страницы /accounts/login/ и /accounts/register/ переиспользуют .auth-card
   из модалки, но вне .auth-modal (там она position:absolute) — здесь просто
   центрируем её в потоке страницы. */
.standalone-auth {
  display: flex;
  justify-content: center;
  padding: 40px 0 60px;
}
.standalone-auth-card.auth-card {
  position: static;
  transform: none;
  margin: 0 auto;
}

.slot-inner.slot-filled {
  border-style: solid;
  padding: 0;
  overflow: hidden;
}
.slot-inner.slot-filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* =====================================================================
   Компактная регистрация и вход по email
   ===================================================================== */
.auth-simple-page .page-shell {
  background:
    radial-gradient(circle at 18% 16%, rgba(65, 156, 92, .14), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(211, 192, 158, .18), transparent 30%),
    #101312;
}

.auth-simple-page .site-header,
.auth-simple-page .site-footer {
  position: relative;
  z-index: 2;
}

.auth-simple-shell {
  min-height: 720px;
  display: grid;
  place-items: center;
  padding: 58px 20px 72px;
}

.auth-simple-card {
  width: min(100%, 560px);
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 30px;
  background: linear-gradient(155deg, rgba(37, 41, 39, .98), rgba(20, 23, 22, .99));
  box-shadow: 0 34px 90px rgba(0, 0, 0, .38);
  color: #fff;
}

.auth-simple-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-simple-logo {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #4ba05d, #24763a);
  box-shadow: 0 10px 24px rgba(53, 141, 75, .22);
  font-size: 18px;
  font-weight: 950;
}

.auth-simple-heading {
  text-align: center;
  margin-bottom: 24px;
}

.auth-simple-heading > span {
  display: inline-block;
  margin-bottom: 7px;
  color: #7fdb99;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-simple-heading h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1;
  letter-spacing: -1.4px;
  font-weight: 950;
}

.auth-simple-heading p {
  max-width: 430px;
  margin: 0 auto;
  color: rgba(255, 255, 255, .62);
  font-size: 14px;
  line-height: 1.55;
}

.auth-simple-heading p strong {
  color: #fff;
}

.auth-simple-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
}

.auth-simple-tabs a {
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: rgba(255, 255, 255, .64);
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
}

.auth-simple-tabs a.active {
  color: #fff;
  background: rgba(255, 255, 255, .11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

.auth-simple-form {
  display: grid;
  gap: 15px;
}

.auth-simple-field {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  font-weight: 800;
}

.auth-simple-input {
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-simple-input:focus-within {
  border-color: rgba(100, 196, 125, .66);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 0 0 4px rgba(69, 155, 91, .12);
}

.auth-simple-input > i {
  color: rgba(255, 255, 255, .42);
  text-align: center;
}

.auth-simple-input input {
  width: 100%;
  height: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}

.auth-simple-input input::placeholder {
  color: rgba(255, 255, 255, .28);
}

.auth-simple-consents {
  display: grid;
  gap: 11px;
  padding-top: 3px;
}

.auth-simple-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}

.auth-simple-consent input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: #3e9855;
}

.auth-simple-consent a {
  color: #8ce5a5;
  font-weight: 800;
  text-decoration: none;
}

.auth-simple-consent a:hover {
  text-decoration: underline;
}

.auth-simple-submit {
  min-height: 60px;
  margin-top: 3px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #469e5d, #287b3e);
  box-shadow: 0 16px 30px rgba(38, 122, 61, .22);
  text-decoration: none;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.auth-simple-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.auth-simple-forgot {
  justify-self: end;
  margin-top: -5px;
  color: #8ce5a5;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.auth-simple-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 24px 0 18px;
  color: rgba(255, 255, 255, .34);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.auth-simple-divider::before,
.auth-simple-divider::after {
  content: '';
  height: 1px;
  background: rgba(255, 255, 255, .09);
}

.auth-simple-social {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.auth-simple-social > strong {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
}

.telegram-login-widget {
  min-height: 44px;
  display: grid;
  place-items: center;
}

.telegram-login-fallback {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, .06);
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
}

.telegram-login-fallback i {
  color: #42aeea;
  font-size: 22px;
}

.telegram-login-note {
  max-width: 360px;
  color: rgba(255, 255, 255, .38);
  text-align: center;
  font-size: 11px;
  line-height: 1.45;
}

.auth-simple-bottom {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .48);
  text-align: center;
  font-size: 13px;
}

.auth-simple-bottom a {
  color: #8ce5a5;
  font-weight: 850;
  text-decoration: none;
}

.auth-simple-card .field-error {
  margin: 0;
  color: #ff8e86;
  line-height: 1.35;
}

.auth-code-card {
  max-width: 520px;
}

.auth-code-input input {
  letter-spacing: .28em;
  font-size: 22px;
  font-weight: 900;
}

.auth-resend-form {
  margin-top: 14px;
  text-align: center;
}

.auth-resend-form button {
  border: 0;
  background: transparent;
  color: #8ce5a5;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-modal-telegram {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(30, 95, 49, .12);
}

.auth-modal-telegram > span {
  color: #676d69;
  font-size: 12px;
  font-weight: 750;
}

.auth-modal .telegram-login-fallback {
  border-color: rgba(31, 103, 60, .16);
  color: #1d2921;
  background: rgba(47, 120, 57, .07);
}

.auth-modal .telegram-login-note {
  color: #7b817d;
}

@media (max-width: 640px) {
  .auth-simple-shell {
    min-height: 620px;
    padding: 34px 10px 48px;
  }
  .auth-simple-card {
    padding: 27px 18px;
    border-radius: 24px;
  }
  .auth-simple-heading h1 {
    font-size: 37px;
  }
  .auth-simple-heading p {
    font-size: 13px;
  }
  .auth-simple-consent {
    font-size: 11.5px;
  }
}

/* Telegram Login: не загружаем официальный виджет до привязки HTTPS-домена. */
.telegram-login-unavailable {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
}
.telegram-login-fallback.is-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  background: #229ed9;
  color: #fff;
  font-weight: 700;
  opacity: .72;
  cursor: not-allowed;
  user-select: none;
}
.telegram-login-note {
  max-width: 360px;
  color: #7a8496;
  text-align: center;
  line-height: 1.45;
}

/* =====================================================================
   HEADER RESPONSIVE FIX
   Tablet: clean two-row grid without horizontal scrolling.
   Mobile: one dropdown navigation panel controlled by the Menu button.
   Loaded last so page-specific styles cannot break the shared header.
   ===================================================================== */
.mobile-nav-toggle {
  display: none;
}

@media (max-width: 1000px) and (min-width: 641px) {
  .topbar {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    gap: 16px 18px !important;
  }

  .topbar > .logo {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .topbar > .header-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-left: 0 !important;
  }

  .topbar > .nav {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .topbar > .nav .nav-link {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    padding: 0 8px !important;
    gap: 7px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  .topbar > .nav .nav-link i {
    flex: 0 0 auto !important;
    font-size: 16px !important;
  }

  .page-shell {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

@media (max-width: 640px) {
  .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .topbar > .logo {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    width: 146px !important;
    height: 48px !important;
    font-size: 13px !important;
  }

  .topbar > .header-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin-left: 0 !important;
    gap: 7px !important;
  }

  .mobile-nav-toggle {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    display: grid !important;
    grid-template-columns: 26px 1fr 18px !important;
    align-items: center !important;
    gap: 10px !important;
    border: 1px solid rgba(47, 120, 57, .22) !important;
    border-radius: 15px !important;
    background: rgba(255, 251, 244, .94) !important;
    color: #111 !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-align: left !important;
    cursor: pointer !important;
    box-shadow: 0 10px 22px rgba(75, 49, 18, .07) !important;
  }

  .mobile-nav-toggle-icon {
    width: 26px !important;
    height: 26px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 8px !important;
    background: rgba(47, 120, 57, .11) !important;
    color: var(--green-dark) !important;
  }

  .mobile-nav-chevron {
    justify-self: end !important;
    color: var(--green-dark) !important;
    transition: transform .18s ease !important;
  }

  .mobile-nav-toggle.is-open .mobile-nav-chevron {
    transform: rotate(180deg) !important;
  }

  .topbar > .nav {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    max-height: 0 !important;
    padding: 0 8px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-7px) !important;
    border: 1px solid transparent !important;
    border-radius: 18px !important;
    background: transparent !important;
    box-shadow: none !important;
    transition: max-height .24s ease, opacity .18s ease, transform .18s ease,
      padding .24s ease, border-color .18s ease, background .18s ease,
      box-shadow .18s ease !important;
  }

  .topbar > .nav.mobile-open {
    max-height: 340px !important;
    padding: 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    border-color: rgba(47, 120, 57, .15) !important;
    background: rgba(255, 251, 244, .98) !important;
    box-shadow: 0 18px 34px rgba(75, 49, 18, .11) !important;
  }

  .topbar > .nav .nav-link {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    padding: 0 14px !important;
    display: grid !important;
    grid-template-columns: 24px 1fr !important;
    justify-content: initial !important;
    justify-items: start !important;
    gap: 11px !important;
    border-radius: 13px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    box-shadow: none !important;
  }

  .topbar > .nav .nav-link.active {
    background: rgba(47, 120, 57, .10) !important;
    border-color: rgba(47, 120, 57, .28) !important;
  }

  .topbar > .nav .nav-link i {
    width: 24px !important;
    text-align: center !important;
    font-size: 16px !important;
  }

  .header-cart-btn,
  .auth-main-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 14px !important;
    font-size: 0 !important;
  }

  .header-cart-btn span,
  .auth-main-btn span {
    display: none !important;
  }

  .header-cart-btn i,
  .auth-main-btn i {
    font-size: 18px !important;
  }

  .header-cart-btn {
    position: relative !important;
  }

  .header-cart-btn b {
    position: absolute !important;
    right: -4px !important;
    top: -5px !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
  }

  .profile-menu {
    right: 0 !important;
    width: min(270px, calc(100vw - 24px)) !important;
  }
}

@media (max-width: 380px) {
  .topbar > .logo {
    width: 132px !important;
    font-size: 12px !important;
  }

  .header-cart-btn,
  .auth-main-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
  }
}

/* Шесть пунктов навигации, включая «Акции и новости» */
@media (max-width: 1000px) and (min-width: 641px) {
  .topbar > .nav { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .topbar > .nav .nav-link { font-size: 12px !important; padding-left: 6px !important; padding-right: 6px !important; }
  .topbar > .nav .nav-link-news { font-size: 11.4px !important; }
}
@media (max-width: 640px) {
  .topbar > .nav.mobile-open { max-height: 410px !important; }
}
@media (min-width: 641px) and (max-width: 1120px) {
  .nav-news-project { display: none; }
}

/* Яндекс ID: серверный OAuth 2.0 без внешнего JS-виджета. */
.auth-social-options {
  width: min(100%, 360px);
  display: grid;
  gap: 10px;
}

.yandex-login-button {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  color: #fff;
  background: #111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  transition: transform .18s ease, box-shadow .18s ease;
}
.yandex-login-button:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.16); }
.yandex-login-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #fc3f1d;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}
.yandex-login-unavailable { width: 100%; display: grid; gap: 7px; justify-items: center; }
.yandex-login-button.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.yandex-login-unavailable small { color: rgba(255,255,255,.42); text-align: center; font-size: 11px; line-height: 1.4; }
.auth-modal .yandex-login-button { border-color: rgba(0,0,0,.12); color: #fff; background: #111; }
.auth-modal .yandex-login-unavailable small { color: #7b817d; }
.yandex-icon { color: #fff !important; background: #fc3f1d !important; }
.yandex-icon b { font-size: 25px; }

/* Auth reliability fixes */
.profile-menu-logout-form { margin: 0; padding: 0; width: 100%; }
.profile-menu-logout-form .profile-menu-item { width: 100%; }
.telegram-login-widget { position: relative; min-height: 48px; display: grid; place-items: center; }
.telegram-login-loading { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 18px; border-radius: 12px; background: #2aabee; color: #fff; font-weight: 700; }
.telegram-login-widget.is-ready .telegram-login-loading { display: none; }

/* 2026-07: stable auth colors and browser autofill normalization */
.auth-simple-page .page-shell {
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .08), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(211, 192, 158, .13), transparent 30%),
    #101211;
}

.auth-simple-tabs a,
.auth-simple-tabs a:link,
.auth-simple-tabs a:visited,
.auth-simple-tabs a:hover,
.auth-simple-tabs a:active,
.auth-simple-bottom a,
.auth-simple-bottom a:link,
.auth-simple-bottom a:visited,
.auth-simple-forgot,
.auth-simple-forgot:visited {
  color: rgba(255, 255, 255, .68);
}

.auth-simple-tabs a.active,
.auth-simple-tabs a.active:visited {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.auth-simple-submit,
.auth-simple-submit:hover,
.auth-simple-submit:focus,
.auth-simple-submit:active,
.auth-simple-submit:visited {
  color: #fff;
  background: linear-gradient(145deg, #252525, #060606);
  box-shadow: 0 16px 30px rgba(0, 0, 0, .25);
}

.auth-simple-heading > span,
.auth-simple-consent a,
.auth-simple-consent a:visited {
  color: #e8dcc8;
}

.auth-simple-input:focus-within {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .07);
}

.auth-simple-input input:-webkit-autofill,
.auth-simple-input input:-webkit-autofill:hover,
.auth-simple-input input:-webkit-autofill:focus,
.auth-simple-input input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px #232625 inset !important;
  transition: background-color 9999s ease-out 0s;
}

/* Both alternative login methods stay full-width and visually distinct. */
.auth-social-options {
  width: min(100%, 380px);
  grid-template-columns: 1fr;
}

.telegram-login-widget,
.telegram-login-unavailable,
.telegram-login-widget > iframe {
  width: 100% !important;
  max-width: 100% !important;
}


/* 2026-07-15: compact Yandex and Telegram sign-in icons. */
.auth-simple-social {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.auth-social-options {
  width: auto !important;
  max-width: none !important;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.auth-provider {
  position: relative;
  width: 64px;
  height: 64px;
}

.auth-provider-icon,
.auth-provider-icon:link,
.auth-provider-icon:visited {
  width: 64px !important;
  min-width: 64px !important;
  height: 64px !important;
  min-height: 64px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center;
  border: 1px solid #cfd5df !important;
  border-radius: 13px !important;
  color: #17191c !important;
  background: #fff !important;
  box-shadow: none !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.auth-provider-icon:hover,
.auth-provider-icon:focus-visible {
  transform: translateY(-2px);
  border-color: #9ea7b4 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12) !important;
}

.auth-provider-icon.is-disabled {
  opacity: .48;
  cursor: not-allowed;
  transform: none;
}

.auth-provider-icon-telegram {
  font: inherit;
}

.auth-provider-icon-telegram i {
  color: #17191c;
  font-size: 27px;
  line-height: 1;
}

.auth-provider-yandex-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 2px solid #17191c;
  border-radius: 50%;
  color: #17191c;
  background: transparent;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.telegram-auth-popover[hidden] {
  display: none !important;
}

.telegram-auth-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 12px);
  left: 50%;
  width: min(310px, calc(100vw - 32px));
  padding: 18px 16px 16px;
  display: grid;
  justify-items: center;
  gap: 13px;
  transform: translateX(-50%);
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 16px;
  color: #17191c;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .2);
}

.telegram-auth-popover::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(-50%) rotate(45deg);
  border-left: 1px solid rgba(17, 24, 39, .12);
  border-top: 1px solid rgba(17, 24, 39, .12);
  background: #fff;
}

.telegram-auth-popover-close {
  position: absolute;
  top: 5px;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  color: #5f6670;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.telegram-auth-popover .telegram-login-widget,
.telegram-auth-popover .telegram-login-widget > iframe {
  width: auto !important;
  max-width: 100% !important;
  min-height: 40px;
}

.auth-modal .auth-social-options {
  width: auto !important;
}

@media (max-width: 520px) {
  .telegram-auth-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .telegram-auth-popover::before {
    display: none;
  }
}


/* 2026-07-15: final light authentication palette and direct Telegram login. */
.auth-simple-page {
  color-scheme: light;
}

.auth-simple-page .page-shell {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, .85), transparent 30%),
    radial-gradient(circle at 84% 72%, rgba(221, 201, 171, .28), transparent 32%),
    #f4eee5 !important;
}

.auth-simple-card {
  border-color: #e1d8cb !important;
  color: #171717 !important;
  background: rgba(255, 252, 247, .98) !important;
  box-shadow: 0 28px 70px rgba(67, 54, 37, .15) !important;
}

.auth-simple-brand {
  color: #615b53 !important;
}

.auth-simple-logo {
  color: #fff !important;
  background: #171717 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14) !important;
}

.auth-simple-heading > span:not(.auth-simple-icon) {
  color: #665f56 !important;
}

.auth-simple-heading h1,
.auth-simple-heading p strong {
  color: #171717 !important;
}

.auth-simple-heading p,
.auth-simple-field,
.auth-simple-field small,
.auth-simple-consent,
.auth-simple-bottom,
.auth-simple-social > strong {
  color: #645f58 !important;
}

.auth-simple-tabs {
  background: #eee7dd !important;
}

.auth-simple-tabs a,
.auth-simple-tabs a:link,
.auth-simple-tabs a:visited,
.auth-simple-tabs a:hover,
.auth-simple-tabs a:active {
  color: #5f5a53 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.auth-simple-tabs a.active,
.auth-simple-tabs a.active:link,
.auth-simple-tabs a.active:visited,
.auth-simple-tabs a.active:hover,
.auth-simple-tabs a.active:active {
  color: #fff !important;
  background: #171717 !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .12) !important;
}

.auth-simple-input {
  border-color: #d8d0c5 !important;
  background: #fff !important;
}

.auth-simple-input:focus-within {
  border-color: #8d867c !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(23, 23, 23, .08) !important;
}

.auth-simple-input > i {
  color: #817b72 !important;
}

.auth-simple-input input {
  color: #171717 !important;
}

.auth-simple-input input::placeholder {
  color: #999289 !important;
}

.auth-simple-input input:-webkit-autofill,
.auth-simple-input input:-webkit-autofill:hover,
.auth-simple-input input:-webkit-autofill:focus,
.auth-simple-input input:-webkit-autofill:active {
  -webkit-text-fill-color: #171717 !important;
  caret-color: #171717 !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
}

.auth-simple-consent input {
  accent-color: #171717 !important;
}

.auth-simple-consent a,
.auth-simple-consent a:link,
.auth-simple-consent a:visited,
.auth-simple-forgot,
.auth-simple-forgot:link,
.auth-simple-forgot:visited,
.auth-simple-bottom a,
.auth-simple-bottom a:link,
.auth-simple-bottom a:visited {
  color: #171717 !important;
}

.auth-simple-submit,
.auth-simple-submit:hover,
.auth-simple-submit:focus,
.auth-simple-submit:active,
.auth-simple-submit:visited {
  color: #fff !important;
  background: #171717 !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .16) !important;
  filter: none !important;
}

.auth-simple-divider {
  color: #857e74 !important;
}

.auth-simple-divider::before,
.auth-simple-divider::after {
  background: #ddd5ca !important;
}

.auth-simple-alert {
  padding: 14px 16px;
  border: 1px solid #ded4c7;
  border-radius: 14px;
  color: #4f4a43;
  background: #f4ede4;
  font-size: 13px;
  line-height: 1.55;
}

.auth-simple-provider-heading {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.auth-simple-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 14px;
  color: #fff;
  font-size: 24px;
}

.auth-simple-icon.yandex-icon {
  color: #fff !important;
  background: #fc3f1d !important;
}

.auth-simple-icon.telegram-icon {
  background: #229ed9 !important;
}

.auth-provider-icon-yandex .auth-provider-yandex-mark {
  width: 32px;
  height: 32px;
  border: 0 !important;
  border-radius: 50%;
  color: #fff !important;
  background: #fc3f1d !important;
  font-size: 19px;
  font-weight: 950;
}

.auth-provider-icon-telegram i {
  color: #229ed9 !important;
}

.auth-provider-telegram {
  position: relative;
  overflow: hidden;
  border-radius: 13px;
}

.telegram-login-direct {
  position: absolute;
  z-index: 4;
  inset: 0;
  overflow: hidden;
  border-radius: 13px;
  cursor: pointer;
}

.telegram-login-direct > iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 170px !important;
  min-width: 170px !important;
  height: 64px !important;
  min-height: 64px !important;
  border: 0 !important;
  opacity: .01 !important;
  cursor: pointer !important;
}

.telegram-auth-popover,
.telegram-auth-popover[hidden] {
  display: none !important;
}

/* 2026-07-15: Telegram OIDC direct redirect. No hidden iframe/click overlay. */
.auth-provider-icon-telegram,
.auth-provider-icon-telegram:link,
.auth-provider-icon-telegram:visited,
.auth-provider-icon-telegram:hover,
.auth-provider-icon-telegram:focus,
.auth-provider-icon-telegram:active {
  position: relative;
  z-index: 1;
  color: #229ed9 !important;
  background: #fff !important;
  text-decoration: none !important;
  pointer-events: auto !important;
}

.auth-provider-icon-telegram i {
  color: #229ed9 !important;
  pointer-events: none;
}

.telegram-login-direct,
.telegram-login-direct > iframe {
  display: none !important;
}

/* === 2026-07-16 ORIGINAL_AUTH_ICONS_FIX_START === */
:root { color-scheme: only light; }
html, body, input, textarea, select, button { color-scheme: light !important; }

@media (prefers-color-scheme: dark) {
  html, body {
    color: #111 !important;
    background:
      radial-gradient(circle at 78% 8%, rgba(255, 231, 176, 0.36), transparent 34%),
      linear-gradient(135deg, #fffefa, #f6ead5) !important;
  }
  .page-shell {
    color: #111 !important;
    background:
      radial-gradient(circle at 73% 37%, rgba(229, 211, 166, 0.48), transparent 25%),
      radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.88), transparent 28%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 239, 219, 0.95)) !important;
  }
  .nav-link, .profile-menu, .auth-card, .profile-card, .account-table,
  .orders-list, .cart-area, .case-block, .referral-stats > div,
  .referral-code-box, .referral-link-box,
  .referral-history-grid section, .referral-history-row,
  .yandex-profile-data > div { color: #111 !important; }
  .nav-link, .profile-menu, .auth-card, .profile-card {
    background-color: rgba(255, 250, 241, .96) !important;
  }
  input, textarea, select {
    color: #111 !important;
    background-color: #fff !important;
    -webkit-text-fill-color: #111 !important;
  }
  input::placeholder, textarea::placeholder {
    color: #8d877f !important;
    opacity: 1;
  }
}

/* Only the click target is expanded. Original Telegram/Yandex visuals stay untouched. */
.auth-provider-icon-telegram {
  position: relative !important;
  z-index: 2 !important;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.auth-provider-icon-telegram::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  cursor: pointer;
}
.auth-provider-icon-telegram > * { pointer-events: none !important; }

.auth-modal-telegram > span { font-size: 14px !important; line-height: 1.35; }
.auth-simple-social > strong { font-size: 15px !important; line-height: 1.35; }

#telegram-link, #yandex-link {
  position: relative;
  z-index: 2;
  min-width: 0;
  scroll-margin-top: 120px;
  overflow: visible;
}
.telegram-link-card .auth-provider-icon,
.yandex-link-card .auth-provider-icon { margin-top: 14px; }

.logo { isolation: isolate; overflow: hidden; }
.logo span { white-space: nowrap; }
.logo span::before {
  top: 50% !important;
  left: 0 !important;
  transform: translateY(-50%) !important;
  transform-origin: center;
}
.logo span:first-child::before { width: 1.35em !important; height: 1.08em !important; }
.logo span:nth-child(2)::before { width: 1.16em !important; height: 1.08em !important; }

.profile-dashboard, .profile-card, .profile-card *, .card-title,
.card-title > div, .account-row, .referral-card, .referral-code-box,
.referral-link-box, .referral-bind-form,
.referral-history-grid, .referral-history-row, .yandex-profile-summary,
.yandex-profile-data { min-width: 0; }

.profile-card h2, .profile-card h3, .profile-card p, .profile-card strong,
.profile-card span, .profile-card small, .profile-card b, .profile-card em,
.profile-card a, .profile-card button, .profile-card input,
.profile-card textarea { overflow-wrap: anywhere; word-break: normal; }
.card-title h2 { line-height: 1.16 !important; }

@media (max-width: 720px) {
  #telegram-link, #yandex-link { scroll-margin-top: 92px; }
  .profile-dashboard { align-items: stretch; }
  .profile-card { width: 100%; }
  .card-title { width: 100%; flex-wrap: wrap; }
  .card-title.with-action { flex-direction: column; }
  .ww-balance-pill { max-width: 100%; white-space: normal; }
  .referral-stats > div, .referral-history-grid section,
  .referral-history-row > div,
  .yandex-profile-summary > div { min-width: 0; }
  .referral-stats strong { font-size: clamp(18px, 5.5vw, 24px); }
  .referral-code-box strong {
    max-width: 100%;
    font-size: clamp(18px, 6vw, 24px);
    letter-spacing: .04em;
  }
    .yandex-profile-summary { align-items: flex-start; }
}

@media (max-width: 480px) {
  .topbar > .logo {
    width: 146px !important;
    height: 48px !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
    line-height: .86 !important;
  }
  .topbar > .logo .logo_help {
    margin-top: 5px !important;
    margin-left: 23px !important;
  }
  .profile-card { padding-left: 15px !important; padding-right: 15px !important; }
  .referral-stats { grid-template-columns: 1fr !important; }
  .referral-code-box, .referral-link-box,
  .yandex-profile-summary { width: 100%; }
    .referral-history-row { grid-template-columns: 36px minmax(0, 1fr) !important; }
  .referral-history-row > b {
    grid-column: 2 !important;
    max-width: 100%;
    white-space: normal !important;
  }
}
/* === 2026-07-16 ORIGINAL_AUTH_ICONS_FIX_END === */

/* === 2026-07-16 TELEGRAM_LIGHT_TILE_FIX === */
/* Keep the Telegram provider tile as light as the Yandex ID tile. */
.auth-provider-icon-telegram,
.auth-provider-icon-telegram:link,
.auth-provider-icon-telegram:visited,
.auth-provider-icon-telegram:hover,
.auth-provider-icon-telegram:focus,
.auth-provider-icon-telegram:focus-visible,
.auth-provider-icon-telegram:active {
  border: 1px solid #cfd5df !important;
  color: #229ed9 !important;
  background: #fff !important;
  background-color: #fff !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1;
}

.auth-provider-icon-telegram:hover,
.auth-provider-icon-telegram:focus-visible {
  border-color: #9ea7b4 !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12) !important;
}

.auth-provider-icon-telegram i,
.auth-provider-icon-telegram .fa-telegram {
  color: #229ed9 !important;
  background: transparent !important;
  filter: none !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

@media (prefers-color-scheme: dark) {
  .auth-provider-icon-telegram,
  .auth-provider-icon-telegram:link,
  .auth-provider-icon-telegram:visited,
  .auth-provider-icon-telegram:hover,
  .auth-provider-icon-telegram:focus,
  .auth-provider-icon-telegram:focus-visible,
  .auth-provider-icon-telegram:active {
    color: #229ed9 !important;
    background: #fff !important;
    background-color: #fff !important;
    border-color: #cfd5df !important;
  }

  .auth-provider-icon-telegram i,
  .auth-provider-icon-telegram .fa-telegram {
    color: #229ed9 !important;
  }
}
/* === 2026-07-16 TELEGRAM_LIGHT_TILE_FIX_END === */

/* === 2026-07-16 TELEGRAM_VIVID_DEFAULT_STATE === */
/* Keep the Telegram mark fully saturated before hover, matching Yandex ID. */
.auth-provider-icon-telegram,
.auth-provider-icon-telegram:link,
.auth-provider-icon-telegram:visited,
.auth-provider-icon-telegram.is-disabled {
  opacity: 1 !important;
  filter: none !important;
  border-color: #cfd5df !important;
  background: #fff !important;
  background-color: #fff !important;
}

.auth-provider-icon-telegram i,
.auth-provider-icon-telegram .fa-telegram,
.auth-provider-icon-telegram.is-disabled i,
.auth-provider-icon-telegram.is-disabled .fa-telegram {
  color: #229ed9 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
}
/* === 2026-07-16 TELEGRAM_VIVID_DEFAULT_STATE_END === */

/* === 2026-07-16 AUTH_FORM_AND_PASSWORD_FIX_START === */
.auth-local-error {
  margin: 0 0 14px;
  padding: 13px 15px;
  border: 1px solid #e5b7b7;
  border-radius: 13px;
  color: #8b1f1f !important;
  background: #fff0f0 !important;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.auth-simple-input.has-password-toggle {
  grid-template-columns: 24px minmax(0, 1fr) 40px;
  padding-right: 8px;
}

.auth-password-field {
  position: relative;
  display: block;
}

.auth-password-field input {
  padding-right: 54px !important;
}

.password-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: #756f67;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.auth-password-field .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible,
.password-toggle.is-visible {
  color: #171717;
  background: rgba(23, 23, 23, .07);
  outline: none;
}

.auth-simple-submit:disabled,
.auth-submit:disabled {
  cursor: wait !important;
  opacity: .72;
  transform: none !important;
}
/* === 2026-07-16 AUTH_FORM_AND_PASSWORD_FIX_END === */


/* === 2026-07-16 TELEGRAM_REAL_LINK_CLICK_FIX_START === */
/* The actual <a> element is the only click target. Generated overlays are disabled. */
a.auth-provider-icon-telegram,
a.auth-provider-icon-telegram:link,
a.auth-provider-icon-telegram:visited,
a.auth-provider-icon-telegram:hover,
a.auth-provider-icon-telegram:focus,
a.auth-provider-icon-telegram:focus-visible,
a.auth-provider-icon-telegram:active {
  position: relative !important;
  z-index: 4 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a.auth-provider-icon-telegram::before,
a.auth-provider-icon-telegram::after {
  content: none !important;
  display: none !important;
  pointer-events: none !important;
}

a.auth-provider-icon-telegram > i,
a.auth-provider-icon-telegram > .fa-telegram {
  pointer-events: none !important;
}

/* Never make a disabled placeholder look like a working login link. */
span.auth-provider-icon-telegram.is-disabled {
  opacity: .48 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
/* === 2026-07-16 TELEGRAM_REAL_LINK_CLICK_FIX_END === */

/* === 2026-07-16 TELEGRAM_CLICKABLE_LOGIN_REPAIR_START ===
   OIDC remains a normal link. When only the classic BotFather login is
   configured, the official Telegram widget becomes the real click layer.
   The visible tile stays identical to the Yandex ID tile.
   ======================================================================= */
a.auth-provider-telegram-legacy {
  position: relative !important;
  z-index: 5 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

a.auth-provider-telegram-legacy > i {
  position: relative;
  z-index: 1;
  pointer-events: none !important;
}

a.auth-provider-telegram-legacy .telegram-login-direct {
  position: absolute !important;
  z-index: 10 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: inherit !important;
  opacity: .01 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

a.auth-provider-telegram-legacy .telegram-login-direct > iframe {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 250px !important;
  min-width: 250px !important;
  max-width: none !important;
  height: 72px !important;
  min-height: 72px !important;
  display: block !important;
  transform: translate(-50%, -50%) !important;
  border: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.telegram-login-page-card {
  max-width: 520px;
}

.telegram-login-visible {
  min-height: 54px;
  display: grid;
  place-items: center;
  margin: 8px 0 4px;
}

.telegram-login-visible iframe {
  max-width: 100% !important;
}
/* === 2026-07-16 TELEGRAM_CLICKABLE_LOGIN_REPAIR_END === */
