/* =========================================================
   Модалка «Учётные данные» — поля + список настроек
   ========================================================= */

.account-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 6px 0 16px;
}

.account-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-field__label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-field__edit {
    color: var(--brand);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}

.account-field__edit:hover {
    color: var(--brand-dark);
}

.account-field__value {
    font-size: 16px;
    color: #1f2937;
    font-weight: 500;
    word-break: break-word;
}

/* Статус подтверждения email под адресом — бейдж + ссылка «Подтвердить». */
.account-field__verify {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
}

.email-verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.4;
}

.email-verify-badge--ok   { background: #e6f4ec; color: #1f7a4d; }
.email-verify-badge--warn { background: #fff3e6; color: #8a4b00; }

/* --- Список «Изменить пароль / Активные сеансы / ...» ----- */

.account-menu {
    border: 1px solid #e5e9ee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 18px;
}

.account-menu__item {
    display: grid;
    grid-template-columns: 20px 1fr auto auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 9px 14px;
    margin: 0;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef1f4;
    border-radius: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background .15s ease;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
}

.account-menu__item:focus,
.account-menu__item:focus-visible,
.account-menu__item:active {
    outline: none;
    box-shadow: none;
    background: #fff;
    color: inherit;
}

.account-menu__item:last-child {
    border-bottom: 0;
}

.account-menu__item:hover {
    background: #f7f9fb;
    color: inherit;
}

/* Глобальный button:hover в 01-base.css перекрашивает любые кнопки в зелёный.
   Для моих пунктов меню фиксируем цвета явно — пусть hover меняет только фон. */
.account-menu__item:hover .account-menu__title {
    color: #1f2937;
}
.account-menu__item:hover .account-menu__icon {
    color: var(--brand);
}
.account-menu__item:hover .account-menu__chevron {
    color: #c5cdd5;
}
.account-menu__item:hover .account-menu__hint {
    color: var(--text-muted);
}

.account-menu__icon {
    color: var(--brand);
    font-size: 16px;
    text-align: center;
}

.account-menu__title {
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
    line-height: 1.2;
}

.account-menu__hint {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.account-menu__chevron {
    color: #c5cdd5;
    font-size: 12px;
}

/* --- Низ модалки --------------------------------------- */

.account-modal__footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.account-modal__delete {
    background: transparent;
    border: 0;
    color: #d23f3f;
    font-size: 14px;
    font-weight: 500;
    padding: 8px;
    cursor: pointer;
    align-self: center;
    text-decoration: none;
}

.account-modal__delete:hover,
.account-modal__delete:focus,
.account-modal__delete:active {
    background: transparent;
    text-decoration: none;
    color: #b22b2b;
    outline: none;
}

/* =========================================================
   Активные сеансы и время автозавершения сеанса.
   Используется в editModal: showSessionsModal / showSessionTtlModal.
   Палитра — переменные из 01-base.css (--brand, --text-muted и т.д.).
   ========================================================= */

/* --- Шапка с описанием ----------------------------------- */
.sessions-hint,
.session-ttl-hint {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
    margin: 4px 0 14px;
}

/* --- Список сеансов -------------------------------------- */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.session-card {
    border: 1px solid #e5e9ee;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.session-card:hover {
    border-color: #d0d7df;
}

.session-card--current {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(44, 182, 125, 0.10);
    background: linear-gradient(0deg, rgba(44, 182, 125, 0.04), rgba(44, 182, 125, 0.04)), #fff;
}

.session-card__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.session-card__device {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1f2937;
}

.session-card__device i {
    font-size: 18px;
    color: var(--text-muted);
    text-align: center;
}

/* Если FontAwesome не загрузился, не оставляем «фантомное» место под иконку. */
.session-card__device i:empty:not([class*="fa-"])::before {
    content: none;
}

.session-card--current .session-card__device i {
    color: var(--brand);
}

.session-card__meta {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

/* --- Бейджи "Этот сеанс" / "Основной" --------------------- */
.session-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.session-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0;
}

.session-tag--current {
    background: rgba(44, 182, 125, 0.12);
    color: var(--brand-dark);
}

.session-tag--primary {
    background: #eef2f7;
    color: #4b5563;
}

/* --- Кнопка "Завершить" в карточке ------------------------ */
.session-card__actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    /* фикс. полоса под кнопку/заметку — заголовок устройства всегда в одной строке */
    min-width: 96px;
    justify-content: flex-end;
}

.session-revoke-btn {
    background: transparent;
    border: 0;
    color: #d23f3f;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.session-revoke-btn:hover,
.session-revoke-btn:focus,
.session-revoke-btn:active {
    background: rgba(210, 63, 63, 0.10);
    color: #b22b2b;
    outline: none;
}

.session-note {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
    cursor: help;
}

/* --- Низ модалки: «Завершить остальные» + «Закрыть» -------- */
.session-modal__footer {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.session-modal__error {
    margin-top: 8px;
}

/* =========================================================
   Время автозавершения сеанса — карточки с радио-выбором.
   ========================================================= */

.ttl-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 4px;
}

.ttl-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e9ee;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.ttl-option:hover {
    border-color: #cfd6dd;
    background: #fafbfc;
}

.ttl-option__label {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
}

/* Скрываем родной кружок, рисуем свой */
.ttl-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ttl-option__indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cfd6dd;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s ease, background .15s ease;
    flex-shrink: 0;
}

.ttl-option__indicator::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand);
    transform: scale(0);
    transition: transform .15s ease;
}

.ttl-option input[type="radio"]:checked ~ .ttl-option__indicator {
    border-color: var(--brand);
}

.ttl-option input[type="radio"]:checked ~ .ttl-option__indicator::after {
    transform: scale(1);
}

.ttl-option:has(input[type="radio"]:checked) {
    border-color: var(--brand);
    background: linear-gradient(0deg, rgba(44, 182, 125, 0.05), rgba(44, 182, 125, 0.05)), #fff;
    box-shadow: 0 0 0 3px rgba(44, 182, 125, 0.08);
}

.ttl-option input[type="radio"]:focus-visible ~ .ttl-option__indicator {
    box-shadow: 0 0 0 3px rgba(44, 182, 125, 0.25);
}

.ttl-modal__footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
