/* ==========================================================================
   AidApp UI — язык главной (#projects .ph) для всех разделов.

   Тёмные панели #10131ab8 без рамок, скругление 1.5rem у карточек и плиток,
   кнопки 2.5rem со скруглением 0.75rem, статус точкой, один синий акцент
   у главного действия. Классы ph-* — общие для модулей; своё модуль держит
   в своём CSS под своим id.
   ========================================================================== */

:root {
    /* Панели светлее фона заметно: на #10131ab8 блоки сливались с чёрным. */
    --ph-panel: rgba(27, 30, 38, 0.82);
    --ph-panel-solid: #181b22;
    --ph-panel-hover: rgba(40, 44, 54, 0.86);
    --ph-field: rgba(255, 255, 255, 0.06);
    --ph-act: rgba(255, 255, 255, 0.08);
    --ph-act-2: rgba(255, 255, 255, 0.14);
    --ph-line: rgba(255, 255, 255, 0.06);
    --ph-text: #ffffff;
    --ph-soft: rgba(255, 255, 255, 0.82);
    --ph-muted: var(--ui-color-text-muted, #9aa0a6);
    --ph-dim: #6b7078;
    --ph-accent: var(--ui-color-accent, #3282d7);
    --ph-accent-hover: var(--ui-color-accent-hover, #2266b0);
    --ph-ok: #4fcf8a;
    --ph-warn: #f5b544;
    --ph-off: #ff6b5e;
    --ph-lime: #b6f23f;
    --ph-r-card: 1.5rem;
    --ph-r-btn: 0.75rem;
    --ph-r-field: 0.875rem;
    --ph-r-chip: 0.875rem;
}

/* ---------- страница и заголовки ---------- */

.ph-page {
    max-width: 40rem;
    margin: 0 auto;
    color: var(--ph-text);
}

/* Отступ снизу — только там, где его не задаёт .bottom-padding-container
   (место под нижнее меню): kit грузится позже и перебивал его. */
.ph-page:not(.bottom-padding-container) {
    padding-bottom: 1.5rem;
}

.ph-page [hidden] {
    display: none !important;
}

/* Шапка раздела: знак сервиса, название и подпись, справа одно-два действия. */
.ph-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0.25rem 1rem;
}

.ph-top__logo {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.875rem;
    object-fit: cover;
}

.ph-top__text {
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

.ph-top__text b {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ph-top__text small {
    display: block;
    margin-top: 0.1875rem;
    font-size: 0.8125rem;
    color: var(--ph-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Заголовок блока внутри страницы, как «Ещё в AID» на главной. */
.ph-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.75rem 0.25rem 0.75rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--ph-text);
}

.ph-h:first-child {
    margin-top: 0.5rem;
}

.ph-h__count {
    margin-left: 0.375rem;
    font-weight: 600;
    color: var(--ph-dim);
}

.ph-h__more {
    flex-shrink: 0;
    border: 0;
    padding: 0;
    background: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ph-muted);
    cursor: pointer;
    transition: color 0.15s ease;
}

.ph-h__more:active {
    color: #fff;
}

/* Заголовок сервиса со знаком, как «AID PAY» на главной. */
.ph-sec {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0 0.25rem 0.75rem;
}

.ph-sec__logo {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    object-fit: cover;
}

.ph-sec__text {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.ph-sec__text b {
    display: block;
    font-size: 1.0625rem;
    font-weight: 700;
}

.ph-sec__text small {
    display: block;
    font-size: 0.8125rem;
    color: var(--ph-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- панели и плитки ---------- */

.ph-card {
    position: relative;
    padding: 1.125rem;
    border-radius: var(--ph-r-card);
    background: var(--ph-panel);
}

.ph-card--flush {
    padding: 0;
    overflow: hidden;
}

.ph-card + .ph-card {
    margin-top: 0.5rem;
}

.ph-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.ph-tiles {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

.ph-tile {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    grid-column: span 3;
    min-height: 7rem;
    padding: 0.875rem;
    border: 0;
    border-radius: var(--ph-r-card);
    background: var(--ph-panel);
    color: #fff;
    text-align: left;
    text-decoration: none;
    transition: transform 0.14s ease, filter 0.15s ease;
}

button.ph-tile,
a.ph-tile {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

button.ph-tile:active,
a.ph-tile:active {
    transform: scale(0.965);
}

.ph-tile--2 { grid-column: span 2; }
.ph-tile--4 { grid-column: span 4; }
.ph-tile--6 { grid-column: span 6; }

.ph-tile__t {
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.ph-tile__s {
    margin-top: 0.1875rem;
    font-size: 0.75rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.68);
}

@media (hover: hover) and (pointer: fine) {
    button.ph-tile:hover,
    a.ph-tile:hover {
        filter: brightness(1.08);
    }
}

/* ---------- кнопки ---------- */

.ph-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4375rem;
    height: 2.5rem;
    padding: 0 1.125rem;
    border: 0;
    border-radius: var(--ph-r-btn);
    background: var(--ph-act);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
}

.ph-btn:active {
    transform: scale(0.97);
}

/* Неактивная — сплошной серой, а не полупрозрачной: у кнопки внизу шторки
   сквозь неё просвечивали строки списка, и она читалась как сломанная, а
   не выключенная. */
.ph-btn:disabled,
.ph-btn.is-disabled {
    opacity: 1;
    background: #2a2e36;
    color: rgba(255, 255, 255, 0.38);
    box-shadow: none;
    pointer-events: none;
}

.ph-btn .bi {
    font-size: 0.9375rem;
    line-height: 1;
}

.ph-btn--primary {
    background: var(--ph-accent);
}

.ph-btn--primary:active {
    background: var(--ph-accent-hover);
}

.ph-btn--white {
    background: #fff;
    color: #0b0d10;
}

.ph-btn--danger {
    background: rgba(255, 107, 94, 0.14);
    color: #ff8b80;
}

.ph-btn--ghost {
    background: none;
    color: var(--ph-muted);
}

.ph-btn--block {
    display: flex;
    width: 100%;
}

.ph-btn--grow {
    flex: 1;
}

.ph-btn--lg {
    height: 3rem;
    border-radius: var(--ph-r-field);
    font-size: 0.9375rem;
}

.ph-btn--sm {
    height: 2.125rem;
    padding: 0 0.875rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
}

.ph-btn--icon {
    position: relative;
    width: 2.5rem;
    padding: 0;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.85);
}

.ph-btn--round {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.ph-actions {
    display: flex;
    gap: 0.5rem;
}

.ph-actions > .ph-btn:first-child:not(.ph-btn--icon) {
    flex: 1;
}

@media (hover: hover) and (pointer: fine) {
    .ph-btn:hover { background: var(--ph-act-2); }
    .ph-btn--primary:hover { background: #3a8de4; }
    .ph-btn--white:hover { background: #e9ebef; }
    .ph-btn--ghost:hover { background: var(--ph-act); color: #fff; }
}

/* ---------- чипы, сегменты, теги, статус ---------- */

.ph-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    height: 2.25rem;
    padding: 0 0.8125rem;
    border: 0;
    border-radius: var(--ph-r-chip);
    background: var(--ph-panel);
    color: #fff;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, background 0.15s ease;
}

.ph-chip:active {
    transform: scale(0.96);
}

.ph-chip.is-active {
    background: rgba(255, 255, 255, 0.14);
}

.ph-chip .bi {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.ph-chips {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.ph-chips::-webkit-scrollbar {
    display: none;
}

.ph-seg {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: var(--ph-field);
}

/* Ширина кнопок — по подписи, свободное место делится поровну: длинное
   «Криптовалюта» берёт больше, чем «СБП», и не вылезает за белую таблетку
   выбранного на узких телефонах. */
.ph-seg > button {
    flex: 1 1 auto;
    min-width: 0;
    height: 2.25rem;
    padding: 0 0.625rem;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--ph-muted);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Выбранный — белой таблеткой с тёмной надписью: серый выбор терялся. */
.ph-seg > button.is-active {
    background: #fff;
    color: #0b0d10;
}

/* Переезд таблетки при смене выбора (public/js/core/ui.js): на время пути
   белым красится отдельная таблетка, а не сама кнопка. */
.ph-seg__pill {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    border-radius: 999px;
    background: #fff;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1), height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.ph-seg.is-gliding > button {
    position: relative;
    z-index: 1;
    transition: color 0.2s ease;
}

.ph-seg.is-gliding > button.is-active {
    background: none;
}

.ph-seg.is-settling > button {
    transition: none;
}

@media (max-width: 374px) {
    .ph-seg > button {
        padding: 0 0.4375rem;
    }
}

.ph-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    height: 1.5rem;
    padding: 0 0.5625rem;
    border-radius: 0.5rem;
    background: var(--ph-act);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ph-tag--ok { background: rgba(79, 207, 138, 0.14); color: var(--ph-ok); }
.ph-tag--warn { background: rgba(245, 181, 68, 0.14); color: var(--ph-warn); }
.ph-tag--off { background: rgba(255, 107, 94, 0.14); color: var(--ph-off); }
.ph-tag--lime { background: var(--ph-lime); color: #142100; font-weight: 800; }

/* Статус точкой с подписью: белая — работает, жёлтая — скоро закончится,
   красная — отключено. */
.ph-st {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    color: var(--ph-muted);
    white-space: nowrap;
}

.ph-st::before {
    content: '';
    width: 0.375rem;
    height: 0.375rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff;
}

.ph-st--ok::before { background: var(--ph-ok); }
.ph-st--warn::before { background: var(--ph-warn); }
.ph-st--off::before { background: var(--ph-off); }
.ph-st--warn { color: var(--ph-warn); }
.ph-st--off { color: var(--ph-off); }

/* ---------- строки списков ---------- */

.ph-list {
    border-radius: var(--ph-r-card);
    background: var(--ph-panel);
    overflow: hidden;
}

.ph-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 3.75rem;
    padding: 0.75rem 1rem;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.ph-row + .ph-row {
    box-shadow: inset 0 1px var(--ph-line);
}

button.ph-row,
a.ph-row,
.ph-row--tap {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
}

button.ph-row:active,
a.ph-row:active,
.ph-row--tap:active {
    background: rgba(255, 255, 255, 0.04);
}

.ph-row__ico {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.0625rem;
    object-fit: cover;
    overflow: hidden;
}

.ph-row__ico img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ph-row__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ph-row__t,
.ph-row__s {
    display: block;
}

.ph-row__t {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ph-row__s {
    margin-top: 0.1875rem;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: var(--ph-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ph-row__v {
    flex-shrink: 0;
    text-align: right;
    font-size: 0.9375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ph-row__v small {
    display: block;
    margin-top: 0.1875rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ph-muted);
}

.ph-plus { color: var(--ph-ok); }

/* ---------- поля ввода ---------- */

.ph-label {
    display: block;
    margin: 0 0.25rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ph-muted);
}

.ph-field {
    display: block;
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 0;
    border-radius: var(--ph-r-field);
    background: var(--ph-field);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.ph-field::placeholder {
    color: var(--ph-dim);
}

.ph-field:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1.5px rgba(50, 130, 215, 0.65);
}

.ph-field-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.375rem 0 1rem;
    height: 3rem;
    border-radius: var(--ph-r-field);
    background: var(--ph-field);
}

.ph-field-row > input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 0.9375rem;
    outline: none;
}

/* ---------- цифры, пустые состояния, точки ---------- */

.ph-num {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.ph-num small {
    margin-left: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ph-muted);
}

.ph-muted { color: var(--ph-muted); }
.ph-warn { color: var(--ph-warn); }
.ph-off { color: var(--ph-off); }

.ph-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1.25rem;
    border-radius: var(--ph-r-card);
    background: var(--ph-panel);
    text-align: center;
}

.ph-empty__ico {
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 0.5rem;
    border-radius: 1rem;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    font-size: 1.5rem;
}

.ph-empty__t {
    font-size: 1.0625rem;
    font-weight: 700;
}

.ph-empty__s {
    max-width: 22rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ph-muted);
}

.ph-empty .ph-btn {
    margin-top: 0.75rem;
}

.ph-dots {
    display: flex;
    gap: 0.375rem;
}

.ph-dots > i {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 0.25rem;
    background: #fff;
    opacity: 0.3;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.ph-dots > i.is-active {
    width: 1rem;
    opacity: 1;
}

.ph-dots > i.is-warn { background: var(--ph-warn); opacity: 0.6; }
.ph-dots > i.is-off { background: var(--ph-off); opacity: 0.6; }
.ph-dots > i.is-warn.is-active,
.ph-dots > i.is-off.is-active { opacity: 1; }

/* Появление блоков лесенкой, как на главной. */
@keyframes ph-rise {
    from { opacity: 0; transform: translate3d(0, 0.875rem, 0) scale(0.97); }
    to { opacity: 1; transform: none; }
}

/* backwards, а не both: после появления transform свободен, и :active
   с уменьшением при нажатии снова работает. */
.ph-rise {
    animation: ph-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
    .ph-rise { animation: none; }
}

/* ---------- шторки ---------- */

/* Шторка — сплошная тёмная панель того же тона, что карточки на главной,
   со скруглением карточек. Содержимое стандартных шторок (ui-*) остаётся. */
.bottom-panel__content {
    background: var(--ph-panel-solid);
    border-top-left-radius: var(--ph-r-card);
    border-top-right-radius: var(--ph-r-card);
}

.bottom-panel__content .button-blue-primary,
.bottom-panel__content .ui-button--primary {
    border-radius: var(--ph-r-field);
}

.bottom-panel__content .button-invisible-primary {
    border-radius: var(--ph-r-field);
    background-color: var(--ph-act);
}

.ph-sheet {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1rem 1rem;
    color: #fff;
}

.ph-sheet__t {
    margin: 0.25rem 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
}

.ph-sheet__s {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ph-muted);
    text-align: center;
}

.ph-sheet__ico {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    font-size: 1.5rem;
}

.ph-sheet__ico--ok { background: rgba(79, 207, 138, 0.14); color: var(--ph-ok); }
.ph-sheet__ico--warn { background: rgba(245, 181, 68, 0.14); color: var(--ph-warn); }
.ph-sheet__ico--off { background: rgba(255, 107, 94, 0.14); color: var(--ph-off); }

.ph-sheet__card {
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
}

.ph-sheet__btns {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* Пары «подпись — значение», как в чеке. */
.ph-kv {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5625rem 0;
    font-size: 0.875rem;
}

.ph-kv + .ph-kv {
    box-shadow: inset 0 1px var(--ph-line);
}

.ph-kv > span:first-child {
    color: var(--ph-muted);
}

.ph-kv > span:last-child {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- ПК ---------- */

/* Колонка контента на ПК — до 66rem (tokens.css). Ритм: карточки через 1rem,
   колонки через 1.25rem, секции через 1.75rem. Раскладку по ширине колонки
   модули переключают в @container aid-page (width >= 50rem / 62rem). */

body.web-desktop .ph-page {
    max-width: none;
}

/* Шапка раздела: знак 2.75rem, название 1.375rem, справа серые ph-btn.
   Синий — только у главного действия страницы. */
body.web-desktop .ph-top {
    min-height: 2.75rem;
    margin: 0 0.25rem 1.25rem;
}

body.web-desktop .ph-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

body.web-desktop .ph-cols--side {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}

body.web-desktop .ph-cols--7-5 {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

body.web-desktop .ph-cols--5-7 {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

body.web-desktop .ph-cols--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Список слева 22rem, подробности справа (FAQ, история). */
body.web-desktop .ph-split {
    display: grid;
    grid-template-columns: 22rem minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

/* Мера чтения: ответы FAQ, текст API, лента чата — даже в широкой колонке. */
body.web-desktop .ph-measure {
    max-width: 44rem;
}

/* ---------- вход ---------- */

/* Окно входа в языке главной: поля без рамок, кнопки 3rem со скруглением
   полей, Telegram — главное действие, «Продолжить» белеет, когда почта
   введена. Стрелки в кнопках убраны. Разметка — auth.js, логика не тронута. */
#email-login-overlay {
    background: #0b0d10;
    transition: opacity 0.24s ease;
}

/* Вход выполнен: экран входа растворяется, карточка чуть отъезжает назад. */
#email-login-overlay.elo--leaving {
    opacity: 0;
    pointer-events: none;
}

#email-login-overlay .elo__card {
    transition: transform 0.24s ease;
}

#email-login-overlay.elo--leaving .elo__card {
    transform: scale(0.97);
}

#email-login-overlay .elo__card {
    max-width: 23rem;
}

#email-login-overlay .elo__logo {
    order: -2;
    margin-bottom: 0.5rem;
}

#email-login-overlay .elo__footer-hint {
    display: block;
    order: -1;
    margin: 0 0 1.75rem;
    font-size: 0.875rem;
    color: var(--ph-muted);
}

#email-login-overlay .elo__form {
    width: 100%;
}

#email-login-overlay .elo__input {
    height: 3rem;
    padding: 0 1rem;
    border: 0;
    border-radius: var(--ph-r-field);
    background: var(--ph-field);
    color: #fff;
    font-size: 1rem;
    box-shadow: none;
}

#email-login-overlay .elo__input::placeholder {
    color: var(--ph-dim);
}

#email-login-overlay .elo__input:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1.5px rgba(50, 130, 215, 0.65);
}

#email-login-overlay .elo__pass-wrap .elo__input {
    padding-right: 3rem;
}

#email-login-overlay .elo__eye {
    color: var(--ph-muted);
}

#email-login-overlay .elo__tg-btn,
#email-login-overlay .elo__submit {
    height: 3rem;
    padding: 0 1rem;
    border-radius: var(--ph-r-field);
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: none;
    transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

#email-login-overlay .elo__tg-btn {
    background: var(--ph-accent);
}

#email-login-overlay .elo__submit {
    background: #fff;
    color: #0b0d10;
}

#email-login-overlay .elo__submit:disabled {
    background: var(--ph-act);
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

#email-login-overlay .elo__submit svg {
    display: none;
}

#email-login-overlay .elo__tg-btn:hover:not(:disabled),
#email-login-overlay .elo__submit:hover:not(:disabled) {
    transform: none;
}

#email-login-overlay .elo__tg-btn:active:not(:disabled),
#email-login-overlay .elo__submit:active:not(:disabled) {
    transform: scale(0.98);
}

#email-login-overlay .elo__divider {
    margin: 1.25rem 0;
    color: var(--ph-dim);
}

#email-login-overlay .elo__error,
#email-login-overlay .elo__tg-error {
    border: 0;
    border-radius: 0.875rem;
    background: rgba(255, 107, 94, 0.12);
    color: #ff8b80;
}

#email-login-overlay .elo__who {
    border-radius: var(--ph-r-field);
    background: var(--ph-panel);
}

#email-login-overlay .elo__link-btn {
    color: #fff;
    font-weight: 600;
}

#email-login-overlay .elo__hint,
#email-login-overlay .elo__oauth {
    color: var(--ph-muted);
}

/* ---------- привязка почты ---------- */

/* Без сетки, свечения, орбит и колец: тёмный экран, знак письма в панели,
   заголовок, одна синяя кнопка. */
.bind-email-overlay__grid,
.bind-email-overlay__glow,
.bind-email-overlay__hero-orbit,
.bind-email-overlay__hero-rings,
.bind-email-overlay__hero-shine,
.bind-email-overlay__hero-shadow {
    display: none !important;
}

.bind-email-overlay__bg {
    background: #0b0d10 !important;
}

.bind-email-overlay__hero {
    width: auto !important;
    height: auto !important;
    margin-bottom: 1.75rem !important;
}

.bind-email-overlay__hero-badge {
    width: 6.5rem;
    height: 6.5rem;
    border: 0;
    border-radius: 1.75rem;
    background: var(--ph-panel);
    box-shadow: none;
    animation: none;
}

.bind-email-overlay__hero-badge svg {
    width: 4rem;
    height: 4rem;
}

.bind-email-overlay__title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: none;
}

.bind-email-overlay__text {
    max-width: 20rem;
    color: var(--ph-muted);
}

.bind-email-overlay__text b {
    color: #fff;
}

.bind-email-overlay__cta.button-blue-primary {
    height: 3rem;
    border-radius: var(--ph-r-field);
    background: var(--ph-accent);
    box-shadow: none;
    font-size: 0.9375rem;
    font-weight: 600;
}

.bind-email-overlay__later {
    color: var(--ph-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

/* ---------- уведомления ---------- */

/* Плашка сверху остаётся на месте (отступы под статус-бар — в
   notifications.css), но тёмная: цвет статуса только у значка и полоски. */
.notification.success,
.notification.error,
.notification.warning,
.notification.info {
    background-color: #171b22;
}

.notification {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);
}

.notification-icon {
    width: 1.375rem;
    height: 1.375rem;
}

.notification-icon.success { background: rgba(79, 207, 138, 0.16); color: var(--ph-ok); }
.notification-icon.error { background: rgba(255, 107, 94, 0.16); color: var(--ph-off); }
.notification-icon.warning { background: rgba(245, 181, 68, 0.16); color: var(--ph-warn); }
.notification-icon.info { background: rgba(255, 255, 255, 0.12); color: #fff; }

.notification-content {
    font-size: 0.9375rem;
    font-weight: 600;
}

.notification-progress {
    background: rgba(255, 255, 255, 0.06);
}

.notification.success .notification-progress-bar { background: var(--ph-ok); }
.notification.error .notification-progress-bar { background: var(--ph-off); }
.notification.warning .notification-progress-bar { background: var(--ph-warn); }
.notification.info .notification-progress-bar { background: rgba(255, 255, 255, 0.5); }

/* Списки и пустые состояния в шторке: цвет панели страницы на фоне шторки
   выглядел провалом, поэтому там они чуть светлее. */
.bottom-panel__content .ph-list,
.bottom-panel__content .ph-empty {
    background: rgba(255, 255, 255, 0.04);
}

/* ---------- главная не трогается ---------- */

/* Главная (#projects) свёрстана на своих классах ph-* из projects.css, и
   часть имён совпадает с набором. Правила набора с такими именами главную
   менять не должны: возвращаем значения, которые были у неё без набора.
   Сверено по вычисленным стилям главной с набором и без него. */
#projects {
    --ph-panel: rgba(16, 19, 26, 0.72);
    --ph-panel-solid: #12151b;
    --ph-panel-hover: rgba(30, 34, 44, 0.8);
}

#projects .ph-h {
    display: block;
    gap: normal;
    align-items: normal;
    justify-content: normal;
}

#projects .ph-btn .bi {
    line-height: inherit;
}

/* ---------- ПК: главная кнопка длинной шторки всегда на виду ---------- */
/* Кнопка прилипает к низу прокрутки, контент уходит под неё. Полоса цвета
   шторки вокруг кнопки закрывает строки, проезжающие под ней; на пустом фоне
   её не видно. То, что идёт после кнопки (сноска), рисуется поверх полосы:
   когда кнопка стоит на своём месте, полоса не съедает сноску. */
body.web-desktop .bottom-panel__content-inner .aidpay-shop-confirm__pay,
body.web-desktop .bottom-panel__content-inner .rfw-submit {
    position: sticky;
    bottom: 1rem;
    z-index: 2;
    box-shadow: 0 0 0 1rem var(--sheet-surface, var(--ph-panel-solid, #181b22));
}

body.web-desktop .bottom-panel__content-inner .rfw-submit ~ * {
    position: relative;
    z-index: 3;
}

/* ---------- ПК: фокус с клавиатуры на кнопках набора ---------- */
/* Вместо системной рамки — плитка чуть светлее, как в колонке меню. */
body.web-desktop .ph-btn:focus-visible,
body.web-desktop .ph-seg > button:focus-visible,
body.web-desktop .ph-row:focus-visible {
    outline: none;
}

body.web-desktop .ph-btn:focus-visible {
    background: var(--ph-act-2);
}

body.web-desktop .ph-btn--primary:focus-visible {
    background: #4a97e8;
}

body.web-desktop .ph-btn--white:focus-visible,
body.web-desktop .ph-seg > button.is-active:focus-visible {
    background: #e2e4e8;
}

body.web-desktop .ph-seg > button:not(.is-active):focus-visible {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.web-desktop .ph-row:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}


/* Напоминание «Привяжите почту» (app-ui.js) — шторка из общего набора. */
.bind-email-sheet .ph-sheet__s b {
    color: #fff;
    font-weight: 600;
}
