/* ========================================
   WOW Admin Dashboard - Modern Glassmorphism
   ======================================== */

:root {
    /* Primary Colors */
    --primary: #0055FF;
    --primary-light: #3377FF;
    --primary-dark: #0044DD;

    /* Accent Colors */
    --accent-orange: #FF6600;
    --accent-purple: #8B5CF6;
    --accent-cyan: #00D4FF;
    --accent-green: #10B981;
    --accent-red: #EF4444;
    --accent-yellow: #F59E0B;

    /* Background */
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --bg-card: #111111;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Sizing */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Login Screen
   ======================================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #0a1628 100%);
    position: relative;
    overflow: hidden;
}

.login-screen::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 85, 255, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.login-screen::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--glass-shadow);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 50px;
    filter: brightness(1.1);
}

.login-container h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

/* Login Modern Inputs - Glassmorphism Gray */
.login-form .form-input {
    background: rgba(128, 128, 128, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    padding: 16px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.login-form .form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-form .form-input:focus {
    background: rgba(128, 128, 128, 0.25);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.15);
    outline: none;
}

.login-form .form-input:hover:not(:focus) {
    background: rgba(128, 128, 128, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

.login-form .form-group label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    font-size: 0.85rem;
    margin-bottom: 10px;
    padding-left: 12px;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.auth-switch p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-switch a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Form Hint */
.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ========================================
   Dashboard Layout
   ======================================== */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-dark);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, rgba(17, 17, 17, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo {
    height: 36px;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 4px 0;
}

.nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(0, 85, 255, 0.1);
    border-left-color: var(--primary);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    height: var(--header-height);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Notifications */
.notifications-wrapper {
    position: relative;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.notifications-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    display: none;
    overflow: hidden;
    z-index: 1000;
}

.notifications-panel.active {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.notifications-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
    background: rgba(0, 85, 255, 0.05);
}

.notification-item.unread::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notification-content span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* User Menu */
.user-menu-wrapper {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 6px 16px 6px 6px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-menu-btn i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 180px;
    background: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--glass-shadow);
    display: none;
    overflow: hidden;
    z-index: 1000;
}

.user-menu.active {
    display: block;
    animation: slideDown 0.2s ease;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* ========================================
   Content Area
   ======================================== */
.content-area {
    flex: 1;
    padding: 2rem;
    background: var(--bg-dark);
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ========================================
   Glass Cards
   ======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--primary);
}

.card-content {
    min-height: 100px;
}

/* ========================================
   Stats Cards
   ======================================== */
.section-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Calendar
   ======================================== */
.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle .btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: #ffffff;
}

.view-toggle .btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.calendar-card {
    padding: 1.5rem;
    min-height: 600px;
}

#calendar {
    --fc-border-color: var(--glass-border);
    --fc-button-bg-color: var(--primary);
    --fc-button-border-color: var(--primary);
    --fc-button-hover-bg-color: var(--primary-dark);
    --fc-button-hover-border-color: var(--primary-dark);
    --fc-button-active-bg-color: var(--primary-dark);
    --fc-today-bg-color: rgba(0, 85, 255, 0.1);
    --fc-event-border-color: transparent;
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: transparent;
}

.fc {
    font-family: 'Poppins', sans-serif;
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fc .fc-button {
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
    color: var(--text-secondary);
}

.fc .fc-daygrid-day.fc-day-today {
    background: rgba(0, 85, 255, 0.1);
}

.fc-event {
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.fc-timegrid-slot {
    height: 48px;
}

/* ========================================
   Tasks List
   ======================================== */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.task-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    background: transparent;
}

.task-checkbox:hover {
    border-color: var(--primary);
}

.task-checkbox.completed {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.task-checkbox.completed::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.task-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.priority-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.priority-badge.urgente {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.priority-badge.normale {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-yellow);
}

.priority-badge.bassa {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.task-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.task-meta i {
    margin-right: 4px;
}

.avatar-stack {
    display: flex;
}

.avatar-stack img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
    margin-left: -8px;
    object-fit: cover;
}

.avatar-stack img:first-child {
    margin-left: 0;
}

/* ========================================
   Users Grid
   ======================================== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.user-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.user-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--glass-border);
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-role {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.user-color {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

/* ========================================
   Clienti Grid
   ======================================== */
.clienti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cliente-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.cliente-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.cliente-logo {
    height: 160px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cliente-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cliente-info {
    padding: 1.25rem;
}

.cliente-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.cliente-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cliente-actions {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

/* ========================================
   Categorie Grid
   ======================================== */
.categorie-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.categoria-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.categoria-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.categoria-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.categoria-info {
    flex: 1;
}

.categoria-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.categoria-ordine {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.categoria-actions {
    display: flex;
    gap: 0.5rem;
}

/* ========================================
   Profile
   ======================================== */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-card {
    text-align: center;
}

.profile-header {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--glass-border);
}

.avatar-edit-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.avatar-edit-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.profile-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-role {
    display: inline-block;
    background: rgba(0, 85, 255, 0.2);
    color: var(--primary);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.profile-details {
    text-align: left;
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input[readonly] {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.form-input-file {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--glass-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
}

.form-input-file::-webkit-file-upload-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    margin-right: 10px;
}

/* Participants Select */
.participants-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
    max-height: 200px;
    overflow-y: auto;
}

.participant-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.participant-option:hover {
    border-color: var(--primary);
}

.participant-option.selected {
    background: rgba(0, 85, 255, 0.2);
    border-color: var(--primary);
}

.participant-option img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.participant-option span {
    font-size: 0.875rem;
}

/* Color Picker */
.color-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    background: transparent;
}

.color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
}

.color-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Image/Video Preview */
.image-preview,
.video-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.image-preview img,
.video-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--border-radius-sm);
}

/* Gallery Editor */
.gallery-editor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
}

.gallery-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
}

.gallery-item input {
    width: 100%;
    padding: 6px 10px;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.8rem;
}

.gallery-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-red);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

.btn i {
    font-size: 0.9em;
}

/* ========================================
   Modals
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-large {
    max-width: 700px;
}

.glass-modal {
    background: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
}

.modal h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-right: 40px;
}

/* ========================================
   Loader
   ======================================== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-spinner {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-spinner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

/* ========================================
   Event Item (for dashboard)
   ======================================== */
.event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.75rem;
}

.event-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: 8px;
    background: var(--primary);
    border-radius: var(--border-radius-sm);
}

.event-time span:first-child {
    font-size: 1.25rem;
    font-weight: 600;
}

.event-time span:last-child {
    font-size: 0.7rem;
    opacity: 0.8;
}

.event-details {
    flex: 1;
}

.event-details h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.event-details p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .content-area {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-header-left {
        flex-wrap: wrap;
    }

    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .main-header {
        padding: 0 1rem;
    }

    .user-menu-btn span {
        display: none;
    }

    .notifications-panel {
        width: calc(100vw - 2rem);
        right: -60px;
    }

    .login-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 1rem;
    }

    .glass-card {
        padding: 1rem;
    }

    .users-grid,
    .clienti-grid {
        grid-template-columns: 1fr;
    }
}
