/* ==========================================================================
   Base Styles & Admin Layout
   ========================================================================== */
body {
  font-family: "Clash Grotesk", sans-serif;
  font-weight: 500;
}

.sidebar-active {
  background-color: #4338ca; /* A deep indigo */
  color: #ffffff;
}

/* Custom scrollbar for a better look */
#sidebar::-webkit-scrollbar {
  width: 8px;
}

#sidebar::-webkit-scrollbar-track {
  background: #1f2937; /* bg-gray-800 */
}

#sidebar::-webkit-scrollbar-thumb {
  background-color: #4b5563; /* bg-gray-600 */
  border-radius: 20px;
}

/* ==========================================================================
   DataTable Styles (for Residents, Announcements, etc.)
   ========================================================================== */
.dataTables_wrapper {
  font-family: "Clash Grotesk", sans-serif;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem;
  margin: 0 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  padding: 0.5em 1em;
  margin-left: 2px;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #4f46e5 !important; /* bg-indigo-600 */
  color: white !important;
  border-color: #4f46e5 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #e0e7ff !important; /* bg-indigo-100 */
  color: #3730a3 !important; /* text-indigo-800 */
  border-color: #c7d2fe !important;
}

/* Table Header */
.dataTables_wrapper table.dataTable thead th {
  background-color: #1f2937; /* bg-gray-800 */
  color: #f9fafb; /* text-gray-50 */
  font-weight: 600;
  padding: 1rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 0;
}

.dataTables_wrapper table.dataTable thead th:first-child {
  border-top-left-radius: 0.5rem; /* rounded-lg */
}

.dataTables_wrapper table.dataTable thead th:last-child {
  border-top-right-radius: 0.5rem; /* rounded-lg */
}

/* Table Body */
.dataTables_wrapper table.dataTable tbody tr:nth-child(even) {
  background-color: #f9fafb; /* bg-gray-50 */
}

.dataTables_wrapper table.dataTable tbody tr:hover {
  background-color: #f0f9ff; /* A light blue hover */
}

.dataTables_wrapper table.dataTable td {
  vertical-align: middle;
  padding: 0.75rem 1rem;
}

/* ==========================================================================
   Selectize.js Custom Styles
   ========================================================================== */
.selectize-input {
  border-radius: 0.5rem !important;
  border-color: #d1d5db !important;
  padding: 0.65rem 1rem !important;
  box-shadow: none !important;
}

.selectize-dropdown-content {
  font-family: "Clash Grotesk", sans-serif;
}

.selectize-input .item {
  background-color: #4f46e5 !important; /* bg-indigo-600 */
  color: white !important;
  border-radius: 0.25rem;
  padding: 0.125rem 0.5rem;
}

.selectize-dropdown .active {
  background-color: #4f46e5 !important; /* bg-indigo-600 */
  color: white !important;
}

.selectize-dropdown .highlight {
  background: #e0e7ff !important; /* bg-indigo-100 */
  color: #1e1b4b !important; /* A dark indigo text */
  border-radius: 1px;
}

/* ==========================================================================
   Super Admin & Loading Spinner Styles
   ========================================================================== */
.loader {
  border-top-color: #4f46e5; /* bg-indigo-600 */
  -webkit-animation: spinner 1.5s linear infinite;
  animation: spinner 1.5s linear infinite;
}

@-webkit-keyframes spinner {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   Public Portal Styles
   ========================================================================== */
.portal-hero {
  /* The background image is now set by a CSS variable */
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.portal-card {
  background-color: white;
  border-radius: 0.75rem; /* rounded-xl */
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  border: 1px solid #e5e7eb; /* border-gray-200 */
}

.portal-card:hover {
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  transform: translateY(-5px);
}

.official-card img {
  filter: grayscale(50%);
  transition: filter 0.3s ease-in-out;
}

.official-card:hover img {
  filter: grayscale(0%);
}

.service-card {
  display: flex;
  flex-direction: column;
  background-color: #f9fafb; /* bg-gray-50 */
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -2px rgb(0 0 0 / 0.05);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 10px 10px -5px rgb(0 0 0 / 0.04);
}

.service-card .service-icon-container {
  background-color: #10b981; /* bg-green-500 */
  color: white;
  padding: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}

.service-card .service-price-footer {
  background-color: #e5e7eb; /* bg-gray-200 */
  padding: 0.5rem 1.5rem;
  text-align: center;
}
