/**
 * Main stylesheet for the Auto Demolition Management System
 */
        /* Mobile Responsive - Nascondi testo logo su mobile */
        @media (max-width: 768px) {
            .logo span {
                display: none;
            }
            
            .header-content {
                padding: 0 1rem;
            }
            
            .segreteria-header {
                padding: 1rem;
            }
            
            .page-title {
                font-size: 1rem;
            }
            
            .user-trigger {
                padding: 0.5rem 0.75rem;
            }
            
            .user-info {
                display: none;
            }
            
            .user-avatar {
                width: 32px;
                height: 32px;
                font-size: 0.8rem;
            }
        }
        }

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;

    --indigo-color: #6610f2;
    --orange-color: #fd7e14;
    --border-radius: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Login page */
.login-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.login-logo i {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.login-logo h2 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-weight: 600;
}

/* Aggiungi sfondo sfumato al container del login */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(25, 135, 84, 0.1));
    z-index: 0;
    border-radius: var(--border-radius) var(--border-radius) 50% 50%;
}

/* Dashboard */
.dashboard-header {
    padding: 2rem 1rem;
    position: relative;
}

.dashboard-header h1 {
    color: var(--dark-color);
    font-weight: 600;
}

.dashboard-header .lead {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.dashboard-header i {
    color: var(--primary-color);
}

.dashboard-card {
    transition: var(--transition);
    margin-bottom: 20px;
    height: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.dashboard-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}

/* Workflow Steps */
.workflow-steps {
    padding: 15px 0;
}

.workflow-step {
    position: relative;
    padding: 20px 15px;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    box-shadow: var(--box-shadow);
    height: 100%;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.workflow-step.active {
    background-color: #e7f5ff;
    border: 1px solid #0d6efd;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
}

.workflow-step.completed {
    background-color: #e7fff0;
    border: 1px solid #198754;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 1;
}

.workflow-step.completed .step-number {
    background-color: #198754;
}

.step-icon {
    font-size: 2rem;
    color: #0d6efd;
    margin: 10px 0;
}

.workflow-step.completed .step-icon {
    color: #198754;
}

.workflow-step h5 {
    margin-bottom: 10px;
}

.workflow-step p {
    color: #6c757d;
    margin-bottom: 15px;
}

/* Card styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
    padding: 12px 15px;
}

.card-body {
    padding: 15px;
}

/* Form styles */
.form-control {
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.input-group {
    position: relative;
    z-index: 1;
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: var(--secondary-color);
    padding: 0.75rem 1rem;
}

.btn-primary {
    transition: var(--transition);
}

.text-indigo { color: var(--indigo-color) !important; }
.text-orange { color: var(--orange-color) !important; }

.btn-indigo {
    background-color: var(--indigo-color);
    border-color: var(--indigo-color);
    color: white;
}

.btn-indigo:hover {
    background-color: #520dc2;
    border-color: #520dc2;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 16, 242, 0.2);
}

.btn-orange {
    background-color: var(--orange-color);
    border-color: var(--orange-color);
    color: white;
}

.btn-orange:hover {
    background-color: #e96c11;
    border-color: #e96c11;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(253, 126, 20, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.required-field::after {
    content: " *";
    color: var(--danger-color);
}

/* Table styles */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Alert styles */
.alert {
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .dashboard-icon {
        font-size: 2rem;
        height: 50px;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
    
    .workflow-step {
        padding: 15px 10px;
    }
    
    .workflow-step h5 {
        font-size: 1.1rem;
        margin-top: 10px;
    }
    
    .workflow-step p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .btn-sm {
        width: 100%;
        padding: 8px;
        margin-top: 5px;
    }
    
    .step-icon {
        font-size: 1.8rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .dropdown-menu {
        width: 100%;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background-color: #fff;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Custom components */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.status-badge-success {
    background-color: var(--success-color);
    color: white;
}

.status-badge-warning {
    background-color: var(--warning-color);
    color: black;
}

.status-badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.status-badge-info {
    background-color: var(--info-color);
    color: black;
}

/* Sidebar for iframe pages */
.iframe-container {
    display: flex;
    height: calc(100vh - 150px);
    margin-top: 20px;
}

.sidebar {
    width: 300px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-right: 20px;
    overflow-y: auto;
}

.content-frame {
    flex: 1;
    border: none;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
    .iframe-container {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .content-frame {
        height: 500px;
    }
}

/* Mobile specific styles */
@media (max-width: 576px) {
    main.container {
        padding-left: 8px;
        padding-right: 8px;
        margin-top: 10px;
    }
    
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .col-md-3, .col-md-4, .col-sm-6 {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .workflow-steps .row {
        display: flex;
        flex-direction: column;
    }
    
    .workflow-step {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 12px 10px;
    }
    
    h2.card-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .navbar-toggler {
        padding: 4px 8px;
    }
    
    .navbar-collapse {
        background-color: var(--primary-color);
        padding: 10px;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        margin-top: 5px;
    }
}
