@import url("https://cdn.jsdelivr.net/npm/tailwindcss@3.4.3/base.min.css");
@import url("https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.css");

/* Global Reset */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  background:
          radial-gradient(ellipse at top left, rgba(30, 58, 95, 0.3) 0%, transparent 50%),
          radial-gradient(ellipse at top right, rgba(201, 169, 97, 0.15) 0%, transparent 50%),
          radial-gradient(ellipse at bottom right, rgba(30, 58, 95, 0.4) 0%, transparent 50%),
          radial-gradient(ellipse at bottom left, rgba(45, 74, 111, 0.2) 0%, transparent 50%),
          linear-gradient(135deg, #0a1628 0%, #1E3A5F 30%, #2D4A6F 70%, #1E3A5F 100%);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #ffffff;
  padding: 0;
  margin: 0;
  position: relative;
  min-height: 100vh;
}

/* Premium textured overlay for depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-image:
          radial-gradient(circle at 85% 15%, rgba(201, 169, 97, 0.08) 0%, transparent 25%),
          radial-gradient(circle at 15% 85%, rgba(30, 58, 95, 0.08) 0%, transparent 25%),
          repeating-linear-gradient(
                  45deg,
                  transparent,
                  transparent 60px,
                  rgba(255, 255, 255, 0.01) 60px,
                  rgba(255, 255, 255, 0.01) 120px
          );
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

body > * {
  position: relative;
  z-index: 1;
}

.navbar {
  background: rgba(30, 58, 95, 0.5); /* Semi-transparent navy blue */
  backdrop-filter: blur(10px); /* Blur effect */
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  border: 1px solid rgba(201, 169, 97, 0.4); /* Gold border */
  border-radius: 12px; /* Rounded corners */
  color: #ffffff; /* White text */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow */
}

.navbar a {
  color: #e0e0e0; /* Neutral white/silver text for links */
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.navbar a:hover {
  color: #ffffff; /* Bright white on hover */
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5); /* Subtle glow */
}
/* Forçar a cor de fundo ao passar o mouse sobre as linhas da tabela */
tbody tr {
  background-color: rgba(10, 22, 40, 0.4) !important;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tbody tr:hover {
  background-color: rgba(201, 169, 97, 0.2) !important;
  color: #ffffff !important;
  transform: translateX(2px);
  box-shadow: inset 3px 0 0 rgba(201, 169, 97, 0.8);
}

/* Mais específico para o caso de conflito com Tailwind ou outra biblioteca */
table.min-w-full tbody tr:hover {
  background-color: rgba(201, 169, 97, 0.25) !important; /* Gold highlight on hover */
  color: #ffffff !important; /* Texto em branco */
}

/* Table cell styling for smaller text */
table.w-full tbody td {
  padding: 0.5rem 0.75rem; /* py-2 px-3 equivalent */
  font-size: 0.875rem; /* text-sm equivalent */
  line-height: 1.25rem;
}

/* Table header styling to match */
table.w-full thead th {
  padding: 0.125rem 0.25rem; /* Further reduced padding for headers */
  line-height: 0.875rem;
}

/* Table wrapper for dynamic resizing and scrolling */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow:
          0 8px 24px rgba(0, 0, 0, 0.3),
          inset 0 1px 0 rgba(255, 255, 255, 0.05);
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 97, 0.4);
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Maroltrans Top Accent Stripe */
.table-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg,
  rgba(30, 58, 95, 1) 0%,
  rgba(30, 58, 95, 1) 60%,
  rgba(255, 255, 255, 0.8) 60%,
  rgba(255, 255, 255, 0.8) 63%,
  rgba(201, 169, 97, 1) 63%,
  rgba(201, 169, 97, 1) 70%,
  rgba(30, 58, 95, 1) 70%
  );
  z-index: 10;
}

/* Ensure table takes full width within wrapper */
.table-wrapper table {
  min-width: 100%; /* Prevent table from shrinking */
  table-layout: auto; /* Allow columns to adjust */
}

.container {
  background-color: rgba(10, 22, 40, 0.6);
  padding: 20px;
  border-radius: 12px;
  box-shadow:
          0 8px 24px rgba(0, 0, 0, 0.3),
          inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(201, 169, 97, 0.3);
}
@media (max-width: 768px) {
  #mobile-menu {
    display: block;
  }
  .desktop-nav {
    display: none;
  }
}
@media (min-width: 769px) {
  #mobile-menu {
    display: none;
  }
  .desktop-nav {
    display: flex;
  }
}
select {
  max-width: 100%;
}

.container .flex {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}


.custom-select {
  background-color: rgba(10, 22, 40, 0.8);
  color: #ffffff;
  border: 1px solid rgba(201, 169, 97, 0.5);
  padding: 10px 14px;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.custom-select:focus {
  outline: none;
  border-color: #C9A961;
  box-shadow:
          0 0 12px rgba(201, 169, 97, 0.5),
          inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.custom-select-wrapper {
  position: relative;
  display: inline-block;
  width: 50%;
  padding:0%;
}
.custom-select-wrapper:after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #1a202c; /* Dark arrow color */
  pointer-events: none;
  transform: translateY(-50%);
}
.select2-container--default .select2-selection--single {
  background-color: rgba(10, 22, 40, 0.9);
  border: 1px solid rgba(201, 169, 97, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.select2-container--default .select2-results > .select2-results__options {
  background-color: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.select2-search__field {
  background-color: rgba(10, 22, 40, 0.8);
  color: #fff;
  border: 1px solid rgba(201, 169, 97, 0.3);
}
body {
  font-family: 'Inter', 'Poppins', 'Nunito', sans-serif;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.form-container {
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 97, 0.4);
  padding: 24px;
  border-radius: 16px;
  box-shadow:
          0 8px 32px rgba(0, 0, 0, 0.4),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* Maroltrans Diagonal Stripe Accent */
.form-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg,
  rgba(30, 58, 95, 0.8) 0%,
  rgba(30, 58, 95, 0.8) 70%,
  rgba(255, 255, 255, 0.6) 70%,
  rgba(255, 255, 255, 0.6) 73%,
  rgba(201, 169, 97, 0.9) 73%,
  rgba(201, 169, 97, 0.9) 80%,
  rgba(30, 58, 95, 0.8) 80%
  );
  z-index: 1;
}

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

.form-header h1 {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff; /* White text */
}

video {
  width: 100%;
  max-width: 600px;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  background-color: #ffffff;
  color: #000000;
}

.select2-container--open .select2-dropdown--below {
  background-color: #1E3A5F;
  color: #ffffff;
}

.select2-container--default .select2-results__option {
  background-color: #1E3A5F;
  color: #ffffff;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #2D4A6F;
  color: #ffffff;
}

/* ── Filter bar (view_data page — dark theme) ── */
.filters-bar {
  background: linear-gradient(135deg, rgba(13, 27, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 100%);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.filters-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.filter-select-wrapper {
  display: flex;
  flex-direction: column;
}
.filter-client-col {
  min-width: 240px;
  flex: 1 1 240px;
  max-width: 360px;
}
.filter-small-col {
  min-width: 100px;
  flex: 0 1 120px;
}
.filter-clear-col {
  min-width: 80px;
  flex: 0 0 auto;
}
.filter-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(201, 169, 97, 0.7);
  margin-bottom: 0;
  padding-left: 0;
  text-align: center;
}

/* Select2 in filter context */
.filter-select-wrapper .select2-container--default .select2-selection--single {
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  display: flex;
  align-items: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-select-wrapper .select2-container--default .select2-selection--single:hover {
  border-color: #9ca3af;
}
.filter-select-wrapper .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #C9A961;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}
.filter-select-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
  background: transparent;
  color: #1f2937;
  line-height: 38px;
  padding-left: 0;
}
.filter-select-wrapper .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #9ca3af;
}
.filter-select-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
}
.filter-select-wrapper .select2-container--default .select2-selection--single .select2-selection__clear {
  color: #9ca3af;
  font-size: 16px;
  margin-right: 4px;
}
.filter-select-wrapper .select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: #ef4444;
}

/* Filter Select2 dropdown */
.select2-container--default .select2-dropdown {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  background: #fff;
  color: #1f2937;
  outline: none;
  transition: border-color 0.2s;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: #C9A961;
  box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.15);
}
.view-data-page .select2-container--default .select2-results__option {
  padding: 8px 12px;
  font-size: 14px;
  background: #fff;
  color: #1f2937;
}
.view-data-page .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: #C9A961;
  color: #fff;
}
.view-data-page .select2-container--default .select2-results > .select2-results__options {
  background: #fff;
  max-height: 280px;
}

/* Clear filters button */
.clear-filters-btn {
  height: auto;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  margin-top: auto;
}
.clear-filters-btn:hover {
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ── Improved Select2 search field in dark theme (data entry) ── */
.select2-container--default .select2-search--dropdown {
  padding: 8px;
}
.select2-container--default .select2-results__option {
  padding: 8px 12px;
  transition: background 0.15s;
}

/* ── Select2 animations ── */
.select2-container--open .select2-dropdown {
  animation: select2SlideIn 0.15s ease-out;
}
@keyframes select2SlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

body {
  font-family: 'Inter', 'Poppins', 'Nunito', sans-serif;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.form-container {
  background-color: rgba(10, 22, 40, 0.75);
  padding: 24px;
  border-radius: 12px;
  box-shadow:
          0 8px 24px rgba(0, 0, 0, 0.3),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.form-header h1 {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff; /* White text */
}

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

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #e0e0e0; /* Brighter text for better contrast */
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 16px;
  backdrop-filter: blur(5px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group select:focus {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  outline: none;
}

.form-group .edit-client-button {
  margin-left: 10px;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 193, 7, 0.8);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.form-group .edit-client-button:hover {
  background: rgba(255, 193, 7, 1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-actions .save-button {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(201, 169, 97, 0.5);
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.8) 0%, rgba(212, 175, 55, 0.8) 100%);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.form-actions .save-button:hover {
  background: linear-gradient(135deg, rgba(201, 169, 97, 1) 0%, rgba(212, 175, 55, 1) 100%);
  box-shadow: 0 6px 12px rgba(201, 169, 97, 0.4);
  transform: translateY(-2px);
}

#confirmation-message {
  text-align: center;
  font-weight: bold;
  color: #28a745; /* Green text for success message */
}
#upload-modal {
  z-index: 1000 !important;  /* Garante que o modal fique acima de outros elementos */
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.8); /* Fundo escuro para destacar o modal */
}

#upload-modal .modal-content {
  background: white;
  padding: 20px;
  width: 50%; /* Aumenta a largura */
  max-width: 600px; /* Define um tamanho máximo */
  min-width: 400px; /* Garante que não fique muito pequeno */
  min-height: 300px; /* Aumenta a altura */
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#drop-area {
  width: 100%;
  height: 150px; /* Aumenta a área de drop */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ccc;
  margin-top: 20px;
  background-color: #f8f8f8;
  border-radius: 5px;
  cursor: pointer;
}

.select2-container {
  z-index: 999 !important;
}
#upload-modal {
  display: none; /* Oculta o modal inicialmente */
  z-index: 1000 !important;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none !important; /* Garante que o modal esteja oculto */
}
/* Layout Configuration */
.form-layout {
  display: flex;
  gap: 20px;
}

.form-left {
  flex: 2;
}

.form-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
}

textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Checkbox Styling */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.form-actions {
  margin-top: 20px;
  text-align: center;
}

.save-button {
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.8) 0%, rgba(212, 175, 55, 0.8) 100%);
  color: white;
  padding: 10px 15px;
  border: 1px solid rgba(201, 169, 97, 0.5);
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.save-button:hover {
  background: linear-gradient(135deg, rgba(201, 169, 97, 1) 0%, rgba(212, 175, 55, 1) 100%);
  box-shadow: 0 6px 12px rgba(201, 169, 97, 0.4);
  transform: translateY(-2px);
}
/* Align Checkboxes Next to Each Other */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between labels and checkboxes */
}

/* Reduce Checkbox Size */
.small-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.delete-button {
  background: rgba(255, 77, 77, 0.8);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 8px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.delete-button:hover {
  background: rgba(255, 77, 77, 1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
/* Alinhar botões lado a lado */
.button-group {
  display: center;
  justify-content: flex-start; /* Alinha os botões à esquerda */
  gap: 10px; /* Adiciona espaço entre os botões */
}
/* === SweetAlert2 FIXES (place at the very end of your CSS) === */
.swal2-container { z-index: 20000 !important; } /* above your modals/select2 */

.swal2-actions {
  display: flex !important;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  visibility: visible !important;
  opacity: 1 !important;
}

.swal2-styled {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 0.625rem 1.25rem;
  font-size: 16px !important;
  line-height: 1.2 !important;
  color: #fff !important;
  background: #4f46e5 !important;  /* confirm */
  border: 0 !important;
  border-radius: 0.5rem;
}

.swal2-styled.swal2-cancel {
  background: #6b7280 !important;   /* cancel */
}

.swal2-input {
  display: block !important;         /* ensure the number field renders */
  max-width: 220px;
  margin: 0.75rem auto;
  text-align: center;
}

/* SweetAlert2: show inputs only when explicitly requested */
.swal2-popup .swal2-input {
  display: none;                 /* default: hidden (prevents ghost inputs in radio dialogs) */
}

.swal2-popup .swal2-input.swal2-input--visible {
  display: block;                /* visible only when we opt-in from JS */
  max-width: 220px;
  margin: 0.75rem auto;
  text-align: center;
}

/* Additional hardening for ghost inputs */
.swal2-popup .swal2-input:not(.swal2-input--visible) {
  display: none !important;
}
.swal2-deny { display: none !important; }

/* Fixed Header Styles - Ultra Premium Notch Design */
.fixed-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 750px);
  height: 58px;
  min-height: 58px;
  background: linear-gradient(135deg,
  rgba(8, 18, 32, 0.96) 0%,
  rgba(15, 30, 50, 0.96) 30%,
  rgba(20, 40, 65, 0.96) 50%,
  rgba(15, 30, 50, 0.96) 70%,
  rgba(8, 18, 32, 0.96) 100%);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-top: none;
  box-shadow:
          0 12px 48px rgba(0, 0, 0, 0.6),
          0 4px 12px rgba(0, 0, 0, 0.4),
          inset 0 1px 0 rgba(255, 255, 255, 0.06),
          inset 0 -1px 0 rgba(201, 169, 97, 0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-radius: 0 0 32px 32px;
  -webkit-border-radius: 0 0 32px 32px;
  overflow: hidden;
}

/* Elegant bottom accent with depth */
.fixed-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
  rgba(201, 169, 97, 0.4) 0%,
  rgba(201, 169, 97, 0.6) 50%,
  rgba(201, 169, 97, 0.4) 100%
  );
  box-shadow: 0 1px 3px rgba(201, 169, 97, 0.2);
  z-index: 10;
}

/* Premium textured pattern overlay */
.fixed-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
          radial-gradient(circle at 20% 50%, rgba(201, 169, 97, 0.03) 0%, transparent 50%),
          radial-gradient(circle at 80% 50%, rgba(201, 169, 97, 0.03) 0%, transparent 50%),
          repeating-linear-gradient(
                  90deg,
                  transparent,
                  transparent 2px,
                  rgba(255, 255, 255, 0.01) 2px,
                  rgba(255, 255, 255, 0.01) 4px
          );
  pointer-events: none;
  z-index: 1;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: none;
  padding: 0 4px;
}

.header-logo {
  display: flex;
  align-items: center;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.header-welcome {
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Analog Clock Styles */
.header-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; /* Increased size */
  height: 42px; /* Increased size */
  position: relative;
}

.analog-clock {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.clock-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.hour-hand, .minute-hand, .second-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%);
}

.hour-hand {
  width: 2.5px;
  height: 18px;
  background: #ffffff;
  border-radius: 1.25px;
}

.minute-hand {
  width: 2px;
  height: 24px;
  background: #ffffff;
  border-radius: 1px;
}

.second-hand {
  width: 1.5px;
  height: 26px;
  background: #ff6b6b;
  border-radius: 0.75px;
}

/* Vertical Navbar Styles - Ultra Premium Glass Effect */
.vertical-navbar {
  position: fixed;
  top: 58px;
  left: 0;
  width: 250px;
  height: calc(100vh - 58px);
  background: linear-gradient(180deg,
  rgba(8, 18, 32, 0.94) 0%,
  rgba(15, 30, 50, 0.94) 30%,
  rgba(20, 40, 65, 0.94) 50%,
  rgba(15, 30, 50, 0.94) 70%,
  rgba(8, 18, 32, 0.94) 100%);
  backdrop-filter: blur(35px) saturate(160%);
  -webkit-backdrop-filter: blur(35px) saturate(160%);
  border-right: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: 0 0 16px 0;
  box-shadow:
          4px 0 24px rgba(0, 0, 0, 0.5),
          2px 0 8px rgba(0, 0, 0, 0.3),
          inset -1px 0 0 rgba(255, 255, 255, 0.04);
  z-index: 998;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease, top 0.3s ease;
  position: relative;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Premium textured pattern for navbar */
.vertical-navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
          radial-gradient(circle at 50% 20%, rgba(201, 169, 97, 0.04) 0%, transparent 50%),
          radial-gradient(circle at 50% 80%, rgba(201, 169, 97, 0.04) 0%, transparent 50%),
          repeating-linear-gradient(
                  0deg,
                  transparent,
                  transparent 3px,
                  rgba(255, 255, 255, 0.008) 3px,
                  rgba(255, 255, 255, 0.008) 6px
          );
  pointer-events: none;
  z-index: 0;
}

/* Elegant gold accent strip at bottom */
.vertical-navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
  transparent 0%,
  rgba(201, 169, 97, 0.4) 10%,
  rgba(201, 169, 97, 0.6) 50%,
  rgba(201, 169, 97, 0.4) 90%,
  transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.vertical-navbar > * {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.vertical-navbar.collapsed {
  width: 70px;
  min-width: 70px; /* Ensure minimum width */
}

.navbar-toggle {
  padding: 15px;
  background: rgba(30, 58, 95, 0.6);
  color: #ffffff;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
  display: flex !important;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  min-height: 50px;
  border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.sortable:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sortable::after {
  content: ' ⇅';
  font-size: 0.8em;
  margin-left: 5px;
}

.navbar-toggle:hover {
  background: rgba(201, 169, 97, 0.3);
}

.navbar-toggle:focus {
  outline: 2px solid rgba(0, 123, 255, 0.8);
  outline-offset: 2px;
}


.navbar-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  pointer-events: auto;
  z-index: 10;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #e0e0e0;
  text-decoration: none;
  border-radius: 8px;
  margin: 5px 10px;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
  pointer-events: auto !important;
  z-index: 10;
}

.nav-link i {
  margin-right: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 18px;
  pointer-events: none; /* Let clicks pass through to the parent link */
}

.nav-link span {
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none; /* Let clicks pass through to the parent link */
}

.vertical-navbar.collapsed .nav-link span {
  opacity: 0;
  visibility: hidden;
}

.vertical-navbar.collapsed .nav-link {
  justify-content: center;
  padding: 15px;
  text-align: center;
}

.vertical-navbar.collapsed .nav-link i {
  margin-right: 0;
}

.nav-link:hover {
  background: rgba(201, 169, 97, 0.15);
  color: #ffffff;
  border-left: 3px solid rgba(201, 169, 97, 0.7);
}

.vertical-navbar.collapsed .nav-link:hover {
  border-left: none;
  border-bottom: 3px solid rgba(201, 169, 97, 0.6);
}

.nav-link.active {
  background: rgba(96, 96, 96, 0.5);
  color: #ffffff;
  box-shadow: inset 0 0 0 3px rgba(160, 160, 160, 0.7);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: rgba(192, 192, 192, 0.9);
  border-radius: 2px;
}

/* Main Content Layout */
.main-content {
  margin-top: 98px;
  margin-left: 320px;
  min-height: 100vh;
  background: rgba(0, 0, 0, 0.1);
  padding: 24px;
  transition: margin-left 0.3s ease, margin-top 0.3s ease;
  position: relative;
  z-index: 1;
}

.vertical-navbar.collapsed ~ .main-content {
  margin-left: 70px;
}

/* Ensure navbar icons are always visible */
.vertical-navbar .nav-link i {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  font-size: 20px !important;
  color: #ffffff !important;
}

/* Make toggle button icon more visible */
.navbar-toggle i {
  font-size: 22px !important;
  color: #ffffff !important;
}

.content-area {
  background: rgba(10, 22, 40, 0.7);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 97, 0.3);
  box-shadow:
          0 8px 32px rgba(0, 0, 0, 0.4),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

/* Maroltrans Diagonal Accent for Content Areas */
.content-area::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(150deg,
  transparent 0%,
  transparent 40%,
  rgba(30, 58, 95, 0.3) 40%,
  rgba(30, 58, 95, 0.3) 45%,
  rgba(255, 255, 255, 0.1) 45%,
  rgba(255, 255, 255, 0.1) 48%,
  rgba(201, 169, 97, 0.5) 48%,
  rgba(201, 169, 97, 0.5) 53%,
  transparent 53%
  );
  pointer-events: none;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .vertical-navbar {
    position: fixed;
    left: -260px;
    width: 250px;
    top: 48px;
    height: calc(100vh - 48px);
    transition: left 0.3s ease, width 0.3s ease;
    z-index: 998;
  }

  .vertical-navbar.mobile-open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
  }

  .navbar-toggle {
    display: block;
  }

  .nav-link span {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 15px 20px;
  }

  .nav-link i {
    margin-right: 15px;
  }

  .main-content {
    margin-left: 0 !important;
    margin-top: 88px;
    padding: 16px;
    min-height: 100vh;
  }

  .container {
    padding: 14px;
    border-radius: 10px;
  }

  .content-area {
    padding: 16px;
    border-radius: 12px;
  }

  .form-container {
    padding: 16px;
  }

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

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  table.w-full thead th {
    padding: 0.25rem 0.375rem;
    font-size: 0.7rem;
  }

  table.w-full tbody td {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .vertical-navbar {
    left: -100vw;
    width: 100vw;
    top: 45px;
    height: calc(100vh - 45px);
  }

  .vertical-navbar.mobile-open {
    left: 0;
    border-radius: 0;
    z-index: 999;
  }

  .main-content {
    margin-left: 0 !important;
    margin-top: 75px;
    padding: 10px;
    min-height: 100vh;
  }

  .container {
    padding: 10px;
    border-radius: 8px;
  }

  .content-area {
    padding: 12px;
    border-radius: 10px;
  }

  .content-area::before {
    display: none;
  }

  .form-container {
    padding: 12px;
  }

  .form-header h1 {
    font-size: 18px;
  }
}

/* Focus States for Accessibility */
.nav-link:focus {
  outline: 2px solid rgba(0, 123, 255, 0.8);
  outline-offset: 2px;
}

/* Responsive adjustments for Dynamic Island header */
@media (max-width: 768px) {
  .fixed-header {
    width: min(92vw, 500px);
    height: 48px;
    min-height: 48px;
    border-radius: 0 0 25px 25px;
    -webkit-border-radius: 0 0 25px 25px;
    padding: 0 16px;
  }

  .main-content {
    margin-top: 88px; /* Adjusted for tablet header */
  }

  .header-logo img {
    width: 38px !important;
    height: 38px !important;
  }

  .header-logo span {
    font-size: 15px !important;
  }
}

@media (max-width: 480px) {
  .fixed-header {
    width: min(96vw, 400px);
    height: 45px;
    min-height: 45px;
    border-radius: 0 0 20px 20px;
    -webkit-border-radius: 0 0 20px 20px;
    padding: 0 12px;
  }

  .main-content {
    margin-top: 85px; /* Adjusted for mobile header */
  }

  .header-logo img {
    width: 32px !important;
    height: 32px !important;
  }

  .header-logo span {
    font-size: 13px !important;
  }

  .header-clock {
    width: 28px !important;
    height: 28px !important;
  }
}
/* 1) When collapsed, fully remove the label from layout */
.vertical-navbar.collapsed .nav-link span {
  display: none !important;   /* instead of visibility:hidden */
}

/* 2) Make the icon row perfectly symmetric */
.vertical-navbar.collapsed .nav-link {
  justify-content: center !important;
  padding: 14px 0 !important;    /* equal left/right */
  margin: 6px 0 !important;      /* no side margins that bias the icon */
  text-align: center !important;
  gap: 0 !important;
}

/* 3) Icon itself: no reserved width or right margin */
.vertical-navbar.collapsed .nav-link i {
  margin-right: 0 !important;
  width: auto !important;
  text-align: center !important;
}

/* 4) Optional: the active left bar visually shifts the icon;
      hide it in collapsed mode so centering looks perfect */
.vertical-navbar.collapsed .nav-link.active::before {
  display: none !important;
}

/* Top Right Welcome Bar Styles - Matching Notch */
.top-right-welcome-bar {
  position: fixed;
  top: 72px; /* Below notch */
  right: 20px;
  background: linear-gradient(135deg,
  rgba(255, 255, 255, 0.95) 0%,
  rgba(250, 250, 252, 0.95) 50%,
  rgba(255, 255, 255, 0.95) 100%
  );
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: 20px;
  padding: 12px 24px;
  box-shadow:
          0 6px 24px rgba(30, 58, 95, 0.12),
          0 3px 12px rgba(0, 0, 0, 0.06),
          inset 0 1px 2px rgba(255, 255, 255, 0.9);
  z-index: 999;
  min-width: 180px;
  font-family: 'Inter', 'Poppins', 'Nunito', sans-serif;
  transition: all 0.3s ease;
}

.top-right-welcome-bar:hover {
  box-shadow:
          0 8px 28px rgba(30, 58, 95, 0.15),
          0 4px 16px rgba(201, 169, 97, 0.1),
          inset 0 1px 2px rgba(255, 255, 255, 1);
  transform: translateY(-2px);
}

.welcome-text {
  color: #1E3A5F;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

/* Responsive adjustments for top right bar */
@media (max-width: 768px) {
  .top-right-welcome-bar {
    top: 63px;
    right: 15px;
    padding: 10px 18px;
    min-width: 150px;
  }

  .welcome-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .top-right-welcome-bar {
    top: 58px;
    right: 12px;
    padding: 8px 16px;
    min-width: 120px;
  }

  .welcome-text {
    font-size: 12px;
  }
}

/* Pagination Styles */
#pagination-container {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.8) 0%, rgba(212, 175, 55, 0.8) 100%);
  color: #ffffff;
  border-color: rgba(201, 169, 97, 0.9);
  box-shadow: 0 0 12px rgba(201, 169, 97, 0.4);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
  color: #888;
}

.pagination-btn.disabled:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-nav-btn::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  background-size: contain;
  background-repeat: no-repeat;
}

.pagination-prev::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 19l-7-7 7-7'/%3E%3C/svg%3E");
}

.pagination-next::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
}

#pagination-info {
  color: #b0b0b0;
  font-size: 14px;
  font-weight: 400;
  margin-top: 8px;
  text-align: center;
  width: 100%;
}

/* Proximity Services Styles */
.proximity-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.proximity-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.proximity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
}

.proximity-card.recent {
  border-left: 4px solid #C9A961;
}

.proximity-card.active {
  border-left: 4px solid #f59e0b;
}

.proximity-card.inactive {
  border-left: 4px solid #ef4444;
  opacity: 0.8;
}

.proximity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.proximity-status-indicator {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
}

.proximity-status-indicator i {
  font-size: 6px;
}

.proximity-card.recent .proximity-status-indicator i {
  color: #C9A961;
}

.proximity-card.active .proximity-status-indicator i {
  color: #f59e0b;
}

.proximity-card.inactive .proximity-status-indicator i {
  color: #ef4444;
}

.proximity-distance {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
}

.proximity-card-body {
  margin-bottom: 8px;
}

.proximity-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.info-row i {
  width: 12px;
  color: #9ca3af;
  font-size: 10px;
}

.info-row .label {
  font-weight: 500;
  color: #d1d5db;
  min-width: 60px;
}

.info-row .value {
  color: #ffffff;
  flex: 1;
}

.proximity-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.create-service-btn, .dismiss-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-service-btn {
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.8) 0%, rgba(212, 175, 55, 0.8) 100%);
  color: white;
  border: 1px solid rgba(201, 169, 97, 0.5);
}

.create-service-btn:hover {
  background: linear-gradient(135deg, rgba(201, 169, 97, 1) 0%, rgba(212, 175, 55, 1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(201, 169, 97, 0.4);
}

.dismiss-btn {
  background: rgba(239, 68, 68, 0.8);
  color: white;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.dismiss-btn:hover {
  background: rgba(239, 68, 68, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Responsive Design for Proximity Cards */
@media (max-width: 768px) {
  .proximity-cards-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .proximity-card {
    padding: 12px;
  }

  .proximity-card-actions {
    flex-direction: column;
  }

  .create-service-btn, .dismiss-btn {
    justify-content: center;
    width: 100%;
    font-size: 13px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .proximity-cards-container {
    gap: 8px;
  }

  .proximity-card {
    padding: 10px;
  }

  .info-row {
    font-size: 13px;
  }

  .proximity-card-header {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }

  .proximity-card-body {
    margin-bottom: 12px;
  }
}

/* Statistics Page Styles */
.statistics-container {
  background: rgba(10, 22, 40, 0.7);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 97, 0.4);
  box-shadow:
          0 8px 32px rgba(0, 0, 0, 0.4),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin: 20px auto;
  max-width: 1200px;
}

.card {
  background: rgba(10, 22, 40, 0.8);
  padding: 1.25rem;
  border-radius: 0.875rem;
  box-shadow:
          0 8px 24px rgba(0, 0, 0, 0.3),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #ffffff;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(201, 169, 97, 0.4);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(201, 169, 97, 0.7);
  box-shadow:
          0 12px 32px rgba(0, 0, 0, 0.4),
          0 0 20px rgba(201, 169, 97, 0.2),
          inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Diagonal Corner Accent for Cards */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg,
  transparent 0%,
  transparent 50%,
  rgba(30, 58, 95, 0.4) 50%,
  rgba(30, 58, 95, 0.4) 55%,
  rgba(255, 255, 255, 0.15) 55%,
  rgba(255, 255, 255, 0.15) 58%,
  rgba(201, 169, 97, 0.6) 58%,
  rgba(201, 169, 97, 0.6) 65%,
  transparent 65%
  );
  pointer-events: none;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(10, 22, 40, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(201, 169, 97, 0.4);
  box-shadow:
          0 8px 24px rgba(0, 0, 0, 0.3),
          inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: #ffffff;
}

/* Ensure table headers are visible */
table thead {
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.95) 0%, rgba(30, 58, 95, 0.95) 100%);
  color: #ffffff;
  border-bottom: 2px solid rgba(201, 169, 97, 0.5);
}

table thead th {
  color: #ffffff !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 16px !important;
}

/* Ensure table body text is visible */
table tbody td {
  color: #ffffff !important;
}

th, td {
  padding: .5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

tbody tr:hover {
  background-color: rgba(201, 169, 97, 0.25) !important;
}

/* Responsive Grids */
@media (max-width: 768px) {
  .grid-cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gap-4 {
    gap: 0.5rem;
  }
  .statistics-container {
    padding: 10px;
    margin: 10px;
  }
  .statistics-container canvas {
    max-height: 250px !important;
  }
  #upload-form {
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

@media (max-width: 480px) {
  .grid-cols-5 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MOBILE POLISH: Select2, SweetAlert2, Modals, Pagination
   ============================================================ */
@media (max-width: 768px) {
  /* Select2: full width + larger touch targets */
  .select2-container {
    width: 100% !important;
  }

  .select2-container--default .select2-selection--single {
    height: 44px !important;
    line-height: 40px !important;
  }

  .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 12px !important;
  }

  .select2-dropdown {
    width: 100% !important;
    max-width: calc(100vw - 24px) !important;
  }

  .select2-container--default .select2-results__option {
    padding: 12px 16px !important;
    font-size: 15px !important;
  }

  .select2-search__field {
    padding: 10px 12px !important;
    font-size: 16px !important; /* prevents iOS zoom on focus */
  }

  /* Filter dropdowns stack on mobile */
  .filters-bar-inner,
  .filters-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .filter-select-wrapper,
  .filter-client-col,
  .filter-small-col,
  .filter-clear-col {
    min-width: unset !important;
    max-width: unset !important;
    flex: unset !important;
    width: 100% !important;
  }

  /* Upload modal: fit on mobile */
  #upload-modal .modal-content {
    width: 92% !important;
    min-width: unset !important;
    padding: 16px !important;
  }

  #drop-area {
    height: 120px !important;
  }
}

@media (max-width: 480px) {
  /* SweetAlert2: fit on phone */
  .swal2-popup {
    width: 90vw !important;
    padding: 16px !important;
    font-size: 14px !important;
  }

  .swal2-styled {
    min-width: 100px !important;
    padding: 0.5rem 1rem !important;
    font-size: 14px !important;
  }

  /* Upload modal: tighter on phone */
  #upload-modal .modal-content {
    width: 95% !important;
    padding: 12px !important;
  }

  #drop-area {
    height: 100px !important;
  }

  /* Pagination: compact on phone */
  #pagination-container {
    padding: 8px 10px !important;
    gap: 4px !important;
  }

  .pagination-btn {
    padding: 6px 8px !important;
    font-size: 12px !important;
    min-width: 32px !important;
  }

  #pagination-info {
    font-size: 12px !important;
  }
}

.transport-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.transport-status.status-draft {
  background: #f2cb61;
  color: #1f1f1f;
}

.transport-status.status-complete {
  background: #2f8f5b;
  color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════════
   Mobile — Disable fixed backgrounds for performance
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body {
    background-attachment: scroll !important;
  }
  body::before {
    position: absolute !important;
    background-attachment: scroll !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Accessibility — Reduced Motion
   ══════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Accessibility — Focus Visible
   ══════════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid rgba(201, 169, 97, 0.8);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════════════════════
   Utility — Safe scrollable containers
   ══════════════════════════════════════════════════════════════════════ */
.table-wrapper,
.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 97, 0.3) transparent;
}

.table-wrapper::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
  height: 6px;
}

.table-wrapper::-webkit-scrollbar-track,
.overflow-x-auto::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb,
.overflow-x-auto::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 97, 0.25);
  border-radius: 3px;
}