/* Стили личного кабинета партнера */
#partner-cabinet-modal .modal-content {
    max-width: 900px;
    width: 95%;
    padding: 25px;
    max-height: 90vh;
    overflow-y: auto;
}

.cabinet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.cabinet-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding-top: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #4361ee;
}

.tab-btn.active {
    color: #4361ee;
    border-bottom: 3px solid #4361ee;
}

.tab-content {
    display: none;
    min-height: 400px; /* Минимальная высота для предотвращения скакания */
}

.tab-content.active {
    display: block;
}

.loading-orders {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.orders-toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.orders-toolbar-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.orders-filter {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

.orders-search {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 200px;
    min-width: 150px;
}

.order-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
}

.order-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    align-items: center;
}

.order-id {
    font-weight: bold;
    color: #4361ee;
    flex: 1;
}

.order-date {
    color: #6c757d;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
}

.order-total {
    font-weight: bold;
    color: #28a745;
    flex: 1;
    text-align: center;
}

.order-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-left: 10px;
    flex: 1;
    text-align: center;
}

.order-status.new {
    background: #ffc107;
    color: #212529;
}

.order-status.processing {
    background: #17a2b8;
    color: white;
}

.order-status.confirmed {
    background: #28a745;
    color: white;
}

.order-status.cancelled {
    background: #dc3545;
    color: white;
}

.order-items {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background: #f8f9fa;
}

.order-items.expanded {
    padding: 15px;
    max-height: 500px;
}

.order-item-name {
    display: block;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.order-comments {
    margin-top: 10px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 4px;
    font-style: italic;
    display: none;
}

.order-comments.expanded {
    display: block;
}

.no-orders {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #4361ee;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

.profile-save-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    display: none;
}
/* Добавленные стили для уведомлений в кабинете партнера */
.order-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    margin: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}
.stock-notice {
    color: #ff9800;
    font-weight: bold;
    margin-left: 5px;
}
.order-status.processing {
    background: linear-gradient(135deg, #17a2b8 0%, #0d7894 100%);
}

.search-highlight {
    background-color: #ffeb3b;
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: bold;
}
/* Стили для вкладки ценообразования */
#pricing-content {
  padding: 20px;
}

.pricing-header {
  margin-bottom: 20px;
}

.pricing-header h3 {
  color: #4361ee;
  margin-bottom: 5px;
}

.pricing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.upload-btn {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.pricing-instructions {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.pricing-instructions h4 {
  margin-top: 0;
  color: #495057;
}

.pricing-instructions ol {
  margin-left: 20px;
  margin-bottom: 15px;
}

.pricing-instructions .note {
  background: #fff3cd;
  padding: 10px;
  border-radius: 4px;
  margin-top: 15px;
  font-size: 0.9rem;
}

/* Стили для выбора методов ценообразования */
.pricing-methods {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}
.pricing-method {
  margin: 5px 0;
  display: flex;
  align-items: center;
}
.pricing-method input[type="radio"] {
  margin-right: 8px;
}
.category-markup-section {
  margin-top: 20px;
  display: none;
}
.category-markup-section:not(.hidden) {
  display: block;
}
.category-markup-container {
  margin-bottom: 20px;
}
.category-markup-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
}
.category-markup-item label {
  flex: 1;
  font-weight: 500;
  color: #495057;
}
.category-markup-item input {
  width: 80px;
  padding: 5px;
  text-align: right;
  border: 1px solid #ced4da;
  border-radius: 4px;
}
.category-markup-item span {
  margin-left: 5px;
  font-weight: bold;
  color: #495057;
}

/* Стили для iOS-стиля переключателя */
.toggle-container {
  display: flex;
  align-items: center;
  margin: 20px 0;
  gap: 15px;
}

.toggle-label {
  font-weight: 500;
  color: #495057;
  font-size: 0.95rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 95px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e9ecef;
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background-color: #4361ee;
}

input:checked + .toggle-slider:before {
  transform: translateX(60px);
}

.toggle-text {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
}

.toggle-text span:first-child {
  opacity: 1;
  transition: opacity 0.3s;
}

.toggle-text span:last-child {
  opacity: 0.7;
  transition: opacity 0.3s;
}

input:checked + .toggle-slider .toggle-text span:first-child {
  opacity: 0.7;
}

input:checked + .toggle-slider .toggle-text span:last-child {
  opacity: 1;
}

#apply-category-markup-btn {
    background: #4361ee;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.3);
    align-self: flex-start;
    margin-top: 15px;
}

#apply-category-markup-btn:hover:not(:disabled) {
    background: #3a56e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.4);
}

#apply-category-markup-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(67, 97, 238, 0.3);
}

#apply-category-markup-btn:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

#apply-category-markup-btn.loading {
    position: relative;
    overflow: hidden;
}

#apply-category-markup-btn.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* Адаптивность для мобильных устройств */
@media (min-width: 768px) {
  .pricing-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .pricing-actions button, 
  .pricing-actions label {
    margin-right: 10px;
    margin-bottom: 10px;
  }
}