@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --primary-color: #303447;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary-color: #030407;
  --bg-color: #171724;
  --border-color: rgba(255, 255, 255, 0.1);
  --text-color: #ffffff;
  --light-text: rgba(255, 255, 255, 0.7);
  --success-color: #10b981;
  --error-color: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --gradient-bg: linear-gradient(135deg, #171724 0%, #232334 100%);
  --card-gradient: linear-gradient(
    145deg,
    rgba(48, 52, 71, 0.6),
    rgba(35, 35, 52, 0.8)
  );
  --button-gradient: linear-gradient(
    135deg,
    var(--primary-light),
    var(--primary-dark)
  );
  --hover-gradient: linear-gradient(135deg, var(--primary-dark), #5d5fef);
  --glow-color: rgba(129, 140, 248, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-bg);
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(79, 70, 229, 0.1) 0%,
      transparent 30%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(129, 140, 248, 0.1) 0%,
      transparent 30%
    );
  pointer-events: none;
  z-index: 0;
}

.landing-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInDown 0.8s ease-out forwards;
}

header h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(
    to right,
    var(--primary-light),
    var(--primary-dark)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
}

header p {
  font-size: 1.3rem;
  color: var(--light-text);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.bot-options {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.bot-card {
  background: var(--card-gradient);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.5rem;
  width: 380px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.bot-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--button-gradient);
  opacity: 0.7;
  transition:
    opacity 0.3s ease,
    height 0.3s ease;
}

.bot-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: -1;
}

.bot-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.bot-card:hover::before {
  opacity: 1;
  height: 8px;
}

.bot-card:hover::after {
  opacity: 0.4;
}

.bot-icon {
  font-size: 3.2rem;
  margin-bottom: 2rem;
  background: var(--button-gradient);
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 2rem;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
  position: relative;
  transition: all 0.3s ease;
}

.bot-icon::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  border: 2px solid transparent;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
  animation: pulse 2s infinite;
}

.bot-card:hover .bot-icon {
  transform: scale(1.1);
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4);
}

.bot-card h2 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  color: var(--text-color);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.bot-card p {
  color: var(--light-text);
  margin-bottom: 2.5rem;
  font-size: 1.15rem;
  height: 80px;
  line-height: 1.6;
}

.select-btn {
  background: var(--button-gradient);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 1rem 2.8rem;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 15px rgba(79, 70, 229, 0.3);
  letter-spacing: 0.5px;
}

.select-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: all 0.6s ease;
}

.select-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(79, 70, 229, 0.4);
  background: var(--hover-gradient);
}

.select-btn:hover::before {
  left: 100%;
}

.select-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(79, 70, 229, 0.3);
}

.btn-arrow {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s ease;
  font-size: 1.2rem;
  position: relative;
  top: 1px;
}

.select-btn:hover .btn-arrow {
  transform: translateX(5px);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal.active {
  display: flex;
  animation: fadeIn 0.4s ease-out;
}

.modal-content {
  background: var(--card-gradient);
  border-radius: 24px;
  padding: 3rem;
  width: 550px;
  max-width: 90%;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  position: relative;
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 1.8rem;
  color: var(--light-text);
  cursor: pointer;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.close-modal:hover {
  color: var(--text-color);
  transform: rotate(90deg);
  background: rgba(255, 255, 255, 0.15);
}

.modal-content h2 {
  font-size: 2.2rem;
  margin-bottom: 0.7rem;
  color: var(--text-color);
  background: linear-gradient(
    to right,
    var(--primary-light),
    var(--primary-dark)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-content p {
  color: var(--light-text);
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.database-list {
  margin-bottom: 2.5rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 10px;
}

.database-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(48, 52, 71, 0.5);
  padding: 1rem 1.5rem;
  border-radius: 16px;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.database-item:hover {
  background-color: rgba(55, 59, 94, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(5px) translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.database-item span {
  font-weight: 500;
  font-size: 1.1rem;
}

.use-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: none;
  border-radius: 12px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.use-btn:hover {
  background-color: var(--primary-dark);
  color: white;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
  transform: translateY(-2px);
}

.new-database {
  display: flex;
  gap: 12px;
}

.new-database input {
  flex: 1;
  background-color: rgba(48, 52, 71, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 16px;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.new-database input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow:
    0 0 0 2px rgba(129, 140, 248, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: rgba(48, 52, 71, 0.6);
}

#create-database-btn {
  background-color: var(--primary-dark);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

#create-database-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
}

#create-database-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.3);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(129, 140, 248, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0);
  }
}

/* Custom scrollbar for database list */
.database-list::-webkit-scrollbar {
  width: 8px;
}

.database-list::-webkit-scrollbar-track {
  background: rgba(23, 23, 36, 0.3);
  border-radius: 10px;
}

.database-list::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    var(--primary-light),
    var(--primary-dark)
  );
  border-radius: 10px;
}

.database-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    var(--primary-dark),
    var(--primary-light)
  );
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.8rem;
  }

  .bot-options {
    gap: 2.5rem;
  }

  .bot-card {
    width: 100%;
    max-width: 380px;
    padding: 2rem;
  }

  .modal-content {
    padding: 2.5rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2.2rem;
  }

  header p {
    font-size: 1.1rem;
  }

  .bot-icon {
    font-size: 2.5rem;
    width: 90px;
    height: 90px;
  }

  .bot-card h2 {
    font-size: 1.7rem;
  }

  .bot-card p {
    font-size: 1rem;
  }

  .select-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  .modal-content h2 {
    font-size: 1.8rem;
  }
}

.loading-databases,
.no-databases,
.error-message {
  padding: 1.2rem;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.loading-databases {
  background-color: rgba(48, 52, 71, 0.4);
  color: var(--light-text);
  position: relative;
  overflow: hidden;
}

.loading-databases::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    transparent,
    var(--primary-light),
    transparent
  );
  animation: loading 2s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.no-databases {
  background-color: rgba(48, 52, 71, 0.4);
  color: var(--light-text);
  border-left: 3px solid var(--primary-light);
}

.error-message {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border-left: 3px solid var(--error-color);
}

.api-key-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.api-key-wrapper input {
  flex: 1;
  background-color: rgba(48, 52, 71, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 16px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow:
    0 2px 5px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.api-key-wrapper input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow:
    0 0 0 2px rgba(129, 140, 248, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: rgba(48, 52, 71, 0.6);
}

.refresh-btn {
  background-color: rgba(48, 52, 71, 0.6);
  color: var(--light-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.9rem;
}

.refresh-btn:hover {
  background-color: rgba(48, 52, 71, 0.8);
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Services Page Styles */
body.services-page {
  height: auto;
  min-height: 100vh;
  display: block;
  align-items: unset;
  justify-content: unset;
  overflow: auto;
  background-color: #171724;
}
body.services-page::before {
  display: none;
}

/* Main container for services page */
.services-main-container {
  background-color: #171724;
  min-height: 100vh;
  width: 100%;
  padding: 0;
  position: relative;
}

/* Page header - reduced padding */
.services-page-header {
  text-align: center;
  padding: 2rem 2rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  max-width: 1200px;
  margin: 0 auto;
}

.services-header-content h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    to right,
    var(--primary-light),
    var(--primary-dark)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
  font-weight: 600;
}

.services-header-content p {
  font-size: 1rem;
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

/* Search container */
.services-search-container {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.services-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: rgba(48, 52, 71, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.services-search-input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: rgba(48, 52, 71, 0.6);
}

.services-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

/* Services content area - reduced padding */
.services-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Services grid */
.services-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Service block base styles */
.service-block {
  background: rgba(48, 52, 71, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
  width: 100%;
}

.service-block:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(48, 52, 71, 0.5);
}

/* User service styles (non-admin) */
.user-service {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  cursor: pointer;
  gap: 1rem;
}

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

.user-service .service-icon {
  font-size: 2rem;
  background: var(--primary-light);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-service .service-info {
  flex: 1;
}

.user-service .service-arrow {
  font-size: 1.2rem;
  color: var(--primary-light);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.user-service:hover .service-arrow {
  transform: translateX(4px);
}

/* Disabled service styles (no frontend available) */
.service-disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  position: relative;
}

.service-disabled::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  pointer-events: none;
}

.service-disabled:hover {
  transform: none !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(48, 52, 71, 0.4) !important;
}

.service-disabled .service-arrow {
  display: none;
}

.service-disabled .service-icon {
  opacity: 0.5;
}

.service-disabled .service-title,
.service-disabled .service-description {
  opacity: 0.7;
}

/* Admin service styles */
.admin-service .service-header {
  display: flex;
  align-items: center;
  padding: 1.25rem;
  cursor: pointer;
  gap: 1rem;
  border-radius: 8px;
}

.admin-service .service-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-service .service-icon {
  font-size: 2rem;
  background: var(--primary-light);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-service .service-info {
  flex: 1;
}

.admin-service .service-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--light-text);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.admin-service .toggle-icon {
  transition: transform 0.2s ease;
  font-size: 0.9rem;
}

.admin-service.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* Service actions container */
.service-actions {
  padding: 0 1.25rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual service action */
.service-action {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  padding: 0.875rem;
  background: rgba(35, 35, 52, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 0.75rem;
}

.service-action:hover {
  background: rgba(35, 35, 52, 0.5);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.service-action .action-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.service-action.primary-action .action-icon {
  background: var(--primary-light);
  color: white;
}

.service-action.upload-action .action-icon {
  background: #10b981;
  color: white;
}

.service-action.knowledge-action .action-icon {
  background: #3b82f6;
  color: white;
}

.service-action .action-content {
  flex: 1;
}

.service-action .action-title {
  margin: 0 0 0.15rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e5e7eb;
}

.service-action .action-description {
  margin: 0;
  font-size: 0.8rem;
  color: var(--light-text);
  line-height: 1.3;
}

/* Common service info styles - standard web font sizes */
.service-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-color);
  font-weight: 600;
}

.service-description {
  color: var(--light-text);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.service-actions-count {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}

/* Loading states */
.services-loading {
  text-align: center;
  padding: 2rem;
  color: var(--light-text);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-light);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.no-services,
.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--light-text);
  font-size: 0.95rem;
}

.services-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* Header styles for navbar */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  background: #38415d;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.services-page .brand-logo .logo-link {
  line-height: 1;
}

.header .brand-logo {
  display: flex;
  align-items: center;
}

.header .logo-image {
  height: 40px;
  width: auto;
}

.tenant-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tenant-info span {
  color: var(--light-text);
  font-weight: 600;
}

.logout-btn {
  background: red;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.logout-btn:hover {
  background: var(--hover-gradient);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Admin panel button - improved positioning */
#admin-panel-btn {
  position: absolute;
  top: 100px;
  right: 1rem;
  z-index: 50;
  background: var(--primary-light);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
#admin-panel-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Responsive design for services */
@media (max-width: 768px) {
  .services-page-header {
    padding: 1.5rem 1rem 1rem 1rem;
  }

  .services-header-content h1 {
    font-size: 1.75rem;
  }

  .services-header-content p {
    font-size: 0.9rem;
  }

  .services-search-container {
    max-width: 100%;
  }

  .services-content {
    padding: 1.5rem 1rem;
  }

  .service-block {
    margin-bottom: 0.75rem;
  }

  .user-service,
  .admin-service .service-header {
    padding: 1rem;
    gap: 0.75rem;
  }

  .service-actions {
    padding: 0 1rem 1rem 1rem;
  }

  .service-action {
    padding: 0.75rem;
  }

  .service-icon,
  .action-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .service-action .action-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  /* Fixed admin button position for mobile */
  #admin-panel-btn {
    position: absolute;
    margin-top: 1.5rem;
    right: 1rem;
    width: auto;
    min-width: unset;
    max-width: unset;
    padding: 0.4rem 0.9rem;
    font-size: 0.95rem;
    border-radius: 6px;
    z-index: 100;
    margin: 0;
    display: inline-block;
  }
  .services-main-container {
    padding-top: 2rem; /* Make room for the button */
  }

  .header {
    padding: 1rem;
    gap: 1rem;
  }

  .admin-panel-btn-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }
  #admin-panel-btn {
    position: static;
    display: inline-block;
    width: auto;
    min-width: unset;
    max-width: unset;
    padding: 0.4rem 0.9rem;
    font-size: 0.95rem;
    border-radius: 6px;
    z-index: 1;
    margin: 0;
    right: 0;
  }
  .services-main-container {
    padding-top: 0; /* Remove any extra padding you added for fixed button */
  }
}

@media (max-width: 480px) {
  .services-page-header {
    padding: 1rem 0.75rem 0.75rem 0.75rem;
  }

  .services-header-content h1 {
    font-size: 1.5rem;
  }

  .services-header-content p {
    font-size: 0.85rem;
  }

  .services-content {
    padding: 1rem 0.75rem;
  }

  .user-service,
  .admin-service .service-header {
    padding: 0.875rem;
    gap: 0.6rem;
  }

  .service-actions {
    padding: 0 0.875rem 0.875rem 0.875rem;
  }

  .service-icon,
  .action-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .service-action .action-icon {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  /* Further adjust admin button for very small screens */
  #admin-panel-btn {
    top: 70px;
    right: 0.75rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }
}
