:root {
  --theme-bg: #0f0f1a;
  --theme-bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
  --theme-text: #e0e0e0;
  --theme-navbar-bg: #1a1a2e;
  --theme-navbar-border: #2d2d44;
  --theme-navbar-text: #8b7cf6;
  --theme-container-bg: #1e1e2e;
  --theme-container-border: #2d2d44;
  --theme-container-text: #e0e0e0;
  --theme-label: #d0d0d0;
  --theme-input-bg: #252538;
  --theme-input-border: #3d3d54;
  --theme-item-bg: #252538;
  --theme-item-border: #3d3d54;
  --theme-btn-primary: #8b7cf6;
  --theme-btn-primary-hover: #7a6be5;
  --theme-btn-secondary: #4a4a5c;
  --theme-btn-secondary-hover: #5a5a6c;
  --theme-btn-secondary-border: #5a5a6c;
  --theme-btn-danger: #dc3545;
  --theme-btn-danger-hover: #c82333;
  --theme-member-tag: #8b7cf6;
  --theme-slot-item-bg: #1a2a3a;
  --theme-slot-item-border: #4a9eff;
  --theme-slot-item-text: #e0e0e0;
  --theme-group-card-bg: #252538;
  --theme-group-card-border: #3d3d54;
  --theme-group-card-border-left: #8b7cf6;
  --theme-group-admin-card-bg: #252538;
  --theme-group-admin-card-border: #3d3d54;
  --theme-transition: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--theme-bg);
  background-image: var(--theme-bg-gradient);
  min-height: 100vh;
  color: var(--theme-text);
  line-height: 1.6;
  /* Nessuna transizione - animazione manuale con JavaScript */
}

/* Prepara gli elementi per la transizione */
body.theme-transitioning * {
  will-change: background, color, border-color, box-shadow;
}

.page {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

/* Login Page */
.login-container {
  max-width: 400px;
  margin: 100px auto;
  background: #1e1e2e;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border: 1px solid #2d2d44;
}

.login-container h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #8b7cf6;
  text-shadow: 0 0 10px rgba(139, 124, 246, 0.3);
}

/* Navbar */
.navbar {
  background: var(--theme-navbar-bg);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--theme-navbar-border);
  position: relative;
  z-index: 10;
  /* Nessuna transizione - animazione manuale con JavaScript */
}

.navbar h1 {
  color: var(--theme-navbar-text);
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(139, 124, 246, 0.3);
  /* Nessuna transizione - animazione manuale con JavaScript */
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--theme-text);
  /* Nessuna transizione - animazione manuale con JavaScript */
}

.kitten-theme-toggle {
  background: #2d2d44;
  border: 2px solid #3d3d54;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  transform: scale(1) rotate(0deg);
}

.kitten-theme-toggle:not(.activating):not(.deactivating):not(.active):hover {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 192, 203, 0.2);
  border-color: #ffb3d1;
  box-shadow: 0 4px 12px rgba(255, 192, 203, 0.4);
  transition: all 0.3s ease;
}

.kitten-theme-toggle.active:not(.activating):not(.deactivating):hover {
  transform: scale(1.15) rotate(-8deg);
  transition: all 0.3s ease;
}

.kitten-theme-toggle.active {
  background: linear-gradient(135deg, #ffb3d1 0%, #ff99c7 100%);
  border-color: #ff69b4;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.6), 0 0 20px rgba(255, 192, 203, 0.4);
  transform: scale(1.05);
}

.kitten-theme-toggle.activating {
  animation: kittenActivate 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  pointer-events: none;
}

.kitten-theme-toggle.deactivating {
  animation: kittenDeactivate 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  pointer-events: none;
}

@keyframes kittenActivate {
  0% {
    transform: scale(1) rotate(0deg);
    background: #2d2d44;
    border-color: #3d3d54;
  }
  50% {
    transform: scale(1.2) rotate(-15deg);
  }
  100% {
    transform: scale(1.05) rotate(0deg);
    background: linear-gradient(135deg, #ffb3d1 0%, #ff99c7 100%);
    border-color: #ff69b4;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.6), 0 0 20px rgba(255, 192, 203, 0.4);
  }
}

@keyframes kittenDeactivate {
  0% {
    transform: scale(1.05) rotate(0deg);
    background: linear-gradient(135deg, #ffb3d1 0%, #ff99c7 100%);
    border-color: #ff69b4;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.6), 0 0 20px rgba(255, 192, 203, 0.4);
  }
  50% {
    transform: scale(0.85) rotate(15deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    background: #2d2d44;
    border-color: #3d3d54;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

body.theme-kittens .kitten-theme-toggle {
  background: #fff0f8;
  border: 2px solid #ffb3d1;
  box-shadow: 0 2px 8px rgba(255, 105, 180, 0.3);
}

body.theme-kittens .kitten-theme-toggle:hover {
  background: #ffe5f0;
  border-color: #ff69b4;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.5);
}

body.theme-kittens .kitten-theme-toggle.active {
  background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
  border-color: #ff1493;
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.7), 0 0 25px rgba(255, 192, 203, 0.5);
  transform: scale(1.05);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  color: var(--theme-text);
  /* Nessuna transizione - animazione manuale con JavaScript */
  position: relative;
  z-index: 1;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #2d2d44;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #888;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #8b7cf6;
  background: rgba(139, 124, 246, 0.1);
}

.tab-btn.active {
  color: #8b7cf6;
  border-bottom-color: #8b7cf6;
}

.tab-content {
  display: none;
  background: var(--theme-container-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 1px solid var(--theme-container-border);
  color: var(--theme-container-text);
  /* Nessuna transizione - animazione manuale con JavaScript */
}

.tab-content.active {
  display: block;
}

.tab-content h2 {
  color: var(--theme-container-text);
  margin-bottom: 1.5rem;
  /* Nessuna transizione - animazione manuale con JavaScript */
}

.tab-content h3 {
  color: var(--theme-container-text);
  margin-bottom: 1rem;
  /* Nessuna transizione - animazione manuale con JavaScript */
}

.tab-content h4 {
  color: var(--theme-label);
  margin-bottom: 0.75rem;
  /* Nessuna transizione - animazione manuale con JavaScript */
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--theme-label);
  /* Nessuna transizione - animazione manuale con JavaScript */
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--theme-input-border);
  border-radius: 4px;
  font-size: 1rem;
  background: var(--theme-input-bg);
  color: var(--theme-text);
  transition: border-color 0.2s; /* Solo per il focus */
  /* Colori animati manualmente con JavaScript */
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #8b7cf6;
  box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.1);
}

.form-group input::placeholder {
  color: #888;
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
  accent-color: #8b7cf6;
  cursor: pointer;
}

.form-group input[type="date"],
.form-group input[type="time"] {
  color-scheme: dark;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 150px;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-primary {
  background: var(--theme-btn-primary) !important;
  color: white;
  box-shadow: 0 2px 8px rgba(139, 124, 246, 0.3);
}

.btn-primary:hover {
  background: var(--theme-btn-primary-hover) !important;
  box-shadow: 0 4px 12px rgba(139, 124, 246, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--theme-btn-secondary) !important;
  color: white;
  border: 1px solid var(--theme-btn-secondary-border) !important;
}

.btn-secondary:hover {
  background: var(--theme-btn-secondary-hover) !important;
  border-color: #6a6a7c;
}

.btn-danger {
  background: var(--theme-btn-danger) !important;
  color: white;
}

.btn-danger:hover {
  background: var(--theme-btn-danger-hover) !important;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Availability List */
.availability-item {
  background: var(--theme-item-bg);
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--theme-item-border);
  color: var(--theme-text);
  transition: background 0.2s; /* Solo per hover */
  /* Colori animati manualmente con JavaScript */
}

.availability-item:hover {
  background: #2d2d44;
}

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

/* Groups */
.group-card {
  background: var(--theme-group-card-bg) !important;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--theme-group-card-border-left) !important;
  border: 1px solid var(--theme-group-card-border) !important;
  border: 1px solid #3d3d54;
  transition: border-color 0.2s;
}

.group-card:hover {
  border-color: #4d4d64;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.group-members {
  margin-top: 1rem;
}

.member-tag {
  display: inline-block;
  background: var(--theme-member-tag) !important;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 4px rgba(139, 124, 246, 0.3);
}

.common-slots {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #3d3d54;
}

.slot-item {
  background: var(--theme-slot-item-bg) !important;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--theme-slot-item-border) !important;
  color: var(--theme-slot-item-text) !important;
}

/* Admin */
.admin-section {
  margin-bottom: 3rem;
}

.user-card,
.group-admin-card {
  background: var(--theme-group-admin-card-bg) !important;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--theme-group-admin-card-border) !important;
  transition: background 0.2s;
}

.user-card:hover,
.group-admin-card:hover {
  background: #2d2d44;
}

.user-info,
.group-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-admin {
  background: #ffc107;
  color: #000;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.badge-user {
  background: #5a5a6c;
  color: white;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #1e1e2e;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #2d2d44;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #3d3d54;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #e0e0e0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #e0e0e0;
}

.modal-body {
  padding: 1.5rem;
  color: #e0e0e0;
}

.modal-body hr {
  border: none;
  border-top: 1px solid #3d3d54;
  margin: 1rem 0;
}

/* Error Messages */
.error-message {
  color: #ff6b6b;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #3a2525;
  border-radius: 4px;
  display: none;
  border: 1px solid #5a3535;
}

.error-message.show {
  display: block;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #888;
}

.empty-state::before {
  content: "📅";
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* Calendar View */
.calendar-container {
  overflow-x: auto;
}

.calendar-week {
  margin-bottom: 2rem;
}

.calendar-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

.calendar-row {
  transition: background 0.1s;
}

.calendar-row:hover {
  opacity: 0.9;
}

.calendar-cell-hover {
  cursor: help;
  position: relative;
}

.calendar-cell-hover:hover {
  opacity: 0.9;
  transform: scale(1.02);
  transition: all 0.2s;
  z-index: 5;
}

@media (max-width: 1200px) {
  .calendar-header,
  .calendar-row {
    grid-template-columns: 60px repeat(7, minmax(100px, 1fr)) !important;
  }
  
  .calendar-header > div,
  .calendar-row > div {
    font-size: 0.75rem;
    padding: 0.25rem !important;
  }
}

/* Animazione per l'avviso off limits */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tema Gattini 🐱 */
body.theme-kittens {
  --theme-bg: #ffeef5;
  --theme-bg-gradient: linear-gradient(135deg, #ffeef5 0%, #fff0f8 50%, #ffe5f0 100%);
  --theme-text: #5a4a5a;
  --theme-navbar-bg: #ffd6e8;
  --theme-navbar-border: #ffb3d1;
  --theme-navbar-text: #ff69b4;
  --theme-container-bg: #fff5f9;
  --theme-container-border: #ffd6e8;
  --theme-container-text: #5a4a5a;
  --theme-label: #8b4a6b;
  --theme-input-bg: #fff9fc;
  --theme-input-border: #ffd6e8;
  --theme-item-bg: #fff9fc;
  --theme-item-border: #ffd6e8;
  --theme-btn-primary: #ff69b4;
  --theme-btn-primary-hover: #ff1493;
  --theme-btn-secondary: #ffb3d1;
  --theme-btn-secondary-hover: #ff99c7;
  --theme-btn-secondary-border: #ff99c7;
  --theme-btn-danger: #ff6b9d;
  --theme-btn-danger-hover: #ff4d7a;
  --theme-member-tag: #ff69b4;
  --theme-slot-item-bg: #fff0f8;
  --theme-slot-item-border: #ffb3d1;
  --theme-slot-item-text: #5a4a5a;
  --theme-group-card-bg: #fff9fc;
  --theme-group-card-border: #ffd6e8;
  --theme-group-card-border-left: #ff69b4;
  --theme-group-admin-card-bg: #fff9fc;
  --theme-group-admin-card-border: #ffd6e8;
}

.kitten-bg-decoration {
  position: fixed;
  width: 300px;
  height: 300px;
  opacity: 0;
  bottom: 2rem;
  right: 1rem;
  transform: rotate(-15deg);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
              transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  user-select: none;
}

.kitten-bg-decoration img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

body.theme-kittens .kitten-bg-decoration {
  opacity: 0.35;
  pointer-events: auto;
  cursor: pointer;
  animation: floatKitten 6s ease-in-out infinite;
}

body.theme-kittens .kitten-bg-decoration:hover {
  transform: rotate(-12deg) scale(1.05) translateY(-5px) !important;
  transition: transform 0.3s ease !important;
}

body.theme-kittens .kitten-bg-decoration.petting {
  animation: petKitten 0.6s ease-in-out, floatKitten 6s ease-in-out infinite;
}

@keyframes floatKitten {
  0%, 100% {
    transform: rotate(-15deg) translateY(0);
  }
  50% {
    transform: rotate(-12deg) translateY(-20px);
  }
}

@keyframes petKitten {
  0%, 100% {
    transform: rotate(-15deg) scale(1) translateY(0);
  }
  25% {
    transform: rotate(-18deg) scale(1.1) translateY(-5px);
  }
  50% {
    transform: rotate(-12deg) scale(1.15) translateY(-10px);
  }
  75% {
    transform: rotate(-18deg) scale(1.1) translateY(-5px);
  }
}

.kitten-interaction {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.kitten-heart,
.kitten-meow {
  position: absolute;
  opacity: 0;
  font-size: 2rem;
  pointer-events: none;
  user-select: none;
}

.kitten-heart {
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
}

.kitten-meow {
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: #d63384;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.kitten-bg-decoration.show-heart .kitten-heart {
  animation: heartPop 1s ease-out forwards;
}

.kitten-bg-decoration.show-meow .kitten-meow {
  animation: meowPop 1.2s ease-out forwards;
}

@keyframes heartPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0) scale(0);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px) scale(1.2);
  }
  40% {
    transform: translateX(-50%) translateY(-20px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-40px) scale(0.8);
  }
}

@keyframes meowPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px) scale(1.1);
  }
  40% {
    transform: translateX(-50%) translateY(-10px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px) scale(0.9);
  }
}

body.theme-kittens .navbar h1 {
  text-shadow: 0 0 10px rgba(255, 105, 180, 0.4);
}

.navbar h1::before {
  content: var(--emoji-content, "");
  display: var(--emoji-display, none);
  transform: scale(var(--emoji-scale, 1)) rotate(var(--emoji-rotation, 0deg));
  transform-origin: center center;
  transition: transform 0.1s linear;
}

body.theme-kittens .navbar h1::before {
  content: "🐱 ";
  display: inline-block;
  transform: scale(var(--emoji-scale, 1)) rotate(var(--emoji-rotation, 0deg));
}

body.theme-kittens .tab-content h2,
body.theme-kittens .tab-content h3 {
  color: #d63384;
}

body.theme-kittens .tabs {
  border-bottom: 2px solid #ffb3d1;
}

body.theme-kittens .tab-btn {
  color: #b8869b;
}

body.theme-kittens .tab-btn:hover {
  color: #ff69b4;
  background: rgba(255, 105, 180, 0.1);
}

body.theme-kittens .tab-btn.active {
  color: #ff69b4;
  border-bottom-color: #ff69b4;
}

body.theme-kittens .form-group label {
  color: #8b4a6b;
}

body.theme-kittens .form-group input,
body.theme-kittens .form-group select {
  background: #fff9fc;
  border: 1px solid #ffd6e8;
  color: #5a4a5a;
}

body.theme-kittens .form-group input:focus,
body.theme-kittens .form-group select:focus {
  border-color: #ff69b4;
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2);
}

/* Bottoni ora usano variabili CSS, gestite dall'animazione JavaScript */

body.theme-kittens .availability-item {
  background: #fff9fc;
  border: 1px solid #ffd6e8;
}

body.theme-kittens .availability-item:hover {
  background: #fff5f9;
}

/* Group cards ora usano variabili CSS, gestite dall'animazione JavaScript */

body.theme-kittens .user-card:hover,
body.theme-kittens .group-admin-card:hover {
  background: #fff5f9;
}

body.theme-kittens .badge-admin {
  background: #ffd700;
  color: #8b4a6b;
  box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

body.theme-kittens .badge-user {
  background: #ffb3d1;
  color: #8b4a6b;
}

body.theme-kittens .modal {
  background: #fff9fc;
  border: 1px solid #ffd6e8;
}

body.theme-kittens .modal-header {
  border-bottom: 1px solid #ffd6e8;
}

body.theme-kittens .modal-header h3 {
  color: #5a4a5a;
}

body.theme-kittens .modal-close {
  color: #b8869b;
}

body.theme-kittens .modal-close:hover {
  color: #ff69b4;
}

body.theme-kittens .modal-body {
  color: #5a4a5a;
}

body.theme-kittens .modal-body hr {
  border-top: 1px solid #ffd6e8;
}

body.theme-kittens .error-message {
  color: #ff4d7a;
  background: #ffeef5;
  border: 1px solid #ffb3d1;
}

body.theme-kittens .empty-state {
  color: #b8869b;
}

body.theme-kittens .empty-state::before {
  content: "🐱";
}

body.theme-kittens .login-container {
  background: #fff9fc;
  border: 1px solid #ffd6e8;
}

body.theme-kittens .login-container h1 {
  color: #ff69b4;
  text-shadow: 0 0 10px rgba(255, 105, 180, 0.4);
}

body.theme-kittens .login-container h1::before {
  content: "🐱 ";
}

/* Calendar styles for kitten theme */
body.theme-kittens #calendar-controls {
  background: #fff9fc !important;
  border: 1px solid #ffd6e8 !important;
}

body.theme-kittens #calendar-controls h3 {
  color: #d63384 !important;
}

body.theme-kittens #calendar-controls label {
  color: #8b4a6b !important;
}

body.theme-kittens #calendar-controls #group-filter {
  background: #fff9fc !important;
  border: 1px solid #ffd6e8 !important;
  color: #5a4a5a !important;
}

body.theme-kittens #calendar-controls #group-filter:focus {
  border-color: #ff69b4 !important;
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.2) !important;
  outline: none !important;
}

/* Bottoni specifici ora usano variabili CSS tramite le loro classi .btn-primary/.btn-secondary */

body.theme-kittens .calendar-header > div {
  background: #ffe5f0 !important;
  border: 1px solid #ffd6e8 !important;
  color: #8b4a6b !important;
}

body.theme-kittens .calendar-row > div:first-child {
  color: #b8869b !important;
}

body.theme-kittens .calendar-cell-hover {
  background: #fff9fc !important;
  border: 1px solid #ffd6e8 !important;
}

body.theme-kittens .calendar-cell-hover:hover {
  background: #fff5f9 !important;
  border-color: #ffb3d1 !important;
}

/* Calendar view buttons ora usano variabili CSS tramite le loro classi .btn-primary/.btn-secondary */

/* Calendar week title */
body.theme-kittens .calendar-week h3 {
  color: #ff69b4 !important;
}

/* Override inline styles for calendar cells in kitten theme - OFF LIMITS */
body.theme-kittens .calendar-cell-hover[style*="#3a1a1a"],
body.theme-kittens .calendar-cell-hover[style*="background: #3a1a1a"],
body.theme-kittens .calendar-cell-hover[style*="background:#3a1a1a"] {
  background: #ffe0e6 !important;
  border: 2px solid #ff6b9d !important;
}

body.theme-kittens .calendar-cell-hover[style*="#3a1a1a"] *,
body.theme-kittens .calendar-cell-hover[style*="background: #3a1a1a"] *,
body.theme-kittens .calendar-cell-hover[style*="background:#3a1a1a"] * {
  color: #d63384 !important;
}

/* Override inline styles for calendar cells in kitten theme - COMPLETO (common slots) */
body.theme-kittens .calendar-cell-hover[style*="#1a4a3a"],
body.theme-kittens .calendar-cell-hover[style*="background: #1a4a3a"],
body.theme-kittens .calendar-cell-hover[style*="background:#1a4a3a"] {
  background: #d0f0ff !important;
  border: 2px solid #4a9eff !important;
}

body.theme-kittens .calendar-cell-hover[style*="#1a4a3a"] *,
body.theme-kittens .calendar-cell-hover[style*="background: #1a4a3a"] *,
body.theme-kittens .calendar-cell-hover[style*="background:#1a4a3a"] * {
  color: #0066cc !important;
}

/* Override inline styles for calendar cells in kitten theme - PARZIALE */
body.theme-kittens .calendar-cell-hover[style*="#4a3a1a"],
body.theme-kittens .calendar-cell-hover[style*="background: #4a3a1a"],
body.theme-kittens .calendar-cell-hover[style*="background:#4a3a1a"] {
  background: #fff4e0 !important;
  border: 1px solid #ffc107 !important;
}

body.theme-kittens .calendar-cell-hover[style*="#4a3a1a"] *,
body.theme-kittens .calendar-cell-hover[style*="background: #4a3a1a"] *,
body.theme-kittens .calendar-cell-hover[style*="background:#4a3a1a"] * {
  color: #cc8800 !important;
}

/* Override inline styles for calendar cells in kitten theme - VUOTE */
body.theme-kittens .calendar-cell-hover[style*="#252538"],
body.theme-kittens .calendar-cell-hover[style*="background: #252538"],
body.theme-kittens .calendar-cell-hover[style*="background:#252538"] {
  background: #fff9fc !important;
  border: 1px solid #ffd6e8 !important;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ============================================ */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .tab-content {
    padding: 1.5rem;
  }
  
  .kitten-bg-decoration {
    width: 200px;
    height: 200px;
    bottom: 1rem;
    right: 0.5rem;
    opacity: 0; /* Assicurati che sia invisibile quando il tema non è attivo */
  }
  
  body.theme-kittens .kitten-bg-decoration {
    opacity: 0.35; /* Visibile solo quando il tema è attivo */
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  /* Navbar */
  .navbar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .navbar h1 {
    font-size: 1.2rem;
    flex: 1;
    min-width: 0;
  }
  
  .nav-right {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
  }
  
  .nav-right span {
    font-size: 0.9rem;
  }
  
  .kitten-theme-toggle {
    font-size: 1.2rem;
    padding: 0.4rem 0.6rem;
    min-width: 40px;
    min-height: 40px;
  }
  
  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Container */
  .container {
    margin: 1rem auto;
    padding: 0 1rem;
  }
  
  /* Tabs */
  .tabs {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
  }
  
  .tab-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
    text-align: center;
  }
  
  /* Tab Content */
  .tab-content {
    padding: 1rem;
  }
  
  .tab-content h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }
  
  .tab-content h3 {
    font-size: 1.1rem;
  }
  
  /* Forms */
  .form-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .form-row .form-group {
    min-width: 100%;
  }
  
  .form-row .btn {
    width: 100%;
  }
  
  /* Availability Items */
  .availability-item {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
  
  .availability-item-info {
    width: 100%;
  }
  
  .availability-item > div:last-child {
    display: flex;
    gap: 0.5rem;
    width: 100%;
  }
  
  .availability-item .btn {
    flex: 1;
  }
  
  /* Group Cards */
  .group-card {
    padding: 1rem;
  }
  
  .group-card h3 {
    font-size: 1.1rem;
  }
  
  /* Calendar Controls */
  #calendar-controls {
    padding: 0.75rem !important;
  }
  
  #calendar-controls h3 {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  #calendar-controls > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  
  #calendar-controls label {
    width: 100%;
  }
  
  #group-filter {
    width: 100% !important;
    min-width: 100% !important;
  }
  
  #apply-filter-btn {
    width: 100%;
  }
  
  /* Calendar View - Scroll orizzontale su mobile */
  .calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .calendar-header,
  .calendar-row {
    min-width: 800px; /* Forza scroll orizzontale */
  }
  
  .calendar-header > div,
  .calendar-row > div {
    font-size: 0.7rem !important;
    padding: 0.25rem !important;
  }
  
  /* Modal */
  .modal {
    width: 95%;
    max-width: 95%;
    margin: 1rem auto;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  /* Kitten Decoration - Più piccola su mobile */
  .kitten-bg-decoration {
    width: 150px;
    height: 150px;
    bottom: 4rem; /* Più in alto per non essere coperto dai bottoni */
    right: 0.5rem;
    opacity: 0; /* Assicurati che sia invisibile quando il tema non è attivo */
    z-index: 100; /* Più alto per essere sopra altri elementi */
  }
  
  body.theme-kittens .kitten-bg-decoration {
    opacity: 0.3; /* Visibile solo quando il tema è attivo, leggermente più trasparente su mobile */
  }
  
  /* Login */
  .login-container {
    margin: 50px auto;
    padding: 1.5rem;
    max-width: 90%;
  }
  
  /* User Cards */
  .user-card,
  .group-admin-card {
    padding: 1rem;
  }
  
  /* Off Limits Items */
  .off-limits-item {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
  
  .off-limits-item > div:last-child {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }
  
  .off-limits-item .btn {
    flex: 1;
  }
}

/* Mobile Small (max-width: 480px) */
@media (max-width: 480px) {
  .navbar h1 {
    font-size: 1rem;
  }
  
  .nav-right span {
    display: none; /* Nascondi il nome utente su schermi molto piccoli */
  }
  
  .tab-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }
  
  .tab-content h2 {
    font-size: 1.1rem;
  }
  
  .kitten-bg-decoration {
    width: 120px;
    height: 120px;
    bottom: 3.5rem; /* Più in alto per non essere coperto dai bottoni */
    right: 0.5rem;
    opacity: 0; /* Assicurati che sia invisibile quando il tema non è attivo */
    z-index: 100; /* Più alto per essere sopra altri elementi */
  }
  
  body.theme-kittens .kitten-bg-decoration {
    opacity: 0.25; /* Visibile solo quando il tema è attivo, leggermente più trasparente su mobile small */
  }
  
  .calendar-header,
  .calendar-row {
    min-width: 700px;
  }
}

