/* DANZFLO — Order Management */

.evt-orders-page {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(124, 58, 237, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(37, 99, 235, 0.05), transparent 50%),
    #f8fafc;
}

.evt-orders-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.evt-orders-badge {
  display: inline-flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 1.125rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 9999px;
}

.evt-orders-title {
  margin: 0.5rem 0 0;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.evt-orders-subtitle {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
}

.evt-orders-header-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.evt-orders-header-stat__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.evt-orders-header-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

/* Panel */
.evt-orders-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.evt-orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
}

.evt-orders-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.evt-orders-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.evt-orders-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.625rem;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evt-orders-filter-btn svg {
  width: 1rem;
  height: 1rem;
}

.evt-orders-filter-btn:hover,
.evt-orders-filter-btn.is-open {
  color: #7c3aed;
  border-color: #c4b5fd;
  background: rgba(124, 58, 237, 0.04);
}

.evt-orders-search {
  display: flex;
  align-items: center;
  gap: 0;
  height: 2.625rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.evt-orders-search:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  background: #fff;
}

.evt-orders-search input {
  width: 12rem;
  max-width: 40vw;
  height: 100%;
  padding: 0 0.875rem;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: #0f172a;
}

.evt-orders-search input::placeholder { color: #94a3b8; }

.evt-orders-search-btn {
  height: 100%;
  padding: 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: #0f172a;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.evt-orders-search-btn:hover { background: #1e293b; }

/* Filter panel */
.evt-orders-filter-panel {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}

.evt-orders-filter-panel[hidden] { display: none; }

.evt-orders-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.875rem;
}

.evt-orders-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 10rem;
}

.evt-orders-filter-field--toolbar {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.evt-orders-filter-field--toolbar .evt-orders-filter-label {
  margin: 0;
  white-space: nowrap;
}

.evt-orders-filter-field--toolbar .evt-orders-filter-select {
  min-width: 9rem;
}

.evt-orders-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.evt-orders-filter-select {
  height: 2.5rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #0f172a;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 0.5rem center / 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  appearance: none;
  cursor: pointer;
}

.evt-orders-filter-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.evt-orders-filter-clear,
.evt-orders-filter-apply {
  height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evt-orders-filter-clear {
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.evt-orders-filter-clear:hover {
  color: #ef4444;
  border-color: #fca5a5;
}

.evt-orders-filter-apply {
  color: #fff;
  background: #7c3aed;
  border: none;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.evt-orders-filter-apply:hover {
  background: #6d28d9;
}

/* Table */
.evt-orders-table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.evt-orders-table-wrap--initial {
  min-height: 220px;
}

.evt-orders-table-wrap--busy .evt-orders-table {
  opacity: 0.45;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.evt-orders-table-busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.evt-orders-table th.text-center,
.evt-orders-table td.text-center {
  text-align: center;
}

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

.evt-orders-table th {
  padding: 0.875rem 1.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.evt-orders-table th.text-center,
.evt-orders-table td.text-center { text-align: center; }

.evt-orders-table td {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.evt-orders-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.evt-orders-table tbody tr {
  transition: background 0.15s ease;
}

.evt-orders-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.04);
}

.evt-orders-table tbody tr:last-child td { border-bottom: none; }

.evt-orders-name {
  font-weight: 600;
  color: #0f172a;
}

.evt-orders-username {
  color: #64748b;
  font-size: 0.8125rem;
}

.evt-orders-email {
  color: #475569;
  font-size: 0.8125rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evt-orders-event-name {
  font-weight: 600;
  color: #0f172a;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evt-orders-organizer {
  color: #475569;
  font-size: 0.8125rem;
}

.evt-orders-category {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: capitalize;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.evt-orders-category--dance {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.18);
}

.evt-orders-category--music {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.18);
}

.evt-orders-category--workshop {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

.evt-orders-category--social {
  color: #be185d;
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.18);
}

.evt-orders-ticket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
}

.evt-orders-date {
  font-variant-numeric: tabular-nums;
  color: #475569;
  font-size: 0.8125rem;
}

.evt-orders-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
}

.evt-orders-flag--no {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.evt-orders-flag--yes {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
}

.evt-orders-flag svg {
  width: 0.875rem;
  height: 0.875rem;
}

.evt-orders-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.875rem;
}

/* Pagination */
.evt-orders-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #eef2f7;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.4), rgba(255, 255, 255, 0.9));
}

.evt-orders-pagination-info {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
}

.evt-orders-pagination-info strong {
  color: #334155;
  font-weight: 600;
}

.evt-orders-page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evt-orders-page-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.evt-orders-page-nav,
.evt-orders-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.125rem;
  height: 2.125rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evt-orders-page-nav svg { width: 1rem; height: 1rem; }

.evt-orders-page-nav:hover:not(:disabled),
.evt-orders-page-btn:hover {
  color: #7c3aed;
  border-color: #c4b5fd;
  background: rgba(124, 58, 237, 0.04);
}

.evt-orders-page-nav:disabled { opacity: 0.4; cursor: not-allowed; }

.evt-orders-page-nums {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.evt-orders-page-btn.active {
  color: #7c3aed;
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
}

.evt-orders-page-ellipsis {
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 0 0.125rem;
}

.evt-orders-header-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.evt-orders-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.evt-orders-back:hover {
  color: #7c3aed;
  border-color: #c4b5fd;
  background: rgba(124, 58, 237, 0.04);
}

.evt-orders-back svg { width: 1.125rem; height: 1.125rem; }

.evt-orders-header-top .evt-orders-badge { height: 2.5rem; }
.evt-orders-header-top + .evt-orders-title { margin-top: 0; }

.evt-orders-col-expand { width: 3rem; }

.evt-orders-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #64748b;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evt-orders-expand:hover {
  color: #7c3aed;
  border-color: #c4b5fd;
  background: rgba(124, 58, 237, 0.04);
}

.evt-orders-expand svg {
  width: 0.875rem;
  height: 0.875rem;
}

.evt-orders-expand.is-open {
  color: #fff;
  background: #7c3aed;
  border-color: #7c3aed;
}

.evt-orders-event {
  font-weight: 600;
  color: #0f172a;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evt-orders-registered {
  color: #475569;
  font-size: 0.8125rem;
}

.evt-orders-price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f172a;
}

.evt-orders-ticket-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
}

.evt-orders-date {
  font-variant-numeric: tabular-nums;
  color: #475569;
  font-size: 0.8125rem;
}

.evt-orders-status {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  border-radius: 999px;
  border: 1px solid transparent;
}

.evt-orders-status--active {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.2);
}

.evt-orders-status--cancelled {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.18);
}

.evt-orders-status--refunded {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

.evt-orders-status--pending {
  color: #d97706;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.2);
}

.evt-orders-attendees-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.evt-orders-attendees-btn:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.3);
}

.evt-orders-detail-row td {
  padding: 0 !important;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.evt-orders-detail {
  padding: 1rem 1.25rem 1.125rem 3.5rem;
}

.evt-orders-detail-title {
  margin: 0 0 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.evt-orders-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evt-orders-ticket-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  color: #334155;
}

.evt-orders-ticket-item strong {
  font-weight: 600;
  color: #0f172a;
}

.evt-orders-email {
  color: #64748b;
  font-size: 0.8125rem;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evt-orders-ticket-name {
  font-weight: 500;
  color: #334155;
}

.evt-orders-page-size-select {
  height: 2.125rem;
  padding: 0 2rem 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 0.5rem center / 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  appearance: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .evt-orders-header { flex-direction: column; }
  .evt-orders-toolbar { flex-direction: column; align-items: stretch; }
  .evt-orders-toolbar-actions { flex-direction: column; align-items: stretch; }
  .evt-orders-search { width: 100%; }
  .evt-orders-search input { flex: 1; width: auto; max-width: none; }
  .evt-orders-filter-actions { margin-left: 0; width: 100%; }
  .evt-orders-filter-clear,
  .evt-orders-filter-apply { flex: 1; }
}
