/* ======================== */
/*        DESIGN TOKENS     */
/* ======================== */
:root {
    /* OKX-inspired light fintech: нейтральная база, мягкий контраст, акцент «биржевой» синий */
    --color-bg: #f3f5f9;
    --color-bg-mid: #eef1f7;
    --color-surface: #ffffff;
    --color-surface-solid: #ffffff;
    --color-text: #141826;
    --color-text-muted: #5c6578;
    --color-heading: #0f1419;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-muted: #dbeafe;
    --color-accent-deep: #1d4ed8;
    --color-accent-gold: #d97706;
    --color-accent-gold-soft: #fff7ed;
    --color-accent-cyan: #0ea5e9;
    --color-accent-rate: #2563eb;
    --color-border: #e5e7eb;
    --color-border-soft: #eef1f6;
    --color-link: #2563eb;
    --color-link-hover: #1d4ed8;
    --color-shadow: rgba(17, 24, 39, 0.06);
    --color-shadow-strong: rgba(17, 24, 39, 0.1);
    --color-disabled-bg: #e2e8f0;
    --color-disabled-text: #64748b;
    --color-tab-active-bg: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --color-tab-hover-bg: #f8fafc;
    --color-rate-box-bg: #eff6ff;
    --color-scrollbar-thumb: #94a3b8;
    --color-scrollbar-thumb-hover: #64748b;
    --color-scrollbar-track: #e2e8f0;
    --panel-border: 1px solid var(--color-border);
    --radius-lg: 14px;
    --radius-md: 10px;
    --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ======================== */
/*        БАЗОВЫЕ СТИЛИ     */
/* ======================== */
body {
    font-family: var(--font-stack);
    background: linear-gradient(180deg, #fafbfe 0%, var(--color-bg) 40%, #eef2f8 100%);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ======================== */
/*           HEADER         */
/* ======================== */
.header {
    background: var(--color-surface);
    padding: 22px 20px;
    min-height: 56px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    border-bottom: var(--panel-border);
    box-shadow: 0 2px 12px var(--color-shadow);
}

.header-brand {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-heading);
    flex: 0 0 auto;
    min-width: 0;
    max-height: 100%;
}

.header-brand:hover {
    color: var(--color-primary);
}

.header-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    max-height: 36px;
    border-radius: 6px;
}

.header-brand img.header-logo {
    display: block;
    height: 86px;
    width: auto;
    max-width: 500px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .header-logo-wrap {
        max-height: 36px;
    }

    .header-brand img.header-logo {
        max-width: min(180px, 52vw);
    }
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px 12px;
    margin-left: 20px;
    flex: 1 1 auto;
}

.header-meta-cluster {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-left: clamp(1rem, 4vw, 3rem);
}

.header-auth--trailing {
    margin-left: auto;
}

.header-auth-static {
    margin-left: auto;
}

.header-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--color-text);
    font-size: clamp(0.9375rem, 2.2vw, 1.125rem);
    font-weight: 500;
    line-height: 1.3;
    max-width: min(380px, 100%);
    cursor: default;
    user-select: none;
}

.header-hours-accent {
    color: var(--color-primary);
    font-weight: 700;
}

.header-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text);
    font-size: clamp(0.9375rem, 2.2vw, 1.125rem);
    font-weight: 500;
    line-height: 1.3;
    max-width: min(380px, 100%);
    transition: background-color 0.2s, color 0.2s;
}

.header-link:hover {
    background: var(--color-tab-hover-bg);
    color: var(--color-heading);
}

.header-link--static {
    cursor: default;
}

.header-link--static:hover {
    background: transparent;
    color: var(--color-text);
}

.header-info svg,
.header-link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--color-primary);
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-primary);
}

/* ======================== */
/*        ОСНОВНОЙ КОНТЕНТ  */
/* ======================== */
.main {
    width: 100%;
    max-width: min(1320px, 100%);
    margin: 40px auto;
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
    box-sizing: border-box;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex: 1 0 auto;
}

.main:has(> .agreements-content:only-child) {
    justify-content: center;
}

/* ======================== */
/*      ФОРМА ОБМЕНА        */
/* ======================== */
.exchange-box {
    background: var(--color-surface);
    padding: 35px 40px;
    border-radius: 16px;
    border: var(--panel-border);
    box-shadow: 0 8px 28px var(--color-shadow-strong);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-align: left;
}

.exchange-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    margin-bottom: 30px;
}

.side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 8px;
}

.select-placeholder {
    color: var(--color-text-muted);
}

select,
input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background: #ffffff;
    color: var(--color-text);
}

small {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 5px;
    display: block;
}

button {
    width: 100%;
    background: var(--color-primary);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 0px;
}

button:hover {
    background: var(--color-primary-hover);
}

/* ======================== */
/*   ДОПОЛНИТЕЛЬНЫЕ ПОЛЯ    */
/* ======================== */
.form-fields {
    margin-top: 10px;
}

.form-fields>div {
    margin-bottom: 18px;
}

/* Правая колонка: резервы + лента активности */
.exchange-sidebar {
    flex: 0 0 380px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: stretch;
}

/* ======================== */
/*     БЛОК "НАШИ РЕЗЕРВЫ"  */
/* ======================== */
.box.breserv {
    background: var(--color-surface);
    border-radius: 16px;
    border: var(--panel-border);
    padding: 20px 25px;
    box-shadow: 0 8px 28px var(--color-shadow-strong);
    flex: 0 1 auto;
    width: 100%;
}

.box.breserv .head2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 15px;
    display: block;
}

#reserve {
    list-style: none;
    padding: 0;
    margin: 0;
}

#reserve .rar-elem {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-soft);
}

#reserve .rar-elem:last-child {
    border-bottom: none;
}

.reserve-left {
    display: flex;
    align-items: center;
}

.reserve-left .img25_control {
    margin-right: 10px;
}

.reserve-left span {
    font-size: 15px;
    color: var(--color-heading);
    line-height: 1.3;
    word-break: break-word;
}

.reserve-amount {
    color: var(--color-accent-rate);
    font-weight: 600;
    font-size: 15px;
    margin-left: auto;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.reserve-amount small {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 13px;
}

.reserve-amount.reserve-amount--up {
    background: rgba(34, 197, 94, 0.09);
    color: rgba(22, 101, 52, 0.95);
    border-radius: 6px;
    padding: 2px 8px;
    outline: 1px solid rgba(34, 197, 94, 0.22);
    outline-offset: 0;
}

.reserve-amount.reserve-amount--down {
    background: rgba(239, 68, 68, 0.08);
    color: rgba(153, 27, 27, 0.92);
    border-radius: 6px;
    padding: 2px 8px;
    outline: 1px solid rgba(239, 68, 68, 0.2);
    outline-offset: 0;
}

/* ---------- Лента «Последние обмены» (демо) ---------- */
.activity-panel {
    background: var(--color-surface);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 28px var(--color-shadow-strong);
    border: var(--panel-border);
}

.activity-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.activity-panel__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-heading);
}

.activity-panel__demo {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--color-text-muted);
}

.activity-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
}

.activity-feed::-webkit-scrollbar {
    width: 6px;
}

.activity-feed::-webkit-scrollbar-track {
    background: var(--color-scrollbar-track);
    border-radius: 6px;
}

.activity-feed::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-thumb);
    border-radius: 6px;
}

.activity-feed::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-thumb-hover);
}

.activity-feed__item {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-soft);
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text);
    animation: activity-feed-in 0.5s ease-out;
}

.activity-feed__item:last-child {
    border-bottom: none;
}

.activity-feed__time {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.activity-feed__text {
    color: var(--color-heading);
}

@keyframes activity-feed-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes reserve-row-flash {
    0% {
        background-color: transparent;
    }

    35% {
        background-color: var(--color-primary-muted);
    }

    100% {
        background-color: transparent;
    }
}

#reserve .rar-elem.reserve-row--flash {
    animation: reserve-row-flash 1.15s ease-out;
}

/* ---------- Страница результата заявки ---------- */
.order-result-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.order-result-box {
    max-width: 100%;
}

.order-result__title {
    margin-top: 0;
}

.order-result__body {
    margin-bottom: 20px;
}

.order-result__empty {
    color: var(--color-text-muted);
    font-size: 14px;
}

.order-result__dl {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 38%) 1fr;
    gap: 6px 16px;
    font-size: 14px;
}

.order-result__dt {
    margin: 0;
    font-weight: 600;
    color: var(--color-heading);
}

.order-result__dd {
    margin: 0;
    color: var(--color-text);
}

.order-result__actions {
    margin: 0;
}

.order-result__link {
    color: var(--color-link);
    font-weight: 600;
    text-decoration: none;
}

.order-result__link:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}

.order-result__note-short {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text);
    margin: 0 0 20px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--color-rate-box-bg);
    border: 1px solid var(--color-border-soft);
}

.order-result__timer-wrap {
    text-align: center;
    padding: 14px 12px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid var(--color-border-soft);
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.order-result__timer-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.order-result__timer {
    font-variant-numeric: tabular-nums;
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 800;
    color: var(--color-accent-deep);
    letter-spacing: 0.06em;
}

.order-result__timer-expired {
    margin-top: 10px;
    font-size: 13px;
    color: #b45309;
    font-weight: 600;
}

.order-result__status-sub {
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 0 0 16px;
    font-weight: 500;
}

.order-result__section {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-soft);
}

.order-result__section:last-of-type {
    border-bottom: none;
}

.order-result__section-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-heading);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.order-result__network {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
}

.order-result__address-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.order-result__address {
    flex: 1 1 200px;
    min-width: 0;
    display: block;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-all;
    padding: 10px 12px;
    margin: 0;
    border-radius: 8px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-heading);
}

.order-result__copy-btn {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
}

.order-result__qr {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 12px;
    border-radius: 10px;
    border: 1px dashed var(--color-border);
    background: var(--color-surface);
}

.order-result__qr table,
.order-result__qr img,
.order-result__qr canvas {
    width: 200px !important;
    height: 200px !important;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.order-result__pay-amount {
    margin: 0;
    font-size: 1.25rem;
}

.order-result__pay-unit {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 1rem;
}

.order-result__mono {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

.order-result__section--summary {
    border-bottom: none;
    margin-bottom: 8px;
}

.order-result__summary {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-text);
}

.order-result__summary-k {
    font-weight: 700;
    color: var(--color-heading);
}

.order-result__sent-block {
    margin-top: 8px;
}

.order-result__sent-msg {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.order-result__btn-sent {
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.order-result__btn-sent:disabled {
    opacity: 0.75;
}

/* ======================== */
/*        ВСПОМОГАТЕЛЬНОЕ   */
/* ======================== */
img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

/* Иконки валют: контраст на светлом фоне */
#reserve .img25_control,
.custom-select .select-item img,
.custom-select .select-selected img {
    width: 30px;
    height: 30px;
    padding: 5px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 1px 3px var(--color-shadow);
}

#reserve .img25_control {
    width: 32px;
    height: 32px;
}

.agreement-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.agreement-item input[type="checkbox"],
.agreement-item input[type="radio"] {
    margin-top: 4px;
    flex-shrink: 0;
    width: auto;
}

.agreement-item label {
    font-size: 14px;
    line-height: 1.55;
    cursor: pointer;
}

.agreement-item label a {
    color: var(--color-link);
    text-decoration: none;
}

.agreement-item label a:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}


.custom-select {
    position: relative;
    width: 100%;
    user-select: none;
}

.select-selected {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 20px;
    position: relative;
    padding-right: 35px;
    /* место под стрелку */
}

.select-selected img {
    flex-shrink: 0;
}

.select-items {
    position: absolute;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-top: 4px;
    width: 100%;
    z-index: 10;
    display: none;
    box-shadow: 0 4px 12px var(--color-shadow-strong);

    /* === Прокрутка === */
    max-height: 280px;
    /* Максимальная высота списка */
    overflow-y: auto;
    /* Включаем вертикальную прокрутку */
    overflow-x: hidden;

    /* Стилизация скроллбара (опционально) */
    scrollbar-width: thin;
    scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);

}

/* Стилизация скроллбара для Chrome/Edge */
.select-items::-webkit-scrollbar {
    width: 6px;
}

.select-items::-webkit-scrollbar-thumb {
    background-color: var(--color-scrollbar-thumb);
    border-radius: 3px;
}

.select-items::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-scrollbar-thumb-hover);
}

.select-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.select-item:hover {
    background-color: var(--color-tab-hover-bg);
}

.select-item img {
    padding-left: 1px;
}

.custom-select.active .select-items {
    display: block;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--color-heading);
    transition: transform 0.2s ease;
}

.custom-select.active .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.exchange-rate {
    background-color: var(--color-rate-box-bg);
    border: 1px solid var(--color-border-soft);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.exchange-rate span {
    color: var(--color-text-muted);
}

.exchange-rate strong {
    color: var(--color-accent-rate);
    font-weight: 600;
}

.exchange-fee-summary {
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid var(--color-border-soft);
    border-radius: 8px;
    background: var(--color-rate-box-bg);
}

.exchange-fee-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    font-size: 14px;
}

.exchange-fee-summary__row+.exchange-fee-summary__row {
    margin-top: 8px;
}

.exchange-fee-summary__k {
    color: var(--color-text-muted);
}

.exchange-fee-summary__row strong {
    color: var(--color-heading);
    font-weight: 700;
}

.exchange-fee-summary__row--total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--color-border-soft);
    font-size: 15px;
}

button:disabled {
    background-color: var(--color-disabled-bg) !important;
    color: var(--color-disabled-text) !important;
    cursor: not-allowed;
    opacity: 0.85;
}

button:disabled:hover {
    background-color: var(--color-disabled-bg) !important;
}

.tabs-container {
    width: 100%;
    max-width: min(1320px, 100%);
    margin: 0 auto;
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
    box-sizing: border-box;
}

.tabs {
    display: flex;
    background: #e8eefc;
    border-radius: 14px;
    padding: 6px;
    margin: 20px auto;
    width: 100%;
    max-width: min(1320px, 100%);
    box-shadow: 0 4px 20px var(--color-shadow);
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-sizing: border-box;
    gap: 4px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 700;
    color: #334155;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.15s;
    letter-spacing: 0.01em;
}

.tab.active {
    background: var(--color-tab-active-bg);
    color: #ffffff;
    box-shadow: 0 2px 8px var(--color-shadow-strong);
    transform: translateY(-1px);
}

.tab:hover:not(.active) {
    background: var(--color-tab-hover-bg);
    border-color: rgba(148, 163, 184, 0.25);
}

@media (max-width: 520px) {
    .tab {
        padding: 10px 5px;
        font-size: 0.72rem;
    }
}

/* css/agreements.css */

.agreements-content {
    width: 100%;
    max-width: min(1320px, 100%);
    margin: 0 auto;
    padding: 32px 0 48px;
    box-sizing: border-box;
}

.agreements-content>h1,
.agreements-content>h2 {
    text-align: center;
    margin: 0 0 1.25rem;
    color: var(--color-heading);
    font-size: clamp(1.625rem, 2.8vw, 2rem);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.02em;
}

.agreement-block--partners h3 {
    margin-bottom: 1rem;
}

.agreement-block--partners .guarantees-partners {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.guarantees-partners {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-soft);
}

.guarantees-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 92px;
    min-height: 92px;
    padding: 10px 8px;
    box-sizing: border-box;
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-heading);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 4px var(--color-shadow);
}

.guarantees-partner:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px var(--color-shadow-strong);
}

.guarantees-partner-favicon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.guarantees-partner-name {
    display: block;
    word-break: break-word;
}

.agreement-block {
    background: var(--color-surface);
    border-radius: 12px;
    border: 1px solid var(--color-border-soft);
    box-shadow: 0 2px 8px var(--color-shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.agreement-block h3 {
    color: var(--color-accent-deep);
    margin: 0 0 0.75rem;
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    font-weight: 700;
    line-height: 1.3;
}

.agreement-block h4 {
    color: var(--color-accent-deep);
    margin: 1rem 0 0.5rem;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
}

.agreement-block h4:first-child {
    margin-top: 0;
}

.agreement-block p {
    color: var(--color-text);
    font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
    line-height: 1.65;
    margin: 0 0 1em;
    max-width: none;
}

/* Обмен + маркетинг: блок на всю ширину колонки, без лишней „узкой“ колонки текста */
#exchange-section .exchange-box {
    width: 100%;
    min-width: 0;
}

.marketing-section {
    background: var(--color-surface);
    border-radius: 16px;
    border: var(--panel-border);
    box-shadow: 0 8px 28px var(--color-shadow-strong);
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 1.5rem);
    margin-top: 28px;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.marketing-section h3 {
    color: var(--color-accent-deep);
    margin: 0 0 0.65rem;
    font-size: clamp(1.125rem, 1.9vw, 1.375rem);
    font-weight: 700;
}

.marketing-section p {
    margin: 0 0 1em;
    font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
    line-height: 1.65;
    color: var(--color-text);
}

.marketing-section p:last-child {
    margin-bottom: 0;
}

.marketing-section ul {
    margin: 0.5em 0 0;
    padding-left: 1.2rem;
    color: var(--color-text);
    font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
    line-height: 1.6;
}

.marketing-section li {
    margin-bottom: 0.45em;
}

.marketing-section li:last-child {
    margin-bottom: 0;
}

/* Помощь: раскрывающиеся блоки FAQ */
.help-page-lead {
    text-align: center;
    margin: -0.25rem auto 1.35rem;
    max-width: min(62.4rem, 100%);
    color: var(--color-text-muted);
    font-size: clamp(0.9375rem, 1.1vw, 1rem);
    line-height: 1.55;
}

.help-faq {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.help-faq-item {
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: 0 1px 4px var(--color-shadow);
    overflow: hidden;
}

.help-faq-item summary {
    cursor: pointer;
    padding: 0.9rem 1.1rem;
    font-weight: 700;
    color: var(--color-heading);
    font-size: clamp(0.95rem, 1.05vw, 1.0625rem);
    line-height: 1.4;
    list-style: none;
}

.help-faq-item summary::-webkit-details-marker {
    display: none;
}

.help-faq-item summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 10px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--color-heading);
    transform: rotate(-90deg);
    transition: transform 0.2s ease;
    vertical-align: middle;
}

.help-faq-item[open] summary::before {
    transform: rotate(0deg);
}

.help-faq-body {
    padding: 0 1.15rem 1.1rem 2.35rem;
    border-top: 1px solid var(--color-border-soft);
}

.help-faq-body p {
    margin: 0.75rem 0 0;
    color: var(--color-text);
    font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
    line-height: 1.65;
    max-width: none;
}

.help-faq-more {
    font-size: 0.9375rem !important;
}

.help-faq-more a {
    color: var(--color-link);
    font-weight: 600;
    text-decoration: none;
}

.help-faq-more a:hover {
    text-decoration: underline;
    color: var(--color-link-hover);
}

.agreement-block p:last-child {
    margin-bottom: 0;
}

/* ---------- Панели, отзывы ---------- */
.glass-panel {
    background: var(--color-surface);
    border: var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 8px 28px var(--color-shadow-strong);
}

.glass-panel--nested {
    margin-top: 1.35rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--color-border-soft);
}

.reviews-section {
    margin-top: 26px;
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 1.5rem);
}

.reviews-section__title {
    color: #2563eb;
    margin: 0 0 0.35rem;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.reviews-section__lead {
    margin: 0 0 1.1rem;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.6;
    color: var(--color-text-muted);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.advantages-section .reviews-section__lead {
    margin-bottom: 1rem;
}

.advantages-grid {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.5rem;
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.advantages-grid li {
    margin: 0;
}

.advantages-note {
    margin: 1rem 0 0;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--color-border-soft);
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.review-card {
    margin: 0;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--color-border-soft);
    box-shadow: 0 2px 8px var(--color-shadow);
}

.review-card__text {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--color-text);
}

.review-card__meta {
    margin-top: 0.65rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 960px) {
    #exchange-section.main {
        flex-direction: column;
        align-items: stretch;
    }

    #exchange-section .exchange-sidebar {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
    }
}

/* ======================== */
/*        FOOTER (как шапка) */
/* ======================== */
.site-footer {
    background: var(--color-surface);
    border-top: var(--panel-border);
    box-shadow: 0 -2px 12px var(--color-shadow);
    margin-top: 48px;
    padding: 20px clamp(1rem, 4vw, 2rem);
    box-sizing: border-box;
}

.site-footer__inner {
    max-width: min(1320px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-heading);
    font-weight: 700;
}

.site-footer__brand:hover {
    color: var(--color-primary);
}

.site-footer__logo {
    height: 46px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
}

.site-footer__copy {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.site-footer__copy strong {
    color: var(--color-heading);
    font-weight: 700;
}

.site-footer__trail {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    text-align: right;
}

.site-footer__staff-link {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
}

.site-footer__staff-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.admin-login-lead code {
    font-size: 0.85em;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--color-border-soft);
}

.admin-login-hint {
    margin-top: 0.5rem;
}

.admin-login-back {
    margin-top: 1.25rem;
    font-size: 0.9375rem;
}

.admin-login-back a {
    color: var(--color-link);
    font-weight: 600;
}

.admin-login-back a:hover {
    color: var(--color-link-hover);
}

/* ======================== */
/*   HEADER AUTH + ACCOUNT  */
/* ======================== */
.header-auth {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-right: 6px;
}

.header-auth__btn {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-heading);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.header-auth__btn:hover {
    background: var(--color-tab-hover-bg);
}

.header-auth__btn--ghost {
    border-color: transparent;
    background: transparent;
}

.header-auth__btn--ghost:hover {
    background: var(--color-tab-hover-bg);
}

/* Одинаковые кнопки Вход/Регистрация в шапке */
.auth-cta {
    min-width: 132px;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    border-width: 1px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.auth-cta--login {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1e40af;
    color: #fff;
}

.auth-cta--login:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: #fff;
}

.auth-cta--register {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-color: #166534;
    color: #fff;
}

.auth-cta--register:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    color: #fff;
}

.account-main {
    display: block;
}

.account-shell {
    width: 100%;
    max-width: min(960px, 100%);
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: var(--radius-lg);
}

.account-head {
    margin-bottom: 1.25rem;
}

.account-head--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.account-title {
    margin: 0 0 0.35rem 0;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    letter-spacing: -0.02em;
    color: var(--color-heading);
}

.account-lead {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.55;
    max-width: 60ch;
}

.account-inner-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 900px;
    background: #e8eefc;
    border: 1px solid rgba(37, 99, 235, 0.22);
    margin-bottom: 1rem;
}

.account-inner-tab {
    border: 1px solid transparent;
    background: transparent;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    min-width: 140px;
    min-height: 44px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.account-inner-tab:hover:not(.account-inner-tab--active) {
    background: var(--color-tab-hover-bg);
    border-color: rgba(148, 163, 184, 0.25);
    transform: translateY(-1px);
}

.account-inner-tab--active {
    color: #ffffff;
    border-color: #1d4ed8;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
    transform: translateY(-1px);
}

.account-form .btn-primary {
    margin-top: 16px;
    padding: 14px 22px;
    font-size: 1.05rem;
}

/* Поля входа/регистрации: не ниже 3 см по запросу */
#account-guest input,
#admin-form-login input {
    height: 50px;
    width: 100%;
    font-size: 1.06rem;
}

.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field input {
    width: 100%;
    min-width: 0;
    height: 50px;
    font-size: 1.06rem;
    padding: 0 52px 0 16px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: transparent;
    overflow: hidden;
    text-indent: -9999px;
    cursor: pointer;
}

.password-toggle::before {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    margin: 5px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6z'/%3E%3Ccircle cx='12' cy='12' r='2.8'/%3E%3C/svg%3E");
}

.password-toggle[aria-pressed="true"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364758b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6z'/%3E%3Ccircle cx='12' cy='12' r='2.8'/%3E%3Cpath d='M4 20L20 4'/%3E%3C/svg%3E");
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: var(--color-tab-hover-bg);
    outline: none;
}

#account-guest .password-toggle,
#admin-form-login .password-toggle {
    width: 32px;
    height: 32px;
}

.form-status[data-kind="err"] {
    color: #b91c1c;
    font-size: 0.9375rem;
    margin: 8px 0 4px;
}

.form-status[data-kind="muted"] {
    color: var(--color-text-muted);
    font-size: 0.9375rem;
    margin: 8px 0 4px;
}

.form-status[data-kind="ok"] {
    color: #15803d;
    font-size: 0.9375rem;
    margin: 8px 0 4px;
}

.form-error {
    color: #b91c1c;
    font-size: 0.9375rem;
    margin: 8px 0;
}

.btn-primary {
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
    filter: brightness(1.03);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-heading);
}

.btn-secondary:hover {
    background: var(--color-tab-hover-bg);
}

.btn-secondary--standout {
    border-width: 2px;
    border-color: rgba(37, 99, 235, 0.45);
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.btn-secondary--standout:hover {
    border-color: rgba(37, 99, 235, 0.8);
    filter: brightness(1.02);
}

.cabinet-mount {
    margin: 0 0 1.25rem 0;
}

.cabinet-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 18px;
    border: var(--panel-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    margin-bottom: 1rem;
}

.cabinet-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    font-weight: 700;
}

.cabinet-title {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 4px 0;
    color: var(--color-heading);
}

.cabinet-sub {
    color: var(--color-text-muted);
}

.cabinet-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    justify-content: center;
}

.cabinet-chip {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 999px;
    border: var(--panel-border);
    background: var(--color-surface);
}

.cabinet-chip--muted {
    color: var(--color-text-muted);
}

.cabinet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 1rem;
}

.cabinet-card {
    border: var(--panel-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    background: var(--color-surface);
}

.cabinet-card--wide {
    margin-bottom: 1rem;
}

.cabinet-card--emphasis {
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
}

.cabinet-card--table {
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.cabinet-card__title {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
}

.cabinet-muted {
    margin: 0 0 8px 0;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.cabinet-note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.cabinet-table-wrap {
    overflow: auto;
    border-radius: var(--radius-md);
    border: var(--panel-border);
}

.cabinet-order-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.cabinet-order-filter {
    width: auto;
    margin: 0;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-heading);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.cabinet-order-filter:hover {
    background: var(--color-tab-hover-bg);
}

.cabinet-order-filter.is-active {
    border-color: #1d4ed8;
    background: #dbeafe;
    color: #1e3a8a;
}

.cabinet-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.cabinet-table th,
.cabinet-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border-soft);
    text-align: left;
    font-size: 0.9375rem;
}

.cabinet-table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    background: #f8fafc;
}

.cabinet-pill {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--color-primary-muted);
    color: #1e3a8a;
}

.cabinet-pill--new {
    background: #dbeafe;
    color: #1e3a8a;
}

.cabinet-pill--processing {
    background: #fef3c7;
    color: #92400e;
}

.cabinet-pill--done {
    background: #dcfce7;
    color: #166534;
}

.cabinet-pill--cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.chat-messages {
    max-height: 320px;
    overflow: auto;
    padding: 10px;
    border-radius: var(--radius-md);
    border: var(--panel-border);
    background: #f8fafc;
    margin-bottom: 10px;
}

.chat-msg {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--color-border-soft);
    margin-bottom: 8px;
}

.chat-msg--staff {
    border-color: #dbeafe;
    background: #eff6ff;
}

.chat-msg__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.chat-msg__body {
    white-space: pre-wrap;
    line-height: 1.45;
    word-break: normal;
    overflow-wrap: break-word;
}

.chat-composer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.chat-input {
    flex: 1 1 300px;
    min-height: 44px;
    resize: vertical;
    border-radius: var(--radius-md);
    border: var(--panel-border);
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

/* ===== Отдельный чат-бот в правом нижнем углу ===== */
.bot-assistant-fab {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 48px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.24);
    background: #ffffff;
    color: #1e3a8a;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.bot-assistant-fab:hover {
    transform: translateY(-1px);
    background: #eff6ff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.bot-assistant-fab__glyph {
    font-size: 1rem;
    line-height: 1;
}

.bot-assistant-fab__label {
    white-space: nowrap;
}

.bot-assistant-panel {
    position: fixed;
    right: 18px;
    bottom: 86px;
    z-index: 9998;
    width: min(360px, calc(100vw - 24px));
    max-height: min(68vh, 560px);
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--color-border-soft);
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.bot-assistant-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border-soft);
    background: #f8fbff;
}

.bot-assistant-panel__controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bot-assistant-panel__title {
    margin: 0;
    color: var(--color-heading);
    font-size: 1rem;
}

.bot-assistant-panel__lead {
    margin: 4px 0 0;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.bot-assistant-panel__close,
.bot-assistant-panel__minimize {
    width: 36px;
    min-width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--color-text-muted);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.bot-assistant-panel__close:hover,
.bot-assistant-panel__minimize:hover {
    background: var(--color-tab-hover-bg);
}

.bot-assistant-panel__minimize {
    font-size: 1.2rem;
    font-weight: 700;
}

.bot-assistant-panel--minimized {
    width: min(320px, calc(100vw - 24px));
    max-height: none;
}

.bot-assistant-panel--minimized .bot-assistant-panel__head {
    border-bottom: none;
}

.bot-assistant-panel--minimized .bot-assistant-panel__lead,
.bot-assistant-panel--minimized .bot-assistant-messages,
.bot-assistant-panel--minimized .bot-assistant-form {
    display: none;
}

.bot-assistant-messages {
    flex: 1 1 auto;
    min-height: 220px;
    max-height: 340px;
    overflow-y: auto;
    padding: 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border-soft);
}

.bot-assistant-message {
    margin-bottom: 8px;
    border-radius: 12px;
    padding: 8px 10px;
    line-height: 1.45;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
}

.bot-assistant-message--bot {
    margin-right: 22px;
    background: #ffffff;
    border: 1px solid var(--color-border-soft);
    color: var(--color-text);
}

.bot-assistant-message--operator {
    margin-right: 22px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
}

.bot-assistant-message--user {
    margin-left: 22px;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.bot-assistant-message__text {
    margin: 0;
}

.bot-assistant-typing {
    display: inline-flex;
    align-items: center;
    margin: 0 0 8px 0;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 0.84rem;
    color: var(--color-text-muted);
    background: #ffffff;
    border: 1px dashed var(--color-border);
}

.bot-assistant-form {
    padding: 10px;
    background: #ffffff;
}

.bot-assistant-form__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.bot-assistant-form__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.bot-assistant-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
    background: #ffffff;
}

.bot-assistant-send {
    width: auto;
    min-width: 114px;
    margin-top: 0;
    padding: 0 14px;
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .bot-assistant-fab {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        min-height: 44px;
        padding: 8px 11px;
        font-size: 0.84rem;
    }

    .bot-assistant-panel {
        right: 12px;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        width: calc(100vw - 24px);
        max-height: min(64vh, 520px);
    }

    .bot-assistant-messages {
        min-height: 200px;
    }

    .bot-assistant-send {
        min-width: 98px;
    }
}

.header-auth__user {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-heading);
    max-width: min(200px, 36vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.06) 100%);
    border: 1px solid rgba(37, 99, 235, 0.22);
}

@media (max-width: 640px) {
    .header-auth:not(.header-auth--trailing) {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ---------- Admin & account deletion ---------- */
.btn-danger {
    margin-top: 12px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(185, 28, 28, 0.45);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.14), rgba(220, 38, 38, 0.06));
    color: #991b1b;
    font-weight: 700;
    cursor: pointer;
}

.btn-danger:hover {
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.22), rgba(220, 38, 38, 0.1));
}

.btn-compact {
    padding: 6px 10px;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.account-delete-zone {
    border-color: rgba(185, 28, 28, 0.2);
}

.admin-shell {
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.admin-inner-tabs {
    background: #e8eefc;
    border-color: rgba(37, 99, 235, 0.22);
}

.admin-inner-tabs .account-inner-tab {
    min-width: 140px;
    min-height: 44px;
    font-weight: 700;
    border: 1px solid transparent;
    color: #334155;
}

.admin-inner-tabs .account-inner-tab.account-inner-tab--active {
    color: #ffffff;
    border-color: #1d4ed8;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
    transform: translateY(-1px);
}

.admin-panel {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.admin-toolbar .btn-secondary {
    border-color: rgba(37, 99, 235, 0.35);
    color: #1e40af;
    background: #eff6ff;
}

.admin-toolbar .btn-secondary:hover {
    background: #dbeafe;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.admin-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.admin-input,
.admin-select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--color-border, #e2e8f0);
    background: var(--color-surface, #fff);
    color: var(--color-heading);
    min-width: 160px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table td {
    vertical-align: middle;
}

.admin-support-grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 16px;
    align-items: start;
}

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

.admin-rooms-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
}

.admin-room-item {
    text-align: left;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--color-surface, #fff);
    cursor: pointer;
}

.admin-room-item:hover {
    border-color: rgba(37, 99, 235, 0.35);
}

.admin-room-item--active {
    border-color: rgba(37, 99, 235, 0.75);
    background: #eef4ff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.admin-room-item__label {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
}

.admin-room-item__preview {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-chat-msgs {
    min-height: 240px;
    max-height: 420px;
    margin-bottom: 10px;
}

.admin-support-meta {
    margin-bottom: 10px;
    font-size: 0.875rem;
}
