@charset "UTF-8";
:root {
  --space-primary: #0a0d1c;
  --space-secondary: #1a1b2e;
  --nebula1: rgba(76, 0, 255, 0.15);
  --nebula2: rgba(236, 72, 153, 0.15);
  --star-color: rgba(255, 255, 255, 0.8);
}

.space-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, #1a1b2e 0%, #0a0d1c 100%);
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

/* Resto del CSS dallo snippet che mi hai mostrato */
.space-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom, var(--space-secondary) 0%, var(--space-primary) 100%);
  overflow: hidden;
  perspective: 1000px;
}

/* Base star styles */
.star-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.star {
  position: absolute;
  background: var(--star-color);
  border-radius: 50%;
  transform: translateZ(0);
}

.star-layer:nth-child(1) .star {
  width: 1px;
  height: 1px;
  animation: starTwinkle 4s infinite;
}

.star-layer:nth-child(2) .star {
  width: 2px;
  height: 2px;
  animation: starTwinkle 6s infinite;
}

.star-layer:nth-child(3) .star {
  width: 3px;
  height: 3px;
  animation: starTwinkle 8s infinite;
}

/* Solar System - Adjusted z-index */
.solar-system {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  transform-style: preserve-3d;
  z-index: 3;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

.planet {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

/* Improved Sun with corona effect */
.sun {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 30% 30%, #fff6e1 0%, #ffd700 20%, #ff8c00 40%, #ff4500 60%, #8b0000 100%);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.3), 0 0 120px rgba(255, 140, 0, 0.3), 0 0 180px rgba(255, 69, 0, 0.2);
}

.sun::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at center, rgba(255, 215, 0, 0.4) 0%, rgba(255, 140, 0, 0.2) 30%, rgba(255, 69, 0, 0.1) 60%, transparent 100%);
  border-radius: 50%;
  z-index: -1;
  animation: coronaPulse 8s ease-in-out infinite;
}

/* Mercury */
#mercury-orbit {
  width: 120px;
  height: 120px;
}

#mercury {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 30% 30%, #bdc3c7, #7f8c8d);
  animation: orbit 3s linear infinite;
}

/* Venus */
#venus-orbit {
  width: 180px;
  height: 180px;
}

#venus {
  width: 15px;
  height: 15px;
  background: radial-gradient(circle at 30% 30%, #e67e22, #d35400);
  animation: orbit 7s linear infinite;
}

/* Earth */
#earth-orbit {
  width: 250px;
  height: 250px;
}

#earth {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 30% 30%, #3498db, #2980b9);
  animation: orbit 10s linear infinite;
}

.earth-atmosphere {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, transparent 0%, rgba(52, 152, 219, 0.2) 100%);
  transform: scale(1.2);
}

/* Mars */
#mars-orbit {
  width: 320px;
  height: 320px;
}

#mars {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 30% 30%, #e74c3c, #c0392b);
  animation: orbit 18s linear infinite;
}

/* Jupiter */
#jupiter-orbit {
  width: 450px;
  height: 450px;
}

#jupiter {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 30% 30%, #f39c12, #d35400);
  animation: orbit 30s linear infinite;
}

/* Saturn */
#saturn-orbit {
  width: 550px;
  height: 550px;
}

#saturn {
  width: 35px;
  height: 35px;
  background: radial-gradient(circle at 30% 30%, #f1c40f, #f39c12);
  animation: orbit 40s linear infinite;
}

.saturn-rings {
  position: absolute;
  width: 200%;
  height: 20%;
  left: -50%;
  top: 40%;
  border-radius: 50%;
  background: linear-gradient(to right, transparent 10%, rgba(241, 196, 15, 0.1) 20%, rgba(241, 196, 15, 0.3) 40%, rgba(241, 196, 15, 0.1) 80%, transparent 90%);
  transform: rotateX(75deg);
}

/* Uranus */
#uranus-orbit {
  width: 650px;
  height: 650px;
}

#uranus {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 30% 30%, #3498db, #2980b9);
  animation: orbit 50s linear infinite;
}

/* Neptune */
#neptune-orbit {
  width: 720px;
  height: 720px;
}

#neptune {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 30% 30%, #2980b9, #1a5276);
  animation: orbit 60s linear infinite;
}

/* Background elements */
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: nebulaPulse 20s ease-in-out infinite;
  z-index: 1;
}

.shooting-star {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 50%, rgba(255, 255, 255, 0) 100%);
  animation: shootingStar var(--duration) linear infinite;
  opacity: 0;
  z-index: 4;
}

/* Animations */
@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg);
  }
}
@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}
@keyframes nebulaPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}
@keyframes coronaPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}
@keyframes shootingStar {
  0% {
    transform: translateX(-100%) translateY(var(--start-y)) rotate(var(--angle));
    opacity: 1;
  }
  100% {
    transform: translateX(200%) translateY(calc(var(--start-y) + 200px)) rotate(var(--angle));
    opacity: 0;
  }
}
:root {
  --sidebar-width: 250px;
  --sidebar-transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 56px;
  --bg-primary: #1a1a1a;
  --color-primary: #6366f1;
}

/* Navbar styles */
.navbar {
  min-width: 100%;
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--bg-primary) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  transition: all var(--sidebar-transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1030;
}

/* ... resto degli stili navbar invariati ... */
/* Base styles for offcanvas - SPOSTATI QUI perché legati alla navbar */
.offcanvas.offcanvas-start {
  width: var(--sidebar-width) !important;
  background: var(--bg-primary) !important;
}

.offcanvas .offcanvas-header {
  padding: 1rem;
  background: var(--bg-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas .offcanvas-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-weight: 500;
}

.offcanvas .btn-close-white {
  opacity: 0.8;
  filter: brightness(0) invert(1);
}

/* FIX per lo scroll - QUESTA È LA PARTE IMPORTANTE */
.offcanvas .offcanvas-body {
  padding: 0 !important;
  overflow-y: auto !important; /* Forza overflow auto */
  height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

/* Scrollbar Styling */
.offcanvas-body::-webkit-scrollbar {
  width: 4px;
}

.offcanvas-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.offcanvas-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

@media (max-width: 991.98px) {
  .sidebar,
  .sidebar-trigger-area {
    display: none !important;
  }
  .mobile-sidebar-toggle {
    display: none !important;
  }
  .offcanvas .menu-link:hover {
    background: rgba(99, 102, 241, 0.1);
  }
}
.add-task-button-container {
  padding: 20px;
  text-align: right;
}

.add-task-button {
  background-color: #bb86fc;
  color: #000000;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.add-task-button:hover {
  background-color: #9965f4;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
}

.task-table th,
.task-table td {
  color: white;
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #333333;
}

.task-table th {
  background-color: #2c2c2c;
  color: #ffffff;
}

.priority-badge {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.priority-high {
  background-color: #cf6679;
  color: #000000;
}

.priority-medium {
  background-color: #ffb86c;
  color: #000000;
}

.priority-low {
  background-color: #03dac6;
  color: #000000;
}

.actions {
  white-space: nowrap;
}

.action-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  margin-right: 5px;
  cursor: pointer;
}

.action-icon.complete {
  background-color: #03dac6;
  color: #000000;
}

.action-icon.edit {
  background-color: #ffb86c;
  color: #000000;
}

.action-icon.delete {
  background-color: #cf6679;
  color: #000000;
}

h1 {
  margin: 0;
  font-size: 24px;
}

.task-form {
  padding: 20px;
}

h1 {
  margin: 0;
  font-size: 24px;
}

.task-form {
  padding: 20px;
}

/* Stili per migliorare la resa delle tabelle */
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
}

.markdown-body table th,
.markdown-body table td {
  border: 1px solid #ddd;
  padding: 8px;
}

.markdown-body table th {
  background-color: #f2f2f2;
  text-align: left;
}

/* Stili per le note a piè di pagina */
.markdown-body sup.footnote-ref {
  font-size: 0.8em;
}

.markdown-body div.footnotes {
  border-top: 1px solid #ddd;
  margin-top: 20px;
}

.markdown-body div.footnotes ol {
  list-style-type: decimal;
}

.markdown-body div.footnotes ol li {
  margin-bottom: 5px;
}

/* Stili per le definizioni */
.markdown-body dl dt {
  font-weight: bold;
}

.markdown-body dl dd {
  margin-left: 20px;
  margin-bottom: 10px;
}

/* Stili per le abbreviazioni */
.markdown-body abbr {
  border-bottom: 1px dotted #000;
  cursor: help;
}

:root {
  --sidebar-width: 250px;
  --sidebar-transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 56px;
  --bg-primary: #1a1a1a;
  --color-primary: #6366f1;
}

/* Contenitore principale */
.d-flex.flex-grow-1 {
  position: relative;
  min-height: 100%;
}

/* Base Sidebar */
.sidebar {
  width: 0;
  min-width: 0;
  background: var(--bg-primary);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--sidebar-transition), transform var(--sidebar-transition), opacity var(--sidebar-transition), box-shadow var(--sidebar-transition);
  transform-origin: left center;
  opacity: 0;
  transform: translateX(-10px) scale(0.98);
  z-index: 1030;
}

.sidebar.expanded {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  opacity: 1;
  transform: translateX(0) scale(1);
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.2);
}

/* Sidebar Content */
.sidebar-content {
  width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(10px);
  transition: transform var(--sidebar-transition), opacity var(--sidebar-transition);
  padding-bottom: 60px;
}

/* Menu Items */
.menu-item {
  margin-bottom: 0.25rem;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sidebar.expanded .menu-item {
  opacity: 1;
  transform: translateX(0);
}

/* Delay progressivo per i menu items */
.menu-item:nth-child(1) {
  transition-delay: 0.05s;
}

.menu-item:nth-child(2) {
  transition-delay: 0.1s;
}

.menu-item:nth-child(3) {
  transition-delay: 0.15s;
}

.menu-item:nth-child(4) {
  transition-delay: 0.2s;
}

.menu-item:nth-child(5) {
  transition-delay: 0.25s;
}

.menu-item:nth-child(6) {
  transition-delay: 0.3s;
}

/* Sidebar Menu */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-height) - 60px);
}

/* Menu Sections */
.menu-section {
  padding: 0.5rem 1rem;
}

.menu-header {
  margin-bottom: 1rem;
}

.menu-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.menu-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Menu Link Styles */
.menu-link {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.menu-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-link:hover::after {
  opacity: 1;
}

.menu-link i {
  font-size: 1.2rem;
  margin-right: 1rem;
  transition: transform 0.2s ease;
  min-width: 1.2rem;
}

.menu-link .menu-text {
  transition: opacity var(--sidebar-transition);
  white-space: nowrap;
}

.menu-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.menu-link:hover i {
  transform: translateX(3px) scale(1.1);
  filter: drop-shadow(0 0 5px var(--color-primary));
  color: var(--color-primary);
}

.menu-link.active {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
}

.menu-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, #6366f1, #8b5cf6);
  border-radius: 0 3px 3px 0;
}

.menu-link.active i {
  color: var(--color-primary);
}

/* Trigger Area */
.sidebar-trigger-area {
  position: fixed;
  left: 0;
  top: var(--header-height);
  width: 15px;
  height: calc(100vh - var(--header-height));
  z-index: 1040;
}

/* Main Content */
main#mainContent {
  width: 100%;
  min-height: calc(100vh - var(--header-height));
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.container-fluid.py-4 {
  flex: 1;
}

/* Footer */
footer {
  position: relative;
  z-index: 2;
}

/* Overlay */
.sidebar.expanded::before {
  content: "";
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Animations */
@keyframes subtle-pulse {
  0% {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  }
  50% {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  }
  100% {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  }
}
.menu-link:hover i {
  animation: subtle-pulse 2s infinite;
}

/* Scrollbar Styling */
.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile Styles */
@media (max-width: 991.98px) {
  .sidebar, .sidebar-trigger-area {
    display: none !important;
  }
  .offcanvas.offcanvas-start {
    width: var(--sidebar-width) !important;
    background: var(--bg-primary) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  .offcanvas .offcanvas-header {
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
  }
  .offcanvas-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
  }
  .offcanvas-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .offcanvas .sidebar-content {
    height: auto;
    min-height: 0;
    opacity: 1;
    visibility: visible;
    width: 100%;
  }
  .offcanvas .sidebar-menu {
    flex: 1;
    overflow-y: visible !important;
  }
  .offcanvas .menu-section {
    padding: 1rem;
  }
  .offcanvas .menu-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    opacity: 1 !important;
    visibility: visible !important;
  }
  .offcanvas .menu-link:hover {
    background: rgba(99, 102, 241, 0.1);
  }
  .offcanvas .menu-item {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
  .offcanvas .btn-close-white {
    opacity: 0.8;
    filter: brightness(0) invert(1);
  }
  .offcanvas .btn-close-white:hover {
    opacity: 1;
  }
}
/* Utility Classes */
.visibility-hidden {
  visibility: hidden;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dashboard-item {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.chart-container {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 15px;
  height: 400px; /* Aumentata l'altezza per grafici più grandi */
}

.summary-row {
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

th,
td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #333333;
}

th {
  background-color: #2c2c2c;
  color: #ffffff;
}

.monthly-summary {
  background-color: #2c2c2c;
  border-radius: 8px;
  padding: 20px;
  color: #fff;
}

.summary-content {
  margin-bottom: 15px;
}

.main-summary {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.summary-col {
  text-align: center;
}

.label {
  display: block;
  font-size: 0.9em;
  margin-bottom: 5px;
  color: #aaa;
}

.value {
  font-size: 1.2em;
  font-weight: bold;
}

.income {
  color: #4BC0C0;
}

.expense {
  color: #FF6384;
}

.progress-bar {
  background-color: #444;
  border-radius: 4px;
  height: 10px;
  margin: 15px 0;
}

.progress {
  background-color: #4BC0C0;
  border-radius: 4px;
  height: 100%;
  transition: width 0.5s ease-in-out;
}

.summary-footer {
  text-align: center;
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 20px;
}

.additional-info {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.info-item {
  text-align: center;
  flex: 1;
}

.info-item .icon {
  font-size: 1.5em;
  margin-bottom: 5px;
  display: block;
}

.info-item .label {
  font-size: 0.8em;
  margin-bottom: 3px;
}

.info-item .value {
  font-size: 1em;
}

.button {
  background-color: #bb86fc;
  color: #000000;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.button:hover {
  background-color: #9965f4;
}

.latest-transactions {
  background-color: #2c2c2c;
  border-radius: 8px;
  padding: 20px;
  color: #fff;
}

.transactions-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.transaction-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  border-bottom: 1px solid #444;
  transition: background-color 0.3s ease;
}

.transaction-item:hover {
  background-color: #3a3a3a;
}

.transaction-icon {
  font-size: 1.5em;
  margin-right: 15px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.transaction-icon.income {
  background-color: rgba(75, 192, 192, 0.2);
  color: #4BC0C0;
}

.transaction-icon.expense {
  background-color: rgba(255, 99, 132, 0.2);
  color: #FF6384;
}

.transaction-details {
  flex-grow: 1;
}

.transaction-description {
  font-weight: bold;
  margin-bottom: 3px;
}

.transaction-category {
  font-size: 0.9em;
  color: #aaa;
}

.transaction-amount {
  font-weight: bold;
  margin: 0 15px;
}

.transaction-amount.income {
  color: #4BC0C0;
}

.transaction-amount.expense {
  color: #FF6384;
}

.transaction-date {
  font-size: 0.9em;
  color: #aaa;
  margin-right: 15px;
}

.transaction-actions .button {
  font-size: 0.8em;
  padding: 5px 10px;
}

.action-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.button {
  background-color: #bb86fc;
  color: #000000;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #9965f4;
}

.button.primary {
  background-color: #03dac6;
}

.button.primary:hover {
  background-color: #018786;
}

.button.small {
  font-size: 0.9em;
  padding: 5px 10px;
}

/* Stile per la cella della tabella contenente lo switch */
td.switch-cell {
  text-align: center !important;
  vertical-align: middle !important;
  width: 120px;
  /* Larghezza fissa per la colonna */
}

/* Container principale dello switch */
.modern-switch {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  /* Occupa tutta la larghezza della cella */
}

/* Il vero input checkbox (nascosto) */
.modern-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

/* Lo switch personalizzato */
.switch-track {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Il circle thumb dello switch */
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background-color: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stato attivo dello switch */
input:checked + .switch-track {
  background-color: #2563eb;
  border-color: #2563eb;
}

input:checked + .switch-track .switch-thumb {
  transform: translateX(16px);
}

/* Label dello stato */
.switch-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  user-select: none;
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Stile per l'intestazione della colonna */
th.switch-header {
  text-align: center !important;
  width: 120px;
  /* Stessa larghezza della cella */
}

.table thead th .d-flex {
  position: relative;
}
.table thead th .d-flex .position-relative {
  display: inline-block;
  margin-left: 0.5rem;
}
.table thead th .d-flex .position-relative .note-icon {
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.table thead th .d-flex .position-relative .note-icon:hover {
  opacity: 1;
}
.table thead th .d-flex .position-relative .note-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2d2d2d;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: pre-wrap;
  max-width: 250px;
  z-index: 1000;
  margin-top: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: none;
}
.table thead th .d-flex .position-relative .note-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 10px;
  border: 6px solid transparent;
  border-bottom-color: #2d2d2d;
}
.table thead th .d-flex .position-relative:hover .note-tooltip {
  display: block;
}
.table .switch-cell {
  vertical-align: middle;
}
.table .btn-delete {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.note-dialog {
  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: 1050;
}
.note-dialog-content {
  background: #2d2d2d;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.note-dialog-content h3 {
  margin-bottom: 15px;
  color: #fff;
}
.note-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 15px;
}
.note-dialog .note-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px;
  resize: vertical;
}
.note-dialog .note-textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.btn-note {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
}
.btn-note:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-delete {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2em;
  line-height: 1;
  transition: all 0.2s;
}
.btn-delete:hover {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.3);
}

/* Stili specifici per la gestione dati */
.data-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.action-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

.btn-add {
  background: var(--gradient-primary);
}

.btn-save {
  background: var(--gradient-success);
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Stili tabella */
.table-container {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  animation: fadeInUp 0.6s ease-out;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-primary);
}

.data-table th {
  background: var(--bg-primary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Input e controlli */
.data-input {
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  width: 100%;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  background-color: #1a1b26;
  /* Colore più scuro per gli input */
}

.data-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  outline: none;
  background-color: #1e1f2e;
  /* Leggermente più chiaro quando in focus */
}

.data-input:hover {
  background-color: #1e1f2e;
  /* Leggermente più chiaro al hover */
}

/* Stili tabella aggiornati */
.data-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #1a1b26;
  /* Colore di sfondo delle celle più scuro */
}

.data-table tr:hover td {
  background-color: #1e1f2e;
  /* Colore hover più scuro */
}

/* Switch personalizzato aggiornato */
.modern-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
}

.switch-track {
  width: 40px;
  height: 20px;
  background: #1a1b26;
  /* Colore track più scuro */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.switch-thumb {
  width: 16px;
  height: 16px;
  background: var(--text-secondary);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: all 0.3s ease;
}

input:checked + .switch-track {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

input:checked + .switch-track .switch-thumb {
  background: white;
  transform: translateX(20px);
}

/* Stili per i date input */
input[type=date].data-input {
  background-color: #1a1b26;
  color: var(--text-primary);
  padding-right: 0.5rem;
}

input[type=date].data-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  /* Rende bianca l'icona del calendario */
  opacity: 0.5;
}

/* Stili per i number input */
input[type=number].data-input {
  background-color: #1a1b26;
}

input[type=number].data-input::-webkit-inner-spin-button,
input[type=number].data-input::-webkit-outer-spin-button {
  opacity: 0.5;
  background: var(--bg-primary);
}

/* Pulsanti azione nella tabella */
.action-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.5rem !important;
}

.row-action-button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.row-action-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.btn-edit {
  color: var(--color-primary);
}

.btn-delete {
  color: var(--color-danger);
}

/* Dialog note */
.note-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.note-dialog-content {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  animation: scaleIn 0.3s ease-out;
}

.note-textarea {
  width: 100%;
  min-height: 100px;
  margin: 1rem 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: 8px;
  resize: vertical;
}

/* Notifiche */
.notifications-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.toast {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
  max-width: 400px;
}

.toast-show {
  transform: translateX(0);
}

.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-danger);
}

/* Animazioni */
@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.data-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

/* Stili per la ricerca */
.data-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.action-left {
  display: flex;
  gap: 0.5rem;
}

.action-right {
  display: flex;
  align-items: center;
}

.search-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-count {
  background: #2d2d3b;
  color: #94a3b8;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Stili specifici per form creazione */
.structure-builder {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
  animation: fadeInUp 0.6s ease-out;
}

.column-palette {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.type-button {
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: var(--gradient-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.type-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.preview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-primary);
  margin-top: 1rem;
}

.preview-table th {
  background: var(--bg-darker);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.preview-table td {
  padding: 0.75rem 1rem;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.remove-column {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gradient-danger);
  color: white;
  border: none;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

th:hover .remove-column {
  opacity: 1;
}

.form-footer {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
}

.btn-create {
  background: var(--gradient-success);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Stili specifici per l'editor delle tabelle */
.structure-builder {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-top: 1.5rem;
  animation: fadeInUp 0.6s ease-out;
}

.column-palette {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.column-button {
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  background: var(--gradient-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.column-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.column-item {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  animation: fadeInUp 0.3s ease-out;
  border: 1px solid var(--border-color);
}

.column-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  width: 100%;
  transition: all 0.3s ease;
}

.column-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  outline: none;
}

.column-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border-radius: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.btn-delete {
  background: var(--gradient-danger);
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.form-footer {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.btn-save {
  background: var(--gradient-success);
  padding: 1rem 2rem;
  border-radius: 12px;
  color: var(--text-primary);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-save:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 25px;
  background: var(--gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.scroll-to-top-btn:hover {
  transform: translateY(-5px);
  filter: brightness(110%);
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#saveBtn {
  right: 90px; /* Posizionamento accanto al pulsante "torna su" */
}

/* Adattamento per dispositivi mobili */
@media (max-width: 640px) {
  .scroll-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}
.notifications-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000000;
  /* Aumentato ulteriormente */
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: auto;
  /* Aggiunto */
  max-width: 100%;
  /* Aggiunto */
}

/* Stile base per le notifiche toast */
.toast {
  pointer-events: auto;
  /* Riabilita gli eventi solo sul toast */
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(120%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  min-width: 300px;
  max-width: 380px;
  opacity: 0;
  visibility: visible;
  /* Aggiunto */
  background: rgba(0, 0, 0, 0.95);
  /* Reso più scuro */
}

/* Varianti di stato con colori più intensi */
.toast-success {
  background: linear-gradient(to right, #059669, #047857);
  border-left: 4px solid #34d399;
}

.toast-error {
  background: linear-gradient(to right, #dc2626, #b91c1c);
  border-left: 4px solid #f87171;
}

/* Animazioni migliorate */
.toast-show {
  transform: translateX(0) !important;
  /* Aggiunto !important */
  opacity: 1 !important;
  visibility: visible !important;
}

/* Contenuto del toast */
.toast-content {
  flex-grow: 1;
  margin: 0 12px;
}

.toast-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
  color: white;
}

.toast-message {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

/* Icone */
.toast-icon {
  font-size: 24px;
  line-height: 1;
  margin-right: 12px;
  color: white;
}

/* Pulsante di chiusura */
.toast-close {
  background: none;
  border: none;
  color: white;
  opacity: 0.7;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 20px;
  transition: opacity 0.2s ease;
  margin-left: 12px;
}

.toast-close:hover {
  opacity: 1;
}

/* Animazione di entrata e uscita */
@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}
.toast-enter {
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast-exit {
  animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.pagination {
  margin-bottom: 1rem;
}

.pagination .page-link {
  background-color: #2b3035;
  border-color: #444;
  color: #fff;
  padding: 0.5rem 0.75rem;
  /* Aumentato il min-width per gestire numeri a due cifre */
  min-width: 42px;
  text-align: center;
  /* Previene il wrap del testo */
  white-space: nowrap;
  /* Assicura che il contenuto rimanga centrato */
  display: flex;
  align-items: center;
  justify-content: center;
  /* Altezza fissa per mantenere l'allineamento */
  height: 38px;
  /* Disabilita la selezione del testo */
  user-select: none;
  /* Previene il ridimensionamento del container */
  box-sizing: border-box;
}

.pagination .page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  font-weight: 500;
  z-index: 3;
}

.pagination .page-item.disabled .page-link {
  background-color: #2b3035;
  border-color: #444;
  color: #6c757d;
  cursor: not-allowed;
}

.pagination .page-link:hover:not(.disabled) {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  z-index: 2;
}

.pagination .page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  z-index: 3;
}

/* Assicura che i pulsanti di navigazione abbiano la stessa dimensione */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  padding: 0.5rem 0.75rem;
}

/* Gestisce meglio i bordi arrotondati */
.pagination .page-item:first-child .page-link {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.pagination .page-item:last-child .page-link {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.search-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 10px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container .input-group {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
  align-items: center;
  /* Aggiunto questo */
  min-height: 48px;
  /* Aggiunto questo */
  display: flex;
  /* Aggiunto questo */
}

.search-container .form-control,
.search-container .form-select {
  color: white;
  background: transparent;
  border: none;
  padding: 12px 15px;
  height: 100%;
  /* Aggiunto questo */
  display: flex;
  /* Aggiunto questo */
  align-items: center;
  /* Aggiunto questo */
}

.search-container .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-container .form-control:focus,
.search-container .form-select:focus {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.05);
}

.search-container .btn-primary {
  border-radius: 8px;
  margin: 3px;
  transition: all 0.3s ease;
}

.search-container .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Stili per l'area dei risultati */
#search-status .alert {
  border-radius: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

#search-status .badge {
  padding: 6px 10px;
  border-radius: 6px;
}

.table > :not(caption) > * > * {
  max-width: 100px;
}

.table-hover > tbody > tr:hover {
  --bs-table-accent-bg: var(--bs-table-hover-bg);
  color: #ff0000;
}

/* Stile per il contenitore del pulsante */
.restore-account {
  position: fixed;
  bottom: 50px;
  right: 30px;
  z-index: 1000;
}

/* Stile per il pulsante */
.restore-account .btn {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  background: var(--gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-primary);
  opacity: 1;
  /* Assicurati che sia visibile */
  visibility: visible;
  /* Assicurati che sia visibile */
  transform: translateY(0);
  /* Evita che sia spostato */
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

:root {
  /* Colori primari */
  --color-primary: #6366f1;
  --color-primary-dark: #5457ec;
  --color-secondary: #8b5cf6;
  --color-secondary-dark: #7c4ef3;
  /* Colori di sfondo */
  --bg-primary: rgba(30, 30, 46, 0.9);
  /* Aggiunto opacity 0.9 */
  --bg-secondary: rgba(37, 38, 68, 0.9);
  /* Aggiunto opacity 0.9 */
  --bg-card: linear-gradient(145deg, rgba(37, 38, 68, 0.9), rgba(30, 30, 46, 0.9));
  /* Aggiunto opacity 0.9 */
  /* Colori di stato */
  --color-success: #14b8a6;
  --color-success-dark: #0d9488;
  --color-danger: #ef4444;
  --color-danger-dark: #dc2626;
  /* Testo */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  /* Border & Shadow */
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.3);
  /* Gradienti */
  --gradient-primary: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  --gradient-success: linear-gradient(135deg, var(--color-success), var(--color-success-dark));
  --gradient-danger: linear-gradient(135deg, var(--color-danger), var(--color-danger-dark));
}

body[data-just-logged-in=true] #mainContent,
body[data-just-logged-in=true] .navbar,
body[data-just-logged-in=true] .sidebar {
  visibility: hidden;
  opacity: 0;
}

.sidebar,
main,
footer {
  position: relative;
  z-index: 1;
}

.bg-dark {
  background-color: rgba(33, 37, 41, 0.75) !important;
}

.text-white {
  color: #ffffff !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #ffffff;
  margin: 0;
  font-size: 24px;
}

.app-wrapper {
  margin: 0 auto;
  padding: 2rem;
  background-color: rgba(30, 30, 46, 0.75);
  background-image: radial-gradient(at 47% 33%, rgba(36, 36, 68, 0.75) 0, transparent 59%), radial-gradient(at 82% 65%, rgba(26, 26, 46, 0.75) 0, transparent 55%);
  border-radius: 5px;
}
.app-wrapper .app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  animation: slideDown 0.6s ease-out;
  width: 100%;
}
.app-wrapper .app-header .app-icon {
  font-size: 2.5rem;
  animation: bounce 2s infinite;
  color: var(--text-primary);
}
.app-wrapper .app-header .app-title {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.2rem;
  font-weight: bold;
  text-align: center;
  width: 100%;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(8px);
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.card:hover::before {
  opacity: 1;
}
.card .card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.card .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(110%);
}
.btn.btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}
.btn.btn-success {
  background: var(--gradient-success);
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
}
.btn.btn-danger {
  background: var(--gradient-danger);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}
.actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}
.actions .btn i {
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 2.25rem 0.375rem 0.75rem;
  -moz-padding-start: calc(0.75rem - 3px);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #ffffff;
  background-color: #444;
}

.form-control-social {
  background: var(--bg-darker) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  padding: 0.75rem 1rem !important;
  border-radius: 8px !important;
  width: 100% !important;
  transition: all 0.3s ease !important;
}
.form-control-social:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
  outline: none !important;
}

.pagination-personal {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 15px;
  background: linear-gradient(145deg, #252644, #1e1e2e);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
  list-style: none;
}
.pagination-personal ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.pagination-personal li {
  padding: 0;
  margin: 0;
}
.pagination-personal .page-arrow {
  padding: 8px;
}
.pagination-personal .page-item {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pagination-personal .page-link {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pagination-personal .page-link.active {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  animation: fadeIn 0.6s ease-out;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 640px) {
  .actions {
    flex-direction: column;
  }
  .pagination {
    padding: 0.75rem;
    gap: 0.5rem;
  }
}