/* ============ BROADCAST PAGE ============ */

.br-page {
    min-height: 100vh;
    padding: 24px 0 80px;
    background: #0a0808;
    color: #fff;
    font-family: 'Kanit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.br-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------- HERO ---------- */
.br-hero {
    position: relative;
    padding: 28px 24px;
    background: linear-gradient(160deg, rgba(24,18,18,.99), rgba(14,10,10,.99));
    border: 1px solid rgba(212,168,83,.35);
    border-radius: 24px;
    overflow: hidden;
    isolation: isolate;
}
.br-hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.br-hero-orb-1 { width: 260px; height: 260px; background: rgba(212,168,83,.18); top: -100px; left: -80px; }
.br-hero-orb-2 { width: 200px; height: 200px; background: rgba(237,75,158,.12); bottom: -80px; right: -60px; }
.br-hero-content { position: relative; z-index: 1; }

.br-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(212,168,83,.15);
    color: #ffd47a;
    border: 1px solid rgba(212,168,83,.35);
    margin-bottom: 10px;
}

.br-hero h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.2;
}
.br-hero h1 .gold {
    background: linear-gradient(135deg, #d4a853, #ffd47a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.br-hero p {
    color: #a08b6b;
    font-size: 13px;
    margin: 0 0 16px;
}
.br-hero p b { color: #ffd47a; }

.br-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) {
    .br-hero-stats {
        grid-template-columns: 1fr 1fr;
    }
    .br-hero-stats .br-stat:last-child {
        grid-column: 1 / -1;
    }
}
.br-stat {
    background: rgba(0,0,0,.35);
    border: 1px solid rgba(212,168,83,.15);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.br-stat-label {
    font-size: 10px;
    color: #a08b6b;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.br-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: #ffd47a;
    font-variant-numeric: tabular-nums;
}
.br-stat-value small { font-size: 11px; color: #a08b6b; font-weight: 600; }

/* ---------- CARD ---------- */
.br-card {
    background: linear-gradient(160deg, rgba(24,18,18,.99), rgba(14,10,10,.99));
    border: 1px solid rgba(212,168,83,.3);
    border-radius: 20px;
    overflow: hidden;
}
.br-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(212,168,83,.15);
}
.br-card-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #ffd47a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.br-card-head h2 .gold { color: #fff; }

/* ---------- FORM ---------- */
.br-form { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.br-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.br-field { display: flex; flex-direction: column; gap: 6px; }
.br-field label {
    font-size: 12px;
    color: #a08b6b;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.br-hint {
    font-size: 11px;
    color: #5a6877;
    margin: 0;
}
.br-field input,
.br-field textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0,0,0,.35);
    color: #fff;
    border: 1.5px solid rgba(212,168,83,.25);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.br-field input:focus,
.br-field textarea:focus {
    outline: none;
    border-color: #d4a853;
    box-shadow: 0 0 0 3px rgba(212,168,83,.15);
}
.br-field textarea {
    min-height: 140px;
    resize: vertical;
    font-family: ui-monospace, 'SF Mono', Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.5;
}

.br-addr-stats {
    font-size: 10px;
    color: #4adea0;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
.br-addr-stats.has-error { color: #ff4757; }
.br-addr-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 11px;
    color: #5a6877;
}
.br-link-btn {
    background: none;
    border: none;
    color: #d4a853;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 0;
    text-decoration: underline;
}
.br-link-btn:hover { color: #ffd47a; }
.br-addr-hint { margin-left: auto; color: #5a6877; }

/* ---------- ASSET BUTTONS ---------- */
.br-asset-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.br-asset {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(212,168,83,.25);
    background: rgba(0,0,0,.35);
    color: #fff;
    cursor: pointer;
    transition: all .2s;
    text-align: left;
}
.br-asset:hover:not(:disabled) { border-color: rgba(212,168,83,.5); }
.br-asset.active {
    border-color: #d4a853;
    background: linear-gradient(180deg, rgba(212,168,83,.18), rgba(212,168,83,.06));
    box-shadow: 0 4px 14px rgba(212,168,83,.2);
}
.br-asset:disabled { opacity: .4; cursor: not-allowed; }
.br-asset-symbol {
    font-size: 14px;
    font-weight: 800;
    color: #ffd47a;
    letter-spacing: .5px;
}
.br-asset.active .br-asset-symbol { color: #fff; }
.br-asset-name {
    font-size: 10px;
    color: #a08b6b;
    font-weight: 600;
}

/* ---------- AMOUNT INPUT ---------- */
.br-amount-input {
    position: relative;
    display: flex;
}
.br-amount-input input {
    padding-right: 56px;
}
.br-amount-cur {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #a08b6b;
    letter-spacing: 1px;
    pointer-events: none;
}

/* ---------- SUMMARY ---------- */
.br-summary {
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(212,168,83,.15);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.br-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #a08b6b;
}
.br-summary-row b {
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.br-summary-row b small {
    font-size: 10px;
    color: #a08b6b;
    font-weight: 600;
    margin-left: 2px;
}
.br-summary-total {
    border-top: 1px dashed rgba(212,168,83,.2);
    padding-top: 8px;
    margin-top: 4px;
    font-size: 14px;
}
.br-summary-total b { color: #ffd47a; }
.br-summary-balance b { color: #4adea0; }
.br-summary-balance.insufficient b { color: #ff4757; }

/* ---------- ALERTS ---------- */
.br-alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}
.br-alert-error {
    background: rgba(255,71,87,.12);
    border: 1px solid rgba(255,71,87,.35);
    color: #ffaaaa;
}
.br-alert-success {
    background: rgba(74,222,160,.12);
    border: 1px solid rgba(74,222,160,.35);
    color: #aaffaa;
}

/* ---------- SUBMIT ---------- */
.br-submit {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #d4a853, #b8922f);
    color: #0a0808;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(212,168,83,.3);
    transition: all .2s;
    letter-spacing: .3px;
}
.br-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(212,168,83,.4);
}
.br-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---------- PROGRESS ---------- */
.br-progress { padding: 20px; }
.br-progress-bar {
    height: 8px;
    background: rgba(0,0,0,.5);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}
.br-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4a853, #ffd47a);
    transition: width .5s ease;
    border-radius: 4px;
}
.br-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #a08b6b;
}
.br-progress-info b { color: #fff; }

.br-progress-meta {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}
.br-meta-row {
    display: flex;
    justify-content: space-between;
    color: #a08b6b;
    padding: 4px 0;
    border-bottom: 1px solid rgba(212,168,83,.05);
}
.br-meta-row b { color: #fff; font-weight: 600; word-break: break-all; text-align: right; max-width: 60%; }

.br-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

/* ---------- BUTTONS ---------- */
.br-btn-secondary {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(212,168,83,.3);
    background: rgba(212,168,83,.08);
    color: #d4a853;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.br-btn-secondary:hover { background: rgba(212,168,83,.18); color: #ffd47a; }

.br-btn-danger {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,71,87,.35);
    background: rgba(255,71,87,.12);
    color: #ff8a95;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.br-btn-danger:hover { background: rgba(255,71,87,.22); color: #ffaaaa; }

.br-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(212,168,83,.25);
    background: rgba(212,168,83,.06);
    color: #d4a853;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.br-icon-btn:hover { background: rgba(212,168,83,.15); color: #ffd47a; }

/* ---------- STATUS BADGE ---------- */
.br-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .8px;
}
.br-status-pending { background: rgba(255,165,2,.18); color: #ffa502; border: 1px solid rgba(255,165,2,.35); }
.br-status-processing { background: rgba(0,152,234,.18); color: #4fc3ff; border: 1px solid rgba(0,152,234,.35); }
.br-status-completed { background: rgba(74,222,160,.18); color: #4adea0; border: 1px solid rgba(74,222,160,.35); }
.br-status-failed { background: rgba(255,71,87,.18); color: #ff8a95; border: 1px solid rgba(255,71,87,.35); }
.br-status-partial { background: rgba(255,165,2,.18); color: #ffa502; border: 1px solid rgba(255,165,2,.35); }
.br-status-cancelled { background: rgba(120,130,140,.18); color: #aab; border: 1px solid rgba(120,130,140,.35); }

/* ---------- HISTORY ---------- */
.br-empty {
    padding: 40px 20px;
    text-align: center;
    color: #5a6877;
}
.br-empty i { font-size: 32px; opacity: .4; margin-bottom: 8px; display: block; }
.br-empty p { margin: 0; font-size: 13px; }

.br-history-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.br-history-item {
    display: grid;
    grid-template-columns: 44px 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(212,168,83,.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
}
.br-history-item:hover {
    background: rgba(212,168,83,.08);
    border-color: rgba(212,168,83,.3);
}
.br-history-id {
    font-size: 12px;
    font-weight: 800;
    color: #d4a853;
    text-align: center;
}
.br-history-info { min-width: 0; }
.br-history-asset {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.br-history-meta {
    font-size: 10px;
    color: #a08b6b;
    margin-top: 2px;
}
.br-history-amount {
    font-size: 12px;
    color: #ffd47a;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.br-history-amount small {
    display: block;
    font-size: 10px;
    color: #a08b6b;
    font-weight: 500;
}

/* ---------- RESPONSIVE ---------- */


/* Компактное отображение больших чисел */
.br-stat-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
    .br-stat-value { font-size: 15px; }
    .br-stat-value small { font-size: 9px; }
}


/* Выбор режима отправки */
.br-mode-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
@media (max-width: 640px) { .br-mode-btns { grid-template-columns: 1fr; } }
.br-mode {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 14px; border-radius: 12px;
    border: 1.5px solid rgba(212,168,83,.25);
    background: rgba(0,0,0,.35); color: #fff;
    cursor: pointer; text-align: left; transition: all .2s;
}
.br-mode:hover:not(:disabled) { border-color: rgba(212,168,83,.5); }
.br-mode.active {
    border-color: #d4a853;
    background: linear-gradient(180deg, rgba(212,168,83,.18), rgba(212,168,83,.06));
}
.br-mode-title { font-size: 13px; font-weight: 700; color: #ffd47a; }
.br-mode-desc { font-size: 11px; color: #a08b6b; }
.br-mode:disabled { opacity: .4; cursor: not-allowed; }

/* Пауза при нехватке TON */
.br-status-paused_ton {
    background: rgba(255,165,2,.18);
    color: #ffa502;
    border: 1px solid rgba(255,165,2,.35);
    animation: br-pulse 2s infinite;
}
@keyframes br-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.br-ton-warning {
    background: rgba(255,165,2,.12);
    border: 1px solid rgba(255,165,2,.35);
    color: #ffd47a;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 12px 0;
    font-size: 13px;
}
.br-ton-warning b { color: #ffa502; }


/* ============ ПАРСЕР АДРЕСОВ ============ */
#brParserCard .br-form { padding: 20px; }
#brParserCard .br-hint {
    background: rgba(212,168,83,.06);
    border-left: 3px solid #d4a853;
    padding: 10px 14px;
    border-radius: 8px;
    line-height: 1.5;
}
#brParserResult .br-actions {
    padding: 0;
    margin-top: 12px;
}
#brParserProgress .br-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #a08b6b;
    margin-top: 8px;
}
#brParserProgress .br-progress-info i {
    color: #d4a853;
    margin-right: 4px;
}


/* Кнопка "Загрузить из файла" (label как кнопка) */
label.br-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d4a853;
    font-size: 11px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
label.br-link-btn:hover { color: #ffd47a; }
label.br-link-btn i { font-size: 11px; }


/* ============ МОИ ФАЙЛЫ (ПАРСЕР) ============ */
.br-files-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.br-file-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(212,168,83,.12);
    border-radius: 12px;
    transition: all .2s;
}
.br-file-item:hover {
    background: rgba(212,168,83,.06);
    border-color: rgba(212,168,83,.3);
}
.br-file-info { min-width: 0; }
.br-file-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffd47a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.br-file-meta {
    font-size: 10px;
    color: #a08b6b;
    margin-top: 2px;
}
.br-file-downloads { display: flex; gap: 6px; }
.br-file-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(212,168,83,.3);
    background: rgba(212,168,83,.08);
    color: #d4a853;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all .2s;
}
.br-file-btn:hover { background: rgba(212,168,83,.2); color: #ffd47a; }
.br-file-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }


/* ============ МОДАЛЬНОЕ ОКНО (МОИ ФАЙЛЫ) ============ */
.br-sub-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0,0,0,.8);
    backdrop-filter: blur(8px);
}
.br-sub-modal.open { display: flex; }
.br-sub-shell {
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(24,18,18,.99), rgba(14,10,10,.99));
    border: 1px solid rgba(212,168,83,.3);
    border-radius: 20px;
    overflow: hidden;
}
.br-sub-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(212,168,83,.15);
}
.br-sub-head h3 {
    margin: 0;
    font-size: 15px;
    color: #ffd47a;
    display: flex;
    gap: 8px;
    align-items: center;
}
.br-sub-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.br-myfile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(212,168,83,.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
}
.br-myfile-item:hover {
    background: rgba(212,168,83,.08);
    border-color: rgba(212,168,83,.35);
}
.br-myfile-info { min-width: 0; }
.br-myfile-title { font-size: 13px; font-weight: 700; color: #ffd47a; }
.br-myfile-meta { font-size: 10px; color: #a08b6b; margin-top: 2px; }
.br-myfile-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(212,168,83,.3);
    background: rgba(212,168,83,.08);
    color: #d4a853;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.br-myfile-btn:hover { background: rgba(212,168,83,.2); }


/* Кнопка "Из моих файлов" — яркая */
#brBtnMyFiles {
    background: rgba(212,168,83,.12);
    border: 1px solid rgba(212,168,83,.35);
    border-radius: 8px;
    padding: 4px 10px;
    color: #ffd47a;
    font-weight: 700;
    text-decoration: none;
}
#brBtnMyFiles:hover {
    background: rgba(212,168,83,.25);
    border-color: #d4a853;
    color: #fff;
}
#brBtnMyFiles i { margin-right: 4px; }


/* ============ ПАГИНАТОР ИСТОРИИ ============ */
.br-history-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(212,168,83,.1);
    margin-top: 4px;
}
.br-history-pager:empty {
    display: none;
}
.br-page-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(212,168,83,.3);
    background: rgba(212,168,83,.08);
    color: #d4a853;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-size: 12px;
}
.br-page-btn:hover:not(:disabled) {
    background: rgba(212,168,83,.2);
    color: #ffd47a;
    border-color: #d4a853;
}
.br-page-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}
.br-page-info {
    font-size: 12px;
    font-weight: 700;
    color: #ffd47a;
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: center;
}


/* ============ УВЕДОМЛЕНИЯ О БАЛАНСЕ ============ */
.br-balance-warnings {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0 8px;
}
.br-balance-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}
.br-balance-warning-gram {
    background: rgba(255,71,87,.10);
    border: 1px solid rgba(255,71,87,.35);
    color: #ffaaaa;
}
.br-balance-warning-pon {
    background: rgba(255,165,2,.10);
    border: 1px solid rgba(255,165,2,.40);
    color: #ffd47a;
}
.br-bw-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-top: 1px;
}
.br-balance-warning-gram .br-bw-icon { color: #ff4757; }
.br-balance-warning-pon .br-bw-icon { color: #ffa502; }
.br-bw-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.br-bw-text b {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
}
.br-bw-text span {
    font-size: 12px;
    color: #d0c0a0;
}
.br-bw-link {
    flex-shrink: 0;
    align-self: center;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid currentColor;
    background: rgba(255,255,255,.05);
    color: inherit;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    transition: background .2s;
}
.br-bw-link:hover {
    background: rgba(255,255,255,.12);
}
@media (max-width: 480px) {
    .br-balance-warning { flex-wrap: wrap; }
    .br-bw-link { width: 100%; text-align: center; margin-top: 6px; }
}


/* ============================================================
   МОБИЛЬНЫЙ ДИЗАЙН — выравнивание и красота
   ============================================================ */

/* --- HERO на мобильном: 2 колонки, третья на всю ширину --- */
@media (max-width: 640px) {
    .br-hero {
        padding: 18px 16px;
        border-radius: 18px;
    }
    .br-hero h1 {
        font-size: 19px;
        line-height: 1.25;
    }
    .br-hero p {
        font-size: 12.5px;
        margin-bottom: 14px;
    }
    .br-hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .br-hero-stats .br-stat {
        padding: 10px 12px;
        border-radius: 10px;
    }
    .br-hero-stats .br-stat:last-child {
        grid-column: 1 / -1;
    }
    .br-stat-label {
        font-size: 9px;
        letter-spacing: .5px;
    }
    .br-stat-value {
        font-size: 15px;
    }
}

/* --- Форма: компактнее, но с воздухом --- */
@media (max-width: 640px) {
    .br-container { padding: 0 12px; gap: 14px; }
    .br-card { border-radius: 16px; }
    .br-card-head { padding: 14px 16px; }
    .br-card-head h2 { font-size: 14px; }
    .br-form { padding: 16px; gap: 14px; }

    .br-field label { font-size: 11.5px; }
    .br-field input,
    .br-field textarea {
        padding: 11px 13px;
        font-size: 13.5px;
        border-radius: 10px;
    }
    .br-field textarea {
        min-height: 120px;
        font-size: 12px;
    }
    .br-amount-cur { font-size: 10px; right: 12px; }
}

/* --- Ассеты: 2 кнопки в ряд, компактнее --- */
@media (max-width: 640px) {
    .br-asset-btns { gap: 8px; }
    .br-asset { padding: 9px 12px; border-radius: 10px; }
    .br-asset-symbol { font-size: 13px; }
    .br-asset-name { font-size: 9.5px; }
}

/* --- Режим отправки: 3 в ряд с уменьшенным текстом --- */
@media (max-width: 640px) {
    .br-mode-btns {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .br-mode {
        padding: 9px 8px;
        border-radius: 10px;
        align-items: center;
        text-align: center;
        gap: 1px;
    }
    .br-mode-title { font-size: 11px; line-height: 1.2; }
    .br-mode-desc { font-size: 9px; line-height: 1.2; display: none; }
    .br-mode.active .br-mode-desc { display: block; }
}

/* --- Сводка: аккуратные строки, без переносов в беспорядке --- */
@media (max-width: 640px) {
    .br-summary { padding: 12px 14px; border-radius: 12px; gap: 7px; }
    .br-summary-row {
        font-size: 12px;
        align-items: flex-start;
        gap: 8px;
    }
    .br-summary-row > span {
        flex: 1;
        line-height: 1.35;
    }
    .br-summary-row > b {
        white-space: nowrap;
        text-align: right;
        flex-shrink: 0;
    }
    .br-summary-total { font-size: 13px; }
    .br-summary-row b small { font-size: 9px; }
}

/* --- Уведомления о балансе: компактнее --- */
@media (max-width: 640px) {
    .br-balance-warning {
        padding: 10px 12px;
        gap: 8px;
        border-radius: 10px;
        flex-wrap: wrap;
    }
    .br-bw-icon { font-size: 13px; width: 18px; height: 18px; }
    .br-bw-text b { font-size: 12px; }
    .br-bw-text span { font-size: 11px; }
    .br-bw-link {
        width: 100%;
        text-align: center;
        margin-top: 4px;
        padding: 7px 10px;
        font-size: 11.5px;
    }
}

/* --- Прогресс: аккуратные строки, статус бейдж справа --- */
@media (max-width: 640px) {
    .br-progress { padding: 16px; }
    .br-progress-info { font-size: 11.5px; }
    .br-progress-meta {
        padding: 0 16px 16px;
        gap: 5px;
        font-size: 11.5px;
    }
    .br-meta-row {
        align-items: flex-start;
        gap: 8px;
    }
    .br-meta-row > span {
        flex-shrink: 0;
        color: #a08b6b;
    }
    .br-meta-row > b {
        max-width: none;
        flex: 1;
        text-align: right;
        font-size: 11.5px;
    }
    .br-actions {
        flex-direction: column-reverse;  /* «Назад» сверху, «Отменить» снизу */
        padding: 0 16px 16px;
        gap: 8px;
    }
    .br-actions .br-btn-secondary,
    .br-actions .br-btn-danger {
        width: 100%;
    }
}

/* --- История: карточка = 2 строки (сверху id + инфо, снизу сумма + статус) --- */
@media (max-width: 640px) {
    .br-history-list { padding: 10px; gap: 8px; }
    .br-history-item {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "id    info  amount"
            "id    info  status";
        gap: 6px 10px;
        padding: 11px 12px;
        border-radius: 10px;
        align-items: center;
    }
    .br-history-id {
        grid-area: id;
        font-size: 11px;
        align-self: center;
        padding-right: 2px;
    }
    .br-history-info { grid-area: info; min-width: 0; }
    .br-history-asset { font-size: 12.5px; }
    .br-history-meta { font-size: 9.5px; }
    .br-history-amount {
        grid-area: amount;
        font-size: 12px;
        align-self: end;
    }
    .br-history-amount small { font-size: 9px; }
    .br-history-item > .br-status {
        grid-area: status;
        justify-self: end;
        font-size: 9.5px;
        padding: 3px 7px;
        letter-spacing: .5px;
    }
}

/* --- Пагинатор: компактнее --- */
@media (max-width: 640px) {
    .br-history-pager { padding: 10px 12px 14px; gap: 10px; }
    .br-page-btn { width: 30px; height: 30px; border-radius: 8px; }
    .br-page-info { font-size: 11px; min-width: 52px; }
}

/* --- Мои файлы (карточка и модалка): компактнее --- */
@media (max-width: 640px) {
    .br-files-list { padding: 10px; gap: 8px; }
    .br-file-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 11px 12px;
        border-radius: 10px;
    }
    .br-file-title { font-size: 12.5px; }
    .br-file-meta { font-size: 9.5px; }
    .br-file-downloads { justify-content: flex-start; gap: 6px; }
    .br-file-btn { padding: 6px 10px; font-size: 10.5px; border-radius: 8px; }

    .br-sub-modal { padding: 12px; }
    .br-sub-shell { border-radius: 16px; max-height: 90vh; }
    .br-sub-head { padding: 14px 16px; }
    .br-sub-head h3 { font-size: 14px; }
    .br-sub-body { padding: 12px 14px; }
    .br-myfile-item {
        padding: 11px 12px;
        border-radius: 10px;
        gap: 8px;
    }
    .br-myfile-title { font-size: 12.5px; }
    .br-myfile-meta { font-size: 9.5px; }
    .br-myfile-btn {
        padding: 6px 10px;
        font-size: 10.5px;
        border-radius: 8px;
    }
}

/* --- Парсер: карточка, поля, кнопки --- */
@media (max-width: 640px) {
    #brParserCard .br-form { padding: 16px; }
    #brParserCard .br-hint {
        padding: 9px 12px;
        font-size: 11px;
        line-height: 1.45;
    }
    #brParserProgress .br-progress-info { font-size: 11px; }
}

/* --- Кнопка «Из моих файлов» — на мобильном на всю ширину --- */
@media (max-width: 640px) {
    .br-addr-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    .br-addr-hint {
        margin-left: 0;
        width: 100%;
        text-align: right;
        font-size: 10px;
    }
    #brBtnMyFiles {
        padding: 5px 10px;
        font-size: 10.5px;
    }
    .br-link-btn { font-size: 11px; }
}

/* --- Кнопки submit: аккуратный отступ --- */
@media (max-width: 640px) {
    .br-submit {
        padding: 14px;
        font-size: 14px;
        border-radius: 12px;
    }
}

/* --- Очень маленькие экраны (≤380px) --- */
@media (max-width: 380px) {
    .br-hero-stats { grid-template-columns: 1fr; }
    .br-hero-stats .br-stat:last-child { grid-column: auto; }
    .br-mode-btns { grid-template-columns: 1fr; }
    .br-mode-desc { display: block; }
    .br-mode { align-items: flex-start; text-align: left; }
    .br-summary-row { font-size: 11.5px; }
    .br-history-asset { font-size: 12px; }
    .br-card-head h2 { font-size: 13px; }
}
