.orders-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.orders-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

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

.orders-action-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.orders-drawer-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .orders-drawer-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.orders-drawer-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  padding: 0.875rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  resize: vertical;
  line-height: 1.5;
}

.orders-drawer-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.orders-drawer-textarea:disabled,
.orders-drawer-textarea[readonly] {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.orders-drawer-textarea--error {
  border-color: #fca5a5;
  box-shadow: 0 0 0 3px rgba(254, 226, 226, 0.75);
}

.orders-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .orders-drawer-actions {
    flex-direction: row;
  }
}

.orders-filter-card,
.orders-summary-card,
.orders-table-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.orders-filter-card {
  padding: 18px;
}

.orders-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.orders-filter-row,
.orders-filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.orders-filter-row label,
.orders-filter-field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.orders-filter-row input,
.orders-filter-row select,
.orders-filter-field input,
.orders-filter-field select {
  min-height: 42px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px;
  box-sizing: border-box;
}

.orders-filter-row input:focus,
.orders-filter-row select:focus,
.orders-filter-field input:focus,
.orders-filter-field select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.orders-search-field {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px 0 38px;
}

.orders-search-field i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.orders-search-field input {
  min-height: 40px;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.orders-search-field input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.orders-helper {
  font-size: 12px;
  color: #94a3b8;
}

.orders-filter-note {
  grid-column: 1 / -1;
  margin-top: -4px;
}

.orders-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.orders-summary-card {
  padding: 16px;
}

.orders-summary-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.orders-summary-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.orders-summary-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.orders-summary-icon--pending {
  background: #eef2ff;
  color: #4f46e5;
}

.orders-summary-icon--approved {
  background: #ecfdf5;
  color: #059669;
}

.orders-summary-icon--changes {
  background: #fff7ed;
  color: #ea580c;
}

.orders-summary-icon--rejected {
  background: #fef2f2;
  color: #dc2626;
}

.orders-summary-title {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  color: #64748b;
}

.orders-summary-value {
  margin-top: 14px;
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
}

.orders-summary-card .orders-summary-value {
  letter-spacing: -0.02em;
}

.orders-table-card {
  overflow: hidden;
}

.orders-table-scroll {
  overflow-x: auto;
}

.orders-table-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #e2e8f0;
}

.orders-count {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}

.orders-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.orders-table thead th {
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.orders-table tbody td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #0f172a;
  text-align: center;
}

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

.orders-table .orders-order-number {
  font-weight: 700;
  color: #0f172a;
}

.orders-table .orders-meta {
  color: #64748b;
  font-size: 13px;
}

.orders-table .orders-order-number,
.orders-table .orders-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.orders-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.orders-pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.orders-mobile-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

@media (max-width: 1024px) {
  .orders-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .orders-filter-grid {
    grid-template-columns: 1fr;
  }

  .orders-summary-grid {
    grid-template-columns: 1fr;
  }

  .orders-table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .orders-table-footer .orders-pagination-controls {
    width: 100%;
    justify-content: space-between;
  }
}
