/* === GESTIONE SALE - CSS === */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --accent: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

/* Loading */
.loading-screen {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: white; z-index: 9999;
}
.loading-spinner {
  width: 40px; height: 40px; border: 4px solid var(--gray-200);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === HOMEPAGE === */
.home-hero {
  background: #020617;
  color: white; text-align: center; padding: 90px 20px 80px;
  position: relative; overflow: hidden; min-height: 640px;
  display: flex; align-items: center; justify-content: center;
}
.home-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(30,58,138,0.7) 0%, transparent 60%),
    radial-gradient(circle at 15% 40%, rgba(59,130,246,0.35) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(99,102,241,0.25) 0%, transparent 35%),
    radial-gradient(circle at 50% 90%, rgba(37,99,235,0.2) 0%, transparent 35%);
  animation: heroBgShift 12s ease-in-out infinite alternate;
}
@keyframes heroBgShift {
  0% { filter: hue-rotate(0deg) brightness(1); }
  100% { filter: hue-rotate(15deg) brightness(1.1); }
}
.home-hero-bg::before {
  content: ''; position: absolute; inset: 0; opacity: 0.025;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.home-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.2) 0%, transparent 30%, transparent 70%, rgba(2,6,23,0.4) 100%);
}

/* Floating orbs */
.home-hero-orbs { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); }
.orb-1 { width: 400px; height: 400px; background: rgba(59,130,246,0.15); top: -10%; left: -5%; animation: orbFloat1 20s ease-in-out infinite; }
.orb-2 { width: 300px; height: 300px; background: rgba(139,92,246,0.12); top: 50%; right: -8%; animation: orbFloat2 25s ease-in-out infinite; }
.orb-3 { width: 250px; height: 250px; background: rgba(6,182,212,0.1); bottom: -5%; left: 30%; animation: orbFloat3 18s ease-in-out infinite; }
@keyframes orbFloat1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(80px, 60px); } }
@keyframes orbFloat2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-60px, -80px); } }
@keyframes orbFloat3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(50px, -40px); } }

/* Particles */
.home-particles { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.home-particles .particle {
  position: absolute; background: rgba(255,255,255,0.4);
  border-radius: 50%; animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-700px) translateX(80px); opacity: 0; }
}

/* Decorative corner elements */
.hero-deco { position: absolute; z-index: 1; opacity: 0.08; }
.hero-deco-tl { top: 30px; left: 30px; width: 120px; height: 120px;
  border-top: 2px solid white; border-left: 2px solid white; }
.hero-deco-br { bottom: 30px; right: 30px; width: 120px; height: 120px;
  border-bottom: 2px solid white; border-right: 2px solid white; }

.home-hero-content { position: relative; z-index: 3; max-width: 800px; }

/* Logo with animated rings */
.home-logo {
  margin-bottom: 32px; animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; display: inline-block; width: 160px; height: 160px;
}
.home-logo img {
  border-radius: 50%; border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 50px rgba(59,130,246,0.5), 0 0 100px rgba(59,130,246,0.15);
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
}
.logo-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(96,165,250,0.3);
  animation: ringRotate 12s linear infinite;
}
.logo-ring::before {
  content: ''; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px;
  background: #60a5fa; border-radius: 50%; box-shadow: 0 0 10px #60a5fa;
}
.logo-ring-2 {
  inset: -12px; border-color: rgba(139,92,246,0.2);
  animation: ringRotate 18s linear infinite reverse;
}
.logo-ring-2::before { background: #8b5cf6; box-shadow: 0 0 10px #8b5cf6; }
@keyframes ringRotate { to { transform: rotate(360deg); } }
@keyframes heroReveal { from { opacity: 0; transform: translateY(-30px) scale(0.85); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Title - GESTIONE */
.home-title { margin-bottom: 0; line-height: 1; animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both; }
.title-gestione {
  display: block; font-family: 'Montserrat', sans-serif; font-size: 1.5rem; font-weight: 200;
  letter-spacing: 22px; text-transform: uppercase; opacity: 0.7; margin-bottom: 6px;
  text-indent: 22px;
}

/* Title - Sale (with depth shadow) */
.title-sale-wrap { display: block; position: relative; }
.title-sale {
  display: block; font-family: 'Playfair Display', serif; font-size: 7rem; font-weight: 900;
  letter-spacing: -3px; line-height: 0.9; position: relative; z-index: 1;
  background: linear-gradient(170deg, #ffffff 0%, #e0e7ff 25%, #93c5fd 55%, #60a5fa 80%, #3b82f6 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: titleShimmer 4s ease-in-out infinite;
  background-size: 200% 200%;
}
.title-sale-shadow {
  display: block; font-family: 'Playfair Display', serif; font-size: 7rem; font-weight: 900;
  letter-spacing: -3px; line-height: 0.9; position: absolute; top: 4px; left: 0; right: 0;
  color: transparent; z-index: 0;
  -webkit-text-stroke: 1px rgba(96,165,250,0.15);
  filter: blur(8px);
}
@keyframes titleShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Divider */
.home-divider {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 28px auto; width: 280px; animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(148,163,184,0.4), transparent); }
.divider-icon { display: flex; align-items: center; opacity: 0.6; }

.home-subtitle {
  font-size: 1.3rem; opacity: 0.8; margin-bottom: 8px; font-weight: 300;
  letter-spacing: 2px; font-family: 'Montserrat', sans-serif;
  animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}
.home-tagline {
  font-size: 0.95rem; opacity: 0.45; font-style: italic;
  animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}
.home-author {
  font-size: 0.9rem; opacity: 0.4; margin-top: 8px;
  animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}
.home-author a { color: #93c5fd; text-decoration: none; font-weight: 600; transition: all 0.3s; }
.home-author a:hover { color: #bfdbfe; text-shadow: 0 0 20px rgba(147,197,253,0.5); }

.home-hero-cta { margin-top: 42px; animation: heroReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both; }
.btn-hero {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 48px; border-radius: 50px;
  background: linear-gradient(135deg, rgba(59,130,246,0.3) 0%, rgba(99,102,241,0.2) 100%);
  color: white; font-weight: 600; font-size: 1.05rem;
  text-decoration: none; border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(12px); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 24px rgba(59,130,246,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
}
.btn-hero::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s;
}
.btn-hero:hover::before { left: 100%; }
.btn-hero:hover {
  background: linear-gradient(135deg, rgba(59,130,246,0.5) 0%, rgba(99,102,241,0.35) 100%);
  border-color: rgba(255,255,255,0.3); transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(59,130,246,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-hero svg { transition: transform 0.3s; }
.btn-hero:hover svg { transform: translateX(5px); }

/* Feature Cards */
.home-features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; max-width: 1200px; margin: -40px auto 48px; padding: 0 24px;
  position: relative; z-index: 4;
}
.feature-card {
  background: white; border-radius: 12px; padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--gray-100);
  display: flex; gap: 16px; align-items: flex-start;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.1); }
.feature-icon-wrap {
  width: 52px; height: 52px; min-width: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--fc-accent, #3b82f6) 8%, white);
  color: var(--fc-accent, #3b82f6);
  border: 1px solid color-mix(in srgb, var(--fc-accent, #3b82f6) 15%, white);
}
.feature-text { flex: 1; min-width: 0; }
.feature-card h3 { font-size: 1rem; margin-bottom: 5px; color: var(--gray-800); font-weight: 600; }
.feature-card p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.55; margin: 0; text-align: justify; }

.home-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  max-width: 960px; margin: 0 auto 60px; padding: 0 24px;
}
.home-login-box, .home-register-box {
  background: white; border-radius: 16px; padding: 36px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06); border: 1px solid var(--gray-100);
  transition: box-shadow 0.3s;
}
.home-login-box:hover, .home-register-box:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.1); }
.home-login-box { border-top: 3px solid var(--primary); }
.home-register-box { border-top: 3px solid var(--success); }
.home-login-box h2, .home-register-box h2 { font-size: 1.4rem; margin-bottom: 8px; }
.home-login-box p, .home-register-box p { color: var(--gray-500); margin-bottom: 20px; font-size: 0.9rem; }

.home-footer {
  text-align: center; padding: 24px; color: var(--gray-400); font-size: 0.85rem;
  border-top: 1px solid var(--gray-200);
}

/* === FORMS === */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 500; margin-bottom: 4px; font-size: 0.9rem; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.error-msg { color: var(--danger); font-size: 0.9rem; padding: 8px 12px; background: #fef2f2; border-radius: var(--radius); margin-top: 8px; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: none; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 500; cursor: pointer; font-family: inherit;
  transition: all 0.2s; text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; background: var(--gray-100); font-size: 1.2rem; }
.btn-icon:hover { background: var(--gray-200); }

/* === NAVBAR === */
.navbar {
  background: white; border-bottom: 1px solid var(--gray-200);
  padding: 0 24px; height: 60px; display: flex; align-items: center;
  gap: 24px; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100;
}
.navbar-brand { display: flex; align-items: center; gap: 12px; }
.brand-text { cursor: pointer; display: flex; align-items: center; gap: 8px; line-height: 1; transition: opacity 0.2s; }
.brand-text:hover { opacity: 0.8; }
.brand-gestione { font-family: 'Montserrat', sans-serif; font-size: 0.6rem; font-weight: 300; letter-spacing: 4px; text-transform: uppercase; color: var(--gray-400); }
.brand-divider { width: 1px; height: 26px; background: linear-gradient(180deg, transparent, var(--gray-300), transparent); }
.brand-sale { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 900; background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #2563eb 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.5px; }
.navbar-menu { display: flex; gap: 4px; flex: 1; }
.nav-btn {
  background: none; border: none; padding: 8px 16px; border-radius: var(--radius);
  cursor: pointer; font-size: 0.9rem; font-family: inherit; color: var(--gray-600);
  transition: all 0.2s; font-weight: 500;
}
.nav-btn:hover { background: var(--gray-100); color: var(--gray-800); }
.nav-btn.active { background: var(--primary-light); color: var(--primary); }
.navbar-user { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
#user-info { color: var(--gray-600); }

/* === VIEWS === */
.view { padding: 24px; max-width: 1400px; margin: 0 auto; }
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}

/* === CALENDAR === */
.calendar-nav { display: flex; align-items: center; gap: 12px; }
.calendar-nav h2 { font-size: 1.4rem; min-width: 220px; text-align: center; }
.view-actions { display: flex; align-items: center; gap: 12px; }

.sale-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.sale-filter-btn {
  padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; cursor: pointer;
  border: 2px solid; font-family: inherit; font-weight: 500; transition: all 0.2s;
}
.sale-filter-btn.active { color: white; }

.calendar-legend { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--gray-600); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }

.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  overflow: hidden; background: white; box-shadow: var(--shadow);
}
.calendar-header-cell {
  padding: 10px; text-align: center; font-weight: 600; font-size: 0.85rem;
  background: var(--gray-50); color: var(--gray-600); border-bottom: 1px solid var(--gray-200);
}
.calendar-cell {
  min-height: 110px; padding: 4px; border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100); position: relative;
  cursor: pointer; transition: background 0.15s;
}
.calendar-cell:hover { background: var(--gray-50); }
.calendar-cell:nth-child(7n) { border-right: none; }
.calendar-cell.other-month { background: var(--gray-50); }
.calendar-cell.other-month .cell-day { color: var(--gray-300); }
.calendar-cell.today { background: #eff6ff; }
.calendar-cell.today .cell-day { background: var(--primary); color: white; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.cell-day { padding: 2px 6px; font-size: 0.85rem; font-weight: 500; color: var(--gray-700); }
.cell-events { margin-top: 2px; }
.cell-event {
  padding: 2px 6px; margin: 1px 0; border-radius: 4px; font-size: 0.72rem;
  font-weight: 500; color: white; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: pointer; transition: opacity 0.15s;
}
.cell-event:hover { opacity: 0.85; }
.cell-more { font-size: 0.7rem; color: var(--gray-500); padding: 2px 6px; cursor: pointer; }

/* === DAY VIEW === */
.day-timeline { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.day-sala-header {
  display: grid; gap: 0; border-bottom: 2px solid var(--gray-200);
}
.day-sala-col { padding: 12px 16px; font-weight: 600; text-align: center; border-right: 1px solid var(--gray-200); }
.day-sala-col:last-child { border-right: none; }
.day-hour-row { display: grid; border-bottom: 1px solid var(--gray-100); min-height: 50px; }
.day-hour-label { padding: 4px 12px; font-size: 0.8rem; color: var(--gray-400); font-weight: 500; background: var(--gray-50); display: flex; align-items: flex-start; border-right: 1px solid var(--gray-200); }
.day-hour-cell { border-right: 1px solid var(--gray-100); position: relative; padding: 2px; }
.day-hour-cell:last-child { border-right: none; }
.day-event {
  padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; color: white;
  font-weight: 500; cursor: pointer; margin: 1px;
}
.day-event small { display: block; font-weight: 400; opacity: 0.9; font-size: 0.7rem; }

/* === DISPONIBILITA VIEW === */
.disp-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.disp-sala-card {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.disp-sala-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.disp-sala-header { padding: 16px; color: white; font-weight: 600; font-size: 1.1rem; }
.disp-sala-body { padding: 16px; }
.disp-status { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius); margin-bottom: 12px; font-weight: 600; font-size: 0.95rem; }
.disp-status.libera { background: #d1fae5; color: #065f46; }
.disp-status.occupata { background: #fee2e2; color: #991b1b; }
.disp-status.parziale { background: #fef3c7; color: #92400e; }
.disp-status-dot { width: 10px; height: 10px; border-radius: 50%; }
.disp-status.libera .disp-status-dot { background: #10b981; }
.disp-status.occupata .disp-status-dot { background: #ef4444; }
.disp-status.parziale .disp-status-dot { background: #f59e0b; }
.disp-event { padding: 8px 10px; margin: 4px 0; background: var(--gray-50); border-radius: 6px; border-left: 3px solid; font-size: 0.85rem; }
.disp-event strong { display: block; }
.disp-event small { color: var(--gray-500); }
.disp-slots { margin-top: 12px; }
.disp-slot { display: inline-block; padding: 4px 10px; margin: 2px; border-radius: 20px; font-size: 0.8rem; cursor: pointer; border: 1px solid; transition: all 0.2s; }
.disp-slot.free { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.disp-slot.free:hover { background: #d1fae5; }
.disp-slot.busy { background: #fef2f2; border-color: #fca5a5; color: #991b1b; text-decoration: line-through; cursor: default; }

/* === KANBAN VIEW === */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; min-height: 500px; }
.kanban-column {
  min-width: 300px; max-width: 340px; flex-shrink: 0;
  background: var(--gray-100); border-radius: var(--radius); display: flex; flex-direction: column;
}
.kanban-col-header {
  padding: 14px 16px; font-weight: 700; font-size: 0.95rem;
  border-bottom: 3px solid; display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--radius) var(--radius) 0 0;
}
.kanban-col-count {
  background: rgba(0,0,0,0.1); padding: 2px 10px; border-radius: 20px; font-size: 0.8rem;
}
.kanban-col-body { padding: 8px; flex: 1; overflow-y: auto; }
.kanban-card {
  background: white; border-radius: var(--radius); padding: 14px; margin-bottom: 8px;
  box-shadow: var(--shadow); cursor: pointer; transition: box-shadow 0.2s, transform 0.1s;
  border-left: 4px solid;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card h4 { font-size: 0.95rem; margin-bottom: 6px; }
.kanban-card-meta { font-size: 0.8rem; color: var(--gray-500); display: flex; flex-direction: column; gap: 3px; }
.kanban-card-tags { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.kanban-tag { padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }

/* === WEEK VIEW === */
.week-grid {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.week-day-col { border-right: 1px solid var(--gray-100); min-height: 400px; }
.week-day-col:last-child { border-right: none; }
.week-day-header {
  padding: 10px 8px; text-align: center; font-weight: 600; font-size: 0.85rem;
  background: var(--gray-50); border-bottom: 2px solid var(--gray-200);
}
.week-day-header.today { background: var(--primary-light); color: var(--primary); }
.week-day-header small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--gray-400); }
.week-day-events { padding: 4px; }
.week-event {
  padding: 6px 8px; margin: 3px 0; border-radius: 4px; font-size: 0.78rem;
  color: white; font-weight: 500; cursor: pointer; transition: opacity 0.15s;
}
.week-event:hover { opacity: 0.85; }
.week-event small { display: block; font-weight: 400; opacity: 0.9; font-size: 0.7rem; }

/* === PRENOTAZIONI LIST === */
.prenotazioni-list { display: flex; flex-direction: column; gap: 12px; }
.pren-card {
  background: white; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px; border-left: 4px solid;
  transition: box-shadow 0.2s;
}
.pren-card:hover { box-shadow: var(--shadow-md); }
.pren-card.annullata { opacity: 0.6; border-left-color: var(--gray-300) !important; }
.pren-info { flex: 1; }
.pren-info h3 { font-size: 1.05rem; margin-bottom: 4px; }
.pren-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.85rem; color: var(--gray-500); }
.pren-meta span { display: flex; align-items: center; gap: 4px; }
.pren-badge {
  padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.pren-badge.confermata { background: #d1fae5; color: #065f46; }
.pren-badge.annullata { background: #fee2e2; color: #991b1b; }
.pren-actions { display: flex; gap: 8px; }

/* === FILTERS === */
.filters-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters-bar select, .filters-bar input {
  padding: 8px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 0.9rem; font-family: inherit;
}

/* === REPORT === */
.report-content { display: grid; gap: 24px; }
.report-filters { display: flex; align-items: center; gap: 8px; }
.report-filters input {
  padding: 8px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius);
  font-size: 0.9rem; font-family: inherit;
}
.report-card {
  background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.report-card h3 { font-size: 1.1rem; margin-bottom: 16px; color: var(--gray-700); }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th { text-align: left; padding: 10px 12px; background: var(--gray-50); font-size: 0.85rem; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); }
.report-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
.report-table tr:hover td { background: var(--gray-50); }
.report-bar { height: 8px; border-radius: 4px; background: var(--gray-200); position: relative; overflow: hidden; }
.report-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.report-stat { text-align: center; }
.report-stat .stat-number { font-size: 2rem; font-weight: 700; color: var(--primary); }
.report-stat .stat-label { font-size: 0.85rem; color: var(--gray-500); }
.report-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }

/* === ADMIN === */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--gray-200); padding-bottom: 0; }
.admin-tab {
  padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-size: 0.95rem; font-family: inherit; font-weight: 500; color: var(--gray-500);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.admin-tab:hover { color: var(--gray-700); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.admin-table th { text-align: left; padding: 12px 16px; background: var(--gray-50); font-size: 0.85rem; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; }
.admin-table tr:hover td { background: var(--gray-50); }
.color-dot { width: 16px; height: 16px; border-radius: 4px; display: inline-block; vertical-align: middle; margin-right: 8px; }

/* === MODAL === */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex;
  align-items: center; justify-content: center; z-index: 1000;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  background: white; border-radius: 12px; width: 90%; max-width: 560px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } }
.modal-lg { max-width: 720px; }
.modal-sm { max-width: 420px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--gray-200); }
.modal-header h2 { font-size: 1.2rem; }
.modal-close { width: 32px; height: 32px; border: none; background: var(--gray-100); border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 8px; }

/* === TOAST === */
.toast {
  position: fixed; bottom: 24px; right: 24px; padding: 14px 24px;
  border-radius: var(--radius); color: white; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 2000; animation: slideInRight 0.3s;
  max-width: 400px; font-size: 0.95rem;
}
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

/* === RESPONSIVE === */

/* Tablet */
@media (max-width: 1024px) {
  .home-features { grid-template-columns: repeat(2, 1fr); }
  .home-hero { padding: 70px 20px 60px; min-height: 540px; }
  .title-sale, .title-sale-shadow { font-size: 5.5rem; }
  .title-gestione { font-size: 1.2rem; letter-spacing: 16px; text-indent: 16px; }
}

/* Mobile */
@media (max-width: 768px) {
  .home-hero { padding: 60px 16px 50px; min-height: 480px; }
  .title-gestione { font-size: 0.85rem; letter-spacing: 10px; text-indent: 10px; }
  .title-sale, .title-sale-shadow { font-size: 3.8rem; letter-spacing: -1px; }
  .home-logo { width: 120px; height: 120px; }
  .home-logo img { width: 90px; height: 90px; }
  .logo-ring-2 { inset: -8px; }
  .hero-deco { display: none; }
  .home-subtitle { font-size: 1rem; letter-spacing: 1px; }
  .home-divider { width: 200px; }
  .btn-hero { padding: 14px 32px; font-size: 0.95rem; }
  .home-features { grid-template-columns: 1fr; gap: 12px; margin-top: -30px; padding: 0 16px; }
  .feature-card { padding: 20px; gap: 14px; }
  .feature-icon-wrap { width: 44px; height: 44px; min-width: 44px; border-radius: 10px; }
  .feature-icon-wrap svg { width: 22px; height: 22px; }
  .feature-card h3 { font-size: 0.95rem; }
  .feature-card p { font-size: 0.82rem; }
  .home-actions { grid-template-columns: 1fr; gap: 20px; padding: 0 16px; margin-bottom: 40px; }
  .home-login-box, .home-register-box { padding: 24px; }
  .navbar { padding: 0 12px; gap: 8px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .navbar-brand { order: 1; }
  .navbar-user { order: 2; margin-left: auto; }
  .navbar-menu { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .nav-btn { white-space: nowrap; padding: 6px 10px; font-size: 0.8rem; }
  .brand-gestione { display: none; }
  .brand-divider { display: none; }
  .view { padding: 12px; }
  .view-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .view-actions { width: 100%; flex-wrap: wrap; }
  .calendar-nav { width: 100%; }
  .calendar-nav h2 { min-width: auto; font-size: 1.1rem; flex: 1; }
  .form-row { grid-template-columns: 1fr; }
  .calendar-cell { min-height: 70px; }
  .cell-event { font-size: 0.65rem; }
  .pren-card { flex-direction: column; align-items: flex-start; }
  .pren-actions { width: 100%; }
  .modal-content { width: 95%; border-radius: 10px; }
  .modal-body { padding: 16px; }
  .modal-header { padding: 16px; }
  .modal-footer { padding: 12px 16px; flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; min-width: 120px; }
  .week-grid { grid-template-columns: repeat(7, minmax(80px, 1fr)); overflow-x: auto; }
  .kanban-board { padding-bottom: 12px; }
  .kanban-column { min-width: 260px; }
  .disp-grid { grid-template-columns: 1fr; }
  .report-filters { flex-direction: column; align-items: flex-start; }
  .admin-tabs { overflow-x: auto; }
  .admin-tab { white-space: nowrap; padding: 8px 14px; font-size: 0.85rem; }
}

/* Small mobile */
@media (max-width: 400px) {
  .title-sale, .title-sale-shadow { font-size: 3rem; }
  .title-gestione { font-size: 0.75rem; letter-spacing: 8px; text-indent: 8px; }
  .home-logo { width: 100px; height: 100px; }
  .home-logo img { width: 75px; height: 75px; }
  .home-subtitle { font-size: 0.9rem; }
  .btn-hero { padding: 12px 24px; font-size: 0.9rem; }
}
