/* GTS Rail Web Styles - Blazor Component Styles */

/* Main Layout Styles */
.main-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #f8f9fa;
}

/* Navigation Styles */
.nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

.nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--bs-primary), #0a58ca);
    color: white;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    border: none;
    padding: 1rem;
}

/* Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Table Styles */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    color: var(--bs-dark);
    padding: 1rem 0.75rem;
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
}

/* Stats Card Styles */
.stats-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-left: 4px solid var(--bs-primary);
    transition: all 0.3s ease;
}

.stats-card:hover {
    border-left-color: #0a58ca;
    transform: translateY(-3px);
}

.stats-card .card-body {
    padding: 1.5rem;
    text-align: center;
}

.stats-card h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        min-height: auto;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stats-card h4 {
        font-size: 1.5rem;
    }
    
    .main-layout {
        flex-direction: column;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-bottom: 3px solid #ffc107;
    top: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    left: 0;
    padding: 0;
    position: fixed;
    width: 100%;
    z-index: 10000;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#blazor-error-ui .error-ui-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

#blazor-error-ui .error-ui-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffc107;
    border-radius: 50%;
    color: #856404;
    font-size: 1.75rem;
}

#blazor-error-ui .error-ui-message {
    flex: 1;
    color: #856404;
}

#blazor-error-ui .error-ui-message strong {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #664d03;
}

#blazor-error-ui .error-ui-message p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #856404;
}

#blazor-error-ui .error-ui-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

#blazor-error-ui .reload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #ffc107;
    color: #664d03;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    border: 2px solid #ffc107;
}

#blazor-error-ui .reload-btn:hover {
    background: #ffca2c;
    border-color: #ffca2c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    color: #664d03;
}

#blazor-error-ui .reload-btn:active {
    transform: translateY(0);
}

#blazor-error-ui .reload-btn i {
    font-size: 0.9rem;
}

#blazor-error-ui .dismiss-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(133, 100, 4, 0.1);
    color: #856404;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(133, 100, 4, 0.2);
    font-size: 1.1rem;
}

#blazor-error-ui .dismiss-btn:hover {
    background: rgba(133, 100, 4, 0.2);
    border-color: rgba(133, 100, 4, 0.3);
    transform: scale(1.1);
}

#blazor-error-ui .dismiss-btn:active {
    transform: scale(0.95);
}

/* Responsive design per schermi piccoli */
@media (max-width: 768px) {
    #blazor-error-ui .error-ui-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    #blazor-error-ui .error-ui-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    #blazor-error-ui .error-ui-message {
        width: 100%;
    }
    
    #blazor-error-ui .error-ui-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    #blazor-error-ui .reload-btn {
        flex: 1;
        justify-content: center;
    }
}



