.orders-header {
  padding: 1.5rem 0 1rem;
}

.orders-header__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.orders-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: #f5efe7;
}

.btn {
  background: #1a1714;
  border: 1px solid #3b342c;
  color: #f0ece4;
  padding: 0.5rem 1.25rem;
  border-radius: 60px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.btn-primary {
  background: #f0a868;
  border-color: #f0a868;
  color: #0b0b0b;
}

.btn-primary:hover {
  background: #ffbe7a;
  border-color: #ffbe7a;
  transform: scale(1.02);
}

.btn-outline {
  background: transparent;
  border-color: #3b342c;
}

.btn-outline:hover {
  border-color: #f0a868;
  color: #f0a868;
}

.orders-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.search-input {
  background: #14120f;
  border: 1px solid #2b2620;
  border-radius: 40px;
  padding: 0.55rem 1.25rem;
  color: #f0ece4;
  font-size: 0.9rem;
  flex: 1;
  min-width: 200px;
  transition: border-color 0.2s;
}

.search-input::placeholder {
  color: #7a7267;
}

.search-input:focus {
  outline: none;
  border-color: #f0a868;
}

.filter-select {
  background: #14120f;
  border: 1px solid #2b2620;
  border-radius: 40px;
  padding: 0.55rem 1.25rem;
  color: #f0ece4;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: #f0a868;
}

.orders-table-wrapper {
  overflow-x: auto;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.orders-table thead th {
  text-align: left;
  padding: 0.75rem 0.75rem;
  color: #9e9487;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #2b2620;
}

.orders-table tbody td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #1f1b17;
  color: #ddd4c7;
}

.orders-table tbody tr {
  transition: background 0.15s;
  cursor: pointer;
}

.orders-table tbody tr:hover {
  background: #1a1714;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem 0.2rem 0.5rem;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-badge--request {
  color: #ffcc80;
  border-color: #e65100;
}

.status-badge--request::before {
  background: #e65100;
}

.status-badge--confirmed {
  color: #90caf9;
  border-color: #1565c0;
}

.status-badge--confirmed::before {
  background: #1565c0;
}

.status-badge--in_progress {
  color: #a5d6a7;
  border-color: #2e7d32;
}

.status-badge--in_progress::before {
  background: #2e7d32;
}

.status-badge--completed {
  color: #ce93d8;
  border-color: #4a148c;
}

.status-badge--completed::before {
  background: #4a148c;
}

.status-badge--paid {
  color: #ffab91;
  border-color: #bf360c;
}

.status-badge--paid::before {
  background: #bf360c;
}

.view-link {
  background: transparent;
  border: none;
  color: #f0a868;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.view-link:hover {
  color: #ffbe7a;
  background: rgba(240, 168, 104, 0.1);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #13110e;
  border: 1px solid #2b2620;
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalFade 0.25s ease;
}

.modal--order {
  max-width: 900px;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #2b2620;
}

.modal__title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #f5efe7;
}

.modal__close {
  background: none;
  border: none;
  color: #9e9487;
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 0.25rem;
}

.modal__close:hover {
  color: #f0ece4;
}

.modal__body {
  padding: 1.5rem;
  overflow-y: auto;
}

.order-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.detail-item--full {
  grid-column: 1 / -1;
}

.detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a7267;
}

.detail-value {
  font-size: 0.95rem;
  color: #f0ece4;
}

.detail-value a {
  color: #f0a868;
  text-decoration: none;
  transition: color 0.2s;
}

.detail-value a:hover {
  color: #ffbe7a;
  text-decoration: underline;
}

.order-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid #23201b;
}

.edit-order-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
}

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

.form-group.detail-item--full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #b0a69a;
}

.form-input,
.form-select,
.form-textarea {
  background: #14120f;
  border: 1px solid #2b2620;
  border-radius: 12px;
  padding: 0.6rem 1rem;
  color: #f0ece4;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  width: 100%;
  font-family: inherit;
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #7a7267;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #f0a868;
}

.form-select option {
  background: #14120f;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #ddd4c7;
  font-size: 0.9rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #f0a868;
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #23201b;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: #1a1714;
  color: #f0ece4;
  padding: 0.6rem 1.8rem;
  border-radius: 60px;
  border: 1px solid #f0a868;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  pointer-events: auto;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .orders-header__top {
    flex-direction: column;
    align-items: stretch;
  }

  .orders-filters {
    flex-direction: column;
  }

  .search-input {
    min-width: unset;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.detail-item--full {
    grid-column: 1;
  }

  .modal {
    max-height: 95vh;
    margin: 0.5rem;
  }

  .modal__header {
    padding: 1rem;
  }

  .modal__body {
    padding: 1rem;
  }

  .orders-table thead th,
  .orders-table tbody td {
    padding: 0.5rem 0.5rem;
    font-size: 0.8rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .order-actions {
    flex-direction: column;
  }

  .order-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .checkbox-group {
    flex-direction: column;
    gap: 0.4rem;
  }
}