/* login.css */
:root {
    --primary-color: #FF7A00;
    --primary-light: #FFAD66;
    --primary-dark: #E56200;
    --primary-gradient: linear-gradient(135deg, #FF9F45 0%, #FF7A00 100%);
    --secondary-gradient: linear-gradient(45deg, #FF7A00, #FF5722);
    --accent-color: #FF9F45;
    --text-on-primary: #FFFFFF;
    --background-color: #FFF9F2;
    --card-bg: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-color: rgba(255, 122, 0, 0.3);
    --error-color: #EF4444;
    --success-color: #10B981;
    --text-color: #333333;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1.25rem;
    --spacing-xl: 2rem;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: linear-gradient(
        135deg,
        #FFE2CC 0%,
        #FFAD66 100%
    );
    position: relative;
    overflow: hidden;
}

/* Forme fluttuanti sullo sfondo */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50%;
}

.shape-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 10%;
    background: rgba(255, 122, 0, 0.1);
    animation: float 15s ease-in-out infinite;
}

.shape-2 {
    width: 80px;
    height: 80px;
    top: 30%;
    right: 15%;
    background: rgba(255, 122, 0, 0.15);
    animation: float 12s ease-in-out infinite 1s;
}

.shape-3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    left: 20%;
    background: rgba(255, 159, 69, 0.1);
    animation: float 18s ease-in-out infinite 2s;
}

.shape-4 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    background: rgba(255, 122, 0, 0.05);
    animation: float 20s ease-in-out infinite 3s;
}

.shape-5 {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 40%;
    background: rgba(255, 159, 69, 0.1);
    animation: float 14s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(0deg);
        border-radius: 50%;
    }
    25% { 
        transform: translateY(-20px) translateX(10px) rotate(5deg); 
        border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
    }
    50% { 
        transform: translateY(10px) translateX(-15px) rotate(-5deg); 
        border-radius: 40% 60% 60% 40% / 50% 50% 50% 50%;
    }
    75% { 
        transform: translateY(15px) translateX(5px) rotate(5deg); 
        border-radius: 60% 40% 50% 50% / 45% 55% 45% 55%;
    }
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: var(--spacing-xl);
    box-shadow: 
        0 8px 32px var(--shadow-color),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 0 32px 0 rgba(255, 255, 255, 0.2);
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.login-card:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 
        0 15px 50px var(--shadow-color),
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 0 32px 0 rgba(255, 255, 255, 0.3);
}

.login-card:hover::before {
    opacity: 1;
}

.logo-container {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    transform: translateZ(20px);
}

.logo-image {
    max-width: 280px;
    height: auto;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 10px rgba(255, 122, 0, 0.3));
    transition: transform 0.5s ease, filter 0.5s ease;
}

.logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 15px rgba(255, 122, 0, 0.4));
}

.login-subtitle {
    color: var(--primary-dark);
    font-size: 1.25rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.login-subtitle::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    border-radius: 3px;
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
}

.form-group.focused .focus-border {
    width: 100%;
    opacity: 1;
}

.form-group.focused .input-icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.input-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1.25rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.input-field {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl) var(--spacing-md) calc(var(--spacing-xl) + 1rem);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-field:focus {
    outline: none;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.1);
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
    opacity: 0;
    border-radius: 3px;
}

.toggle-password {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.4rem;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.submit-button {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--primary-gradient);
    color: var(--text-on-primary);
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.5s ease;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-color);
    background: var(--secondary-gradient);
}

.submit-button:hover::before {
    left: 100%;
}

.button-text {
    display: inline-block;
    transition: transform 0.3s ease;
}

.submit-button i {
    margin-left: var(--spacing-sm);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--error-color);
    color: #991B1B;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: var(--spacing-sm);
    color: var(--error-color);
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.admin-link {
    text-align: center;
    margin-top: var(--spacing-lg);
    position: relative;
}

.admin-link::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 25%;
    width: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.admin-link a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 0.5rem;
}

.admin-link a:hover {
    opacity: 1;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
}

.admin-link i {
    margin-right: var(--spacing-xs);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: var(--spacing-lg);
    }
    
    .logo-image {
        max-width: 220px;
    }
    
    .login-subtitle {
        font-size: 1.1rem;
    }
}