body {
  font-family: 'Rubik', 'Segoe UI', Tahoma, sans-serif;
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #eef2ff 0%, #dbeafe 45%, #c7d2fe 100%);
  color: #0f172a;
  direction: rtl;
  min-height: 100vh;
}

h1 {
  text-align: center;
  padding: 1.2rem;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  margin: 0 0 1.5rem 0;
  font-size: 1.9rem;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

form {
  max-width: 650px;
  margin: auto;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  color: #111827;
  box-sizing: border-box;
}

label {
  display: block;
  margin-bottom: 1.2rem;
  font-weight: 600;
  color: #1e293b;
}

input, select {
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.3rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  background: #f1f5f9;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

input:focus, select:focus {
  outline: none;
  border-color: #0ea5e9;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.3);
}

button {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  border: none;
  padding: 0.9rem 1.4rem;
  margin-top: 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(14,165,233,0.4);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(14,165,233,0.6);
}

button[type="button"] {
  background: linear-gradient(135deg, #475569, #334155);
}

button[type="button"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(51,65,85,0.6);
}

#passengers > div {
  border: 1px solid #e2e8f0;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: #f1f5f9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

#passengers h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #1e40af;
}

table {
  width: 95%;
  margin: auto;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

table th, table td {
  border: 1px solid #e2e8f0;
  padding: 0.8rem;
  text-align: center;
  font-size: 0.95rem;
  color: #111827;
}

table th {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: white;
}

table tr:nth-child(even) {
  background: #f1f5f9;
}

table tr:hover {
  background: #e0f2fe;
}


.filters-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  justify-content: flex-start;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.94));
  padding: 1rem 1.25rem;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  width: 100%;
  color: #1f2937;
}

.filters-form .field {
  display: flex;
  flex-direction: column;
  flex: 1 1 220px;
  min-width: 160px;
}

.filters-form .field label {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #1f2937;
}

.filters-form input,
.filters-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.filters-form .actions-group {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex: 0 0 auto;
}

.filters-form button {
  margin-top: 0;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.filters-form button.secondary {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #f8fafc;
}

.filters-form button.ghost {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #1f2937;
}

.filters-form button.ghost:hover {
  background: rgba(148, 163, 184, 0.22);
  color: #0f172a;
}

@media (max-width: 960px) {
  .filters-form {
    gap: 0.75rem;
  }

  .filters-form .field {
    flex: 1 1 200px;
  }
}

@media (max-width: 640px) {
  .filters-form {
    padding: 0.85rem 0.9rem;
  }

  .filters-form .actions-group {
    width: 100%;
    justify-content: stretch;
  }

  .filters-form button {
    flex: 1 1 140px;
  }
}

@media (max-width: 768px) {
  form {
    width: 92%;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .table-wrapper {
    overflow-x: hidden;
  }

  table {
    min-width: 720px;
    font-size: 0.9rem;
  }

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

@media (max-width: 480px) {
  body {
    padding-bottom: 2rem;
  }

  form {
    width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 1.2rem 1rem;
    box-shadow: none;
  }

  h1 {
    font-size: 1.3rem;
    padding: 1rem 0.5rem;
    border-radius: 0;
  }

  button {
    width: 100%;
    margin-right: 0;
  }

  #passengers > div {
    padding: 0.8rem 0.7rem;
    margin-bottom: 0.8rem;
  }
}
button.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

button.danger:hover {
  box-shadow: 0 6px 14px rgba(185, 28, 28, 0.6);
}

.admin-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.admin-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.admin-container h1 {
  background: none;
  color: #1f2937;
  padding: 0;
  margin: 0;
  box-shadow: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.table-wrapper {
  background: rgba(248, 250, 252, 0.95);
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(79, 70, 229, 0.15);
  padding: 1.2rem;
  overflow-x: hidden;
}

#registrationsTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  table-layout: fixed;
}

#registrationsTable th,
#registrationsTable td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem 0.55rem;
  text-align: center;
  color: #0f172a;
  white-space: normal;
  word-break: break-word;
}

#registrationsTable th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #f8fafc;
  z-index: 2;
}

#registrationsTable tbody tr:nth-child(even) {
  background: #eef2ff;
}

#registrationsTable tbody tr:hover {
  background: #dbeafe;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pending {
  background: rgba(250, 204, 21, 0.22);
  color: #92400e;
}

.status-approved {
  background: rgba(34, 197, 94, 0.22);
  color: #166534;
}

.status-rejected {
  background: rgba(248, 113, 113, 0.26);
  color: #9f1239;
}

.actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
}

.action {
  background: none;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #f8fafc;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action:hover {
  transform: translateY(-1px);
}

.action.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.action.warning {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.action.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}




.filters-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(221, 231, 255, 0.9));
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.2);
  margin: 0;
  color: #1f2937;
  width: 100%;
  overflow-x: visible;
  scrollbar-width: thin;
}

.filters-form::-webkit-scrollbar {
  height: 6px;
}

.filters-form::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}

.filters-form .field {
  display: flex;
  flex-direction: column;
  flex: 1 1 180px;
  min-width: 160px;
}

.filters-form .field label {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #1f2937;
}

.filters-form input,
.filters-form select {
  width: 100%;
  padding: 0.6rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
}

.filters-form .actions-group {
  flex: 0 0 auto;
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.filters-form button {
  margin-top: 0;
  padding: 0.6rem 1.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.filters-form button.secondary {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #f8fafc;
}

.filters-form button.ghost {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #1f2937;
}

.filters-form button.ghost:hover {
  background: rgba(148, 163, 184, 0.25);
  color: #0f172a;
}

.action-feedback {
  min-height: 1.4rem;
  text-align: center;
  font-weight: 600;
  color: #2563eb;
  margin: 0 0 1.2rem;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.action-feedback[data-visible="true"] {
  opacity: 1;
}

.action-feedback[data-type="success"] {
  color: #22c55e;
}

.action-feedback[data-type="error"] {
  color: #fb7185;
}

.table-wrapper {
  overflow: hidden;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  align-items: center;
}

.action {
  min-width: 68px;
}

.loading-row td {
  text-align: center;
  font-weight: 600;
  color: #475569;
}

.empty-state {
  margin-top: 1.5rem;
  background: rgba(248, 250, 252, 0.92);
  border-radius: 16px;
  padding: 1.6rem;
  text-align: center;
  color: #475569;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
}

@media (max-width: 768px) {
  .admin-container {
    padding: 1rem 0 2rem;
  }

  .admin-header {
    padding: 0 1rem;
  }

  .filters-form {
    flex-direction: column;
    gap: 1rem;
  }

  .filters-form .field {
    width: 100%;
  }

  .filters-form .actions-group {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .filters-form button {
    width: 100%;
  }

  .table-wrapper {
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }

  .responsive-table {
    border: none;
    box-shadow: none;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    display: block;
    margin-bottom: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #f8fafc;
    padding: 1rem;
    border: 1px solid #e2e8f0;
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border: none;
    border-bottom: 1px solid #eef2ff;
    text-align: left;
    font-size: 1rem;
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #334155;
    margin-right: 1rem;
    text-align: right;
  }

  .actions {
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5rem;
    width: 100%;
  }

  .action {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .admin-container {
    padding: 0.5rem 0 1.5rem;
  }

  .admin-header {
    padding: 0 0.75rem;
  }

  .filters-form {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .filters-form button {
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
  }

  .responsive-table tr {
    padding: 0.75rem;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
  }

  .responsive-table td {
    padding: 0.6rem 0.25rem;
    font-size: 0.9rem;
  }

  .responsive-table td::before {
    font-size: 0.85rem;
  }

  .action {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    min-width: 50px;
  }

  .status-badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* Admin mobile refresh */
.admin-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.filters-toggle {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.filters-toggle:hover {
  background: rgba(37, 99, 235, 0.16);
  color: #1e40af;
}

.filters-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.filters-form.collapsed {
  display: none;
}

.filters-form .actions-group {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.filters-form .actions-group button {
  flex: 0 0 auto;
}

.mobile-cards {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.mobile-card {
  background: rgba(248, 250, 252, 0.96);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mobile-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-card__title {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.mobile-card__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-weight: 700;
  color: #0f172a;
  font-size: 1.02rem;
}

.mobile-card__chip {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.mobile-card__meta {
  font-size: 0.85rem;
  color: #475569;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.mobile-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.1rem;
  font-size: 0.9rem;
  color: #1e293b;
}

.mobile-card__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.mobile-card__item dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.mobile-card__item dd {
  margin: 0;
  font-weight: 500;
  color: #0f172a;
  word-break: break-word;
}

.mobile-card__link {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.mobile-card__link:hover {
  text-decoration: underline;
}

.mobile-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.mobile-card__actions .action {
  flex: 1 1 120px;
  min-width: 90px;
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
}

.mobile-card--loading {
  text-align: center;
  font-weight: 600;
  color: #475569;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  background: rgba(226, 232, 240, 0.55);
  padding: 1rem;
  border-radius: 16px;
}

@media (min-width: 721px) {
  .filters-toggle {
    display: none;
  }

  .filters-form.collapsed {
    display: grid;
  }

  .mobile-cards {
    display: none;
  }
}

@media (max-width: 900px) {
  .filters-form {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-title-bar {
    align-items: flex-start;
  }

  .filters-toggle {
    display: inline-flex;
  }

  .filters-form {
    padding: 0.75rem;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .filters-form .actions-group {
    justify-content: stretch;
  }

  .filters-form .actions-group button,
  .filters-form button {
    flex: 1 1 45%;
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .table-wrapper {
    padding: 0;
    background: none;
    box-shadow: none;
  }

  #registrationsTable,
  .responsive-table {
    display: none;
  }

  .mobile-cards {
    display: flex;
  }

  .empty-state {
    margin-inline: 0.75rem;
  }
}

@media (max-width: 480px) {
  .admin-title-bar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-card {
    padding: 0.85rem 0.9rem;
    gap: 0.75rem;
  }

  .mobile-card__grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .mobile-card__actions .action {
    flex: 1 1 100%;
    font-size: 0.82rem;
  }
}
