/*
 * MY_EQS Web Portal - Custom CSS
 * Stili personalizzati per portale agenti
 */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* Body e layout generale */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: 600;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.btn-lg {
    padding: 0.75rem 2rem;
}

/* Tables */
.table {
    background: white;
}

.table thead {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 0;
}

.timeline-item {
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 50px;
    bottom: -30px;
    width: 2px;
    background-color: #dee2e6;
}

/* Navbar */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s;
}

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control-lg {
    padding: 0.75rem 1rem;
}

/* Input groups */
.input-group-text {
    background-color: white;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: 1px solid var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
}

/* Alerts */
.alert {
    border: none;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

/* Progress bars */
.progress {
    background-color: #e9ecef;
}

/* Modal */
.modal-header {
    border-bottom: none;
    padding: 1.5rem;
}

.modal-footer {
    border-top: none;
    padding: 1.5rem;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .timeline-item:not(:last-child)::before {
        left: 20px;
    }
}

/* iPad specific */
@media (min-width: 768px) and (max-width: 1024px) {
    .navbar-nav {
        font-size: 1.1rem;
    }

    .btn {
        font-size: 1.1rem;
        padding: 0.6rem 1.8rem;
    }

    .form-control, .form-select {
        font-size: 1.1rem;
        padding: 0.7rem 1rem;
    }
}

/* Utilities */
.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Print styles */
@media print {
    .navbar, footer, .btn, .breadcrumb {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
