.yarsell-returns-container { max-width: 1100px; margin: 20px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1e293b; }
.yarsell-header h1 { font-size: 26px; margin: 0 0 6px 0; color: #0f172a; font-weight: 700; }
.yarsell-subtitle { color: #64748b; margin-bottom: 25px; font-size: 15px; }

.yarsell-alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
.yarsell-alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.yarsell-alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.yarsell-alert-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.yarsell-section-title { font-size: 18px; font-weight: 700; color: #1e293b; margin-bottom: 15px; }
.yarsell-section-header-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 35px; margin-bottom: 15px; }
.yarsell-section-header-wrap .yarsell-section-title { margin-bottom: 0; }

/* Панель фильтрации заказов */
.yarsell-table-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #f8fafc; border: 1px solid #e2e8f0; padding: 6px 12px; border-radius: 10px; }
.yarsell-filter-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.yarsell-filter-label { font-size: 12px; font-weight: 600; color: #64748b; margin-right: 4px; }

.yarsell-filter-btn { background: #ffffff; color: #475569; border: 1px solid #cbd5e1; padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 4px; }
.yarsell-filter-btn:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; }
.yarsell-filter-btn.is-active { background: #2563eb; color: #ffffff; border-color: #2563eb; box-shadow: 0 2px 6px rgba(37,99,235,0.25); }

.yarsell-btn-caret { font-size: 10px; opacity: 0.8; margin-left: 2px; }

.yarsell-sort-group { display: flex; align-items: center; }
.yarsell-sort-btn { background: #ffffff; color: #334155; border: 1px solid #cbd5e1; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s; }
.yarsell-sort-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.yarsell-sort-btn #sort_date_icon { font-weight: 800; color: #2563eb; font-size: 14px; }

/* Таблица отгрузок */
.yarsell-requests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-bottom: 30px; }
.yarsell-request-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
.yarsell-card-expired { border-color: #fca5a5; background: #fffafb; }
.yarsell-req-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.yarsell-req-pvz-badge { font-size: 12px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 6px 10px; border-radius: 6px; color: #334155; margin-bottom: 8px; line-height: 1.4; }

/* Отображение товара в карточке заявки на возврат (как на макете) */
.yarsell-req-items-list { margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.yarsell-req-product-row { display: flex; align-items: center; gap: 14px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; }
.yarsell-req-product-photo-wrap { width: 56px; height: 56px; border: 1px solid #cbd5e1; border-radius: 6px; background: #ffffff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; padding: 2px; box-sizing: border-box; }
.yarsell-req-product-photo { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; margin: auto; }
.yarsell-req-product-photo-placeholder { font-size: 24px; color: #94a3b8; }
.yarsell-req-product-info { font-size: 14px; color: #1e293b; line-height: 1.4; flex: 1; }
.yarsell-req-product-name { font-weight: 600; color: #0f172a; }
.yarsell-req-product-traits { color: #64748b; font-weight: 500; margin-left: 4px; }

.yarsell-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.yarsell-badge-approved { background: #dcfce7; color: #15803d; }
.yarsell-badge-expired { background: #fee2e2; color: #b91c1c; }
.yarsell-badge-done { background: #f1f5f9; color: #334155; }
.yarsell-badge-wait { background: #fef3c7; color: #92400e; }

.yarsell-timer-banner { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; font-size: 13px; padding: 8px 12px; border-radius: 6px; margin: 10px 0; }
.yarsell-barcode-box { margin-top: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px; text-align: center; }
.yarsell-barcode-title { font-size: 11px; color: #64748b; margin-bottom: 6px; font-weight: 500; }

.yarsell-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.yarsell-table th { background: #f8fafc; padding: 12px 16px; font-size: 13px; color: #475569; border-bottom: 1px solid #e2e8f0; text-align: left; }
.yarsell-table td { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.yarsell-sub { font-size: 12px; color: #64748b; margin-top: 2px; }

/* Фотографии товаров в первом столбце */
.yarsell-table-photo-col { width: 60px; text-align: center; padding-right: 0 !important; }
.yarsell-table-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.05); display: inline-block; }
.yarsell-table-thumb-placeholder { width: 48px; height: 48px; border-radius: 8px; background: #f1f5f9; border: 1px solid #e2e8f0; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: #94a3b8; }

.yarsell-btn { padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; border: none; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.yarsell-btn-primary { background: #2563eb; color: #ffffff; }
.yarsell-btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }
.yarsell-btn-secondary { background: #e2e8f0; color: #334155; }
.yarsell-btn-secondary:hover { background: #cbd5e1; }
.yarsell-btn-sm { padding: 5px 10px; font-size: 12px; }

.yarsell-modal { position: fixed; top:0; left:0; right:0; bottom:0; background: rgba(15,23,42,0.65); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 20px; box-sizing: border-box; }
.yarsell-modal-content { background: #ffffff; border-radius: 14px; width: 100%; max-width: 620px; max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); position: relative; box-sizing: border-box; }
.yarsell-modal-close { position: absolute; right: 18px; top: 16px; font-size: 26px; cursor: pointer; color: #64748b; line-height: 1; transition: color 0.15s; }
.yarsell-modal-close:hover { color: #0f172a; }

.yarsell-btn-danger { background: #ef4444; color: #ffffff; }
.yarsell-btn-danger:hover { background: #dc2626; }

.yarsell-form-group { margin-bottom: 16px; }
.yarsell-form-group label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.yarsell-select, .yarsell-textarea { width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; box-sizing: border-box; }

/* 3. Интерактивные слоты загрузки фото */
.yarsell-photo-upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 6px; }
.yarsell-upload-box { border: 2px dashed #cbd5e1; border-radius: 10px; height: 110px; background: #f8fafc; position: relative; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-sizing: border-box; }
.yarsell-upload-box:hover { border-color: #3b82f6; background: #eff6ff; }
.yarsell-upload-box input[type="file"] { display: none; }

.yarsell-box-placeholder { text-align: center; padding: 6px; pointer-events: none; }
.yarsell-box-icon { font-size: 24px; display: block; margin-bottom: 2px; }
.yarsell-box-title { font-size: 11px; color: #334155; font-weight: 700; line-height: 1.2; }
.yarsell-box-sub { font-size: 9px; color: #94a3b8; margin-top: 2px; font-weight: 500; }

/* Skeleton анимация справа налево (Right to Left) */
.yarsell-box-skeleton {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    z-index: 2;
}
.yarsell-skeleton-shimmer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
    background-size: 200% 100%;
    animation: yarsellShimmerRightToLeft 1.2s infinite linear;
}
@keyframes yarsellShimmerRightToLeft {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.yarsell-spinner-icon {
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(37,99,235,0.25);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: yarsellSpin 0.7s infinite linear;
    position: relative;
    z-index: 3;
    margin-bottom: 4px;
}
@keyframes yarsellSpin {
    to { transform: rotate(360deg); }
}
.yarsell-skeleton-text {
    position: relative;
    z-index: 3;
    font-size: 10px;
    font-weight: 700;
    color: #1e40af;
}

/* Превью загруженной картинки с кнопкой удаления */
.yarsell-box-preview-wrap {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.yarsell-box-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.yarsell-box-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.15s, background 0.15s;
    z-index: 5;
}
.yarsell-box-remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Toast всплывающие сообщения */
.yarsell-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.yarsell-toast {
    background: #1e293b;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: yarsellToastSlideIn 0.25s ease-out;
    max-width: 360px;
    line-height: 1.4;
    border-left: 4px solid #ef4444;
}
.yarsell-toast-warn {
    background: #7f1d1d;
    border-left-color: #f87171;
}
@keyframes yarsellToastSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Карточка выбора ПВЗ на форме */
.yarsell-pvz-picker-card { display: flex; align-items: center; background: #f8fafc; border: 1.5px solid #cbd5e1; border-radius: 8px; padding: 10px 14px; gap: 12px; }
.yarsell-pvz-icon-pin { font-size: 24px; }
.yarsell-pvz-details { flex: 1; min-width: 0; }
.yarsell-pvz-subhead { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 2px; }
.yarsell-pvz-link { display: flex; align-items: center; justify-content: space-between; text-decoration: none; color: #1e293b; font-weight: 600; font-size: 14px; gap: 8px; }
.yarsell-pvz-link:hover { color: #2563eb; }
.yarsell-pvz-link-arrow { font-size: 12px; color: #2563eb; background: #eff6ff; padding: 4px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }

/* Стили модального окна Яндекс.Карт */
.yarsell-pvz-modal-content { max-width: 950px; width: 95%; padding: 22px; max-height: 92vh; display: flex; flex-direction: column; }
.yarsell-pvz-modal-header h3 { margin: 0 0 4px 0; font-size: 19px; color: #0f172a; }
.yarsell-pvz-modal-header p { margin: 0 0 14px 0; font-size: 13px; color: #64748b; }

.yarsell-pvz-search-bar { display: flex; position: relative; margin-bottom: 10px; }
.yarsell-pvz-search-bar input { width: 100%; padding: 10px 40px 10px 14px; border: 1.5px solid #cbd5e1; border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.yarsell-pvz-search-bar input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.yarsell-pvz-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 14px; color: #94a3b8; cursor: pointer; }

.yarsell-city-tags { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 12px; }
.yarsell-city-tag { background: #f1f5f9; color: #475569; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.yarsell-city-tag:hover { background: #e2e8f0; color: #1e293b; }
.yarsell-city-tag.is-active { background: #2563eb; color: #ffffff; }

.yarsell-pvz-body-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; flex: 1; min-height: 420px; }
.yarsell-pvz-map-wrapper { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #e2e8f0; background: #e2e8f0; }
.yarsell-map-loader { position: absolute; top:50%; left:50%; transform:translate(-50%, -50%); color: #475569; font-size: 14px; font-weight: 600; background: rgba(255,255,255,0.9); padding: 10px 16px; border-radius: 8px; }

.yarsell-pvz-sidebar { display: flex; flex-direction: column; min-height: 0; }
.yarsell-pvz-count { font-size: 12px; color: #64748b; font-weight: 600; margin-bottom: 8px; }
.yarsell-pvz-list-scroll { flex: 1; overflow-y: auto; max-height: 400px; padding-right: 4px; }

.yarsell-pvz-card-item { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; margin-bottom: 10px; transition: all 0.2s; }
.yarsell-pvz-card-item:hover { border-color: #93c5fd; background: #ffffff; box-shadow: 0 4px 12px rgba(37,99,235,0.08); }
.yarsell-pvz-card-title { font-weight: 700; font-size: 14px; color: #0f172a; margin-bottom: 4px; }
.yarsell-pvz-card-address { font-size: 12px; color: #475569; margin-bottom: 4px; line-height: 1.3; }
.yarsell-pvz-card-schedule { font-size: 11px; color: #16a34a; font-weight: 600; margin-bottom: 4px; }
.yarsell-pvz-card-phone { font-size: 11px; color: #64748b; margin-bottom: 8px; }
.yarsell-btn-select-pvz { width: 100%; margin-top: 4px; }

/* Модальное окно выбора Месяца и Года */
.yarsell-month-modal-content { max-width: 380px; text-align: center; padding: 22px; }
.yarsell-month-picker-header h3 { margin: 0 0 4px 0; font-size: 18px; color: #0f172a; }
.yarsell-month-picker-header p { margin: 0 0 16px 0; font-size: 13px; color: #64748b; }

.yarsell-year-selector { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 12px; margin-bottom: 14px; }
.yarsell-year-current { font-size: 17px; font-weight: 800; color: #0f172a; }
.yarsell-year-arrow { background: #ffffff; border: 1px solid #cbd5e1; width: 32px; height: 32px; border-radius: 6px; font-size: 14px; font-weight: bold; color: #334155; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.yarsell-year-arrow:hover { background: #2563eb; color: #ffffff; border-color: #2563eb; }

.yarsell-months-carousel-wrap { max-height: 240px; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px; scroll-behavior: smooth; background: #fafafa; }
.yarsell-month-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; margin-bottom: 4px; border-radius: 6px; cursor: pointer; transition: all 0.15s; background: #ffffff; border: 1px solid transparent; }
.yarsell-month-item:hover { background: #eff6ff; border-color: #bfdbfe; }
.yarsell-month-item.is-selected { background: #2563eb; color: #ffffff; font-weight: 700; border-color: #2563eb; }
.yarsell-month-item.is-selected .yarsell-month-num { color: #bfdbfe; }
.yarsell-month-item.is-selected .yarsell-month-name { color: #ffffff; }
.yarsell-month-num { font-size: 12px; font-weight: 700; color: #94a3b8; width: 24px; text-align: left; }
.yarsell-month-name { flex: 1; text-align: left; font-size: 14px; font-weight: 600; }
.yarsell-month-now-badge { font-size: 10px; background: #dcfce7; color: #166534; padding: 2px 6px; border-radius: 4px; font-weight: 700; text-transform: uppercase; }
.yarsell-month-item.is-selected .yarsell-month-now-badge { background: #ffffff; color: #2563eb; }

/* Модальное окно детального просмотра заявки (Read-Only) */
.yarsell-view-modal-content { max-width: 600px; width: 100%; max-height: 88vh; display: flex; flex-direction: column; padding: 24px; box-sizing: border-box; }
.yarsell-view-header { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.yarsell-view-body { flex: 1; overflow-y: auto; padding-right: 6px; }
.yarsell-view-section { margin-bottom: 18px; }
.yarsell-view-section-title { font-size: 13px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.yarsell-view-section-content { font-size: 14px; color: #1e293b; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 14px; line-height: 1.4; }
.yarsell-view-items-wrap { display: flex; flex-direction: column; gap: 8px; }
.yarsell-view-reason-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px; }
.yarsell-view-proofs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 6px; }
.yarsell-view-proof-item { display: flex; flex-direction: column; align-items: center; background: #ffffff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px; text-decoration: none; transition: all 0.2s; overflow: hidden; }
.yarsell-view-proof-item:hover { border-color: #2563eb; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.yarsell-view-proof-img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; margin-bottom: 4px; }
.yarsell-view-proof-label { font-size: 11px; color: #475569; font-weight: 600; text-align: center; }
.yarsell-view-footer { padding-top: 16px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; }

@media (max-width: 768px) {
    .yarsell-section-header-wrap { flex-direction: column; align-items: flex-start; }
    .yarsell-table-filter-bar { width: 100%; box-sizing: border-box; }
    .yarsell-pvz-body-grid { grid-template-columns: 1fr; }
    .yarsell-pvz-map-wrapper { min-height: 260px; height: 260px; }
    .yarsell-pvz-list-scroll { max-height: 240px; }
    .yarsell-photo-upload-grid { grid-template-columns: repeat(2, 1fr); }
    .yarsell-view-footer { flex-direction: column; align-items: stretch; }
}
