/* UniGe Piano Studi Plugin - CSS con contrasto ottimizzato */

#unige-piano-studi-app {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px 0;
    line-height: 1.6;
}

#unige-piano-studi-app * {
    box-sizing: border-box;
}

/* Login Screen */
.unige-login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin: 20px 0;
}

.unige-login-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.unige-login-container h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2rem;
    font-weight: 700;
}

.unige-login-container p {
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 500;
}

.unige-user-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.unige-user-type-card {
    padding: 30px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.unige-user-type-card:hover {
    border-color: #4facfe;
    background: #f8f9ff;
}

.unige-user-type-card.selected {
    border-color: #4facfe;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.unige-user-type-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.unige-user-type-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.unige-user-type-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Main App */
.unige-main-app {
    display: none;
}

.unige-main-app.active {
    display: block;
}

/* Header */
.unige-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.unige-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.unige-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.unige-user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.unige-user-info {
    text-align: right;
}

.unige-user-name {
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.unige-user-role {
    font-size: 0.8rem;
    opacity: 0.95;
    color: rgba(255,255,255,0.95);
}

/* Buttons */
.unige-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.unige-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.7);
}

.unige-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.unige-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.unige-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Content Areas */
.unige-content {
    background: white;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

/* Welcome Banner */
.unige-welcome-banner {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.unige-welcome-banner h2 {
    color: #1a252f;
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.unige-welcome-banner p {
    color: #1a252f;
    font-weight: 600;
}

/* Steps */
.unige-step {
    margin-bottom: 30px;
    padding: 25px;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.unige-step:hover {
    border-color: #4facfe;
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.1);
}

.unige-step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.unige-step-number {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 0.9rem;
}

.unige-step-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a252f;
}

/* Form Elements */
.unige-form-group {
    margin-bottom: 20px;
}

.unige-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1a252f;
}

.unige-form-group input,
.unige-form-group select,
.unige-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    color: #1a252f;
    font-weight: 500;
}

.unige-form-group input:focus,
.unige-form-group select:focus,
.unige-form-group textarea:focus {
    outline: none;
    border-color: #4facfe;
}

/* Time Grid */
.unige-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.unige-day-schedule {
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    padding: 20px;
    background: #fafafa;
}

.unige-day-title {
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
    font-size: 1.1rem;
    text-align: center;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    padding: 10px;
    border-radius: 8px;
    margin: -20px -20px 15px -20px;
}

.unige-time-slot {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s;
}

.unige-time-slot:hover {
    background: #f0f4ff;
}

.unige-time-slot input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    width: auto;
}

.unige-time-slot label {
    color: #1a252f;
    font-weight: 600;
    cursor: pointer;
}

/* Results */
.unige-results {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    display: none;
}

.unige-results.show {
    display: block;
    animation: unige-slideIn 0.5s ease;
}

@keyframes unige-slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.unige-result-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.unige-result-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a252f;
    margin-bottom: 10px;
}

.unige-result-details {
    color: #1a252f;
    line-height: 1.6;
    font-weight: 500;
}

.unige-no-conflict {
    color: #27ae60;
    font-weight: 700;
}

.unige-conflict {
    color: #e74c3c;
    font-weight: 700;
}

/* Loading */
.unige-loading {
    text-align: center;
    padding: 20px;
    display: none;
    color: #1a252f;
    font-weight: 600;
}

.unige-loading.show {
    display: block;
}

.unige-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4facfe;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: unige-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes unige-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin Tabs */
.unige-admin-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    overflow: hidden;
}

.unige-admin-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    color: #1a252f;
}

.unige-admin-tab.active {
    background: white;
    color: #4facfe;
    font-weight: 700;
}

.unige-admin-tab-content {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.unige-admin-tab-content.active {
    display: block;
}

/* Stats */
.unige-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.unige-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.unige-stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
}

.unige-stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
    color: rgba(255,255,255,0.95);
    font-weight: 500;
}

/* Upload Area */
.unige-upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    margin-bottom: 20px;
    background: #fff;
}

.unige-upload-area:hover {
    border-color: #4facfe;
    background: #f8f9ff;
}

.unige-upload-area.dragover {
    border-color: #4facfe;
    background: #f0f4ff;
}

.unige-upload-area h3 {
    color: #1a252f;
    font-weight: 700;
    margin-bottom: 15px;
}

.unige-upload-area p {
    color: #1a252f;
    font-weight: 600;
    margin-bottom: 10px;
}

.unige-upload-area ul {
    color: #1a252f;
    text-align: left;
    margin: 15px auto;
    max-width: 600px;
}

.unige-upload-area ul li {
    margin-bottom: 8px;
    font-weight: 600;
}

/* File Input */
input[type="file"] {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #1a252f;
    transition: border-color 0.3s;
    width: 100%;
    max-width: 500px;
    font-weight: 500;
}

input[type="file"]:focus {
    outline: none;
    border-color: #4facfe;
}

/* Upload Status */
#unige-upload-status {
    font-weight: 600;
}

#unige-upload-status p {
    color: #1a252f;
    margin-bottom: 8px;
    font-weight: 600;
}

#unige-upload-status h4 {
    color: #1a252f;
    font-weight: 700;
}

/* Activity Log */
#unige-activity-log {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

#unige-activity-log p {
    color: #1a252f;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .unige-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .unige-user-type-selector {
        grid-template-columns: 1fr;
    }

    .unige-time-grid {
        grid-template-columns: 1fr;
    }

    .unige-content {
        padding: 20px 15px;
    }

    .unige-step {
        padding: 20px 15px;
    }

    .unige-admin-tabs {
        flex-direction: column;
    }

    .unige-admin-tab {
        border-bottom: 1px solid #dee2e6;
    }

    .unige-admin-tab:last-child {
        border-bottom: none;
    }

    .unige-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .unige-stats-grid {
        grid-template-columns: 1fr;
    }

    .unige-login-container {
        margin: 10px;
        padding: 30px 20px;
    }

    .unige-header h1 {
        font-size: 1.4rem;
    }
}

/* Accessibility */
.unige-btn:focus,
.unige-btn-primary:focus,
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.3);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unige-welcome-banner h2,
    .unige-step-title,
    .unige-form-group label,
    .unige-result-title {
        color: #000 !important;
    }
    
    .unige-welcome-banner p,
    .unige-result-details,
    .unige-upload-area p {
        color: #333 !important;
    }
}