@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
    --primary: #006e32;
    --primary-dark: #004d23;
    --primary-light: #008f42;
    --bg-main: #0a0e0d;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #e8f5e9;
    --text-secondary: #a5d6a7;
    --border: rgba(0, 110, 50, 0.3);
    --shadow: rgba(0, 110, 50, 0.4);
    
    --font-heading: 'Orbitron', monospace;
    --font-body: 'Rajdhani', sans-serif;
    --font-code: 'Space Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0a0e0d 0%, #1a1f1e 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 110, 50, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 110, 50, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    position: relative;
}
@media (min-width: 1400px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        max-width: 1400px;
    }
}


/* Navbar */
.navbar {
    background: rgba(10, 14, 13, 0.7) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(0, 110, 50, 0.1);
    z-index: 1030;
}

.dropdown-menu {
    z-index: 1050 !important;
}

.navbar-brand {
    font-family: var(--font-heading);
    color: var(--primary-light) !important;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 3px; 
    text-transform: uppercase;
}

.nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-light) !important;
}

.nav-link:hover::after {
    width: 80%;
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 110, 50, 0.15);
    transition: all 0.4s ease;
    overflow: hidden;
}

.card:hover {
    background: var(--bg-card-hover);
    box-shadow: 0 12px 48px rgba(0, 110, 50, 0.25);
    border-color: var(--primary);
}

.card-header {
    font-family: var(--font-heading);
    background: rgba(0, 110, 50, 0.15);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1.2rem 1.5rem;
    letter-spacing: 1.5px;
}

.card-body {
    color: var(--text-primary);
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-family: var(--font-heading);
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 110, 50, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 6px 25px rgba(0, 110, 50, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--primary);
}

.btn-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
}

.btn-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.btn-danger:hover {
    background: rgba(244, 67, 54, 0.3);
    color: #ff5252;
}

.btn-info {
    background: rgba(3, 169, 244, 0.2);
    color: #03a9f4;
    border: 1px solid rgba(3, 169, 244, 0.3);
}

.btn-info:hover {
    background: rgba(3, 169, 244, 0.3);
    color: #4fc3f7;
}

.btn-success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
    background: rgba(76, 175, 80, 0.3);
    color: #66bb6a;
}

/* Forms */
.form-control, .form-select {
    font-family: var(--font-body);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.7rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 110, 50, 0.25);
}

.form-control::placeholder {
    font-family: var(--font-body);
    font-weight: 300;
    color: rgba(165, 214, 167, 0.5);
}

.form-label {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-select option {
    background: var(--bg-main);
    color: var(--text-primary);
}

/* Tables */
.table-dark {
    --bs-table-bg: rgba(255, 255, 255, 0.03);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-bg: rgba(0, 110, 50, 0.15);
    border-collapse: separate;
    border-spacing: 0;
}

.table-dark thead th {
    font-family: var(--font-heading);
    background-color: rgba(0, 110, 50, 0.2);
    color: var(--primary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--primary);
}

.table-dark tbody tr {
    transition: all 0.3s ease;
}

.table-dark tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 110, 50, 0.2);
}

.table-dark tfoot th {
    background-color: rgba(0, 110, 50, 0.2);
    border-top: 2px solid var(--primary);
    color: var(--primary-light);
}

/* Badges */
.badge {
    font-family: var(--font-heading);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.bg-secondary {
    background: rgba(158, 158, 158, 0.3) !important;
    border: 1px solid rgba(158, 158, 158, 0.5);
}

.bg-warning {
    background: rgba(255, 193, 7, 0.3) !important;
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107 !important;
}

.bg-info{
    background-color: #781987 !important;
}

.bg-success {
    background: rgba(76, 175, 80, 0.3) !important;
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50 !important;
}

.bg-macchine {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.bg-semilavorato {
    background: rgba(158, 158, 158, 0.3) !important;
    border: 1px solid rgba(158, 158, 158, 0.5);
}

.bg-accessorio {
    background: rgba(255, 193, 7, 0.3) !important;
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #3b3a39 !important;
}

.bg-componente{
    background-color: #781987 !important;
}

/* Alerts */
.alert {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    color: var(--text-primary);
}

.alert-success {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.15);
}

.alert-danger {
    border-color: rgba(244, 67, 54, 0.5);
    background: rgba(244, 67, 54, 0.15);
}

.btn-close {
    filter: invert(1) brightness(2);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    letter-spacing: 2px;
}

/* Home cards */
.text-center .card {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-center .card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(0, 110, 50, 0.1);
}

.text-center .card i {
    color: var(--primary-light);
    transition: all 0.3s ease;
}

.text-center .card:hover i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--primary));
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .alert {
    animation: fadeIn 0.5s ease;
}

/* Small text */
.text-muted {
    color: rgba(165, 214, 167, 0.6) !important;
}

small {
    color: var(--text-secondary);
}

/* Links */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
}

/* HR */
hr {
    border-color: var(--border);
    opacity: 0.3;
}

/* Input groups */
.articolo-row {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.articolo-row:hover {
    background: rgba(0, 110, 50, 0.05);
    border-color: var(--border);
}

/* Dashboard stat cards */
.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 110, 50, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 110, 50, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 110, 50, 0.3);
    border-color: var(--primary);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card i {
    color: var(--primary-light);
    transition: all 0.4s ease;
}

.stat-card:hover i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px var(--primary));
}

.stat-card .display-5 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card p {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 2px;
    font-size: 0.85rem;
}

/* Progress bars */
.progress {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 0 10px rgba(0, 110, 50, 0.5);
    transition: width 0.6s ease;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, #4caf50 0%, #66bb6a 100%);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Code tags */
code {
    font-family: var(--font-code);
    background: rgba(0, 110, 50, 0.2);
    color: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Table improvements for dashboard */
.table-sm td, .table-sm th {
    padding: 0.75rem;
}

/* Map styles */
#italia-map {
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-legend-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 5px;
    border: 1px solid var(--border);
}

.map-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 9999;
    display: none;
    border: 1px solid var(--primary);
    backdrop-filter: blur(10px);
}

.region-point circle:hover {
    transform-origin: center;
}

/* Modal fixes */
.modal {
    z-index: 2000 !important;
}

.modal-backdrop {
    z-index: 1990 !important;
}


/* World map enhancements */
#world-map {
    background: radial-gradient(circle at center, rgba(0, 110, 50, 0.05) 0%, transparent 70%);
    border-radius: 8px;
}

canvas#world-map {
    filter: drop-shadow(0 0 30px rgba(0, 255, 100, 0.2));
}

/* Map card specific styles */
.card:has(#world-map) {
    background: linear-gradient(135deg, rgba(10, 14, 13, 0.8) 0%, rgba(0, 110, 50, 0.05) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 100, 0.2);
}

.card:has(#world-map) .card-header {
    background: rgba(0, 110, 50, 0.2);
    border-bottom: 1px solid rgba(0, 255, 100, 0.3);
}

/* public/assets/css/style.css - aggiungi alla fine */

/* Table responsive fix mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .table-responsive {
        margin: 0;
        border: none;
    }
    
    .table-dark {
        font-size: 0.85rem;
    }
    
    .table-dark th,
    .table-dark td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    .btn-group {
        flex-wrap: wrap !important;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Footer responsive */
footer a:hover {
    color: var(--primary-light) !important;
}

footer ul li {
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    footer {
        font-size: 0.9rem;
    }
    
    footer h6 {
        font-size: 0.8rem !important;
    }
    
    footer .small {
        font-size: 0.8rem !important;
    }
}