:root{
  --surface:#ffffff;
  --surface-2:#f5f6f7;
  --border:#e7eaee;
  --text:#111827;
  --muted:#6b7280;
  --accent:#0a84ff; /* Apple blue */
  --success:#22c55e;
}

html,body{background:var(--surface-2); color:var(--text);}

/* Body padding per header fisso */
body {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Rimuovi margini e padding dal container principale */
.container-fluid {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Aggiungi padding al main per compensare l'header fisso */
main.container-fluid {
  padding-top: 80px !important;
}

/* Forza l'header a essere fisso e rimuovi spazi indesiderati */
.navbar.navbar-expand-lg {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
}

/* Rimuovi eventuali margini dal body e html */
html {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

/* Assicura che il contenuto principale inizi sotto l'header */
.apple-landing-hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Fix specifico per l'header fisso */
#appNavbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  margin: 0 !important;
  padding: 0.75rem 0 !important;
}

/* Rimuovi spazi indesiderati sopra l'header */
.navbar::before {
  display: none !important;
}

.navbar::after {
  display: none !important;
} 

/* Dark mode */
:root[data-theme='dark']{
  --surface:#1c1c1e;
  --surface-2:#0f0f10;
  --border:#2a2a2c;
  --text:#f2f2f7;
  --muted:#a1a1aa;
  --accent:#0a84ff;
}

/* Cards */
.card{border-radius:14px; border:1px solid var(--border); background:var(--surface);} 
.card-header{border-bottom:1px solid var(--border); background:var(--surface); font-weight:600;}
.card.shadow-sm{box-shadow:0 8px 24px rgba(0,0,0,.06);} 

/* Tables */
.table thead th{background:var(--surface-2); border-bottom:1px solid var(--border); color:var(--muted); font-weight:600;}
.table tbody tr{transition:background .2s ease, box-shadow .2s ease;}
.table tbody tr:hover{background:rgba(0,0,0,.02);} 
.table td, .table th{border-color:var(--border);} 
.table-sm>tbody>tr>td, .table-sm>tbody>tr>th, .table-sm>thead>tr>th{padding:.65rem .8rem}

/* Badges & progress */
.badge{border-radius:999px; padding:.32rem .58rem; font-weight:600; letter-spacing:.1px}
.progress{background:var(--surface-2); border-radius:999px; overflow:hidden}
.progress .progress-bar{border-radius:999px}

/* Apple Buttons */
.btn {
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: translateY(1px);
}

.btn-outline-primary {
  border-color: var(--border);
  color: #1d1d1f;
  background: transparent;
}

.btn-outline-primary:hover {
  background: #007aff;
  border-color: #007aff;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-primary {
  background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
  border-color: #007aff;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056cc 0%, #004bb5 100%);
  border-color: #0056cc;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
}

.btn-outline-secondary {
  border-color: #e5e5e7;
  color: #1d1d1f;
  background: transparent;
}

.btn-outline-secondary:hover {
  background: #f2f2f7;
  border-color: #d1d1d6;
  color: #1d1d1f;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

:root[data-theme='dark'] .btn-outline-primary {
  color: #f2f2f7;
  border-color: #48484a;
}

:root[data-theme='dark'] .btn-outline-primary:hover {
  background: #007aff;
  border-color: #007aff;
  color: white;
}

:root[data-theme='dark'] .btn-outline-secondary {
  color: #f2f2f7;
  border-color: #48484a;
}

:root[data-theme='dark'] .btn-outline-secondary:hover {
  background: #3a3a3c;
  border-color: #48484a;
  color: #f2f2f7;
}

/* Apple Navbar - Fixed */
.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1030 !important;
  backdrop-filter: saturate(180%) blur(20px);
  background-color: rgba(255, 255, 255, 0.8) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  padding: 0.75rem 0;
  margin: 0 !important;
}

.navbar:hover {
  background-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

:root[data-theme='dark'] .navbar {
  background-color: rgba(28, 28, 30, 0.8) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .navbar:hover {
  background-color: rgba(28, 28, 30, 0.9) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.navbar .navbar-brand {
  font-weight: 600;
}

/* Logo nell'header - dimensioni ridotte */
.navbar .navbar-brand img.header-logo {
  height: 32px;
  width: auto;
  max-width: 120px;
}

/* Pulsante grande per modifica timbrature */
.apple-cta-btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.apple-cta-btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
}

/* ===== AZIONI RAPIDE DASHBOARD OWNER ===== */

/* Container principale azioni rapide */
.apple-actions-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
  margin-bottom: 2rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.apple-actions-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Item singola azione */
.apple-action-item {
  flex: 0 0 300px;
  min-width: 280px;
  max-width: 320px;
}

/* Card azione rapida */
.apple-quick-action-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e5e7;
  padding: 1.5rem;
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.apple-quick-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: #007aff;
}

/* Icona della card */
.apple-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.apple-card-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-radius: 12px;
}

.apple-card-icon i {
  position: relative;
  z-index: 1;
}

/* Colori specifici per le icone */
.apple-presenze-icon {
  background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
}

.apple-calendar-icon {
  background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
}

.apple-progetti-icon {
  background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
}

.apple-permessi-icon {
  background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
}

.apple-mutua-icon {
  background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
}

/* Contenuto della card */
.apple-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.apple-card-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.apple-card-description {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: #8e8e93;
  margin: 0 0 1.5rem 0;
  line-height: 1.4;
  flex: 1;
}

/* Bottone della card */
.apple-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f2f2f7;
  color: #007aff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: none;
  width: 100%;
  margin-top: auto;
}

.apple-card-btn:hover {
  background: #007aff;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.apple-card-btn i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.apple-card-btn:hover i {
  transform: translateX(2px);
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .apple-actions-container {
    gap: 1rem;
    padding: 0.25rem 0;
  }
  
  .apple-action-item {
    flex: 0 0 260px;
    min-width: 240px;
    max-width: 280px;
  }
  
  .apple-quick-action-card {
    padding: 1.25rem;
    min-height: 180px;
  }
  
  .apple-card-title {
    font-size: 1.1rem;
  }
  
  .apple-card-description {
    font-size: 0.85rem;
  }
}

@media (min-width: 768px) {
  .apple-action-item {
    flex: 0 0 280px;
    min-width: 260px;
    max-width: 300px;
  }
}

@media (min-width: 1200px) {
  .apple-action-item {
    flex: 0 0 320px;
    min-width: 300px;
    max-width: 350px;
  }
}

/* Dark mode support */
:root[data-theme='dark'] .apple-quick-action-card {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-quick-action-card:hover {
  border-color: #007aff;
}

:root[data-theme='dark'] .apple-card-title {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-card-description {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-card-btn {
  background: #3a3a3c;
  color: #007aff;
}

:root[data-theme='dark'] .apple-card-btn:hover {
  background: #007aff;
  color: #ffffff;
}

/* Navbar Links */
.navbar-nav .nav-link {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: #1d1d1f;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: #007aff;
  background-color: rgba(0, 122, 255, 0.1);
  transform: translateY(-1px);
}

.navbar-nav .nav-link:active {
  transform: translateY(0);
}

:root[data-theme='dark'] .navbar-nav .nav-link {
  color: #f2f2f7;
}

:root[data-theme='dark'] .navbar-nav .nav-link:hover {
  color: #5ac8fa;
  background-color: rgba(0, 122, 255, 0.15);
}

/* Navbar Toggler */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-toggler:hover {
  background-color: rgba(0, 122, 255, 0.1);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

:root[data-theme='dark'] .navbar-toggler:hover {
  background-color: rgba(0, 122, 255, 0.15);
}

/* Apple Brand Header - Simplified */
.apple-brand {
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 0.5rem 0;
  display: inline-block;
}

.apple-brand:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.apple-brand-name {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #54a0ff,
    #5f27cd,
    #ff6b6b
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  transition: all 0.3s ease;
  position: relative;
}

.apple-brand-name::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #54a0ff,
    #5f27cd,
    #ff6b6b
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  filter: blur(1px);
  opacity: 0.7;
  z-index: -1;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.apple-brand:hover .apple-brand-name {
  transform: scale(1.05);
  animation-duration: 2s;
}

/* Dark mode per Apple Brand */
:root[data-theme='dark'] .apple-brand-name {
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #54a0ff,
    #5f27cd,
    #ff6b6b
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

:root[data-theme='dark'] .apple-brand-name::before {
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #54a0ff,
    #5f27cd,
    #ff6b6b
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

/* Responsive Apple Brand */
@media (max-width: 768px) {
  .apple-brand-name {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .apple-brand-name {
    font-size: 1.25rem;
  }
}
/* Navbar glow by status */
.navbar-glow-green{box-shadow:0 0 0 2px rgba(34,197,94,.15) inset, 0 6px 20px rgba(34,197,94,.25)!important}
.navbar-glow-yellow{box-shadow:0 0 0 2px rgba(255,210,77,.18) inset, 0 6px 20px rgba(255,210,77,.3)!important}
.navbar-glow-red{box-shadow:0 0 0 2px rgba(224,49,49,.18) inset, 0 6px 20px rgba(224,49,49,.32)!important}

/* Lists */
.list-group-item{border-color:var(--border)}

/* Task cards */
.task-card{border-radius:14px; border:1px solid var(--border); background:var(--surface); transition:transform .12s ease, box-shadow .12s ease; position:relative; overflow:hidden}
.task-card:hover{transform:translateY(-2px); box-shadow:0 10px 24px rgba(0,0,0,.08)}
.task-title{font-size:1.05rem; font-weight:600; margin:0}
.task-meta{color:var(--muted); font-size:.9rem}
.task-footer{color:var(--muted); font-size:.9rem}
.icon-muted{color:var(--muted)}
/* Completed task green bar */
.task-card.task-completed::before{content:""; position:absolute; left:0; top:0; bottom:0; width:6px; background:var(--success)}

/* Filter bar compact */
.filter-toolbar .form-select, .filter-toolbar .form-control{border-radius:10px}
.filter-toolbar{gap:.5rem}

/* Charts holder height */
.chart-holder{height:220px}


/* Calendar event chips (Apple-like) */
.fc .event-chip{border-radius:12px; border:1px solid rgba(0,0,0,.06); box-shadow:0 6px 16px rgba(0,0,0,.08); padding:4px 8px}
.fc .event-chip .event-chip-inner{display:flex; align-items:center; gap:.35rem; font-weight:600}
.fc .event-chip .event-title{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.fc .fc-daygrid-event a{color:inherit; text-decoration:none}
.fc .event-chip.is-done{border-color: var(--success)}
.fc .event-chip .check{color: var(--success)}

/* Attendance overlay */
.pause-overlay{position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:1050; backdrop-filter:saturate(180%) blur(6px)}
.pause-overlay[hidden]{display:none}
.pause-overlay .pause-overlay-content{background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:2rem 2.5rem; text-align:center; box-shadow:0 18px 40px rgba(0,0,0,.25)}
.pause-overlay .display-6{font-weight:700}

/* Page blur under header when paused */
.page-blur{filter:blur(3px); transition:filter .2s ease}
.page-tint-yellow{position:relative}
.page-tint-yellow::before{content:""; position:fixed; left:0; right:0; top:56px; bottom:0; background:rgba(255,210,77,.15); pointer-events:none; z-index:1040}

/* Status colors */
.chip{display:inline-block; padding:.25rem .5rem; border-radius:999px; font-weight:600}
.chip-late{background:#FFD24D; color:#111}
.chip-early{background:#FFEC99; color:#111}
.chip-perm{background:#3A86FF; color:#fff}
.chip-pause-over{background:#FF9500; color:#111}
.chip-error{background:#E03131; color:#fff}
.chip-ot{background:#12B886; color:#fff}
.chip-special{background:#ADB5BD; color:#111}

/* Work clock */
.work-clock{border:1px solid var(--border); border-radius:999px; padding:.25rem .6rem; display:flex; align-items:center; gap:.35rem; font-weight:600}
.clock-working{background:#d9fbe5; color:#065f46; border-color:rgba(16,185,129,.35)}
.clock-paused{background:#fff7d6; color:#7c5c00; border-color:rgba(255,210,77,.45)}
.clock-idle{background:var(--surface); color:var(--text)}

/* Alert banner Apple-like */
.alert-banner{border-radius:14px; border:1px solid var(--border); box-shadow:0 10px 24px rgba(0,0,0,.08)}

/* Presenze mobile cards */
.presence-card{border:1px solid var(--border); border-radius:14px; background:var(--surface); padding:12px 14px; margin-bottom:10px}
.presence-ok{box-shadow:inset 0 0 0 2px rgba(34,197,94,.15)}
.presence-abs{box-shadow:inset 0 0 0 2px rgba(224,49,49,.15)}
.presence-today{box-shadow:inset 0 0 0 2px rgba(10,132,255,.18)}
.live-dot{display:inline-block; width:8px; height:8px; background:#E03131; border-radius:999px; animation:blink 1.1s infinite alternate}
@keyframes blink{from{opacity:1} to{opacity:.3}}

/* Presenze Calendar - Design Moderno */
.presence-calendar {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.calendar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e5e7eb;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 12px 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.calendar-day:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.calendar-day.today {
    background: #eff6ff;
    border: 2px solid #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.calendar-day.weekend {
    background: #f9fafb;
    color: #6b7280;
}

.calendar-day.holiday {
    background: #fef3c7;
    color: #92400e;
}

/* Status Indicators */
.status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.status-present { background: #10b981; }
.status-partial { background: #f59e0b; }
.status-late { background: #ef4444; }
.status-early-leave { background: #8b5cf6; }
.status-absent { background: #ef4444; }
.status-holiday { background: #6b7280; }
.status-weekend { background: #9ca3af; }

/* Day Details */
.day-number {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.day-weekday {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-times {
    margin-top: 8px;
    font-size: 11px;
}

.day-start {
    color: #10b981;
    font-weight: 600;
}

.day-end {
    color: #6b7280;
}

.day-duration {
    color: #3b82f6;
    font-weight: 600;
    font-size: 12px;
}

/* Timeline per dettagli giorno */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 16px;
}

.timeline-marker {
    position: absolute;
    left: -16px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.timeline-content {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
}

/* Statistiche Cards */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stats-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.stats-label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

/* Filtri */
.filter-buttons .btn-check:checked + .btn {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Modal dettagli */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    border: none;
}

.modal-title {
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-day {
        min-height: 80px;
        margin-bottom: 8px;
        border-radius: 8px;
    }
    
    .stats-card {
        margin-bottom: 16px;
    }
}

/* Animazioni */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-day {
    animation: fadeInUp 0.3s ease forwards;
}

.calendar-day:nth-child(1) { animation-delay: 0.1s; }
.calendar-day:nth-child(2) { animation-delay: 0.2s; }
.calendar-day:nth-child(3) { animation-delay: 0.3s; }
.calendar-day:nth-child(4) { animation-delay: 0.4s; }
.calendar-day:nth-child(5) { animation-delay: 0.5s; }
.calendar-day:nth-child(6) { animation-delay: 0.6s; }
.calendar-day:nth-child(7) { animation-delay: 0.7s; }

/* Timeline styles for daily view */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #007bff;
}

/* Enhanced table styles for presenze */
.table-presenze th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table-presenze td {
    vertical-align: middle;
    padding: 12px 8px;
}

.table-presenze .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Status indicators */
.status-present {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.status-absent {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.status-late {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

/* Card enhancements */
.card-presenze {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.card-presenze .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

/* Statistics cards */
.stat-card {
    transition: transform 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-2px);
}

/* Navigation tabs */
.nav-presenze .nav-link {
    border-radius: 6px;
    margin-right: 4px;
    font-weight: 500;
}

.nav-presenze .nav-link.active {
    background-color: #007bff;
    border-color: #007bff;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .btn-group .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
    
    .timeline-content {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .timeline-marker {
        width: 12px;
        height: 12px;
        left: -18px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Desktop optimizations */
@media (min-width: 769px) {
    .timeline {
        padding-left: 40px;
    }
    
    .timeline::before {
        left: 20px;
        width: 3px;
    }
    
    .timeline-marker {
        width: 20px;
        height: 20px;
        left: -30px;
    }
    
    .timeline-content {
        padding: 20px;
        font-size: 1rem;
    }
}

/* Dark mode improvements */
:root {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    transition: background-color 0.3s ease, color 0.3s ease;
}

:root[data-theme='dark'] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #e9ecef;
    --bs-light: #2d2d2d;
    --bs-dark: #f8f9fa;
}

:root[data-theme='dark'] .card {
    background-color: #2d2d2d;
    border-color: #495057;
    color: #e9ecef;
}

:root[data-theme='dark'] .card-header {
    background-color: #343a40;
    border-bottom-color: #495057;
    color: #e9ecef;
}

:root[data-theme='dark'] .table {
    --bs-table-bg: #2d2d2d;
    --bs-table-color: #e9ecef;
    --bs-table-border-color: #495057;
}

:root[data-theme='dark'] .table-light {
    --bs-table-bg: #343a40;
    --bs-table-color: #e9ecef;
}

:root[data-theme='dark'] .table-hover > tbody > tr:hover {
    --bs-table-accent-bg: #3d4043;
}

:root[data-theme='dark'] .navbar-light {
    background-color: #2d2d2d !important;
    border-color: #495057 !important;
}

:root[data-theme='dark'] .navbar-light .navbar-brand,
:root[data-theme='dark'] .navbar-light .nav-link {
    color: #e9ecef !important;
}

:root[data-theme='dark'] .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

:root[data-theme='dark'] .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

:root[data-theme='dark'] .alert-info {
    background-color: #0f5132;
    border-color: #0a4128;
    color: #d1e7dd;
}

:root[data-theme='dark'] .alert-success {
    background-color: #0f5132;
    border-color: #0a4128;
    color: #d1e7dd;
}

:root[data-theme='dark'] .timeline-content {
    background-color: #343a40;
    border-left-color: #0d6efd;
}

:root[data-theme='dark'] .timeline::before {
    background: #495057;
}

:root[data-theme='dark'] .timeline-marker {
    background-color: #2d2d2d;
}

/* KPI cards dark mode */
:root[data-theme='dark'] .card.border-primary {
    background-color: #2d2d2d;
    border-color: #0d6efd !important;
    color: #e9ecef;
}

:root[data-theme='dark'] .card.border-primary h6 {
    color: #e9ecef !important;
}

:root[data-theme='dark'] .card.border-primary small {
    color: #adb5bd !important;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Theme toggle button improvements */
#themeToggle {
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#themeToggle:hover {
    transform: scale(1.1);
}

/* Dark mode specific button styles */
:root[data-theme='dark'] .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

:root[data-theme='dark'] .btn-success {
    background-color: #198754;
    border-color: #198754;
}

:root[data-theme='dark'] .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

:root[data-theme='dark'] .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

:root[data-theme='dark'] .btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
}

/* Dark mode specific fixes */
:root[data-theme='dark'] body {
    background-color: #1a1a1a !important;
    color: #e9ecef !important;
}

:root[data-theme='dark'] .container-fluid {
    background-color: #1a1a1a;
    color: #e9ecef;
}

:root[data-theme='dark'] .badge {
    color: #000 !important;
}

:root[data-theme='dark'] .badge.bg-light {
    background-color: #f8f9fa !important;
    color: #000 !important;
}

:root[data-theme='dark'] .text-muted {
    color: #adb5bd !important;
}

:root[data-theme='dark'] .text-dark {
    color: #e9ecef !important;
}

:root[data-theme='dark'] .bg-light {
    background-color: #2d2d2d !important;
    color: #e9ecef !important;
}

:root[data-theme='dark'] .kpi-card {
    background-color: #2d2d2d !important;
    color: #e9ecef !important;
}

:root[data-theme='dark'] .kpi-card h4 {
    color: #e9ecef !important;
}

:root[data-theme='dark'] .kpi-card small {
    color: #adb5bd !important;
}

/* Dark mode badge fixes */
:root[data-theme='dark'] .badge.bg-success {
    background-color: #198754 !important;
    color: #fff !important;
}

:root[data-theme='dark'] .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

:root[data-theme='dark'] .badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

:root[data-theme='dark'] .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

:root[data-theme='dark'] .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

/* Dark mode text color fixes */
:root[data-theme='dark'] .text-success {
    color: #75b798 !important;
}

:root[data-theme='dark'] .text-danger {
    color: #f5a9a9 !important;
}

:root[data-theme='dark'] .text-warning {
    color: #ffd43b !important;
}

:root[data-theme='dark'] .text-info {
    color: #74c0fc !important;
}

:root[data-theme='dark'] .text-primary {
    color: #74c0fc !important;
}

/* Dark mode Apple colors */
:root[data-theme='dark'] .apple-title {
    color: #FFFFFF;
}

:root[data-theme='dark'] .apple-subtitle {
    color: #8E8E93;
}

:root[data-theme='dark'] .navigation-buttons .btn-outline-secondary {
    border-color: #3A3A3C;
    color: #FFFFFF;
    background: #1C1C1E;
}

:root[data-theme='dark'] .navigation-buttons .btn-outline-secondary:hover {
    background: #2C2C2E;
    border-color: #48484A;
    color: #FFFFFF;
}

:root[data-theme='dark'] .view-nav .btn-sm {
    border-color: #3A3A3C;
    color: #FFFFFF;
    background: #1C1C1E;
}

:root[data-theme='dark'] .view-nav .btn-sm:hover {
    background: #2C2C2E;
    border-color: #48484A;
    color: #FFFFFF;
}

:root[data-theme='dark'] .view-nav {
    background: #2C2C2E;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

:root[data-theme='dark'] .view-nav .btn-sm {
    color: #8E8E93;
    background: transparent;
}

:root[data-theme='dark'] .view-nav .btn-sm:hover {
    color: #FFFFFF;
    background: rgba(255,255,255,0.1);
}

:root[data-theme='dark'] .view-nav .btn-sm.active {
    background: #1C1C1E;
    color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
}

:root[data-theme='dark'] .view-nav .btn-sm.active::before {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

/* Dark mode navigation buttons */
:root[data-theme='dark'] .navigation-buttons .btn-outline-secondary {
    border-color: #6c757d;
    color: #e9ecef;
    background: transparent;
}

:root[data-theme='dark'] .navigation-buttons .btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

:root[data-theme='dark'] .navigation-buttons .btn-primary {
    background: #007AFF;
    border-color: #007AFF;
    color: white;
}

:root[data-theme='dark'] .navigation-buttons .btn-primary:hover {
    background: #0056CC;
    border-color: #0056CC;
    color: white;
}

/* Dark mode timeline fixes */
:root[data-theme='dark'] .timeline-content {
    background-color: #2d2d2d !important;
    color: #e9ecef !important;
    border-left-color: #007AFF !important;
}

:root[data-theme='dark'] .timeline::before {
    background: #6c757d !important;
}

:root[data-theme='dark'] .timeline-marker {
    background-color: #1a1a1a !important;
    border-color: #6c757d !important;
}

/* Dark mode card fixes */
:root[data-theme='dark'] .card {
    background-color: #2d2d2d !important;
    border-color: #495057 !important;
    color: #e9ecef !important;
}

:root[data-theme='dark'] .card-header {
    background-color: #343a40 !important;
    border-bottom-color: #495057 !important;
    color: #e9ecef !important;
}

/* Dark mode table fixes */
:root[data-theme='dark'] .table {
    --bs-table-bg: #2d2d2d !important;
    --bs-table-color: #e9ecef !important;
    --bs-table-border-color: #495057 !important;
}

:root[data-theme='dark'] .table-light {
    --bs-table-bg: #343a40 !important;
    --bs-table-color: #e9ecef !important;
}

:root[data-theme='dark'] .table-hover > tbody > tr:hover {
    --bs-table-accent-bg: #3d4043 !important;
}

:root[data-theme='dark'] .table th {
    background-color: #343a40 !important;
    color: #e9ecef !important;
    border-color: #495057 !important;
}

:root[data-theme='dark'] .table td {
    background-color: #2d2d2d !important;
    color: #e9ecef !important;
    border-color: #495057 !important;
}

/* Dark mode list fixes */
:root[data-theme='dark'] .list-unstyled li {
    color: #e9ecef !important;
}

:root[data-theme='dark'] .list-unstyled strong {
    color: #f8f9fa !important;
}

/* Dark mode hr fixes */
:root[data-theme='dark'] hr {
    border-color: #495057 !important;
}

/* UI Semplificata - Design "a prova di scemi" */
.navigation-buttons {
    gap: 0.5rem;
}

.navigation-buttons .btn-lg {
    min-width: 120px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e5e7;
}

.navigation-buttons .btn-lg:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navigation-buttons .btn-primary {
    background: #007AFF;
    border: 1px solid #007AFF;
    color: white;
}

.navigation-buttons .btn-primary:hover {
    background: #0056CC;
    border-color: #0056CC;
    color: white;
}

.navigation-buttons .btn-outline-secondary {
    border: 1px solid #e5e5e7;
    color: #1C1C1E;
    background: white;
    font-weight: 500;
}

.navigation-buttons .btn-outline-secondary:hover {
    background: #f5f5f7;
    border-color: #d1d1d6;
    color: #1C1C1E;
}

/* Apple-style titles - Minimalist */
.apple-title {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: #1C1C1E;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
}

.apple-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: #8E8E93;
    letter-spacing: 0;
    margin: 0;
    margin-top: 0.25rem;
}

/* KPI Cards migliorate */
.kpi-card {
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #e9ecef;
}

.kpi-card h4 {
    font-weight: 700;
    font-size: 1.5rem;
}

/* View navigation buttons - Apple style with 3D effect */
.view-nav {
    display: flex;
    gap: 0.5rem;
    background: #F2F2F7;
    padding: 0.25rem;
    border-radius: 20px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.view-nav .btn-sm {
    border-radius: 16px;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border: none;
    color: #8E8E93;
    background: transparent;
    transition: all 0.2s ease;
    position: relative;
    flex: 1;
    min-width: 80px;
}

.view-nav .btn-sm:hover {
    color: #1C1C1E;
    background: rgba(255,255,255,0.5);
}

.view-nav .btn-sm.active {
    background: #FFFFFF;
    color: #1C1C1E;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    transform: translateY(-1px);
    font-weight: 600;
}

.view-nav .btn-sm.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 100%);
    border-radius: 16px;
    z-index: -1;
}

/* Enhanced 3D effect on click */
.view-nav .btn-sm:active {
    transform: translateY(0px);
    transition: transform 0.1s ease;
}

.view-nav .btn-sm.active:active {
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Minimalist action buttons */
.apple-action-btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    border: 1px solid #e5e5e7;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    background: #ffffff;
    color: #1c1c1e;
    text-decoration: none;
}

.apple-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #d1d1d6;
    color: #1c1c1e;
    text-decoration: none;
}

.apple-action-btn:active {
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.apple-action-btn.permesso {
    background: #ffffff;
    color: #ff3b30;
    border-color: #ff3b30;
}

.apple-action-btn.permesso:hover {
    background: #ff3b30;
    color: #ffffff;
    border-color: #ff3b30;
}

.apple-action-btn.ferie {
    background: #ffffff;
    color: #007aff;
    border-color: #007aff;
}

.apple-action-btn.ferie:hover {
    background: #007aff;
    color: #ffffff;
    border-color: #007aff;
}

.apple-action-btn.mutua {
    background: #ffffff;
    color: #34c759;
    border-color: #34c759;
}

.apple-action-btn.mutua:hover {
    background: #34c759;
    color: #ffffff;
    border-color: #34c759;
}

.apple-action-btn i {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Dark mode for action buttons */
:root[data-theme='dark'] .apple-action-btn.permesso {
    background: linear-gradient(135deg, #FFB3BA 0%, #FF8A95 100%);
    color: #FFFFFF;
}

:root[data-theme='dark'] .apple-action-btn.permesso:hover {
    background: linear-gradient(135deg, #FF8A95 0%, #FF6B7A 100%);
    color: #FFFFFF;
}

:root[data-theme='dark'] .apple-action-btn.ferie {
    background: linear-gradient(135deg, #BAE1FF 0%, #95D5FF 100%);
    color: #FFFFFF;
}

:root[data-theme='dark'] .apple-action-btn.ferie:hover {
    background: linear-gradient(135deg, #95D5FF 0%, #74C0FC 100%);
    color: #FFFFFF;
}

:root[data-theme='dark'] .apple-action-btn.mutua {
    background: linear-gradient(135deg, #D4F1D4 0%, #B8E6B8 100%);
    color: #FFFFFF;
}

:root[data-theme='dark'] .apple-action-btn.mutua:hover {
    background: linear-gradient(135deg, #B8E6B8 0%, #9AE69A 100%);
    color: #FFFFFF;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .navigation-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navigation-buttons .btn-lg {
        min-width: auto;
        width: 100%;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    .kpi-card h4 {
        font-size: 1.25rem;
    }
    
    .apple-title {
        font-size: 1.5rem;
    }
    
    .view-nav {
        width: 100%;
        margin-top: 1rem;
    }
    
    .view-nav .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        min-width: 70px;
    }
    
    .apple-action-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
        min-height: 44px;
    }
}

/* Dashboard Presenze - Minimalist Apple Style */
.presenze-dashboard {
    background: #fafafa;
    min-height: 100vh;
}

.presenze-card {
    background: #ffffff;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.presenze-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d1d6;
}

.presenze-stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.presenze-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.presenze-table {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    overflow: hidden;
}

.presenze-table th {
    background: rgba(248, 249, 250, 0.8);
    border: none;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    padding: 1rem;
}

.presenze-table td {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem;
    vertical-align: middle;
}

.presenze-table tbody tr:hover {
    background: rgba(0, 123, 255, 0.05);
}

.avatar-presenze {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.avatar-presenze-lg {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.day-card-presenze {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    transition: all 0.2s ease;
    min-height: 120px;
}

.day-card-presenze:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 123, 255, 0.2);
}

.day-card-presenze.present {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #28a745;
}

.day-card-presenze.absent {
    background: rgba(248, 249, 250, 0.8);
    border-color: #dee2e6;
}

.badge-presenze {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    border-radius: 20px;
    font-weight: 500;
}

.progress-presenze {
    height: 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.progress-presenze .progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
}

.chart-container {
    position: relative;
    height: 300px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 1rem;
}

.filter-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.btn-presenze {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    padding: 0.5rem 1rem;
}

.btn-presenze:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-presenze-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-presenze-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.btn-presenze-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-presenze-outline:hover {
    background: #007bff;
    color: white;
}

.modal-presenze .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
}

.modal-presenze .modal-header {
    border: none;
    padding: 1.5rem 1.5rem 0;
}

.modal-presenze .modal-body {
    padding: 1.5rem;
}

.modal-presenze .modal-footer {
    border: none;
    padding: 0 1.5rem 1.5rem;
}

/* Permissions Page Specific Styles - Minimalist */
.permissions-form .form-control:focus,
.permissions-form .form-select:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 0.1rem rgba(0, 122, 255, 0.15);
    outline: none;
}

.permissions-form .form-control,
.permissions-form .form-select {
    transition: all 0.2s ease;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.permissions-form .form-control:hover,
.permissions-form .form-select:hover {
    border-color: #d1d1d6;
}

.permissions-form .form-label {
    font-weight: 500;
    color: #1c1c1e;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Enhanced Apple-style form sections */
.form-section {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.form-section h6 {
    color: #007AFF;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 122, 255, 0.1);
}

/* Special user toggle - Minimalist */
.special-user-toggle {
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.special-user-toggle:hover {
    background: #fff3c4;
    border-color: #ffb300;
}

/* User info card - Minimalist */
.user-info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e5e7;
    transition: all 0.2s ease;
}

.user-info-card:hover {
    background: #f5f5f7;
    border-color: #d1d1d6;
}

/* Action buttons enhancement - Minimalist */
.action-buttons {
    border-top: 1px solid #e5e5e7;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Sidebar cards enhancement - Minimalist */
.sidebar-card {
    transition: all 0.2s ease;
}

.sidebar-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d1d6;
}

/* Info items styling - Minimalist */
.info-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.625rem;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e7;
}

.info-item:hover {
    background: #f5f5f7;
    border-color: #d1d1d6;
}

/* Apple Welcome Card - Elegant Design */
.apple-welcome-card {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.apple-welcome-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.apple-welcome-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.5rem;
  text-align: center;
}

.apple-greeting {
  margin-bottom: 1.5rem;
}

.apple-greeting-text {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Spettacolare effetto sfumatura in movimento per il nome utente */
.apple-username-gradient {
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #54a0ff,
    #5f27cd
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
  font-weight: 700;
  position: relative;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.apple-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #8e8e93;
  margin: 0 0 1rem 0;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.apple-description {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #6d6d70;
  margin: 0 0 2.5rem 0;
  letter-spacing: -0.005em;
  line-height: 1.5;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.apple-cta-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.apple-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  border: 2px solid #007aff;
  border-radius: 12px;
  color: #000000;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.apple-cta-btn:hover {
  background: #007aff;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
  text-decoration: none;
}

.apple-cta-btn:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

.apple-cta-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.apple-cta-btn:hover i {
  transform: translateX(3px);
}

/* Quick Stats nella Hero Section */
.apple-quick-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.apple-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.apple-stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.95);
}

.apple-stat-item .apple-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.apple-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.apple-stat-content .apple-stat-number {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  line-height: 1;
}

.apple-stat-content .apple-stat-label {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #8e8e93;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Feature Highlights */
.apple-feature-highlights {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.apple-feature-highlight {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
}

.apple-feature-highlight:hover {
  background: rgba(0, 122, 255, 0.15);
  border-color: rgba(0, 122, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.apple-feature-highlight i {
  color: #007aff;
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.apple-feature-highlight:hover i {
  transform: scale(1.1);
}

.apple-feature-highlight span {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1d1d1f;
  letter-spacing: -0.005em;
}

.apple-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.apple-tutorial-btn {
  background: #007aff;
  border: none;
  border-radius: 16px;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.apple-tutorial-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
  background: #0056cc;
}

.apple-tutorial-btn:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}

.apple-btn-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.apple-btn-content i {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.apple-tutorial-btn:hover .apple-btn-content i {
  transform: scale(1.1);
}

/* Decorazione di sfondo elegante */
.apple-card-decoration {
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 80% 20%, rgba(0, 122, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

/* Dark mode support */
:root[data-theme='dark'] .apple-welcome-card {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-greeting-text {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-subtitle {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-description {
  color: #a1a1aa;
}

:root[data-theme='dark'] .apple-card-decoration {
  background: radial-gradient(circle at 80% 20%, rgba(0, 122, 255, 0.15) 0%, transparent 70%);
}

:root[data-theme='dark'] .apple-cta-btn {
  background: #1c1c1e;
  border-color: #007aff;
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-cta-btn:hover {
  background: #007aff;
  color: #ffffff;
}

/* Dark mode per nuovi elementi hero */
:root[data-theme='dark'] .apple-stat-item {
  background: rgba(44, 44, 46, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-stat-item:hover {
  background: rgba(44, 44, 46, 0.9);
}

:root[data-theme='dark'] .apple-stat-content .apple-stat-number {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-stat-content .apple-stat-label {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-feature-highlight {
  background: rgba(0, 122, 255, 0.15);
  border-color: rgba(0, 122, 255, 0.3);
}

:root[data-theme='dark'] .apple-feature-highlight:hover {
  background: rgba(0, 122, 255, 0.2);
  border-color: rgba(0, 122, 255, 0.4);
}

:root[data-theme='dark'] .apple-feature-highlight span {
  color: #f2f2f7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .presenze-card {
    margin-bottom: 1rem;
  }
  
  .presenze-table {
    font-size: 0.875rem;
  }
  
  .day-card-presenze {
    min-height: 100px;
  }
  
  .avatar-presenze {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .apple-action-btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    min-height: 44px;
  }
  
  .navigation-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .navigation-buttons .btn-lg {
    min-width: auto;
    width: 100%;
  }
  
  /* Mobile adjustments for Apple welcome card */
  .apple-welcome-content {
    padding: 2rem 1.5rem;
  }
  
  .apple-greeting-text {
    font-size: 2rem;
  }
  
  .apple-subtitle {
    font-size: 1.1rem;
  }
  
  .apple-description {
    font-size: 0.95rem;
  }
  
  .apple-btn-content {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .apple-card-decoration {
    width: 150px;
    height: 150px;
  }
  
  .apple-cta-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
  }
  
  /* Responsive per nuovi elementi hero */
  .apple-quick-stats {
    gap: 1rem;
    margin: 1.5rem 0;
  }
  
  .apple-stat-item {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  
  .apple-stat-item .apple-stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .apple-stat-content .apple-stat-number {
    font-size: 1.1rem;
  }
  
  .apple-stat-content .apple-stat-label {
    font-size: 0.75rem;
  }
  
  .apple-feature-highlights {
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .apple-feature-highlight {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
  }
  
  .apple-feature-highlight span {
    font-size: 0.8rem;
  }
}

/* Apple Calendar Picker */
.apple-calendar-picker {
  position: relative;
  display: inline-block;
}

.apple-calendar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.apple-calendar-overlay.show {
  opacity: 1;
  visibility: visible;
}

.apple-date-badge {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
}

.apple-date-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.apple-calendar-dropdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e5e7;
  padding: 20px;
  z-index: 10000;
  min-width: 320px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: none;
}

.apple-calendar-dropdown.show {
  opacity: 1;
  visibility: visible;
  display: block;
}

.apple-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.apple-calendar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
}

.apple-calendar-nav {
  display: flex;
  gap: 8px;
}

.apple-calendar-nav-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f2f2f7;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.apple-calendar-nav-btn:hover {
  background: #e5e5ea;
  transform: scale(1.05);
}

.apple-calendar-nav-btn:active {
  transform: scale(0.95);
}

.apple-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.apple-calendar-weekday {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: #8e8e93;
  padding: 8px 4px;
}

.apple-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.apple-calendar-day {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.apple-calendar-day:hover {
  background: #f2f2f7;
  transform: scale(1.1);
}

.apple-calendar-day.today {
  background: #007AFF;
  color: white;
  font-weight: 600;
}

.apple-calendar-day.selected {
  background: #34c759;
  color: white;
  font-weight: 600;
}

.apple-calendar-day.other-month {
  color: #c7c7cc;
}

.apple-calendar-day.other-month:hover {
  background: #f8f9fa;
  color: #8e8e93;
}

.apple-calendar-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apple-calendar-today-btn {
  background: #f2f2f7;
  border: none;
  color: #1d1d1f;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apple-calendar-today-btn:hover {
  background: #e5e5ea;
  transform: translateY(-1px);
}

.apple-calendar-close-btn {
  background: #ff3b30;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apple-calendar-close-btn:hover {
  background: #d70015;
  transform: translateY(-1px);
}

/* Dark mode support for calendar */
:root[data-theme='dark'] .apple-calendar-dropdown {
  background: #2c2c2e;
  border-color: #3a3a3c;
}

:root[data-theme='dark'] .apple-calendar-title {
  color: #ffffff;
}

:root[data-theme='dark'] .apple-calendar-nav-btn {
  background: #3a3a3c;
  color: #ffffff;
}

:root[data-theme='dark'] .apple-calendar-nav-btn:hover {
  background: #48484a;
}

:root[data-theme='dark'] .apple-calendar-weekday {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-calendar-day {
  color: #ffffff;
}

:root[data-theme='dark'] .apple-calendar-day:hover {
  background: #3a3a3c;
}

:root[data-theme='dark'] .apple-calendar-day.other-month {
  color: #48484a;
}

:root[data-theme='dark'] .apple-calendar-day.other-month:hover {
  background: #2c2c2e;
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-calendar-footer {
  border-color: #3a3a3c;
}

:root[data-theme='dark'] .apple-calendar-today-btn {
  background: #3a3a3c;
  color: #ffffff;
}

:root[data-theme='dark'] .apple-calendar-today-btn:hover {
  background: #48484a;
}

/* Responsive calendar */
@media (max-width: 480px) {
  .apple-calendar-dropdown {
    min-width: 280px;
    padding: 16px;
  }
  
  .apple-calendar-day {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  
  .apple-calendar-weekday {
    font-size: 0.7rem;
    padding: 6px 2px;
  }
}

/* Apple Tutorial Section - Elegant Feature Cards */
.apple-tutorial-section {
  background: #fafafa;
  border-radius: 24px;
  padding: 3rem 2rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.apple-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.apple-section-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.apple-section-title i {
  color: #007aff;
  font-size: 2rem;
}

.apple-section-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  color: #8e8e93;
  margin: 0;
  letter-spacing: -0.01em;
}

.apple-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.apple-feature-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.apple-feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.apple-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.apple-icon-container {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.apple-icon-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 16px;
}

.apple-presenze-icon {
  background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
}

.apple-permessi-icon {
  background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
}

.apple-progetti-icon {
  background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
}

.apple-dashboard-icon {
  background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
}

.apple-export-icon {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.apple-security-icon {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.apple-domain-icon {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

/* Apple Versions Section */
.apple-versions-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 4rem 0;
  margin-top: 2rem;
}

.apple-versions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.apple-version-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.apple-version-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.apple-version-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.apple-version-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.apple-version-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 16px;
}

.apple-standard-card .apple-version-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.apple-pro-card .apple-version-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.apple-version-title h3 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.apple-version-title p {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #8e8e93;
  margin: 0;
  letter-spacing: -0.005em;
}

.apple-version-features {
  margin-bottom: 2rem;
}

.apple-version-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.apple-version-feature:hover {
  background: rgba(0, 122, 255, 0.05);
}

.apple-version-feature i {
  font-size: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.apple-standard-card .apple-version-feature i {
  color: #667eea;
}

.apple-pro-card .apple-version-feature i {
  color: #f5576c;
}

.apple-version-feature span {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #1d1d1f;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.apple-version-cta {
  margin-top: auto;
}

.apple-version-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: #f2f2f7;
  border: 2px solid #e5e5ea;
  border-radius: 16px;
  color: #1d1d1f;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.apple-version-btn:hover {
  background: #007aff;
  border-color: #007aff;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
  text-decoration: none;
}

.apple-version-btn:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

.apple-version-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.apple-version-btn:hover i {
  transform: translateX(3px);
}

/* Dark mode per versioni */
:root[data-theme='dark'] .apple-versions-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

:root[data-theme='dark'] .apple-version-card {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-version-title h3 {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-version-title p {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-version-feature span {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-version-feature:hover {
  background: rgba(0, 122, 255, 0.1);
}

:root[data-theme='dark'] .apple-version-btn {
  background: #3a3a3c;
  border-color: #48484a;
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-version-btn:hover {
  background: #007aff;
  border-color: #007aff;
  color: #ffffff;
}

/* Responsive per versioni */
@media (max-width: 768px) {
  .apple-versions-section {
    padding: 3rem 0;
  }
  
  .apple-versions-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .apple-version-card {
    padding: 2rem;
  }
  
  .apple-version-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .apple-version-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .apple-version-title h3 {
    font-size: 1.25rem;
  }
  
  .apple-version-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

.apple-card-title h4 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.apple-card-title p {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: #8e8e93;
  margin: 0;
  letter-spacing: -0.005em;
}

.apple-feature-list {
  flex: 1;
  margin-bottom: 2rem;
}

.apple-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.apple-feature-item:hover {
  background: rgba(0, 122, 255, 0.05);
}

.apple-feature-item i {
  font-size: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.apple-presenze-card .apple-feature-item i {
  color: #007aff;
}

.apple-permessi-card .apple-feature-item i {
  color: #34c759;
}

.apple-progetti-card .apple-feature-item i {
  color: #ff9500;
}

.apple-feature-item span {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #1d1d1f;
  line-height: 1.5;
  letter-spacing: -0.005em;
}

.apple-card-cta {
  margin-top: auto;
}

.apple-feature-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: #f2f2f7;
  border: 2px solid #e5e5ea;
  border-radius: 16px;
  color: #1d1d1f;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.apple-feature-btn:hover {
  background: #007aff;
  border-color: #007aff;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
  text-decoration: none;
}

.apple-feature-btn:active {
  transform: translateY(0);
  transition: all 0.1s ease;
}

.apple-feature-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.apple-feature-btn:hover i {
  transform: translateX(3px);
}

.apple-feature-btn.apple-disabled {
  background: #f2f2f7;
  border-color: #d1d1d6;
  color: #8e8e93;
  cursor: not-allowed;
}

.apple-feature-btn.apple-disabled:hover {
  background: #f2f2f7;
  border-color: #d1d1d6;
  color: #8e8e93;
  transform: none;
  box-shadow: none;
}

/* Dark mode support */
:root[data-theme='dark'] .apple-tutorial-section {
  background: #1c1c1e;
}

:root[data-theme='dark'] .apple-section-title {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-section-subtitle {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-feature-card {
  background: #2c2c2e;
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-card-title h4 {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-card-title p {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-feature-item span {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-feature-btn {
  background: #3a3a3c;
  border-color: #48484a;
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-feature-btn:hover {
  background: #007aff;
  border-color: #007aff;
  color: #ffffff;
}

:root[data-theme='dark'] .apple-feature-btn.apple-disabled {
  background: #3a3a3c;
  border-color: #48484a;
  color: #8e8e93;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .apple-tutorial-section {
    padding: 2rem 1.5rem;
    margin: 1.5rem 0;
  }
  
  .apple-section-title {
    font-size: 1.875rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .apple-features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .apple-feature-card {
    padding: 1.5rem;
  }
  
  .apple-card-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .apple-icon-container {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    margin: 0 auto;
  }
  
  .apple-card-title h4 {
    font-size: 1.25rem;
  }
  
  .apple-feature-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
}

/* Apple Tab Navigation - Mobile Responsive */
.apple-tab-navigation {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: #f2f2f7;
  padding: 0.5rem;
  border-radius: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  max-width: 400px;
}

.apple-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #8e8e93;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex: 1;
  min-width: 80px;
  position: relative;
}

.apple-tab-btn:hover {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.apple-tab-btn.active {
  background: #ffffff;
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

.apple-tab-btn i {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.apple-tab-btn:hover i {
  transform: scale(1.1);
}

.apple-tab-btn.active i {
  color: #007aff;
}

/* Apple Date Navigation - Mobile Responsive */
.apple-date-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.apple-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-radius: 16px;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.apple-nav-prev,
.apple-nav-next {
  background: #f2f2f7;
  color: #1d1d1f;
  border-color: #e5e5ea;
}

.apple-nav-prev:hover,
.apple-nav-next:hover {
  background: #e5e5ea;
  color: #1d1d1f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.apple-nav-today {
  background: #007aff;
  color: #ffffff;
  border-color: #007aff;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.apple-nav-today:hover {
  background: #0056cc;
  border-color: #0056cc;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
  text-decoration: none;
}

.apple-nav-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.apple-nav-btn:hover i {
  transform: scale(1.1);
}

.apple-date-display {
  text-align: center;
  margin-top: 1rem;
}

.apple-date-badge {
  display: inline-block;
  background: #ffffff;
  color: #1d1d1f;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dark mode support */
:root[data-theme='dark'] .apple-tab-navigation {
  background: #2c2c2e;
}

:root[data-theme='dark'] .apple-tab-btn {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-tab-btn:hover {
  color: #f2f2f7;
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-tab-btn.active {
  background: #1c1c1e;
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-nav-prev,
:root[data-theme='dark'] .apple-nav-next {
  background: #3a3a3c;
  color: #f2f2f7;
  border-color: #48484a;
}

:root[data-theme='dark'] .apple-nav-prev:hover,
:root[data-theme='dark'] .apple-nav-next:hover {
  background: #48484a;
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-date-badge {
  background: #2c2c2e;
  color: #f2f2f7;
  border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .apple-tab-navigation {
    gap: 0.25rem;
    padding: 0.375rem;
    margin: 0 1rem;
  }
  
  .apple-tab-btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
    min-width: 70px;
  }
  
  .apple-tab-btn i {
    font-size: 1.1rem;
  }
  
  .apple-tab-btn span {
    font-size: 0.75rem;
  }
  
  .apple-date-navigation {
    gap: 0.5rem;
    padding: 0 1rem;
  }
  
  .apple-nav-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .apple-nav-btn i {
    font-size: 1rem;
  }
  
  .apple-date-badge {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .apple-tab-navigation {
    margin: 0 0.5rem;
  }
  
  .apple-tab-btn {
    padding: 0.5rem 0.625rem;
    font-size: 0.75rem;
    min-width: 60px;
  }
  
  .apple-tab-btn i {
    font-size: 1rem;
  }
  
  .apple-tab-btn span {
    font-size: 0.7rem;
  }
  
  .apple-date-navigation {
    gap: 0.375rem;
    padding: 0 0.5rem;
  }
  
  .apple-nav-btn {
    padding: 0.625rem 0.875rem;
    font-size: 0.85rem;
  }
  
  .apple-date-badge {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* Fix hamburger menu */
.navbar {
  position: relative;
  z-index: 1050;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
  z-index: 1051;
  position: relative;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
  transition: all 0.3s ease;
  z-index: 1050;
  position: relative;
}

/* Ensure mobile menu works */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #ffffff;
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1052 !important;
    position: relative;
  }
  
  .navbar-collapse.show {
    z-index: 1052 !important;
  }
  
  .navbar-nav {
    margin: 0;
  }
  
  .nav-item {
    margin-bottom: 0.5rem;
  }
  
  .nav-item:last-child {
    margin-bottom: 0;
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
  }
  
  .nav-link:hover {
    background: #f8f9fa;
  }
}

/* Dark mode for mobile menu */
:root[data-theme='dark'] .navbar-collapse {
  background: #2c2c2e;
}

:root[data-theme='dark'] .nav-link:hover {
  background: #3a3a3c;
}

/* Fix specifico per pagina presenze */
.container-fluid .navbar {
  z-index: 1055 !important;
}

.container-fluid .navbar-collapse {
  z-index: 1056 !important;
}

.container-fluid .navbar-collapse.show {
  z-index: 1056 !important;
}

/* Assicura che il menu sia sempre sopra le card */
.navbar-collapse {
  z-index: 1055 !important;
}

.navbar-collapse.show {
  z-index: 1055 !important;
}

/* Fix ultra-specifico per pagina presenze */
body .navbar {
  z-index: 9999 !important;
  position: relative !important;
}

body .navbar-toggler {
  z-index: 10000 !important;
  position: relative !important;
}

body .navbar-collapse {
  z-index: 9998 !important;
  position: relative !important;
}

body .navbar-collapse.show {
  z-index: 9998 !important;
  position: relative !important;
}

/* Forza il menu a essere visibile */
.navbar-collapse.collapse {
  z-index: 9998 !important;
}

.navbar-collapse.collapsing {
  z-index: 9998 !important;
}

/* Fix specifico per menu aperto */
.navbar-collapse.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 9998 !important;
  position: relative !important;
}

/* Assicura che il menu sia sempre visibile quando aperto */
@media (max-width: 991.98px) {
  .navbar-collapse.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9998 !important;
    position: relative !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    margin-top: 0.5rem !important;
    padding: 1rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  }
  
  :root[data-theme='dark'] .navbar-collapse.show {
    background: #2c2c2e !important;
  }
}

/* ===== APPLE STYLE PER RICHIESTE FERIE/PERMESSI ===== */

/* Container principale */
.requests-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header con titolo e CTA */
.requests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.requests-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}

/* CTA Buttons Apple Style */
.apple-cta-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.apple-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #007AFF;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 12px rgba(0, 122, 255, 0.25);
  border: none;
  position: relative;
  overflow: hidden;
}

.apple-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
  color: white;
  text-decoration: none;
}

.apple-cta-btn.apple-secondary {
  background: #f2f2f7;
  color: #1d1d1f;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.apple-cta-btn.apple-secondary:hover {
  background: #e5e5ea;
  color: #1d1d1f;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.apple-cta-btn i {
  font-size: 0.9rem;
}

/* Grid delle richieste */
.requests-grid {
  display: grid;
  gap: 1.5rem;
}

/* Card delle richieste - Apple Style */
.request-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e5e7;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.request-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.request-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.request-card:hover::before {
  opacity: 1;
}

/* Header della card */
.request-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Tipo richiesta */
.request-type {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.request-type.ferie {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1976d2;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.2);
}

.request-type.permesso {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #7b1fa2;
  box-shadow: 0 2px 10px rgba(123, 31, 162, 0.2);
}

/* Status badge */
.request-status {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.request-status.pending {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  box-shadow: 0 2px 10px rgba(133, 100, 4, 0.2);
}

.request-status.approved {
  background: linear-gradient(135deg, #d4edda 0%, #a8e6cf 100%);
  color: #155724;
  box-shadow: 0 2px 10px rgba(21, 87, 36, 0.2);
}

.request-status.rejected {
  background: linear-gradient(135deg, #f8d7da 0%, #ffb3ba 100%);
  color: #721c24;
  box-shadow: 0 2px 10px rgba(114, 28, 36, 0.2);
}

/* Body della card */
.request-body {
  padding: 1.5rem;
}

/* Date grid */
.request-dates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.date-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e5e5e7;
}

.date-label {
  font-size: 0.75rem;
  color: #8e8e93;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.date-value {
  font-size: 1rem;
  color: #1d1d1f;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Reason section */
.request-reason {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e5e5e7;
}

.reason-label {
  font-size: 0.75rem;
  color: #8e8e93;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.reason-text {
  color: #1d1d1f;
  line-height: 1.5;
  font-size: 0.9rem;
  font-weight: 400;
}

/* Actions */
.request-actions {
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #e5e5e7;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-action {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  background: white;
  color: #8e8e93;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-action:hover {
  border-color: #007AFF;
  color: #007AFF;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
}

.btn-cancel {
  background: #ff3b30;
  color: white;
  border-color: #ff3b30;
}

.btn-cancel:hover {
  background: #ff2d55;
  border-color: #ff2d55;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  color: #8e8e93;
}

.empty-state i {
  font-size: 5rem;
  color: #d1d1d6;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.empty-state h3 {
  margin: 0 0 1rem 0;
  color: #1d1d1f;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.empty-state p {
  margin: 0 0 2rem 0;
  color: #8e8e93;
  font-size: 1rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .requests-container {
    padding: 1rem 0.5rem;
  }
  
  .requests-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .requests-title {
    font-size: 1.5rem;
  }
  
  .apple-cta-container {
    justify-content: center;
  }
  
  .request-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .request-dates {
    grid-template-columns: 1fr;
  }
  
  .request-actions {
    flex-direction: column;
  }
  
  .btn-action {
    justify-content: center;
  }
}

/* Dark mode support */
:root[data-theme='dark'] .request-card {
  background: #1c1c1e;
  border-color: #38383a;
}

:root[data-theme='dark'] .request-header {
  border-color: #38383a;
}

:root[data-theme='dark'] .request-body {
  color: #ffffff;
}

:root[data-theme='dark'] .date-item {
  background: #2c2c2e;
  border-color: #38383a;
}

:root[data-theme='dark'] .request-reason {
  background: #2c2c2e;
  border-color: #38383a;
}

:root[data-theme='dark'] .request-actions {
  background: #2c2c2e;
  border-color: #38383a;
}

:root[data-theme='dark'] .btn-action {
  background: #2c2c2e;
  border-color: #38383a;
  color: #ffffff;
}

:root[data-theme='dark'] .empty-state h3 {
  color: #ffffff;
}

/* ===== APPLE STYLE PER RICHIESTE MUTUA ===== */

/* Tipo richiesta mutua */
.request-type.mutua {
  background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
  color: #ff3b30;
  box-shadow: 0 2px 10px rgba(255, 59, 48, 0.2);
}

/* Certificate info */
.certificate-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid #e5e5e7;
}

.certificate-info i {
  color: #007AFF;
  font-size: 1rem;
}

.certificate-info span {
  font-size: 0.8rem;
  color: #1d1d1f;
  font-weight: 500;
}

/* Medical notes */
.medical-notes {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e5e5e7;
}

.medical-notes .reason-label {
  color: #ff3b30;
  font-weight: 600;
}

.medical-notes .reason-text {
  color: #1d1d1f;
  font-weight: 400;
}

/* Dark mode per mutua */
:root[data-theme='dark'] .certificate-info {
  background: linear-gradient(135deg, #2c2c2e 0%, #3a3a3c 100%);
  border-color: #38383a;
}

:root[data-theme='dark'] .medical-notes {
  background: #2c2c2e;
  border-color: #38383a;
}

/* ===== APPLE LANDING PAGE STYLES ===== */

/* Hero Section */
.apple-landing-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  overflow: hidden;
  padding: 2rem 0;
}

.apple-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 1;
}

.apple-gradient-orb {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.1));
  animation: float 8s ease-in-out infinite;
  filter: blur(40px);
}

.apple-orb-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.apple-orb-2 {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.apple-orb-3 {
  width: 150px;
  height: 150px;
  bottom: 20%;
  left: 60%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Status Card per utenti autenticati */
.apple-status-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 2;
}

.apple-status-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.apple-status-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
}

.apple-status-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.apple-status-info {
  flex: 1;
}

.apple-status-title {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.apple-status-text {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.95rem;
  color: #8e8e93;
  margin: 0;
  line-height: 1.4;
}

.apple-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #007aff;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
  border: none;
}

.apple-status-btn:hover {
  background: #0056cc;
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
}

.apple-status-btn i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.apple-status-btn:hover i {
  transform: translateX(3px);
}

/* Stats Section */
.apple-stats-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.apple-stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.apple-stat-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 2;
  height: 100%;
}

.apple-stat-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.apple-stat-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: white;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.apple-stat-card:hover .apple-stat-icon {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.3);
}

.apple-stat-number {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.apple-stat-label {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Dark mode support per landing page */
:root[data-theme='dark'] .apple-landing-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

:root[data-theme='dark'] .apple-status-card {
  background: rgba(28, 28, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-status-title {
  color: #f2f2f7;
}

:root[data-theme='dark'] .apple-status-text {
  color: #8e8e93;
}

:root[data-theme='dark'] .apple-stats-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

:root[data-theme='dark'] .apple-stat-card {
  background: rgba(44, 44, 46, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme='dark'] .apple-stat-card:hover {
  background: rgba(44, 44, 46, 0.9);
}

/* Responsive adjustments per landing page */
@media (max-width: 768px) {
  .apple-landing-hero {
    min-height: 80vh;
    padding: 1rem 0;
  }
  
  .apple-status-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .apple-status-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .apple-stats-section {
    padding: 3rem 0;
  }
  
  .apple-stat-card {
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
  }
  
  .apple-stat-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .apple-stat-number {
    font-size: 2rem;
  }
  
  .apple-orb-1 {
    width: 200px;
    height: 200px;
  }
  
  .apple-orb-2 {
    width: 150px;
    height: 150px;
  }
  
  .apple-orb-3 {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .apple-status-content {
    padding: 1rem;
  }
  
  .apple-stat-card {
    padding: 1rem;
  }
  
  .apple-stat-number {
    font-size: 1.75rem;
  }
  
  .apple-stat-label {
    font-size: 0.9rem;
  }
}

/* ===== APPLE STYLE PER PAGINE DETTAGLIO ===== */

/* Container principale */
.apple-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Card Apple Style */
.apple-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e5e7;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-bottom: 1.5rem;
}

.apple-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.apple-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  background: #f8f9fa;
}

.apple-card-body {
  padding: 1.5rem;
}

.apple-card-footer {
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #f0f0f0;
}

/* Titoli */
.apple-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
  letter-spacing: -0.01em;
}

.apple-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: #8e8e93;
  margin: 0.25rem 0 0 0;
}

/* Badges */
.apple-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.apple-badge-success {
  background: linear-gradient(135deg, #d4edda 0%, #a8e6cf 100%);
  color: #155724;
  box-shadow: 0 2px 10px rgba(21, 87, 36, 0.2);
}

.apple-badge-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  color: #856404;
  box-shadow: 0 2px 10px rgba(133, 100, 4, 0.2);
}

.apple-badge-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #ffb3ba 100%);
  color: #721c24;
  box-shadow: 0 2px 10px rgba(114, 28, 36, 0.2);
}

/* Info Grid */
.apple-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.apple-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e5e5e7;
}

.apple-info-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.apple-info-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}

/* Timeline */
.apple-timeline {
  position: relative;
  padding-left: 2rem;
}

.apple-timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #007aff, #5ac8fa);
  border-radius: 1px;
}

.apple-timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.apple-timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #007aff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px #007aff20;
}

.apple-timeline-item:last-child::before {
  background: #34c759;
  box-shadow: 0 0 0 2px #34c75920;
}

.apple-timeline-content {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid #e5e5e7;
}

.apple-timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.apple-timeline-description {
  font-size: 0.8rem;
  color: #8e8e93;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.apple-timeline-date {
  font-size: 0.75rem;
  font-weight: 500;
  color: #007aff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Back Button */
.apple-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f2f2f7;
  color: #1d1d1f;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.8rem;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid #e5e5e7;
}

.apple-back-button:hover {
  background: #e5e5ea;
  color: #1d1d1f;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Icons */
.apple-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.8rem;
}

.apple-icon-primary {
  background: #007aff20;
  color: #007aff;
}

.apple-icon-success {
  background: #34c75920;
  color: #34c759;
}

.apple-icon-warning {
  background: #ff950020;
  color: #ff9500;
}

.apple-icon-danger {
  background: #ff3b3020;
  color: #ff3b30;
}

/* Responsive */
@media (max-width: 768px) {
  .apple-container {
    padding: 1rem 0.5rem;
  }
  
  .apple-card-header,
  .apple-card-body {
    padding: 1rem;
  }
  
  .apple-title {
    font-size: 1.25rem;
  }
  
  .apple-info-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .apple-timeline {
    padding-left: 1.5rem;
  }
  
  .apple-timeline::before {
    left: 0.75rem;
  }
  
  .apple-timeline-item {
    padding-left: 1rem;
  }
  
  .apple-timeline-item::before {
    left: -1rem;
  }
}

/* Dark mode support */
:root[data-theme='dark'] .apple-card {
  background: #1c1c1e;
  border-color: #38383a;
}

:root[data-theme='dark'] .apple-card-header,
:root[data-theme='dark'] .apple-card-footer {
  background: #2c2c2e;
  border-color: #38383a;
}

:root[data-theme='dark'] .apple-info-item {
  background: #2c2c2e;
  border-color: #38383a;
}

:root[data-theme='dark'] .apple-timeline-content {
  background: #2c2c2e;
  border-color: #38383a;
}

:root[data-theme='dark'] .apple-back-button {
  background: #2c2c2e;
  border-color: #38383a;
  color: #ffffff;
}

:root[data-theme='dark'] .apple-back-button:hover {
  background: #3a3a3c;
  color: #ffffff;
}

