/* ========================================
   COMPONENTS CSS
   Componenti riutilizzabili dell'applicazione
   ======================================== */

/* Content Container */
.container-fluid {
    max-width: 1800px;
    margin: 0 auto;
}

@media (min-width: 1920px) {
    .container-fluid {
        max-width: 1900px;
    }
}

/* Card Styles */
.card-modern {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 40, 85, 0.1);
    border: none;
}

.card-header-modern {
    background-color: #F8F9FA;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid var(--primary-base);
    padding: 1.25rem;
}

.card-header-warning {
    background-color: var(--warning);
    border-radius: 10px 10px 0 0;
}

.card-header-title {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.card-header-title h4 {
    color: var(--primary-dark);
    margin-bottom: 0;
}

.card-header-title.text-white h4 {
    color: white;
}

.card-header-icon {
    font-size: 1.5rem;
    color: var(--primary-base);
    margin-right: 10px;
}

.card-header-icon.text-white {
    color: white;
}

/* Stats Cards */
.stat-card {
    border-radius: 8px;
    background-color: white;
    margin-bottom: 0.5rem;
}

.stat-card-body {
    padding: 0.5rem 1rem;
}

.stat-card-badge {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.stat-card-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.stat-card-value-small {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Table Styles */
.table-modern {
    border-radius: 8px;
    overflow: hidden;
}

.table-modern thead {
    background-color: #F8F9FA;
    border-bottom: 2px solid var(--primary-base);
}

.table-modern th {
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem;
}

.table-modern td {
    vertical-align: middle;
}

.table-row-highlighted {
    background-color: var(--pastel-peach);
    border-left: 4px solid var(--pastel-orange);
}

/* Form Controls */
.form-control-modern {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.form-control-modern:focus {
    border-color: var(--primary-base);
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

.input-group-icon {
    background-color: white;
    border-right: none;
}

.input-group-icon + .form-control {
    border-left: none;
}

.input-group-icon .fa,
.input-group-icon .fas {
    color: var(--primary-base);
}

/* Search Bar */
.search-input-group {
    max-width: 400px;
}

.search-input-group .input-group-text {
    background-color: white;
    border-right: none;
}

.search-input-group .form-control {
    border-left: none;
}

/* Buttons */
.btn-modern {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border: none;
    transition: all 0.2s;
}

.btn-modern-secondary {
    background-color: #E3F2FD;
    color: var(--primary-base);
    font-size: 0.875rem;
    padding: 0.4rem 0.8rem;
}

.btn-modern-secondary:hover {
    background-color: #BBDEFB;
    color: var(--primary-dark);
}

.btn-modern-secondary i {
    margin-right: 0.35rem;
}

.btn-modern-primary {
    background-color: #2563EB;
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-modern-primary:hover {
    background-color: #1D4ED8;
    color: white;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-modern-success {
    background-color: #10B981;
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-modern-success:hover {
    background-color: #059669;
    color: white;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-modern-info {
    background-color: #8B5CF6;
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.btn-modern-info:hover {
    background-color: #7C3AED;
    color: white;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.btn-modern-warehouse {
    background-color: #F59E0B;
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.btn-modern-warehouse:hover {
    background-color: #D97706;
    color: white;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

.btn-primary-modern {
    background-color: var(--primary-base);
    color: white;
}

.btn-primary-modern:hover {
    background-color: var(--primary-medium);
    color: white;
}

.btn-success-modern {
    background-color: var(--success);
    color: white;
}

.btn-success-modern:hover {
    background-color: #45A049;
    color: white;
}

.btn-warning-modern {
    background-color: var(--warning);
    color: white;
}

.btn-warning-modern:hover {
    background-color: #E68900;
    color: white;
}

.btn-group-modern {
    margin-bottom: 0.5rem;
}

/* Icons */
.icon-sm {
    font-size: 20px;
}

.icon-md {
    font-size: 1.5rem;
}

.icon-lg {
    font-size: 2rem;
}

.icon-primary {
    color: var(--primary-base);
    margin-right: 8px;
}

.icon-primary-medium {
    color: var(--primary-medium);
    margin-right: 8px;
}

.icon-success {
    color: var(--success);
    margin-right: 8px;
}

.icon-warning {
    color: var(--warning);
    margin-right: 8px;
}

.icon-error {
    color: var(--error);
    margin-right: 8px;
}

.icon-muted {
    color: var(--text-muted);
    margin-right: 8px;
}

/* Badge Styles */
.badge-modern {
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    font-weight: 500;
}

.badge-stat {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Links */
.link-primary {
    color: var(--primary-base);
    font-weight: 600;
    text-decoration: none;
}

.link-primary:hover {
    color: var(--primary-medium);
    text-decoration: none;
}

/* Dropdown Menu */
.dropdown-item-modern {
    padding: 10px 20px;
    transition: background-color 0.2s;
    color: var(--text-dark);
}

.dropdown-item-modern:hover {
    background-color: var(--primary-lightest);
    color: var(--text-dark);
}

.dropdown-item-modern:active,
.dropdown-item-modern:focus {
    background-color: var(--primary-light);
    color: var(--text-dark);
}

.dropdown-item-modern .fa,
.dropdown-item-modern .fas,
.dropdown-item-modern .fab {
    margin-right: 8px;
}

.dropdown-divider-modern {
    margin: 0.5rem 0;
}

/* Alert Messages */
.alert-modern {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-top: 20px;
    text-align: center;
}

.alert-info-modern {
    background-color: var(--primary-lightest);
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
}

.alert-success-modern {
    background-color: #E8F5E9;
    border: 1px solid var(--success);
    color: #2E7D32;
}

.alert-fixed-modern {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
    background: var(--success);
    color: white;
    border: none;
}

/* Progress Bar */
.progress-modern {
    height: 8px;
    border-radius: 5px;
    background-color: #f0f0f0;
}

.progress-bar-modern {
    border-radius: 5px;
    transition: width 0.3s ease;
}

.bg-primary-modern {
    background-color: var(--primary-base);
}

.bg-error {
    background-color: var(--error);
}

.bg-warning {
    background-color: var(--warning);
}

.bg-success {
    background-color: var(--success);
}

/* Modal Styles */
.modal-header-modern {
    background-color: var(--primary-lightest);
    border-bottom: 2px solid var(--primary-base);
}

.modal-title-modern {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Navigation */
.navbar-brand-modern {
    font-weight: 600;
    color: var(--primary-dark) !important;
}

.navbar-modern {
    background: white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    border-bottom: 1px solid #E5E7EB !important;
    padding: 0.6rem 0 !important;
}

.bg-primary-dark {
    background-color: var(--primary-dark) !important;
}

.logo-navbar {
    width: 90px;
    margin-left: 8px;
}

/* Social/Action Icons */
.action-icons a {
    text-decoration: none;
    margin-right: 8px;
}

.action-icons .fa-whatsapp {
    font-size: 20px;
}

.action-icons .fa-envelope {
    font-size: 20px;
}

.action-icons .fa-shopping-cart,
.action-icons .fa-warehouse {
    font-size: 20px;
    color: #9C9C9C;
}

/* Status Icons */
.status-icon {
    width: 30px;
    margin: 2px;
}

/* Info Display */
.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
}

.empty-state-icon {
    font-size: 2rem;
    color: var(--primary-base);
}

.empty-state-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
    color: var(--text-dark);
}

/* Loader */
.loader-overlay {
    display: none;
}

.loader-overlay.active {
    display: block;
}

/* Time/Date Display */
.timestamp {
    color: var(--text-muted);
}

.timestamp .fa,
.timestamp .far {
    margin-right: 5px;
}

/* Card List Item */
.card-list-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--primary-lightest);
    transition: box-shadow 0.2s;
}

.card-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 40, 85, 0.15);
}

.card-list-item-header {
    background-color: white;
    border-bottom: 1px solid var(--primary-lightest);
    padding: 1rem;
}

.card-list-item-body {
    padding: 0.5rem 1rem;
}

/* Button icon styles */
.btn-icon-delete {
    margin-left: 15px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 0.9rem;
    background-color: var(--error);
    color: white;
    transition: all 0.2s;
}

.btn-icon-delete:hover {
    background-color: #d32f2f;
    transform: scale(1.05);
}

/* Border utilities for components */
.border-primary-lightest {
    border: 1px solid var(--primary-lightest) !important;
}

.border-bottom-primary-lightest {
    border-bottom: 1px solid var(--primary-lightest) !important;
}

/* Textarea styles */
.textarea-modern {
    width: 100%;
    border: 2px solid var(--primary-lightest);
    border-radius: 8px;
    padding: 10px;
    font-size: 1rem;
    resize: vertical;
}

.textarea-modern:focus {
    outline: none;
    border-color: var(--primary-base);
}

/* Card header variants */
.card-header-warning {
    background-color: var(--warning);
    border-radius: 10px 10px 0 0;
    color: white;
}

.card-header-warning h1,
.card-header-warning h2,
.card-header-warning h3,
.card-header-warning h4,
.card-header-warning h5,
.card-header-warning h6 {
    color: white;
}

.card-header-success {
    background-color: var(--success);
    border-radius: 10px 10px 0 0;
    color: white;
}

/* Pagination Styles */
.pagination {
    margin-top: 1.5rem;
    justify-content: center;
}

.pagination .page-item .page-link {
    color: var(--primary-base);
    border: 1px solid var(--primary-lightest);
    border-radius: 5px;
    margin: 0 2px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.pagination .page-item .page-link:hover {
    background-color: var(--primary-lightest);
    color: var(--primary-dark);
    border-color: var(--primary-base);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-base);
    border-color: var(--primary-base);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    border-color: var(--primary-lightest);
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* ========================================
   NAVBAR MODERN STYLES
   ======================================== */

/* Navbar Base */
.navbar-modern {
    padding: 0.6rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background: white;
    border-bottom: 1px solid #E5E7EB;
}

.navbar-toggler-icon-custom {
    background: transparent;
}

.navbar-toggler {
    border: 2px solid var(--primary-base) !important;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}

.navbar-toggler-icon-custom .fa-bars {
    font-size: 20px;
    color: var(--primary-base) !important;
}

.logo-navbar {
    max-height: 35px;
    height: 35px;
    width: auto;
}

/* Modern Nav Links */
.nav-link-modern {
    position: relative;
    padding: 0.7rem 1.1rem !important;
    border-radius: 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin: 0 0.2rem;
    color: #2C3E50 !important;
    font-weight: 600;
    font-size: 0.95rem;
    background: transparent;
}

.nav-link-modern:focus {
    outline: none;
    box-shadow: none;
}

.nav-link-modern::before {
    display: none;
}

.nav-link-modern:hover {
    background: #F0F4F8;
    color: var(--primary-base) !important;
}

.nav-link-modern.active {
    background: #E3F2FD;
    color: var(--primary-base) !important;
    box-shadow: none;
}

.nav-link-modern i {
    font-size: 1.1rem;
    margin-right: 8px;
}

.nav-link-modern:hover i,
.nav-link-modern.active i {
    color: var(--primary-base);
}

/* Logout Link */
.nav-link-logout {
    color: #E74C3C !important;
}

.nav-link-logout:hover {
    background: #FFEBEE !important;
    color: #C0392B !important;
}

.nav-link-logout i {
    color: #E74C3C;
}

.nav-link-logout:hover i {
    color: #C0392B !important;
}

/* Dropdown Modern */
.dropdown-modern {
    border: none;
    background: white;
    margin-top: 0.5rem;
    animation: dropdownFade 0.3s ease;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0, 40, 85, 0.12);
    border-radius: 10px;
    border: 1px solid #E8EBF0;
    overflow: hidden;
    padding: 0.5rem 0;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item-modern {
    padding: 0.65rem 1.25rem;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.dropdown-item-modern i {
    width: 20px;
    margin-right: 10px;
    color: var(--primary-base);
    transition: all 0.25s ease;
}

.dropdown-item-modern:hover {
    background: linear-gradient(90deg, rgba(25, 118, 210, 0.08) 0%, transparent 100%);
    border-left-color: var(--primary-base);
    color: var(--primary-base);
    padding-left: 1.5rem;
}

.dropdown-item-modern:hover i {
    transform: translateX(3px);
}
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    border-left-color: #4facfe;
    transform: translateX(5px);
}

.dropdown-item-modern i {
    width: 20px;
    margin-right: 10px;
    color: #4facfe;
}

/* Active State */
.nav-item .nav-link-modern.active {
    background: rgba(79, 172, 254, 0.2);
}

.nav-item .nav-link-modern.active::before {
    width: 80%;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 1px solid #E5E7EB;
    }
    
    .nav-link-modern {
        padding: 0.9rem 1rem !important;
        margin: 0.25rem 0;
        font-size: 1rem;
        color: #2C3E50 !important;
    }
    
    .nav-link-modern::before {
        display: none;
    }
    
    .nav-link-modern:hover {
        background: #F0F4F8;
        color: var(--primary-base) !important;
        transform: none;
    }

    .nav-link-modern.active {
        background: #E3F2FD;
        color: var(--primary-base) !important;
    }

    .nav-link-logout:hover {
        background: #FFEBEE !important;
        color: #C0392B !important;
    }

    .dropdown-modern {
        box-shadow: none;
        border: none;
        border-top: 1px solid #E5E7EB;
        border-radius: 0;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .dropdown-item-modern {
        padding: 0.8rem 1.5rem;
    }
    
    .dropdown-menu,
    .dropdown-menu-right {
        background: #ffffff !important;
        border: 1px solid #E5E7EB !important;
    }
    
    .dropdown-item-modern {
        color: #2C3E50 !important;
    }
    
    .dropdown-item-modern:hover {
        background: #F0F4F8 !important;
        color: var(--primary-base) !important;
    }
}

/* ========================================
   PAGE HEADER & CARD STYLES
   ======================================== */

/* Page Header Card */
.page-header-card {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,40,85,0.1);
}

.page-header-card .card-body {
    padding: 1rem 1.25rem;
}

.page-header {
    background-color: #F8F9FA;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid var(--primary-base);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-icon {
    font-size: 1.5rem;
    color: var(--primary-base);
}

.page-header h4 {
    margin-bottom: 0;
    color: var(--primary-dark);
}

/* Statistics Card */
.stats-card {
    border-radius: 6px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stats-card-badge {
    font-size: 0.75rem;
    width: fit-content;
}

.stats-card-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Statistics Collapse Section */
.stats-collapse-container {
    padding: 0.75rem 1.25rem;
}

#statsCollapse {
    border-bottom: 1px solid #E5E7EB;
}

#statsCollapse .row {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
}

#statsCollapse.collapsing {
    transition: height 0.25s ease;
}

#statsCollapse.show {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   SEARCH & FILTER FORM STYLES
   ======================================== */

.filter-form {
    background-color: #F8F9FA;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0 0.25rem;
}

.filter-input-group-text {
    background-color: white;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.filter-input-icon {
    color: var(--primary-base);
    font-size: 0.9rem;
}

.filter-input {
    border-left: none;
    border-radius: 0 4px 4px 0;
}

.filter-input.has-value,
.filter-select.has-value {
    background-color: #fff3cd;
    font-weight: 600;
}

.filter-select {
    border-radius: 4px;
}

.filter-buttons {
    display: flex;
    gap: 4px;
}

.filter-btn {
    border-radius: 4px;
}

.filter-btn-icon {
    font-size: 0.85rem;
}

.filter-reset-btn {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

/* ========================================
   TABLE ICON STYLES
   ======================================== */

/* Order ID Column Container */
.order-id-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-id-code {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.order-id-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-id-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.order-id-actions a:hover {
    transform: scale(1.15);
}

.table-icon-alert {
    color: #d53300;
    font-size: 1rem;
}

.table-icon-whatsapp {
    color: #25D366;
    font-size: 1.1rem;
}

.table-icon-comment {
    color: #55a3a3;
    font-size: 1rem;
}

.table-icon-comment-empty {
    color: #9c9c9c;
    font-size: 1rem;
}

.table-icon-truck {
    color: darkred;
    font-size: 1rem;
}

.table-status-delivered {
    color: green;
}

.table-status-not-delivered {
    color: red;
}

/* ========================================
   MISC UTILITIES
   ======================================== */

.no-results-alert {
    margin-top: 20px;
}

.no-results-icon {
    font-size: 2rem;
    color: var(--pastel-blue);
}

.no-results-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
    color: var(--text-dark);
}

/* ========================================
   PROJECT VIEW STYLES
   ======================================== */

/* Project Stats */
.project-stat-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.project-stat-value {
    font-size: 1.2rem;
}

.project-stat-canceled {
    font-size: 0.7rem;
}

/* Project Table */
.project-table-link {
    color: var(--pastel-blue);
    font-weight: 600;
}

.project-table-link i {
    margin-right: 5px;
}

.project-table-name {
    font-weight: 500;
}

.project-table-phone {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-table-phone i {
    margin-right: 3px;
}

.project-table-icon-links {
    margin-top: 5px;
}

.project-table-icon-link {
    text-decoration: none;
    margin-right: 8px;
}

.project-table-icon {
    font-size: 20px;
}

.project-table-icon-whatsapp {
    color: #25D366;
}

.project-table-icon-mail {
    color: #9C9C9C;
}

.project-table-icon-shop {
    color: #9C9C9C;
}

.project-table-icon-warehouse {
    font-size: 20px;
}

.project-table-address i {
    color: var(--pastel-blue);
    margin-right: 5px;
}

.project-courier-link {
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.project-courier-link:hover .badge {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.project-courier-link .badge {
    transition: all 0.2s ease;
}

.project-badge-item {
    font-size: 0.85rem;
}

.project-badge-shipment {
    font-size: 0.8rem;
}

.project-icon-image {
    width: 30px;
    margin: 2px;
}

.project-row-uncomfortable {
    background-color: var(--pastel-peach);
    border-left: 4px solid var(--pastel-orange);
}

/* Dynamic color styles - per colori dinamici da backend */
.dynamic-color-icon {
    font-size: 20px;
}

.d-none-custom {
    display: none;
}

.d-block-custom {
    display: block;
}

/* ========================================
   BADGE ROLE STYLES
   ======================================== */

.badge-role-admin {
    background: var(--primary-base);
    color: white;
}

.badge-role-warehouse {
    background: var(--warning);
    color: white;
}

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

/* ========================================
   ADDITIONAL UTILITIES
   ======================================== */

.mb-0 {
    margin-bottom: 0 !important;
}

.text-center-custom {
    text-align: center;
}

.border-none {
    border: none;
}

.mr-10 {
    margin-right: 10px;
}

/* ========================================
   BADGE STATUS STYLES
   ======================================== */

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

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

/* ========================================
   MODAL STYLES
   ======================================== */

.modal-padding {
    padding: 20px;
}

.modal-title-primary {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.modal-title-danger {
    color: var(--danger-base, #dc3545);
    margin-bottom: 15px;
}

.modal-icon-primary {
    color: var(--primary-base);
}

.modal-label-bold {
    font-weight: 600;
}

.modal-actions {
    text-align: right;
    margin-top: 20px;
}

.modal-text-danger {
    color: var(--danger-base, #dc3545);
    font-size: 0.9em;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.btn-change-role {
    background-color: var(--primary-base);
    color: white;
    border: none;
}

.btn-confirm-primary {
    background-color: var(--primary-base);
    border: none;
    margin-left: 10px;
}

.btn-delete-danger {
    margin-left: 10px;
}

.cursor-pointer {
    cursor: pointer;
}

/* ========================================
   HOME PAGE PROJECT CARD STYLES
   ======================================== */

.projects-loader {
    display: none;
}

.spinner-large {
    width: 3rem;
    height: 3rem;
}

.home-project-card {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.home-project-card-header {
    border-bottom: 2px solid #e9ecef;
    padding: 0.5rem;
}

.home-project-title {
    font-size: 1rem;
}

.home-project-icon {
    font-size: 0.9rem;
}

.home-project-trash {
    font-size: 0.9rem;
}

.home-project-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    color: white;
}

.home-project-badge-icon {
    font-size: 0.65rem;
}

.home-project-date {
    font-size: 0.7rem;
}

.home-project-body {
    padding: 0.6rem;
}

.home-project-status-label {
    color: #6c757d;
    font-size: 0.65rem;
}

.home-project-progress {
    height: 14px;
    border-radius: 8px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
}

.home-project-progress-bar {
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
    line-height: 14px;
}

.home-project-status-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
}

.home-trash-button {
    margin-left: 10px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 5px;
}

/* Delete Project Modal */
.modal-content-custom {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px rgba(0,40,85,0.2);
}

.modal-header-danger {
    background-color: #F8F9FA;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid var(--error);
}

.modal-title-text {
    color: var(--primary-dark);
}

.modal-icon-danger {
    margin-right: 8px;
    color: var(--error);
}

.modal-body-custom {
    padding: 25px;
    font-size: 1.05rem;
    color: var(--primary-dark);
}

.modal-footer-custom {
    border-top: 1px solid var(--primary-lightest);
}

.modal-btn-close {
    background-color: var(--primary-light);
    color: #ffffff;
    border-radius: 5px;
}

.modal-btn-delete {
    background-color: var(--error);
    color: white;
    border-radius: 5px;
}

.modal-btn-icon {
    margin-right: 5px;
}

/* ========================================
   WEIGHTS PAGE STYLES
   ======================================== */

.alert-success-fixed {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    display: none;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.alert-close-white {
    color: white;
    opacity: 0.8;
}

.weights-card {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,40,85,0.1);
}

.weights-header {
    background-color: #F8F9FA;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid var(--primary-base);
}

.weights-title {
    color: var(--primary-dark);
}

.weights-title-icon {
    margin-right: 10px;
    color: var(--primary-base);
}

.weights-btn-add {
    background-color: var(--primary-base);
    color: white;
    border: none;
}

.weights-info-icon {
    color: var(--primary-base);
}

.weights-table {
    border-radius: 8px;
    overflow: hidden;
}

.weights-thead {
    background-color: #F8F9FA;
    border-bottom: 2px solid var(--primary-base);
}

.weights-th-narrow {
    width: 30px;
    color: var(--primary-dark);
}

.weights-th {
    color: var(--primary-dark);
}

.weights-tbody {
    cursor: move;
}

.weights-drag-handle {
    text-align: center;
}

.weights-drag-icon {
    color: #ccc;
}

.weights-conditions {
    font-size: 0.95rem;
}

.weights-btn-edit {
    background: var(--primary-base);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 12px;
}

.weights-btn-delete {
    background: var(--error);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 12px;
    margin-left: 5px;
}

.weights-empty-row {
    padding: 40px;
}

.weights-empty-icon {
    font-size: 48px;
    color: var(--primary-light);
    display: block;
    margin-bottom: 10px;
}

.weights-simulator-card {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,40,85,0.1);
}

.weights-simulator-header {
    background: linear-gradient(135deg, var(--primary-base) 0%, var(--primary-medium) 100%);
    border-radius: 10px 10px 0 0;
    color: white;
}

.weights-simulator-info {
    font-size: 0.9rem;
}

/* Badge condition styles for weights page */
.badge-weight-packages {
    background: var(--primary-base);
    color: white;
}

.badge-weight-replacement {
    background: var(--primary-light);
    color: #ffffff;
}

.badge-weight-uncomfortable {
    background: var(--warning);
    color: white;
}

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

.badge-weight-size {
    background: var(--primary-medium);
    color: white;
}

.badge-weight-keyword {
    background: var(--primary-light);
    color: #ffffff;
}

.badge-weight-country {
    background: var(--primary-base);
    color: white;
}

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

.badge-weight-default {
    background: var(--primary-dark);
    color: white;
}

.badge-weight-courier {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-weight-active {
    background: var(--success);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
}

.badge-weight-inactive {
    background: var(--text-muted);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ========================================
   VIEW PROJECT PAGE SPECIFIC STYLES
   ======================================== */

.customer-id-link {
    text-decoration: none;
}

.customer-id-link:hover {
    text-decoration: underline;
}

/* Ottimizzazione spazi stat cards */
.stat-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 0.5rem !important;
}

.stat-card .card-body {
    padding: 0.4rem 0.6rem !important;
}

.stat-card .badge {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.4rem !important;
    margin-bottom: 0.2rem !important;
}

.stat-card div[class*="text-size"] {
    font-size: 1.1rem !important;
}

/* Table modern optimizations for viewProject */
.table-modern td {
    padding: 0.25rem 0.3rem !important;
    font-size: 0.85rem;
    vertical-align: top;
    line-height: 1.3;
}

.table-modern th {
    padding: 0.4rem 0.3rem !important;
    font-size: 0.85rem;
}

.table-modern td br {
    line-height: 0.5;
}

.table-modern td > div {
    margin-top: 0.2rem !important;
}

.table-modern td span {
    line-height: 1.2;
}

.table-modern td img {
    margin: 1px !important;
    width: 25px !important;
}

.badge {
    padding: 0.15rem 0.35rem;
    font-size: 0.7rem;
    margin-top: 0.15rem !important;
}

.card-header-modern .d-flex {
    margin-bottom: 0.5rem !important;
}

/* Icone più compatte */
.table-modern i.fab,
.table-modern i.fa,
.table-modern i.fas {
    font-size: 18px !important;
}

/* ========================================
   HOME PAGE SPECIFIC ANIMATIONS
   ======================================== */

.project-card {
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
    border-color: #007bff !important;
}

.project-card a:hover {
    color: #0056b3 !important;
}

.fa-trash:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

/* Animazione loader */
#projectsLoader {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   WAREHOUSE PAGE SPECIFIC STYLES
   ======================================== */

.warehouse-filter-form {
    background-color: #F8F9FA;
    padding: 10px 8px;
    border-radius: 6px;
}

.warehouse-search-icon-group {
    background-color: white;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.warehouse-search-icon {
    color: var(--primary-base);
    font-size: 0.9rem;
}

.warehouse-search-input {
    border-left: none;
    border-radius: 0 4px 4px 0;
}

.warehouse-search-input-active {
    background-color: #fff3cd;
    font-weight: 600;
}

.warehouse-select-filter {
    border-radius: 4px;
}

.warehouse-button-group {
    gap: 4px;
}

.warehouse-filter-button {
    border-radius: 4px;
}

.warehouse-filter-icon {
    font-size: 0.85rem;
}

.warehouse-reset-button {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
}

/* ========================================
   LOGIN PAGE STYLES
   Pagina di login moderna e innovativa
   ======================================== */

.login-page {
    min-height: 100vh;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.login-page::before,
.login-page::after {
    display: none;
}

.login-weconny-logo {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 2;
}

.login-weconny-logo img {
    width: 120px;
    opacity: 0.9;
}

.login-container {
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 40, 85, 0.3);
    overflow: hidden;
    border: none;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, var(--primary-base) 0%, var(--primary-medium) 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.login-back-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
    color: white;
    text-decoration: none;
}

.login-back-btn i {
    margin-right: 6px;
    font-size: 12px;
}

.login-header::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -50px;
}

.login-logo {
    width: 180px;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.login-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

.login-body {
    padding: 40px 30px;
}

.form-group-modern {
    margin-bottom: 28px;
    position: relative;
}

.form-label-modern {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-label-modern i {
    margin-right: 8px;
    color: var(--primary-base);
    width: 18px;
}

.form-control-modern {
    height: 50px;
    border: 2px solid #E8EBF0;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #F8F9FB;
}

.form-control-modern:focus {
    border-color: var(--primary-base);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.1);
    outline: none;
}

.form-control-modern.is-invalid {
    border-color: var(--danger);
    background-color: #FFF5F5;
}

.login-page .invalid-feedback {
    font-size: 13px;
    margin-top: 6px;
    color: var(--danger);
    display: flex;
    align-items: center;
}

.login-page .invalid-feedback::before {
    content: '\f06a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 6px;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.remember-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-base);
}

.remember-checkbox label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    user-select: none;
}

.btn-login {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-base) 0%, var(--primary-medium) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::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: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: var(--primary-base);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.forgot-password a:hover {
    color: var(--primary-medium);
    text-decoration: underline;
}

.forgot-password a i {
    margin-left: 6px;
    font-size: 12px;
}

.login-footer {
    text-align: center;
    padding: 24px 30px;
    background-color: #F8F9FB;
    border-top: 1px solid #E8EBF0;
}

.login-footer-text {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.login-footer-text a {
    color: var(--primary-base);
    font-weight: 600;
    text-decoration: none;
}

.login-footer-text a:hover {
    text-decoration: underline;
}

@media (max-width: 576px) {
    .login-page {
        padding: 20px 15px;
    }

    .login-header {
        padding: 30px 20px;
    }

    .login-logo {
        width: 140px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-body {
        padding: 30px 20px;
    }
}
