/* StarVell — Dark Soft UI (Neumorphism) */

:root {
    --bg: #1a1d29;
    --bg-sidebar: #1f232d;
    --bg-card: #23262f;
    --bg-input: #2c3039;
    --border: rgba(255,255,255,0.06);
    --text: #e8eaed;
    --text-muted: #9ca3af;
    --accent: #6366f1;
    --accent-bg: rgba(99, 102, 241, 0.15);
    --green: #22c55e;
    /* Soft UI — raised (двойные тени: тёмная + светлая) */
    --shadow-soft: 8px 8px 16px rgba(0,0,0,0.4), -8px -8px 16px rgba(45,50,60,0.12);
    --shadow-soft-hover: 10px 10px 20px rgba(0,0,0,0.45), -10px -10px 20px rgba(45,50,60,0.15);
    /* Soft UI — inset (вдавленные поля) */
    --shadow-inset: inset 4px 4px 8px rgba(0,0,0,0.35), inset -4px -4px 8px rgba(45,50,60,0.08);
    --shadow-inset-focus: inset 2px 2px 6px rgba(0,0,0,0.4), inset -2px -2px 6px rgba(45,50,60,0.1);
    --radius: 14px;
    --radius-sm: 10px;
    --transition: 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}

/* Минималистичные скроллбары */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25);
}

*::-webkit-scrollbar-thumb:active {
    background: rgba(255,255,255,0.3);
}

*::-webkit-scrollbar-button {
    display: none;
}

.hidden { display: none !important; }

/* ========== Login ========== */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-form {
    width: 100%;
    max-width: 340px;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form:hover {
    box-shadow: var(--shadow-soft-hover);
}

.login-form input {
    padding: 0.85rem 1.1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    box-shadow: var(--shadow-inset);
    transition: var(--transition);
}

.login-form input::placeholder {
    color: var(--text-muted);
}

.login-form input:focus {
    outline: none;
    box-shadow: var(--shadow-inset-focus);
    border-color: rgba(99, 102, 241, 0.35);
}

.btn-login {
    padding: 0.85rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -3px -3px 8px rgba(99, 102, 241, 0.15);
    transition: var(--transition);
}

.btn-login:hover {
    box-shadow: 6px 6px 14px rgba(0,0,0,0.4), -4px -4px 10px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.error-msg {
    color: #ef4444;
    font-size: 13px;
    min-height: 18px;
}

/* ========== Layout ========== */
#dashboard-screen {
    display: flex;
    min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
    width: 220px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 14px rgba(0,0,0,0.25), -2px 0 8px rgba(45,50,60,0.1);
}

.sidebar-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 15px;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255,255,255,0.04);
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.2);
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.5rem 0.75rem;
    border-radius: 1px;
}

.nav-item.active {
    color: var(--text);
    background: var(--accent-bg);
    box-shadow: rgba(99, 102, 241, 0.2) 0 0 0 1px, inset 2px 2px 4px rgba(0,0,0,0.15);
}

.nav-icon {
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-parent {
    margin-bottom: 8px;
}

.nav-item-parent {
    flex: 1;
}

.nav-item-parent .nav-icon {
    flex-shrink: 0;
}

.nav-chevron {
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.7;
    transition: transform var(--transition);
}

.nav-parent.expanded .nav-chevron {
    transform: rotate(90deg);
}

.nav-sub {
    padding-left: 2.25rem;
    margin-top: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
}

.nav-parent.expanded .nav-sub {
    max-height: 180px;
}

.nav-sub-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 4px;
    font-size: 13px;
}

.nav-sub-item:last-child {
    margin-bottom: 8px;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.user-name {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

.btn-logout:hover {
    color: var(--text);
}

/* ========== Main ========== */
.main {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow: auto;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

/* ========== Toolbar ========== */
.toolbar {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- Base Soft UI Button ---- */
.btn {
    padding: 0.55rem 1rem;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(45,50,60,0.1);
    transition: var(--transition);
    white-space: nowrap;
}

.btn:hover {
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -4px -4px 10px rgba(45,50,60,0.12);
    transform: translateY(-1px);
}

.btn:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-refresh {
    padding: 0.55rem 1rem;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(45,50,60,0.1);
    transition: var(--transition);
}

.btn-refresh:hover {
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -4px -4px 10px rgba(45,50,60,0.12);
    transform: translateY(-1px);
}

.btn-refresh:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

.search {
    width: 100%;
    max-width: 420px;
    padding: 0.75rem 1.1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-inset);
    transition: var(--transition);
}

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

.search:focus {
    outline: none;
    box-shadow: var(--shadow-inset-focus);
    border-color: rgba(99, 102, 241, 0.3);
}

.filters {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-label {
    color: var(--text-muted);
    font-size: 13px;
}

.filter-btns {
    display: flex;
    gap: 0.25rem;
}

.filter-btn {
    padding: 0.5rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.2), -2px -2px 6px rgba(45,50,60,0.08);
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text);
    box-shadow: 5px 5px 10px rgba(0,0,0,0.25), -3px -3px 8px rgba(45,50,60,0.1);
}

.filter-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 5px 5px 10px rgba(0,0,0,0.25), -3px -3px 8px rgba(99, 102, 241, 0.1);
}

.filter-status {
    margin-left: auto;
}

.category-filters {
    margin-bottom: 1rem;
}

.category-bulk-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.bulk-select-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bulk-check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.bulk-selected-count {
    font-size: 13px;
    color: var(--accent);
}

.bulk-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.bulk-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-group-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-right: 0.25rem;
}

.bulk-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

.btn-bulk {
    font-size: 13px;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-bulk.btn-active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.btn-bulk.btn-active:hover {
    background: rgba(34, 197, 94, 0.25);
}

.btn-bulk.btn-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-bulk.btn-inactive:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-bulk:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom checkbox */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-checkbox .checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    transition: var(--transition);
}

.custom-checkbox input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.custom-checkbox input:checked + .checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 3px;
}

.custom-checkbox input:indeterminate + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.custom-checkbox input:indeterminate + .checkmark::after {
    content: '';
    width: 10px;
    height: 2px;
    background: white;
}

.custom-checkbox .check-label {
    margin-left: 0;
}

.lot-check-wrap {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding-right: 0.75rem;
    flex-shrink: 0;
}

.lot-check-wrap .checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.category-lot-card {
    display: flex;
    align-items: flex-start;
}

.category-lot-card.selected {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: var(--shadow-soft), 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.category-bulk-progress {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.filter-select {
    padding: 0.5rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--shadow-inset);
    transition: var(--transition);
}

.filter-select:hover {
    box-shadow: var(--shadow-inset-focus);
}

/* ========== Lots ========== */
.lots-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lot-card {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.lot-card:hover {
    box-shadow: var(--shadow-soft-hover);
}

.lot-card-clickable {
    cursor: pointer;
}

.lot-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.35rem;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3), -1px -1px 2px rgba(34, 197, 94, 0.2);
}

.lot-status.active {
    background: var(--green);
}

.lot-status.inactive {
    background: #ef4444;
}

.lot-body {
    flex: 1;
    min-width: 0;
}

.lot-category {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.lot-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.lot-title:empty {
    display: none;
}

.lot-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.lot-features {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.lot-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.activation-failure-reason {
    font-size: 13px;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.lot-details {
    list-style: none;
    font-size: 12px;
    color: var(--text-muted);
}

.lot-details li::before {
    content: "◆ ";
    color: var(--text-muted);
    opacity: 0.6;
    margin-right: 0.25rem;
}

.lots-loading, .lots-error {
    padding: 1rem;
    color: var(--text-muted);
}

.lots-error {
    color: #ef4444;
}

/* ========== Settings ========== */
.settings-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.settings-card-info {
    flex: 1;
}

.settings-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.settings-row {
    margin: 0 0 0.25rem 0;
    font-size: 14px;
}

.settings-row-muted {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 0.5rem;
}

.settings-row-muted code {
    background: var(--bg-input);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 11px;
}

.settings-cache {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}

.btn-refresh-now {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(45,50,60,0.1);
    transition: var(--transition);
}

.btn-refresh-now:hover {
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -4px -4px 10px rgba(45,50,60,0.12);
    transform: translateY(-1px);
}

.btn-refresh-now:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

.settings-card-desc {
    flex-wrap: wrap;
}

.settings-card-orders-test .orders-test-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

.settings-card-orders-test .orders-test-row .create-input {
    width: 100px;
}

.orders-test-result {
    margin-top: 0.75rem;
    font-size: 13px;
}

.orders-test-result.log-ok {
    color: var(--green);
}

.orders-test-result.log-error {
    color: #ef4444;
}

.settings-log {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-family: monospace;
}

.log-line {
    margin: 0.25rem 0;
    color: var(--text-muted);
}

.log-line.log-ok {
    color: var(--green);
}

.log-line.log-skip {
    color: var(--text-muted);
}

.log-line.log-error {
    color: #ef4444;
}

.settings-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 1.5rem;
}

.section-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 1rem;
}

/* ========== Statistics ========== */
.stat-placeholder,
.dumper-placeholder {
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    color: var(--text-muted);
    text-align: center;
}

.dumper-placeholder {
    margin-top: 1.5rem;
}

.dumper-placeholder p {
    margin-bottom: 0.5rem;
}

.dumper-stats {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
}

.dumper-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 24px;
    margin-bottom: 10px;
}

.dumper-stats-row span {
    font-size: 13px;
    color: var(--text-muted);
}

.dumper-stats-row strong {
    color: var(--text);
}

.dumper-risk {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
}

.dumper-risk-normal {
    background: rgba(99, 102, 241, 0.15);
    border-left: 4px solid var(--accent);
}

.dumper-risk-low {
    background: rgba(34, 197, 94, 0.15);
    border-left: 4px solid #22c55e;
}

.dumper-risk-medium {
    background: rgba(245, 158, 11, 0.15);
    border-left: 4px solid #f59e0b;
}

.dumper-risk-high {
    background: rgba(239, 68, 68, 0.15);
    border-left: 4px solid #ef4444;
}

.dumper-risk-critical {
    background: rgba(220, 38, 38, 0.2);
    border-left: 4px solid #dc2626;
}

.dumper-risk-text {
    font-weight: 600;
    display: block;
}

.dumper-risk-desc {
    font-size: 12px;
    opacity: 0.9;
}

.dumper-settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.dumper-settings-row .toggle-label {
    font-size: 13px;
    color: var(--text);
}

.dumper-settings-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.dumper-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dumper-card {
    position: relative;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: var(--transition);
}

.dumper-card-dot {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: dumper-dot-blink 1.5s ease-in-out infinite;
}

.dumper-dot-on {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.dumper-dot-off {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

/* ========== Auto-execution ========== */
.auto-execution-blocks {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auto-execution-block {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.auto-execution-block-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.auto-execution-block-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.auto-execution-rates {
    margin-top: 0.5rem;
    font-size: 13px;
    color: var(--text-muted);
}

.auto-execution-rates-label {
    font-weight: 500;
}

.auto-execution-lot-margin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 13px;
}
.auto-execution-lot-margin label { color: var(--text-muted); }
.auto-execution-lot-margin .lot-margin-input {
  width: 5rem;
  padding: 0.3rem 0.5rem;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
}

.auto-execution-rates-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 12px;
}

.auto-execution-card-rate,
.auto-execution-card-calc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.auto-execution-block-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.auto-execution-block-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 0;
}

.auto-execution-lots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.auto-execution-lot-card {
    min-width: 0;
}

.auto-execution-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.auto-execution-card-header .lot-category {
    flex: 1;
    min-width: 0;
}

.auto-execution-toggle {
    flex-shrink: 0;
}

.auto-execution-empty {
    color: var(--text-muted);
    font-size: 13px;
}

.auto-execution-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auto-execution-order-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.auto-execution-order-status {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.auto-execution-status-pending {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
}

.auto-execution-status-in_progress {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.auto-execution-status-completed {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green);
}

.auto-execution-status-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.auto-execution-order-info {
    flex: 1;
    min-width: 0;
}

.auto-execution-order-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.auto-execution-order-id {
    font-weight: 500;
}

.auto-execution-order-amount {
    font-weight: 600;
    color: var(--text);
}

.auto-execution-order-row-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 13px;
    color: var(--text-muted);
}

@keyframes dumper-dot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.dumper-card:hover {
    box-shadow: var(--shadow-soft-hover);
    transform: translateY(-2px);
}

.dumper-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dumper-card-title {
    font-weight: 600;
    color: var(--text);
}

.dumper-card-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.dumper-card-toggle {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    flex-shrink: 0;
}

.dumper-loading,
.dumper-empty {
    color: var(--text-muted);
    padding: 1rem;
}

.dumper-lots-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dumper-lot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.dumper-lot-row:hover {
    background: var(--bg-input);
}

.dumper-lot-toggle {
    flex-shrink: 0;
}

.dumper-lot-name {
    font-weight: 500;
    color: var(--text);
    flex: 1;
    cursor: pointer;
}

.pubgm-subid,
.pubgm-min-price {
    font-size: 13px;
    color: var(--text-muted);
}

.pubgm-mapping-badge {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 5rem;
}

.pubgm-subid {
    min-width: 5rem;
}

.pubgm-min-price-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 6rem;
}

.pubgm-min-label {
    font-size: 13px;
    color: var(--text-muted);
}

.pubgm-min-input {
    width: 52px;
    padding: 0.25rem 0.4rem;
    font-size: 13px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 4px);
    color: var(--text);
}

.pubgm-min-input:focus {
    outline: none;
    border-color: var(--accent);
}

.pubgm-min-currency,
.pubgm-min-value {
    font-size: 13px;
    color: var(--text);
}

.pubgm-min-price {
    min-width: 5rem;
}

.pubgm-main-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pubgm-add-game-id {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.pubgm-add-game-id .create-input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem;
}

.pubgm-game-ids-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pubgm-game-id-row-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pubgm-game-id-row-wrap .pubgm-game-btn {
    flex: 1;
}

.btn-pubgm-remove-game-id {
    padding: 0.4rem 0.6rem !important;
    font-size: 18px;
    line-height: 1;
    color: var(--text-muted);
}

.btn-pubgm-remove-game-id:hover {
    color: #ef4444;
}

.pubgm-game-btn {
    display: block;
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(45,50,60,0.1);
    transition: var(--transition);
}

.pubgm-game-btn:hover {
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -4px -4px 10px rgba(45,50,60,0.12), 0 0 0 1px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
    background: var(--bg-card);
}

.pubgm-game-btn:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

.pubgm-game-btn-priority {
    border: 2px solid var(--green);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(45,50,60,0.1), 0 0 0 1px var(--green);
}

.pubgm-game-btn-priority:hover {
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -4px -4px 10px rgba(45,50,60,0.12), 0 0 0 2px var(--green);
}

#pubgm-game-page-view .lot-detail-header {
    margin-bottom: 1rem;
}

.pubgm-game-page-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pubgm-game-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.pubgm-game-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.pubgm-main-updated {
    font-size: 13px;
    color: var(--text-muted);
}

.pubgm-primary-game {
    margin-top: 1rem;
}

.pubgm-game-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.pubgm-game-fields {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pubgm-primary-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.pubgm-primary-product-card {
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s;
}

.pubgm-primary-product-card:hover {
    border-color: var(--accent);
}

.pubgm-primary-product-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.pubgm-primary-product-price {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.pubgm-primary-product-status {
    font-size: 12px;
    color: var(--green);
    margin-top: 0.25rem;
}

.pubgm-primary-product-denomination {
    font-size: 12px;
    color: var(--accent);
    margin-top: 0.15rem;
}

.pubgm-excluded-wrap {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.pubgm-excluded-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
}

.pubgm-excluded-item {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pubgm-excluded-id {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.pubgm-excluded-restore {
    margin-left: auto;
}

.pubgm-lot-row-clickable {
    cursor: pointer;
}

.pubgm-lot-row-clickable:hover {
    background: rgba(255,255,255,0.03);
}

.pubgm-lot-detail-mapping {
    margin: 1.5rem 0;
}

.pubgm-mapping-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.pubgm-mapping-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.pubgm-mapping-row .create-input {
    flex: 1;
    min-width: 0;
}

.pubgm-mapping-status {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
}

.pubgm-mapping-error {
    color: #ef4444;
}

.pubgm-mapping-products {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.pubgm-mapping-product-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.pubgm-mapping-product-item:last-of-type {
    border-bottom: none;
}

.pubgm-mapping-product-name {
    color: var(--text);
}

.pubgm-mapping-product-price {
    color: var(--text-muted);
}

.pubgm-mapping-product-total {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 15px;
    color: var(--text);
}

.btn-pubgm-product-exclude {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.btn-pubgm-product-exclude:hover {
    background: rgba(239, 68, 68, 0.25);
}

.pubgm-product-modal {
    min-width: 420px;
    max-width: 520px;
    padding: 2rem 2.5rem;
}

.pubgm-product-modal .modal-title {
    margin-bottom: 1.5rem;
}

.pubgm-product-modal .form-row {
    margin-bottom: 1.25rem;
}

.pubgm-product-modal .form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.pubgm-product-modal .modal-actions {
    margin-top: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

#pubgm-primary-products-loading,
#pubgm-primary-empty {
    margin-top: 1rem;
}

#pubgm-lots-view .lot-detail-header {
    margin-bottom: 1rem;
}

#pubgm-detail-view {
    padding: 1.5rem 0;
}

#pubgm-detail-view .lot-detail-header {
    margin-bottom: 2rem;
}

.pubgm-detail-form {
    margin-bottom: 2rem;
}

.pubgm-detail-form .form-row {
    margin-bottom: 0.75rem;
}

.pubgm-detail-form .form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.pubgm-game-id-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.pubgm-game-id-row .create-input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem;
}

#pubgm-products-loading,
#pubgm-products-empty {
    margin-top: 1.5rem;
}

.pubgm-products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pubgm-product-card {
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pubgm-product-name {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.4;
}

.pubgm-product-id {
    font-size: 13px;
    color: var(--text-muted);
    font-family: monospace;
    line-height: 1.4;
}

.pubgm-product-fields {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.pubgm-product-game-id {
    font-size: 13px;
    color: var(--text-muted);
    font-family: monospace;
    line-height: 1.4;
}

.pubgm-product-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-pubgm-bind {
    align-self: flex-start;
}

.btn-pubgm-add-qty {
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    min-width: 2rem;
    border-radius: var(--radius-sm, 4px);
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
}

.btn-pubgm-add-qty:hover {
    opacity: 0.9;
}

.btn-pubgm-bind.pubgm-bind-done {
    background: var(--green);
    color: #fff;
    cursor: default;
}

.pubgm-bound-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.pubgm-bound-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.pubgm-bound-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pubgm-bound-card {
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.pubgm-bound-card.pubgm-bound-cheapest {
    border-color: var(--green);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.pubgm-bound-cheapest-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 11px;
    font-weight: 600;
    color: var(--green);
    background: rgba(34, 197, 94, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.pubgm-bound-primary-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(99, 102, 241, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.pubgm-bound-card.pubgm-bound-primary .pubgm-bound-cheapest-badge {
    right: auto;
    left: 0.5rem;
}

.pubgm-bound-card.pubgm-bound-primary .pubgm-bound-primary-badge {
    right: 0.5rem;
}

.btn-pubgm-set-primary {
    padding: 0.35rem 0.6rem;
    font-size: 12px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm, 4px);
    cursor: pointer;
}

.btn-pubgm-set-primary:hover {
    background: rgba(99, 102, 241, 0.3);
}

.pubgm-bound-card-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pubgm-bound-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pubgm-bound-label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 5rem;
}

.pubgm-bound-product-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.pubgm-bound-product-id {
    font-size: 12px;
    font-family: monospace;
    color: var(--text-muted);
    word-break: break-all;
}

.pubgm-bound-game-id,
.pubgm-bound-fields,
.pubgm-bound-price {
    font-size: 13px;
    color: var(--text);
}

.pubgm-bound-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-pubgm-unbind {
    padding: 0.35rem 0.6rem;
    font-size: 12px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm, 4px);
    cursor: pointer;
}

.btn-pubgm-unbind:hover {
    background: rgba(239, 68, 68, 0.3);
}

.pubgm-bound-toggle-label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 2.5rem;
}

.dumper-lot-min-price {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dumper-lot-min-label {
    font-size: 13px;
    color: var(--text-muted);
}

.dumper-lot-min-input {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    flex: 0 0 72px;
    padding: 0.35rem 0.5rem;
    font-size: 13px;
    box-sizing: border-box;
}

.dumper-lot-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: #22c55e;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.dumper-lot-save-btn:hover {
    background: #16a34a;
}

.dumper-lot-save-btn:active {
    transform: scale(0.95);
}

.dumper-lot-save-btn.dumper-save-ok {
    background: #15803d;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4);
}

.dumper-lot-info-view .lot-detail-content {
    gap: 2rem;
    padding-top: 0.5rem;
}

.dumper-lot-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dumper-lot-info-row span {
    color: var(--text-muted);
    min-width: 140px;
}

.logs-content {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 12px;
  font-family: 'Consolas', 'Monaco', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 70vh;
  overflow-y: auto;
}

.logs-toolbar {
  margin-bottom: 1rem;
}

.dumper-lot-info-row code {
    font-size: 13px;
    background: var(--bg-input);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
}

/* Priority select */
.dumper-lot-priority {
    flex-shrink: 0;
    width: auto;
    min-width: 60px;
    padding: 0.3rem 0.4rem;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    cursor: pointer;
    appearance: auto;
}

.dumper-lot-priority option[value="1"] { color: #ef4444; }
.dumper-lot-priority option[value="2"] { color: #f59e0b; }
.dumper-lot-priority option[value="3"] { color: #6366f1; }
.dumper-lot-priority option[value="4"] { color: #8b5cf6; }
.dumper-lot-priority option[value="5"] { color: #6b7280; }
.dumper-lot-priority option[value="6"] { color: #9ca3af; }

/* Accounts list */
.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.acc-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 13px;
    flex-wrap: wrap;
}

.acc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.acc-dot.acc-ok { background: #22c55e; }
.acc-dot.acc-blocked { background: #ef4444; animation: dumper-blink 1s infinite; }

.acc-meta {
    color: var(--text-muted);
    font-size: 12px;
}

.acc-stats {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: auto;
}

.acc-status {
    font-size: 12px;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
}

.acc-status.acc-ok {
    color: #22c55e;
}

.acc-status.acc-blocked {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Accounts page */
.accounts-page-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .accounts-page-grid { grid-template-columns: 1fr; }
}

.accounts-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.accounts-panel-title {
    font-size: 1.1rem;
    margin: 0 0 0.35rem 0;
    color: var(--text);
}

.accounts-panel-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
}

.accounts-panel-add {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.accounts-panel-add input {
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-sm);
}

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

.proxies-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    font-size: 13px;
}

.proxies-table th {
    padding: 0.4rem 0.75rem;
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
}

.proxies-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    background: var(--bg-input);
}

.proxies-table tr td:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.proxies-table tr td:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.proxy-num {
    width: 2rem;
    color: var(--text-muted);
}

.proxy-url code {
    font-size: 11px;
    word-break: break-all;
}

.proxy-actions {
    display: flex;
    gap: 0.4rem;
    white-space: nowrap;
}

.proxy-status {
    font-size: 12px;
    white-space: nowrap;
}

.proxy-testing {
    color: var(--text-muted);
    animation: proxy-pulse 0.8s infinite;
}

@keyframes proxy-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.proxy-ok {
    color: #22c55e;
    font-weight: 600;
}

.proxy-fail {
    color: #ef4444;
    font-size: 11px;
}

.btn-sm {
    font-size: 12px;
    padding: 0.4rem 0.7rem;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.25), -2px -2px 6px rgba(45,50,60,0.08);
    transition: var(--transition);
}

.btn-sm:hover {
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(45,50,60,0.1);
    transform: translateY(-1px);
}

.btn-sm:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

.btn-ghost {
    background: var(--bg-input);
    color: var(--text-muted);
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2), -2px -2px 4px rgba(45,50,60,0.06);
    transition: var(--transition);
}

.btn-ghost:hover {
    color: var(--text);
    box-shadow: 3px 3px 8px rgba(0,0,0,0.25), -2px -2px 6px rgba(45,50,60,0.08);
    transform: translateY(-1px);
}

.btn-danger {
    color: #ef4444;
}

.btn-accent {
    background: var(--accent);
    color: white;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(99, 102, 241, 0.12);
}

.btn-accent:hover {
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -4px -4px 10px rgba(99, 102, 241, 0.15);
}

.btn-success {
    color: #22c55e;
}

.btn-success:hover {
    color: #16a34a;
}

.accounts-panel-add-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.accounts-add-title {
    font-size: 0.95rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-muted);
}

.accounts-add-form {
    display: flex;
    flex-direction: column;
}

.accounts-add-form .form-row {
    margin-bottom: 0.75rem;
}

.accounts-add-form label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.accounts-textarea {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    resize: vertical;
}

select[multiple].create-input {
    padding: 0.4rem;
    border-radius: var(--radius-sm);
}

select[multiple].create-input option {
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    margin-bottom: 2px;
}

.accounts-list-title {
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
    color: var(--text-muted);
}

.accounts-list-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 0.75rem 0;
}

.accounts-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.35rem;
}

.accounts-list-ok {
    margin-bottom: 1.5rem;
}

.accounts-list-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    border: none;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.25s ease;
}

.account-card:hover {
    box-shadow: var(--shadow-soft-hover);
}

.account-card-problem {
    box-shadow: 6px 6px 14px rgba(239, 68, 68, 0.15), -6px -6px 14px rgba(45,50,60,0.08);
}

.account-card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.account-card-top .account-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.account-card-info {
    flex: 1;
    min-width: 0;
}

.account-name {
    display: block;
    font-size: 1rem;
}

.account-role {
    display: inline-block;
    font-size: 11px;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.account-role-main {
    background: var(--accent-bg);
    color: var(--accent);
}

.account-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    padding: 0.5rem 0.6rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.account-problem-badge {
    font-size: 11px;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* account-card-stats removed - merged into account-card-meta */

.account-card-error {
    font-size: 11px;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.account-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-edit-modal .form-row {
    margin-bottom: 1rem;
}

.account-edit-modal .form-row label {
    display: block;
    font-size: 13px;
    margin-bottom: 0.35rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.accounts-empty {
    color: var(--text-muted);
    font-size: 13px;
}


.stat-placeholder p {
    margin-bottom: 0.5rem;
}

.stat-hint {
    font-size: 12px;
    opacity: 0.8;
}

/* Order Statistics */
.stat-orders-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-period {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-period-label {
    color: var(--text-muted);
    font-size: 13px;
}

.stat-period-btns {
    display: flex;
    gap: 0.35rem;
}

.stat-period-btn {
    padding: 0.5rem 0.9rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.stat-period-btn:hover {
    color: var(--text);
}

.stat-period-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-reviews-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-reviews-cards {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.stat-reviews-card {
    min-width: 160px;
}

.stat-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-card-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-card-value {
    font-size: 14px;
    color: var(--text);
}

.stat-value-green {
    color: var(--green);
}

.stat-value-blue {
    color: #3b82f6;
}

.stat-value-red {
    color: #ef4444;
}

.stat-block {
    margin-bottom: 1.5rem;
}

.stat-block-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.stat-list {
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.stat-products-list .stat-row,
.stat-buyers-list .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.stat-products-list .stat-row:last-child,
.stat-buyers-list .stat-row:last-child {
    border-bottom: none;
}

.stat-products-list .stat-row:hover,
.stat-buyers-list .stat-row:hover {
    background: rgba(255,255,255,0.02);
}

.stat-row-name {
    color: var(--text);
}

.stat-row-meta {
    font-size: 13px;
    color: #3b82f6;
}

.stat-buyers-sort {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-sort-label {
    color: var(--text-muted);
    font-size: 13px;
}

.stat-sort-btns {
    display: flex;
    gap: 0.35rem;
}

.stat-sort-btn {
    padding: 0.4rem 0.8rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.stat-sort-btn:hover {
    color: var(--text);
}

.stat-sort-btn.active {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.3);
}

.stat-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Latest Orders */
.stat-orders-list {
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.stat-order-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.stat-order-row:last-child {
    border-bottom: none;
}

.stat-order-row:hover {
    background: rgba(255,255,255,0.02);
}

.stat-order-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-order-dot.completed {
    background: var(--green);
}

.stat-order-dot.pending {
    background: #3b82f6;
}

.stat-order-dot.returned {
    background: #ef4444;
}

.stat-order-id {
    color: #3b82f6;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    min-width: 90px;
}

.stat-order-id:hover {
    text-decoration: underline;
}

.stat-order-desc {
    flex: 1;
    color: var(--text);
    font-size: 13px;
}

.stat-order-price {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.stat-order-date {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Account Statistics */
.stat-account-periods {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-account-table-wrap {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

.stat-account-table {
    width: 100%;
    border-collapse: collapse;
}

.stat-account-table th,
.stat-account-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.stat-account-table th {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-account-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.stat-period-extra {
    font-size: 12px;
    color: #3b82f6;
    margin-top: 2px;
}

.stat-delta-pos {
    color: var(--green);
}

.stat-delta-neg {
    color: #ef4444;
}

.btn-stat-detail {
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-stat-detail:hover {
    background: rgba(99, 102, 241, 0.25);
}

.stat-detail-header {
    margin-bottom: 1.5rem;
}

.stat-detail-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 800px) {
    .stat-detail-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-detail-card {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-detail-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-detail-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.stat-detail-value {
    font-size: 14px;
}

.stat-detail-chart-wrap {
    margin-bottom: 1.5rem;
}

.stat-chart-container {
    height: 280px;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.settings-form {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-form label {
    font-size: 13px;
    color: var(--text-muted);
}

.settings-form input {
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    box-shadow: var(--shadow-inset);
}


/* ========== Lot Detail ========== */
.lot-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-back {
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.3), -3px -3px 8px rgba(45,50,60,0.1);
    transition: var(--transition);
}

.btn-back:hover {
    box-shadow: 5px 5px 12px rgba(0,0,0,0.35), -4px -4px 10px rgba(45,50,60,0.12);
    transform: translateY(-1px);
}

.btn-back:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

/* ========== Create Lot ========== */
.create-lot-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}

.create-lot-step1 {
    max-width: 400px;
}

.create-step1-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.create-step1-row .create-input {
    flex: 0 0 100px;
}

.create-form-wrap {
    max-width: 680px;
}

.create-form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.create-category-title {
    font-size: 1.35rem;
    font-weight: 600;
}

.create-game-badge {
    padding: 0.25rem 0.75rem;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 20px;
    font-size: 13px;
}

.create-form-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}

.create-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.create-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .create-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .create-form-grid {
        grid-template-columns: 1fr;
    }
}

.create-field {
    margin-bottom: 1.25rem;
}

.create-field:last-child {
    margin-bottom: 0;
}

.create-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.create-field-label .required {
    color: #ef4444;
}

.create-input,
.create-select,
.create-textarea {
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}

.create-input:focus,
.create-select:focus,
.create-textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.create-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.create-select:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.create-select option {
    background: var(--bg-card);
    color: var(--text);
}

.create-option-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.create-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.create-options-card {
    padding: 1rem 1.5rem;
}

.create-textarea {
    resize: vertical;
    min-height: 100px;
}

.create-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.create-input-group .create-input {
    border: none;
    flex: 1;
}

.create-input-suffix {
    padding: 0 1rem;
    font-size: 14px;
    color: var(--text-muted);
}

.create-char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.create-field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.create-numeric-filters {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.create-submit-btn {
    padding: 0.75rem 2rem;
    font-size: 15px;
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft), 0 25px 50px rgba(0, 0, 0, 0.5);
    padding: 1.5rem 2rem;
    max-width: 420px;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.modal-desc {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.modal-link {
    color: var(--accent);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.modal-link:hover {
    background: var(--accent-bg);
}

.modal-close-btn {
    width: 100%;
}

.lot-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lot-detail-block {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.lot-detail-block h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.lot-detail-text {
    white-space: pre-wrap;
    line-height: 1.6;
}

.lot-detail-actions {
    margin-bottom: 0.5rem;
}

.toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--bg-input);
    border-radius: 13px;
    box-shadow: var(--shadow-inset);
    transition: var(--transition);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-bg);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.toggle-switch input:checked + .toggle-slider::after {
    left: 25px;
    background: var(--accent);
}

.toggle-switch:has(input:disabled) {
    cursor: wait;
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.6;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
}

/* ========== Categories ========== */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.category-card:hover {
    box-shadow: var(--shadow-soft-hover);
}

.category-card-clickable {
    cursor: pointer;
}

.category-name {
    font-weight: 500;
}

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

/* Уведомления (toast) */
.notifications-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    pointer-events: none;
}

.notification-toast {
    pointer-events: auto;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.45;
    box-shadow: var(--shadow-soft);
    animation: toast-in 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-toast.toast-429 {
    background: linear-gradient(145deg, #3d2a1a, #2d1f14);
    border-left: 4px solid #f59e0b;
    color: #fef3c7;
}

.notification-toast.toast-proxy {
    background: linear-gradient(145deg, #2a1a2a, #1f1420);
    border-left: 4px solid #ef4444;
    color: #fecaca;
}

.notification-toast.toast-exhausted {
    background: linear-gradient(145deg, #2a1a1a, #1a1414);
    border-left: 4px solid #dc2626;
    color: #fecaca;
}

.notification-toast.toast-info {
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    color: var(--text);
}

.notification-toast.toast-error {
    background: linear-gradient(145deg, #2a1a1a, #1a1414);
    border-left: 4px solid #ef4444;
    color: #fecaca;
}

.notification-toast .toast-close {
    margin-left: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 2px;
    font-size: 18px;
    line-height: 1;
}

.notification-toast .toast-close:hover {
    opacity: 1;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Страница уведомлений */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-card {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    background: var(--bg-card);
}

.notification-card-429 {
    border-left: 4px solid #f59e0b;
}

.notification-card-proxy {
    border-left: 4px solid #ef4444;
}

.notification-card-exhausted {
    border-left: 4px solid #dc2626;
}

.notification-card-info {
    border-left: 4px solid var(--accent);
}

.notification-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notification-type {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-card-429 .notification-type { color: #f59e0b; }
.notification-card-proxy .notification-type { color: #ef4444; }
.notification-card-exhausted .notification-type { color: #dc2626; }
.notification-card-info .notification-type { color: var(--accent); }

.notification-time {
    font-size: 12px;
    color: var(--text-muted);
}

.notification-card-body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

.notifications-empty {
    color: var(--text-muted);
    padding: 24px;
    text-align: center;
}

.notifications-error {
    color: #ef4444;
    padding: 16px;
}

/* Страница предложений приоритетов */
.rate-limit-info {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--accent);
}

.rate-limit-info h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text);
}

.rate-limit-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 6px 0;
    line-height: 1.5;
}

.suggestions-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

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

.suggestion-row {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    background: var(--bg-card);
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 8px 20px;
    align-items: center;
}

.suggestion-row .suggestion-lot { grid-column: 1; grid-row: 1; }
.suggestion-row .suggestion-priorities { grid-column: 2; grid-row: 1; }
.suggestion-row .btn-apply-suggestion { grid-column: 3; grid-row: 1; }
.suggestion-row .suggestion-reason { grid-column: 1 / -1; grid-row: 2; font-size: 13px; color: var(--text-muted); }

.suggestion-lot {
    font-weight: 500;
}

.suggestion-priorities {
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-current {
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--bg-input);
    font-size: 12px;
}

.suggestion-current.suggestion-changed {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

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

.suggestion-suggested {
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    font-size: 12px;
}

.suggestion-reason {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-apply-suggestion {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.btn-apply-suggestion:hover {
    filter: brightness(1.1);
}

.suggestions-empty {
    color: var(--text-muted);
    padding: 24px;
    text-align: center;
}

.suggestions-error {
    color: #ef4444;
    padding: 16px;
}

/* PUBGM orders */
.pubgm-orders-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.pubgm-orders-show-created {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.pubgm-orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pubgm-order-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.pubgm-order-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    flex-wrap: wrap;
}

.pubgm-order-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.pubgm-order-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pubgm-order-status-pending { background: #f59e0b; }
.pubgm-order-status-in_progress { background: #3b82f6; }
.pubgm-order-status-completed { background: #22c55e; }
.pubgm-order-status-error { background: #ef4444; }
.pubgm-order-status-partial_error { background: #f59e0b; }
.pubgm-order-status-created { background: #8b5cf6; }

.pubgm-order-id {
    font-family: monospace;
    font-size: 13px;
    color: var(--accent);
    min-width: 5rem;
}

.pubgm-order-sub {
    font-size: 14px;
    color: var(--text);
    min-width: 6rem;
}

.pubgm-order-uc {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.pubgm-order-status-label {
    font-size: 12px;
    color: var(--text-muted);
}

.pubgm-order-buyer {
    font-size: 13px;
    color: var(--text-muted);
}

.pubgm-order-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.pubgm-order-details {
    padding: 1rem 1rem 1rem 2.5rem;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.pubgm-order-detail-row {
    margin-bottom: 0.5rem;
}

.pubgm-order-provider-list ul,
.pubgm-order-messages ul {
    margin: 0.5rem 0 0 1rem;
    padding-left: 1rem;
}

.pubgm-order-provider-list li,
.pubgm-order-messages li {
    margin-bottom: 0.25rem;
}

.pubgm-msg-time {
    color: var(--text-muted);
    font-size: 11px;
}
