/* Раздел «Сток дилера» — только десктоп (≥1200px). */
@media (max-width: 1199px) {
    #dealerStock,
    .tab[data-tab="dealerStock"] {
        display: none !important;
    }
}

.dealer-stock-wrap {
    max-width: 1080px;
}

.dealer-stock-lead {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.45;
}

.dealer-stock-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.dealer-stock-tab {
    padding: 10px 16px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dealer-stock-tab:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
}

.dealer-stock-tab.is-active {
    background: rgba(0, 122, 255, 0.1);
    border-color: #007aff;
    color: #0056c7;
}

.dealer-stock-panel {
    display: none;
}

.dealer-stock-panel.is-active {
    display: block;
}

.dealer-stock-card {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.dealer-stock-card + .dealer-stock-card {
    margin-top: 14px;
}

.dealer-stock-card h2 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dealer-stock-card p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}

.dealer-stock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.dealer-stock-actions .btn-blue,
.dealer-stock-actions .btn-green,
.dealer-stock-actions .btn-light {
    margin-top: 0;
}

.dealer-stock-dropzone {
    margin-top: 14px;
    padding: 28px 18px;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dealer-stock-dropzone.is-dragover {
    border-color: #007aff;
    background: #eff6ff;
}

.dealer-stock-dropzone-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 650;
    color: #0f172a;
}

.dealer-stock-dropzone-hint {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
}

.dealer-stock-file-input {
    display: none;
}

.dealer-stock-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 12px;
}

.dealer-stock-stat {
    padding: 8px 12px;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.dealer-stock-stat--ok {
    background: #ecfdf5;
    color: #047857;
}

.dealer-stock-stat--warn {
    background: #fff7ed;
    color: #c2410c;
}

.dealer-stock-stat--err {
    background: #fef2f2;
    color: #b91c1c;
}

.dealer-stock-table-wrap {
    overflow: auto;
    max-height: 420px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.dealer-stock-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dealer-stock-table th,
.dealer-stock-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

.dealer-stock-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    z-index: 1;
}

.dealer-stock-table tr.is-error td {
    background: #fff5f5;
}

.dealer-stock-table tr.is-ok td {
    background: #f0fdf4;
}

.dealer-stock-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.dealer-stock-badge--ok {
    background: #dcfce7;
    color: #166534;
}

.dealer-stock-badge--err {
    background: #fee2e2;
    color: #991b1b;
}

.dealer-stock-progress {
    margin-top: 14px;
}

.dealer-stock-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.dealer-stock-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #007aff, #34c759);
    transition: width 0.2s ease;
}

.dealer-stock-progress-text {
    margin: 8px 0 0;
    font-size: 13px;
    color: #64748b;
}

.dealer-stock-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dealer-stock-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.dealer-stock-form-grid input,
.dealer-stock-form-grid select {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.dealer-stock-form-grid .dealer-stock-span-2 {
    grid-column: 1 / -1;
}

.dealer-stock-sync-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
}

.dealer-stock-sync-status strong {
    color: #0f172a;
}

.dealer-stock-muted {
    color: #94a3b8;
    font-size: 13px;
}

.dealer-stock-auth-hint {
    padding: 24px;
    text-align: center;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.dealer-stock-auth-hint p {
    margin: 0 0 14px;
    color: #64748b;
}

@media (min-width: 1200px) {
    #dealerStock .screen-content {
        padding-bottom: 28px;
    }
}
