/* =========================================================
   Мой Собиратор — вход / профиль в шапке.
   Размещать ПОСЛЕ существующих стилей шапки.
   Не затрагивает .sob-hdr__nav и остальные блоки сайта.
   ========================================================= */
.sob-hdr .sob-hdr__auth-link,
.sob-hdr .sob-hdr__account-toggle {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex: 0 0 auto;
    min-height: 44px;
    gap: 9px;
    padding: 0 13px !important;
    border: 1px solid #dce6f1 !important;
    border-radius: 12px !important;
    background: #f7fafe !important;
    color: #0f2647 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
    font-family: inherit !important;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: .2s ease;
    list-style: none;
    box-shadow: none !important;
}
.sob-hdr .sob-hdr__auth-link:hover,
.sob-hdr .sob-hdr__account-toggle:hover,
.sob-hdr .sob-hdr__account[open] .sob-hdr__account-toggle {
    border-color: #bad5ee !important;
    background: #edf6ff !important;
    color: #0a58a5 !important;
}
.sob-hdr .sob-hdr__auth-link svg,
.sob-hdr .sob-hdr__account-toggle svg,
.sob-hdr-drawer .sob-hdr-drawer__auth-primary svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}
.sob-hdr .sob-hdr__account { position: relative; flex: 0 0 auto; }
.sob-hdr .sob-hdr__account-toggle { user-select: none; }
.sob-hdr .sob-hdr__account-toggle::-webkit-details-marker { display: none; }
.sob-hdr .sob-hdr__account-toggle::marker { content: ''; }
.sob-hdr .sob-hdr__account-chevron { width: 14px !important; height: 14px !important; }
.sob-hdr .sob-hdr__account[open] .sob-hdr__account-chevron { transform: rotate(180deg); }
.sob-hdr .sob-hdr__account-dropdown {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 14px);
    width: 245px;
    max-width: 90vw;
    padding: 10px;
    border: 1px solid #e2eaf4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 23px 56px rgba(15, 38, 71, .17);
}
.sob-hdr .sob-hdr__account-name { padding: 9px 11px 11px; margin: 0 0 4px; border-bottom: 1px solid #e8eff6; color: #637a91; font-size: 12px; overflow-wrap: anywhere; }
.sob-hdr .sob-hdr__account-dropdown > a,
.sob-hdr .sob-hdr__logout-form button {
    display: block !important;
    width: 100%;
    padding: 12px !important;
    border: 0 !important;
    border-radius: 10px;
    color: #17344f !important;
    background: transparent !important;
    text-align: left;
    font-size: 13px !important;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
}
.sob-hdr .sob-hdr__account-dropdown > a:hover,
.sob-hdr .sob-hdr__logout-form button:hover { background: #f0f6fd !important; color: #0a58a5 !important; }
.sob-hdr .sob-hdr__logout-form,
.sob-hdr-drawer .sob-hdr-drawer__logout-form { margin: 0 !important; padding: 0 !important; }
.sob-hdr .sob-hdr__logout-form { border-top: 1px solid #e9eff6; margin-top: 4px !important; padding-top: 4px !important; }

/* Мобильный аккаунт — внутри существующего drawer. */
.sob-hdr-drawer .sob-hdr-drawer__auth {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 20px;
    border-top: 1px solid #e8eff6;
}
.sob-hdr-drawer .sob-hdr-drawer__auth-primary,
.sob-hdr-drawer .sob-hdr-drawer__auth-secondary,
.sob-hdr-drawer .sob-hdr-drawer__logout-form button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 49px;
    padding: 12px 15px !important;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 750 !important;
    text-decoration: none !important;
    cursor: pointer;
}
.sob-hdr-drawer .sob-hdr-drawer__auth-primary { color: #fff !important; background: #0a58a5 !important; border: 0 !important; }
.sob-hdr-drawer .sob-hdr-drawer__auth-secondary { color: #0a58a5 !important; background: #f3f8ff !important; border: 1px solid #d8e7f5 !important; }
.sob-hdr-drawer .sob-hdr-drawer__logout-form button { color: #62758b !important; background: #fff !important; border: 1px solid #dce5ee !important; }

/* В телефоне вход доступен в меню-гамбургере: иначе 4 кнопки не вмещаются. */
@media (max-width: 600px) {
    .sob-hdr .sob-hdr__auth-link,
    .sob-hdr .sob-hdr__account { display: none !important; }
}
@media (min-width: 601px) and (max-width: 1360px) {
    .sob-hdr .sob-hdr__account-toggle { min-width: 44px; }
}

/* Модальное окно входа. */
html.sob-auth-modal-open,
html.sob-auth-modal-open body { overflow: hidden !important; }
.sob-auth-modal, .sob-auth-modal *, .sob-auth-modal *::before, .sob-auth-modal *::after { box-sizing: border-box; }
.sob-auth-modal {
    position: fixed;
    z-index: 10100;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.sob-auth-modal[hidden] { display: none !important; }
.sob-auth-modal__shade { position: absolute; inset: 0; background: rgba(7, 22, 39, .67); backdrop-filter: blur(6px); }
.sob-auth-modal__dialog {
    position: relative;
    width: min(100%, 460px);
    max-height: calc(100dvh - 40px);
    overflow: auto;
    padding: 38px;
    border: 1px solid #dce7f2;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 35px 100px rgba(8, 29, 54, .27);
    outline: none;
    color: #0f2647;
}
.sob-auth-modal__close { position: absolute; right: 19px; top: 16px; border: 0 !important; background: transparent !important; color: #6d7c8b; cursor: pointer; padding: 4px 9px; font-size: 28px; line-height: 1.2; }
.sob-auth-modal__eyebrow { color: #0a58a5; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 850; }
.sob-auth-modal__dialog h2 { margin: 12px 0 8px !important; color: #0f2647 !important; font-size: 33px !important; line-height: 1.15; font-weight: 800; text-transform: none !important; }
.sob-auth-modal__intro { margin: 0 0 26px !important; color: #667b92; font-size: 14px !important; line-height: 1.55; }
.sob-auth-modal__form { display: grid; gap: 9px; margin: 0 !important; padding: 0 !important; }
.sob-auth-modal__form label { display: block; font-size: 13px; font-weight: 750; color: #24364d; }
.sob-auth-modal__form input[type="text"],
.sob-auth-modal__form input[type="password"] {
    display: block !important;
    width: 100% !important;
    height: 50px !important;
    min-width: 0;
    margin: 0 0 9px !important;
    padding: 0 15px !important;
    border: 1px solid #dbe6f0 !important;
    border-radius: 12px !important;
    background: #f7faff !important;
    color: #172c43 !important;
    font-size: 15px !important;
    font-family: inherit !important;
    box-shadow: none !important;
}
.sob-auth-modal__form input:focus { outline: none; border-color: #0a58a5 !important; box-shadow: 0 0 0 3px rgba(10,88,165,.13) !important; }
.sob-auth-modal__password-wrap { position: relative; }
.sob-auth-modal__password-wrap input { padding-right: 96px !important; }
.sob-auth-modal__show { position: absolute; top: 10px; right: 8px; margin: 0; padding: 6px 8px; border: 0; background: transparent; color: #0a58a5; font-size: 12px; font-weight: 750; cursor: pointer; }
.sob-auth-modal__submit { display: flex; justify-content: center; align-items: center; min-height: 52px; margin-top: 9px; padding: 12px 20px; border: 0 !important; border-radius: 12px !important; background: #ffc400 !important; color: #122743 !important; font-weight: 850; font-size: 15px; cursor: pointer; }
.sob-auth-modal__submit:hover { background: #ffd43d !important; }
.sob-auth-modal__register { text-align: center; font-size: 13px; color: #657a8d; margin: 20px 0 0; }
.sob-auth-modal__register a { color: #0a58a5; font-weight: 750; text-decoration: none; }
.sob-auth-modal__register a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .sob-auth-modal { padding: 12px; }
    .sob-auth-modal__dialog { width: 100%; max-height: calc(100dvh - 24px); padding: 32px 22px 25px; border-radius: 21px; }
    .sob-auth-modal__dialog h2 { font-size: 28px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .sob-auth-modal, .sob-auth-modal * { transition: none !important; }
}
