* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f0518 0%, #1a0b2e 100%);
    color: #ffffff;
    min-height: 100vh;
}

.panel-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(20, 10, 40, 0.95);
    border-right: 1px solid rgba(184, 79, 214, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.logo {
    background: linear-gradient(135deg, #b84fd6 0%, #8b2fd1 100%);
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
}
.lang-switch-small {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 60px;
    display: flex;
    gap: 5px;
}
.lang-switch-small span {
    padding: 4px 10px;
    border-radius: 60px;
    font-size: 11px;
    cursor: pointer;
}
.lang-switch-small span.active { background: rgba(184, 79, 214, 0.6); }

.nav-category {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin: 15px 0 5px 10px;
    font-weight: 700;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 14px;
}
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { background: rgba(184, 79, 214, 0.1); color: white; }
.nav-item.active {
    background: linear-gradient(135deg, #b84fd6 0%, #8b2fd1 100%);
    color: white;
}
.nav-divider { border-top: 1px solid rgba(184, 79, 214, 0.2); margin: 10px 0; }

.sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(184, 79, 214, 0.2); }
.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: rgba(255, 95, 86, 0.1);
    border: 1px solid rgba(255, 95, 86, 0.3);
    border-radius: 10px;
    color: #ff5f56;
    cursor: pointer;
    font-size: 13px;
}
.logout-btn svg { width: 18px; height: 18px; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
}
.section { display: none; animation: fadeIn 0.3s ease-out; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.section-header h1 { font-size: 28px; font-weight: 700; }

/* Stats & Charts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(184, 79, 214, 0.2);
    border-radius: 16px;
    padding: 20px;
}
.stat-label { font-size: 13px; color: rgba(255, 255, 255, 0.5); margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.stat-change { font-size: 12px; font-weight: 600; }
.stat-change.positive { color: #27ca40; }
.stat-change.negative { color: #ff5f56; }

.charts-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
.chart-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(184, 79, 214, 0.2);
    border-radius: 16px;
    padding: 24px;
}
.chart-card h3 { margin-bottom: 20px; font-size: 16px; }

/* Tables */
.table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(184, 79, 214, 0.2);
    border-radius: 16px;
    padding: 20px;
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table th {
    text-align: left;
    padding: 12px;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.status-active { background: rgba(39, 202, 64, 0.2); color: #27ca40; }
.status-banned { background: rgba(255, 95, 86, 0.2); color: #ff5f56; }

/* Forms & Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}
.settings-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(184, 79, 214, 0.2);
    border-radius: 16px;
    padding: 24px;
}
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.form-input {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    margin-top: 5px;
}
.connect-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #b84fd6 0%, #8b2fd1 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 22px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider { background-color: #b84fd6; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

/* Logs */
.logs-container {
    background: #000;
    border-radius: 12px;
    padding: 20px;
    font-family: monospace;
    font-size: 13px;
    max-height: 500px;
    overflow-y: auto;
}
.log-entry { margin-bottom: 5px; }
.log-entry.error { color: #ff5f56; }
.log-entry.success { color: #27ca40; }
.log-entry.info { color: #0088cc; }

@media (max-width: 768px) {
    .sidebar { width: 100%; position: relative; height: auto; }
    .main-content { margin-left: 0; padding: 20px; }
}

/* ===== CONTROLS ===== */
.users-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}
.search-input {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 79, 214, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    min-width: 280px;
    outline: none;
    transition: all 0.3s;
}
.search-input:focus {
    border-color: #b84fd6;
    box-shadow: 0 0 0 3px rgba(184, 79, 214, 0.15);
}
.filter-select {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 79, 214, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}
.filter-select option {
    background: #1a0b2e;
    color: white;
}

/* ===== USER ROW ===== */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b84fd6, #8b2fd1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.user-name {
    font-weight: 600;
    color: white;
    font-size: 14px;
}
.user-name .admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #b84fd6, #8b2fd1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
}
.user-id-small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}
.status-active { background: rgba(39, 202, 64, 0.2); color: #27ca40; }
.status-banned { background: rgba(255, 95, 86, 0.2); color: #ff5f56; }
.status-admin { background: linear-gradient(135deg, #b84fd6, #8b2fd1); color: white; }

/* ===== ACTION BUTTONS ===== */
.action-btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    margin: 2px;
}
.action-btn:hover {
    background: rgba(184, 79, 214, 0.2);
    border-color: rgba(184, 79, 214, 0.5);
    transform: translateY(-1px);
}
.action-btn.danger {
    border-color: rgba(255, 95, 86, 0.3);
    color: #ff5f56;
}
.action-btn.danger:hover {
    background: rgba(255, 95, 86, 0.2);
}
.action-btn.success {
    border-color: rgba(39, 202, 64, 0.3);
    color: #27ca40;
}
.action-btn.success:hover {
    background: rgba(39, 202, 64, 0.2);
}
.action-btn.primary {
    background: linear-gradient(135deg, #b84fd6, #8b2fd1);
    border-color: transparent;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
.modal-box {
    background: linear-gradient(135deg, #1a0b2e 0%, #0f0518 100%);
    border: 1px solid rgba(184, 79, 214, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(184, 79, 214, 0.2);
}
.modal-header h2 {
    font-size: 22px;
    background: linear-gradient(135deg, #fff, #b84fd6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}
.modal-close:hover {
    background: rgba(255, 95, 86, 0.2);
    border-color: rgba(255, 95, 86, 0.5);
}

/* Modal user info */
.modal-user-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(184, 79, 214, 0.2);
}
.modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b84fd6, #8b2fd1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}
.modal-user-info h3 {
    font-size: 20px;
    margin-bottom: 6px;
}
.modal-user-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 2px 0;
}

/* Modal tabs */
.modal-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(184, 79, 214, 0.2);
    padding-bottom: 10px;
}
.modal-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.modal-tab:hover { color: white; background: rgba(255, 255, 255, 0.05); }
.modal-tab.active {
    background: linear-gradient(135deg, #b84fd6, #8b2fd1);
    color: white;
}

/* Modal sections */
.modal-section { display: none; }
.modal-section.active { display: block; animation: fadeIn 0.3s; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.info-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.info-item-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.info-item-value {
    font-size: 15px;
    font-weight: 600;
    color: white;
}

/* Action grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.action-card {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(184, 79, 214, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.action-card:hover {
    background: rgba(184, 79, 214, 0.1);
    border-color: rgba(184, 79, 214, 0.5);
    transform: translateY(-2px);
}
.action-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(184, 79, 214, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.action-card-text h4 {
    font-size: 13px;
    margin-bottom: 2px;
}
.action-card-text p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}
.action-card.danger { border-color: rgba(255, 95, 86, 0.3); }
.action-card.danger .action-card-icon { background: rgba(255, 95, 86, 0.2); }
.action-card.danger:hover { background: rgba(255, 95, 86, 0.1); border-color: rgba(255, 95, 86, 0.5); }
.action-card.success { border-color: rgba(39, 202, 64, 0.3); }
.action-card.success .action-card-icon { background: rgba(39, 202, 64, 0.2); }

/* Panels list */
.panels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.panel-row.has-access {
    border-color: rgba(39, 202, 64, 0.3);
    background: rgba(39, 202, 64, 0.05);
}
.panel-name {
    font-weight: 600;
    font-size: 14px;
}

/* Balance edit */
.balance-edit {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}
.balance-edit input {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 79, 214, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    outline: none;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 99999;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.toast.success { background: linear-gradient(135deg, #27ca40, #1fa832); }
.toast.error { background: linear-gradient(135deg, #ff5f56, #e04848); }
.toast.info { background: linear-gradient(135deg, #b84fd6, #8b2fd1); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 768px) {
    .users-controls { flex-direction: column; width: 100%; }
    .search-input { width: 100%; min-width: 0; }
    .info-grid, .actions-grid { grid-template-columns: 1fr; }
    .modal-user-header { flex-direction: column; text-align: center; }
}

.af-hint { font-size: 13px; opacity: .6; margin: -10px 0 16px; }
.af-form { display: grid; grid-template-columns: 1.2fr 2fr 1fr 1fr .8fr auto; gap: 10px; margin-bottom: 20px; }
.af-form input, .af-form select {
    padding: 10px 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(184,79,214,.3);
    border-radius: 8px; color: #fff; outline: none; font-size: 14px;
}
.af-form select option { background: #1a0b2e; }
.af-table { display: flex; flex-direction: column; gap: 6px; }
.af-row {
    display: grid; grid-template-columns: 1.2fr 2fr 1fr .8fr auto; gap: 12px; align-items: center;
    padding: 12px 14px; background: rgba(255,255,255,.03); border-radius: 10px; font-size: 14px;
}
.af-row.af-wd { grid-template-columns: .9fr 1fr .8fr 2fr auto; }
.af-header { background: rgba(184,79,214,.1); font-size: 12px; text-transform: uppercase; opacity: .7; }
.af-row small { display: block; opacity: .55; font-size: 12px; margin-top: 2px; }
.af-actions { display: flex; gap: 8px; justify-content: flex-end; }
.af-actions button:not(.panel-btn) { background: none; border: none; cursor: pointer; font-size: 16px; }
.af-actions .panel-btn { padding: 8px 14px; font-size: 13px; }
.af-copy { cursor: pointer; }
.af-copy.copied { color: #27ca40; }
.af-empty { padding: 16px; text-align: center; opacity: .5; }
.af-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.af-head h2 { margin: 0; }
.af-tabs { display: flex; gap: 6px; }
.af-tabs button {
    padding: 8px 14px; border-radius: 8px; border: 1px solid rgba(184,79,214,.3);
    background: rgba(255,255,255,.04); color: #fff; cursor: pointer;
}
.af-tabs button.active { background: linear-gradient(135deg, #b84fd6 0%, #8b2fd1 100%); border-color: transparent; }
.af-badge { background: #ff5f56; border-radius: 10px; padding: 2px 8px; font-size: 13px; margin-left: 6px; }
@media (max-width: 900px) { .af-form, .af-row, .af-row.af-wd { grid-template-columns: 1fr; } }

.af-row.af-acc { grid-template-columns: .6fr 1fr 1.6fr .5fr 1.2fr auto; }
.af-input {
    padding: 8px 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(184,79,214,.3);
    border-radius: 8px; color: #fff; outline: none;
}
.af-acc input[type=color] { width: 42px; height: 32px; border: none; background: none; cursor: pointer; padding: 0; }



.panel-btn.primary { background: linear-gradient(135deg, #b84fd6 0%, #8b2fd1 100%); }
.panel-btn.success { background: rgba(39,202,64,.2); color: #27ca40; border: 1px solid rgba(39,202,64,.3); }
.panel-btn.warning { background: rgba(255,193,7,.2); color: #ffc107; border: 1px solid rgba(255,193,7,.3); }
.panel-btn:disabled { opacity: .5; cursor: wait; }

/* ===== период ===== */
.period-selector { display: flex; gap: 8px; }
.period-btn {
    padding: 8px 14px; border-radius: 8px; cursor: pointer; color: #fff;
    background: rgba(255,255,255,.05); border: 1px solid rgba(184,79,214,.3);
}
.period-btn.active { background: linear-gradient(135deg, #b84fd6, #8b2fd1); border-color: transparent; }

/* ===== блоки ===== */
.panel-section {
    background: rgba(255,255,255,.03); border: 1px solid rgba(184,79,214,.2);
    border-radius: 18px; padding: 24px; margin-bottom: 24px;
}
.panel-section h2 { font-size: 18px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.af-hint { font-size: 13px; color: rgba(255,255,255,.5); margin: 0 0 18px; line-height: 1.55; max-width: 820px; }
.af-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.af-badge { background: #ff5f56; border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.muted { color: rgba(255,255,255,.45); }
.pos { color: #4ade80; } .neg { color: #ff8a80; }

/* ===== кнопки и поля ===== */
.panel-btn {
    height: 40px; padding: 0 16px; border: none; border-radius: 10px; font-weight: 600;
    cursor: pointer; font-size: 13px; color: #fff; white-space: nowrap; transition: .2s;
}
.panel-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.panel-btn:disabled { opacity: .5; cursor: wait; transform: none; }
.panel-btn.primary { background: linear-gradient(135deg, #b84fd6, #8b2fd1); }
.panel-btn.success { background: rgba(39,202,64,.15); color: #4ade80; border: 1px solid rgba(39,202,64,.35); height: 34px; }
.panel-btn.warning { background: rgba(255,193,7,.12); color: #fbbf24; border: 1px solid rgba(255,193,7,.3); height: 34px; }
.icon-btn {
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 14px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.icon-btn:hover { background: rgba(184,79,214,.2); }
.icon-btn.danger:hover { background: rgba(255,95,86,.2); }
.af-input, .af-form input, .af-form select {
    width: 100%; height: 40px; padding: 0 12px; font-size: 14px; color: #fff; outline: none;
    background: rgba(0,0,0,.25); border: 1px solid rgba(184,79,214,.3); border-radius: 10px;
}
.af-input:focus, .af-form input:focus, .af-form select:focus { border-color: #b84fd6; box-shadow: 0 0 0 3px rgba(184,79,214,.15); }
.af-form select option { background: #1a0b2e; }

/* ===== плашки ===== */
.acc-badge {
    --acc: #b84fd6;
    display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
    background: color-mix(in srgb, var(--acc) 18%, transparent);
    color: color-mix(in srgb, var(--acc) 65%, white);
    border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent);
}
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st-ok   { background: rgba(74,222,128,.15); color: #4ade80; }
.st-wait { background: rgba(250,204,21,.15); color: #facc15; }
.st-bad  { background: rgba(255,95,86,.15);  color: #ff8a80; }
.st-acc  { background: rgba(184,79,214,.2);  color: #e3b5f5; font-size: 13px; }

/* ===== карточки аккаунтов ===== */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.acc-card {
    --acc: #b84fd6;
    display: flex; flex-direction: column; gap: 10px; padding: 16px;
    background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.06);
    border-left: 4px solid var(--acc); border-radius: 14px;
}
.acc-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acc-card code { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.6); }
.acc-card-sub { font-size: 12px; color: rgba(255,255,255,.5); }
.acc-card-bal { display: flex; gap: 16px; font-size: 12px; color: rgba(255,255,255,.55); }
.acc-card-bal b { display: block; font-size: 15px; color: #fff; }
.acc-card-form { display: grid; grid-template-columns: 1fr 42px auto; gap: 8px; align-items: center; }
.acc-card-form input[type=color] { width: 42px; height: 40px; border: none; border-radius: 10px; background: none; cursor: pointer; padding: 0; }
.acc-card-upd { font-size: 11px; color: rgba(255,255,255,.35); }

/* ===== форма ставок ===== */
.af-form { display: grid; grid-template-columns: 1.2fr 2fr 1fr 1fr .8fr auto; gap: 10px; margin-bottom: 18px; }

/* ===== таблицы ===== */
.af-table { display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; overflow: hidden; }
.af-row {
    display: grid; gap: 14px; align-items: center; padding: 12px 16px; font-size: 14px;
    border-top: 1px solid rgba(255,255,255,.05);
}
.af-row:first-child { border-top: none; }
.af-row:not(.af-header):hover { background: rgba(184,79,214,.05); }
.af-header { background: rgba(184,79,214,.1); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: rgba(255,255,255,.55); }
.af-row small { display: block; font-size: 12px; color: rgba(255,255,255,.5); margin-top: 2px; word-break: break-word; }
.af-rates .af-row { grid-template-columns: 1.2fr 2fr 1fr .8fr 80px; }
.af-wds .af-row   { grid-template-columns: .8fr 1.1fr .8fr 2fr auto; }
.af-fin .af-row   { grid-template-columns: 1.1fr 1.2fr .8fr 1.4fr 1fr; }
.af-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.af-copy { cursor: pointer; } .af-copy:hover { color: #d59bf0; } .af-copy.copied { color: #4ade80; }
.af-empty { padding: 22px; text-align: center; color: rgba(255,255,255,.45); font-size: 14px; }
.af-tabs { display: flex; gap: 4px; padding: 4px; background: rgba(0,0,0,.25); border-radius: 10px; }
.af-tabs button { padding: 7px 14px; border-radius: 8px; border: none; background: none; color: rgba(255,255,255,.7); cursor: pointer; font-weight: 600; }
.af-tabs button.active { background: linear-gradient(135deg, #b84fd6, #8b2fd1); color: #fff; }

@media (max-width: 1000px) {
    .af-form { grid-template-columns: 1fr 1fr; }
    .af-row, .af-rates .af-row, .af-wds .af-row, .af-fin .af-row { grid-template-columns: 1fr; gap: 4px; }
    .af-header { display: none; }
}
.acc-card-bal b.frz { color: #facc15; }

/* =====================================================================
   Контент: рассылки, баннер, техобслуживание, общие настройки
   ===================================================================== */
.cx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cx-card {
    display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 18px;
    background: linear-gradient(160deg, rgba(184,79,214,.08), rgba(255,255,255,.02) 40%);
    border: 1px solid rgba(184,79,214,.2);
}
.cx-wide { grid-column: 1 / -1; }
.cx-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cx-card-head h3 { font-size: 17px; margin-bottom: 4px; }
.cx-card-head p { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.5; }
.cx-form { display: flex; flex-direction: column; gap: 14px; }
.cx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cx-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .4px; }
.cx-label small { text-transform: none; font-weight: 400; opacity: .7; }
.cx-hint { font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.45; }
.cx-form input:not([type=checkbox]):not([type=radio]), .cx-form select, .cx-form textarea, .ex-form input, .ex-form select {
    width: 100%; padding: 11px 13px; font: inherit; font-size: 14px; color: #fff; outline: none;
    background: rgba(0,0,0,.28); border: 1px solid rgba(184,79,214,.3); border-radius: 10px; transition: .2s;
}
.cx-form textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.cx-form input:focus, .cx-form select:focus, .cx-form textarea:focus, .ex-form input:focus { border-color: #b84fd6; box-shadow: 0 0 0 3px rgba(184,79,214,.15); }
.cx-form select option, .ex-form select option { background: #1a0b2e; }
.cx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cx-chip span {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
    font-size: 13px; font-weight: 600; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); transition: .15s;
}
.cx-chip input:checked + span { background: rgba(184,79,214,.25); border-color: #b84fd6; }
.cx-chip input:focus-visible + span { outline: 2px solid #d59bf0; }
.cx-swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.cx-swatch--info { background: #b84fd6; } .cx-swatch--promo { background: linear-gradient(90deg, #db2777, #6366f1); }
.cx-swatch--success { background: #22c55e; } .cx-swatch--warning { background: #f59e0b; }
.cx-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cx-actions a.panel-btn { display: inline-flex; align-items: center; text-decoration: none; }
.cx-preview-wrap { display: flex; flex-direction: column; gap: 6px; }
.cx-notif {
    display: flex; gap: 14px; padding: 16px; border-radius: 12px;
    background: rgba(255,255,255,.03); border: 1px solid rgba(184,79,214,.35);
}
.cx-notif-ico { width: 44px; height: 44px; border-radius: 10px; background: rgba(184,79,214,.12); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.cx-notif b { font-size: 15px; } .cx-notif p { font-size: 13px; color: rgba(255,255,255,.65); margin: 4px 0; word-break: break-word; }
.cx-notif small { font-size: 11px; color: rgba(255,255,255,.4); }
.cx-sub { font-size: 14px; color: rgba(255,255,255,.6); margin-top: 4px; }
.cx-history { display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; overflow: hidden; }
.cx-hrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.05); }
.cx-hrow:first-child { border-top: none; }
.cx-hico { font-size: 20px; }
.cx-hbody { min-width: 0; } .cx-hbody b { display: block; font-size: 14px; }
.cx-hbody small { display: block; font-size: 12px; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-hmeta { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: rgba(255,255,255,.6); }
.cx-hmeta small { color: rgba(255,255,255,.35); }
.cx-switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(0,0,0,.2); font-size: 14px; }
.cx-alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; background: rgba(245,158,11,.12); color: #fbbf24; border: 1px solid rgba(245,158,11,.35); }
.cx-banner-preview .site-banner {
    padding: 10px 16px; border-radius: 10px; text-align: center; font-size: 14px; font-weight: 600; color: #fff;
    background: linear-gradient(90deg, #8b2fd1, #b84fd6); transition: opacity .2s;
}
.cx-banner-preview .site-banner--success { background: linear-gradient(90deg, #15803d, #22c55e); }
.cx-banner-preview .site-banner--warning { background: linear-gradient(90deg, #b45309, #f59e0b); color: #1a1205; }
.cx-banner-preview .site-banner--promo { background: linear-gradient(90deg, #db2777, #a855f7, #6366f1); }
.cx-banner-preview .site-banner.is-off { opacity: .35; }
.cx-banner-preview .cx-hint { display: block; margin-top: 6px; }
.panel-btn:not(.primary):not(.success):not(.warning) { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); }

/* =====================================================================
   Пруфы
   ===================================================================== */
.ex-form { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; margin-bottom: 14px; }
.ex-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; font-size: 13px;
    background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.3);
}
.ex-chip small { color: rgba(255,255,255,.45); }
.ex-chip button { width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer; background: rgba(255,255,255,.08); color: #fff; }
.ex-chip button:hover { background: rgba(255,95,86,.4); }
.proofs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.proof-card {
    display: grid; grid-template-columns: 96px 1fr; grid-template-areas: "thumb body" "actions actions"; gap: 12px 14px;
    padding: 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(184,79,214,.2);
}
.proof-thumb {
    grid-area: thumb; height: 96px; border-radius: 10px; border: none; cursor: pointer; color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    background: radial-gradient(circle at 30% 30%, rgba(184,79,214,.45), rgba(60,20,90,.6));
}
.proof-thumb.is-image { background: radial-gradient(circle at 30% 30%, rgba(96,165,250,.45), rgba(20,40,90,.6)); }
.proof-thumb span { font-size: 28px; }
.proof-thumb small { font-size: 10px; opacity: .75; text-transform: uppercase; }
.proof-body { grid-area: body; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.proof-title { font-weight: 700; font-size: 14px; line-height: 1.35; }
.proof-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: rgba(255,255,255,.55); }
.proof-meta code { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.06); }
.proof-actions { grid-area: actions; display: flex; gap: 8px; }
.proof-actions .panel-btn { flex: 1; height: 36px; }
.viewer-box { max-width: 900px; }
.viewer-media { border-radius: 12px; overflow: hidden; background: #000; display: flex; justify-content: center; margin-bottom: 14px; }
.viewer-media video, .viewer-media img { max-width: 100%; max-height: 65vh; display: block; }
.viewer-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 14px; }
.viewer-meta code { font-size: 12px; }
.acc-card-bal { flex-wrap: wrap; }

/* =====================================================================
   Адаптивность админки
   ===================================================================== */
.burger-btn {
    display: none; position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; z-index: 1001;
    padding: 8px 12px; border: none; border-radius: 10px; font-size: 22px; color: #fff; cursor: pointer;
    background: linear-gradient(135deg, #b84fd6, #8b2fd1); box-shadow: 0 4px 15px rgba(184,79,214,.4);
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 999; }
.sidebar-overlay.active { display: block; }
.table-container { -webkit-overflow-scrolling: touch; }

@media (max-width: 1100px) {
    .cx-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar { width: 220px; padding: 20px 14px; }
    .main-content { margin-left: 220px; padding: 28px 24px; }
    .section-header { flex-wrap: wrap; gap: 12px; }
    .users-controls { flex-wrap: wrap; }
    .search-input { min-width: 0; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .data-table { min-width: 680px; }
}
@media (max-width: 768px) {
    .burger-btn { display: block; }
    .sidebar { position: fixed; left: -280px; top: 0; width: 260px; height: 100vh; z-index: 1000; transition: left .3s; }
    .sidebar.open { left: 0; }
    .main-content { margin-left: 0; padding: calc(68px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom)); }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .section-header h1 { font-size: 22px; }
    .users-controls { flex-direction: column; align-items: stretch; width: 100%; }
    .search-input, .filter-select { width: 100%; min-width: 0; font-size: 16px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 20px; word-break: break-word; }
    .settings-grid { grid-template-columns: 1fr; }
    .panel-section { padding: 16px; }
    .cx-card { padding: 16px; }
    .cx-row { grid-template-columns: 1fr; }
    .cx-form input:not([type=checkbox]):not([type=radio]), .cx-form select, .cx-form textarea, .ex-form input, .ex-form select { font-size: 16px; }
    .cx-hrow { grid-template-columns: auto 1fr auto; }
    .cx-hmeta { grid-column: 2; align-items: flex-start; }
    .cx-actions .panel-btn { flex: 1; }
    .ex-form { grid-template-columns: 1fr; }
    .proofs-list { grid-template-columns: 1fr; }
    .acc-grid { grid-template-columns: 1fr; }
    .af-form { grid-template-columns: 1fr; }
    .period-selector { width: 100%; }
    .period-btn { flex: 1; }
    .data-table { min-width: 720px; }
    .modal-overlay { align-items: flex-end; }
    .modal-box { width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
    .modal-tabs { overflow-x: auto; scrollbar-width: none; }
    .modal-tab { flex: 0 0 auto; white-space: nowrap; }
    .balance-edit { flex-wrap: wrap; }
    .toast { left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); }
}
@media (max-width: 380px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* flex-элемент не должен растягиваться под содержимое (длинные ленты вкладок) */
.main-content { min-width: 0; }
.logo { white-space: nowrap; }
.section-header { flex-wrap: wrap; gap: 12px; }
.section-header h1 { white-space: nowrap; }

[hidden] { display: none !important; }

/* =====================================================================
   Витрина (shop.akso.online)
   ===================================================================== */
.st-open { font-size: 14px; font-weight: 600; color: #d59bf0; text-decoration: none; margin-left: 10px; vertical-align: middle; }
.st-open:hover { text-decoration: underline; }
#section-store .panel-section { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.st-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.st-cat { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.st-cat.off { opacity: .5; }
.st-cat small { color: rgba(255,255,255,.45); font-weight: 700; }
.st-cat-ico { font-size: 16px; }
.st-cat-tools { display: inline-flex; gap: 2px; }
.st-cat-tools button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; color: rgba(255,255,255,.6); cursor: pointer; font-size: 14px; }
.st-cat-tools button:hover:not(:disabled) { background: rgba(255,255,255,.08); color: #fff; }
.st-cat-tools button:disabled { opacity: .25; cursor: default; }
.st-cat-form { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; max-width: 520px; }
.st-list { display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; overflow: hidden; }
.st-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 100px 48px auto; gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.05); }
.st-row:first-child { border-top: 0; }
.st-row.off .st-thumb, .st-row.off .st-main { opacity: .45; }
.st-thumb { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; font-size: 26px; background: rgba(184,79,214,.1); }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-main { min-width: 0; }
.st-main b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-main small { color: rgba(255,255,255,.5); font-size: 12px; }
.st-price { font-weight: 700; white-space: nowrap; text-align: right; }
.st-price s { display: block; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.4); }
.pill.st-ok { background: rgba(94,234,212,.12); color: #5eead4; }
.pill.st-bad { background: rgba(248,113,113,.14); color: #fca5a5; }
.pill.st-man { background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); }
.pill.st-hit { background: rgba(184,79,214,.25); color: #e9c6f7; font-size: 11px; vertical-align: middle; }
.st-tools { display: flex; gap: 6px; justify-content: flex-end; }
.st-tools .panel-btn { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.st-toggle { position: relative; width: 42px; height: 24px; display: inline-block; cursor: pointer; }
.st-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.st-toggle span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.12); transition: .2s; pointer-events: none; }
.st-toggle span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.st-toggle input:checked + span { background: #b84fd6; }
.st-toggle input:checked + span::after { transform: translateX(18px); }
.st-toggle input:focus-visible + span { outline: 2px solid #d59bf0; outline-offset: 2px; }
.modal-box.st-wide { max-width: 640px; }
.st-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.st-modal-head h3 { font-size: 19px; }
.st-img-row { display: flex; gap: 14px; align-items: flex-start; }
.st-img { width: 96px; height: 96px; flex: none; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font-size: 32px; background: rgba(0,0,0,.3); border: 1px dashed rgba(184,79,214,.4); }
.st-img img { width: 100%; height: 100%; object-fit: cover; }
.st-img-row input[type=file] { font-size: 13px; color: rgba(255,255,255,.7); }
.st-stock-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.st-stock-head small { color: rgba(255,255,255,.5); }
.st-keys { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.st-key { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.25); }
.st-key code { flex: 1; min-width: 0; font-size: 13px; color: #5eead4; word-break: break-all; }
.st-key.sold code { color: rgba(255,255,255,.4); text-decoration: line-through; }
.st-key small { font-size: 11px; color: rgba(255,255,255,.4); white-space: nowrap; }
.st-key button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: rgba(255,255,255,.5); cursor: pointer; }
.st-key button:hover { background: rgba(248,113,113,.15); color: #fca5a5; }
@media (max-width: 1024px) {
    .st-row { grid-template-columns: 48px minmax(0, 1fr) auto 48px; }
    .st-row > div:nth-child(4) { display: none; }
    .st-tools { grid-column: 2 / -1; justify-content: flex-start; }
    .st-thumb { width: 48px; height: 48px; }
}
@media (max-width: 768px) {
    .st-cat-form { grid-template-columns: 64px 1fr; }
    .st-cat-form button { grid-column: 1 / -1; }
    .st-row { grid-template-columns: 44px minmax(0, 1fr) 48px; gap: 10px; }
    .st-price { grid-column: 2; text-align: left; }
    .st-tools .panel-btn { flex: 1; justify-content: center; }
    .st-img-row { flex-direction: column; }
}

/* =====================================================================
   V-Bucks бот
   ===================================================================== */
.vb-status { font-size: 13px; font-weight: 700; margin-left: 10px; vertical-align: middle; }
.vb-status.on { color: #4ade80; } .vb-status.off { color: #f87171; }
.vb-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.vb-switch input { position: absolute; opacity: 0; }
.vb-switch span { position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.15); transition: .2s; }
.vb-switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.vb-switch input:checked + span { background: #22c55e; }
.vb-switch input:checked + span::after { transform: translateX(18px); }
.vb-switch input:focus-visible + span { outline: 2px solid #d59bf0; outline-offset: 2px; }
#section-vbucks .vb-card { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.vb-head-tools { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.vb-links { display: flex; flex-direction: column; gap: 8px; }
.vb-links:empty { display: none; }
.vb-link { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px dashed rgba(184,79,214,.4); }
.vb-link-done { border-style: solid; border-color: rgba(74,222,128,.35); }
.vb-link-expired, .vb-link-error { border-color: rgba(248,113,113,.35); }
.vb-link-n { font-size: 12px; color: rgba(255,255,255,.45); }
.vb-link .panel-btn { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.vb-codebox { margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(184,79,214,.3); font-size: 13px; color: rgba(255,255,255,.75); }
.vb-codebox ol { margin: 0 0 10px; padding-left: 18px; line-height: 1.6; }
.vb-codebox a { color: #d68cf0; }
.vb-code-row { display: flex; gap: 8px; flex-wrap: wrap; }
.vb-code-row input { flex: 1 1 260px; min-width: 0; }
.vb-code { font-size: 15px; font-weight: 700; letter-spacing: 2px; padding: 4px 10px; border-radius: 8px; background: rgba(184,79,214,.18); }
.vb-wait { font-size: 13px; color: rgba(255,255,255,.55); }
.vb-ok { color: #4ade80; font-weight: 600; font-size: 14px; }
.vb-errt { color: #fca5a5; font-size: 13px; }
.vb-x { margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: rgba(255,255,255,.5); cursor: pointer; }
.vb-search { max-width: 320px; }
.vb-table { display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; overflow: hidden; }
.vb-tr { display: grid; grid-template-columns: minmax(0, 2.2fr) 90px 100px 100px 110px 110px auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.05); font-size: 14px; }
.vb-jobs .vb-tr { grid-template-columns: minmax(0, 1.6fr) 100px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 120px auto; }
.vb-tr:first-child { border-top: 0; }
.vb-th { font-size: 12px; color: rgba(255,255,255,.5); font-weight: 600; background: rgba(255,255,255,.02); }
.vb-tr.off { opacity: .55; }
.vb-tr.paused { background: rgba(251,191,36,.05); }
.vb-tr > span { min-width: 0; }
.vb-tr b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-tr small { color: rgba(255,255,255,.45); font-size: 12px; }
.vb-free { color: #5eead4; display: inline !important; }
.vb-err { display: block; color: #fca5a5 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-pill { display: inline-block; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 11px !important; font-weight: 700; background: rgba(255,255,255,.08); color: rgba(255,255,255,.7) !important; }
.vb-pill.active { background: rgba(74,222,128,.14); color: #4ade80 !important; }
.vb-pill.invalid { background: rgba(248,113,113,.16); color: #fca5a5 !important; }
.vb-pill.st { background: rgba(184,79,214,.18); color: #e9c6f7 !important; }
.vb-tools { display: flex; gap: 6px; justify-content: flex-end; }
.vb-tools .panel-btn { height: 32px; padding: 0 12px; font-size: 13px; }
.vb-lot-form { display: grid; grid-template-columns: minmax(0, 1fr) 140px 140px auto; gap: 8px; }
.vb-grid { margin-top: 0; }
.vb-sub { font-size: 15px; margin-top: 6px; }
.vb-gift-log { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.vb-glog { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.2); font-size: 13px; }
.vb-glog small { color: rgba(255,255,255,.45); font-size: 11px; }
.vb-glog.bad { background: rgba(248,113,113,.08); }
@media (max-width: 1100px) {
    .vb-th { display: none; }
    .vb-tr, .vb-jobs .vb-tr { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 12px 14px; }
    .vb-tr > span:first-child, .vb-tools { grid-column: 1 / -1; }
    .vb-tr > span[data-l]::before { content: attr(data-l) ': '; color: rgba(255,255,255,.45); font-size: 12px; }
    .vb-tools { justify-content: flex-start; }
    .vb-lot-form { grid-template-columns: 1fr 1fr; }
    .vb-lot-form input[name=pattern], .vb-lot-form button { grid-column: 1 / -1; }
}
.vb-tr { grid-template-columns: minmax(0, 2.2fr) 90px 100px 100px 110px 110px 260px; }
.vb-jobs .vb-tr { grid-template-columns: minmax(0, 1.6fr) 100px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 120px 190px; }
@media (max-width: 1100px) {
    .vb-tr, .vb-jobs .vb-tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    #section-vbucks .cx-card-head { flex-direction: column; align-items: stretch; }
    .vb-head-tools { width: 100%; }
    .vb-head-tools .panel-btn { flex: 1; }
    #section-vbucks .section-header { align-items: flex-start; }
    .vb-search { max-width: none; }
    .vb-link { gap: 8px; }
}

/* ---------- Плагины / AKSO ERP ---------- */
.pl-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.pl-tabs button { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: none; color: rgba(255,255,255,.6); cursor: pointer; font-weight: 600; }
.pl-tabs button[aria-selected="true"] { background: rgba(184,79,214,.18); border-color: rgba(184,79,214,.5); color: #fff; }
.pl-h2 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 10px; }
.pl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.pl-row:last-child { border-bottom: 0; }
.pl-row form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pl-row input, .pl-row textarea, .pl-row select { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; color: #fff; padding: 8px 10px; font: inherit; font-size: 14px; }
.pl-row input[type=number] { width: 110px; }
.pl-row textarea { width: 100%; min-height: 64px; resize: vertical; }
.pl-meta { font-size: 13px; color: rgba(255,255,255,.5); }
.pl-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.08); margin-right: 4px; }
.pl-chip.ok { background: rgba(74,222,128,.14); color: #4ade80; }
.pl-chip.bad { background: rgba(248,113,113,.14); color: #f87171; }
.pl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
@media (max-width: 768px) {
    .pl-row { grid-template-columns: 1fr; }
    .pl-grid { grid-template-columns: 1fr; }
}

/* сезонное оформление */
.cx-season { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: stretch; }
.cx-season-opts { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cx-season-prev { position: relative; min-height: 190px; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.08);
    background: radial-gradient(120% 70% at 50% -10%, rgba(184,79,214,.18), #120a20 70%); }
.cx-season-prev[data-season="winter"] { background: radial-gradient(120% 70% at 50% -10%, rgba(147,197,253,.28), #0e1222 70%); }
.cx-season-prev[data-season="spring"] { background: radial-gradient(120% 70% at 50% -10%, rgba(244,114,182,.25), #1a0d1c 70%); }
.cx-season-prev[data-season="summer"] { background: radial-gradient(120% 70% at 50% -10%, rgba(253,224,71,.2), #17110a 70%); }
.cx-season-prev[data-season="autumn"] { background: radial-gradient(120% 70% at 50% -10%, rgba(251,146,60,.26), #1a0f0a 70%); }
.cx-season-prev canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cx-season-prev span { position: absolute; left: 12px; bottom: 10px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85); }
@media (max-width: 900px) { .cx-season { grid-template-columns: 1fr; } }

/* промокоды */
.pr-code { display: flex; gap: 8px; }
.pr-code input { flex: 1; min-width: 0; }
.pr-code select { width: 70px; }
#prForm input[name=code] { text-transform: uppercase; letter-spacing: .5px; }
.pr-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.pr-box[hidden] { display: none; }
.pr-box .cx-chips .panel-btn { height: 32px; padding: 0 12px; font-size: 13px; }
.pr-preview { padding: 12px 14px; border-radius: 12px; background: rgba(184,79,214,.1); border: 1px dashed rgba(184,79,214,.4); font-size: 14px; }
.pr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.05); }
.pr-row:first-child { border-top: 0; }
.pr-row.off { opacity: .5; }
.pr-main { min-width: 0; }
.pr-main b { font-family: ui-monospace, Menlo, monospace; font-size: 15px; }
.pr-kind { font-size: 12px; color: rgba(255,255,255,.6); margin-left: 6px; }
.pr-main small { display: block; font-size: 12px; color: rgba(255,255,255,.5); margin-top: 3px; }
.pr-stat { text-align: center; font-weight: 700; }
.pr-stat small { display: block; font-size: 11px; font-weight: 400; color: rgba(255,255,255,.45); }
@media (max-width: 760px) { .pr-row { grid-template-columns: 1fr auto; } .pr-row .af-actions { grid-column: 1 / -1; } }

/* прокручиваемые таблицы */
.af-scroll { max-height: 520px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.af-scroll .af-header { position: sticky; top: 0; z-index: 1; background: #1c1030; }
.af-row.af-click { cursor: pointer; }
.af-row.af-click:hover { background: rgba(184,79,214,.08); }
/* журнал событий */
.lg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lg-tabs button { padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: rgba(255,255,255,.75); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.lg-tabs button.active { background: rgba(184,79,214,.25); border-color: #b84fd6; color: #fff; }
.lg-list { display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; max-height: 70vh; }
.lg-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid rgba(255,255,255,.05); }
.lg-row:first-child { border-top: 0; }
.lg-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); }
.lg-main { min-width: 0; display: flex; flex-direction: column; }
.lg-main b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.lg-main small, .lg-side small { font-size: 12px; color: rgba(255,255,255,.45); }
.lg-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lg-side .panel-btn { height: 28px; padding: 0 10px; font-size: 12px; }
.lg-side b.pos, .ub-side b.pos { color: #4ade80; } .lg-side b.neg, .ub-side b.neg { color: #f87171; }
.lg-more { display: flex; justify-content: center; margin-top: 12px; }
/* история баланса пользователя */
.ub-hist { display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; max-height: 420px; overflow-y: auto; }
.ub-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.05); }
.ub-row:first-child { border-top: 0; }
.ub-main { min-width: 0; display: flex; flex-direction: column; }
.ub-main small, .ub-side small { font-size: 12px; color: rgba(255,255,255,.45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-side { display: flex; flex-direction: column; align-items: flex-end; }
.ub-row .panel-btn { height: 30px; padding: 0 10px; font-size: 12px; }
.ub-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; font-size: 12px; color: rgba(255,255,255,.55); }
.ub-pager .panel-btn { height: 30px; padding: 0 12px; font-size: 12px; }
.ub-pager .panel-btn:disabled { opacity: .35; }
/* чат сделки */
.dc-overlay { z-index: 2100; }
.dc-box { max-width: 720px; width: calc(100% - 24px); max-height: 92vh; display: flex; flex-direction: column; }
.dc-info { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; font-size: 13px; color: rgba(255,255,255,.75); border-bottom: 1px solid rgba(255,255,255,.08); }
.dc-info b { color: #fff; }
.dc-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.dc-links .panel-btn { height: 32px; display: inline-flex; align-items: center; text-decoration: none; font-size: 13px; }
.dc-feed { flex: 1; min-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 2px; }
.dc-msg { max-width: 80%; padding: 8px 12px; border-radius: 12px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(255,255,255,.06); align-self: flex-start; }
.dc-msg.own { align-self: flex-end; background: rgba(184,79,214,.25); }
.dc-msg.sys { align-self: center; max-width: 92%; background: rgba(250,204,21,.08); color: #fde68a; font-size: 12px; text-align: center; }
.dc-msg time { display: block; font-size: 11px; color: rgba(255,255,255,.4); margin-top: 3px; }
.dc-msg a { color: #d59bf0; }
.pill.st-ok { background: rgba(74,222,128,.15); color: #4ade80; } .pill.st-bad { background: rgba(248,113,113,.15); color: #f87171; }
@media (max-width: 640px) { .lg-row { grid-template-columns: 30px 1fr; } .lg-side { grid-column: 2; align-items: flex-start; } .ub-row { grid-template-columns: 1fr auto; } .ub-row .panel-btn { grid-column: 1 / -1; justify-self: start; } }
