/* ===== VARIABILI E STILI BASE ===== */
:root {
    --primary-color: #8ecae6;
    --secondary-color: #219ebc;
    --accent-color: #ffb4a2;
    --dark-color: #023047;
    --light-color: #f8f9fa;
    --success-color: #90be6d;
    --warning-color: #f9c74f;
    --danger-color: #f94144;
    --text-dark: #333;
    --text-muted: #666;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* ===== LAYOUT E NAVBAR ===== */
.navbar {
    background-color: var(--dark-color) !important;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white !important;
}

.navbar-brand .bi {
    color: white !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.dropdown-menu {
    background-color: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

main.container {
    margin-top: 80px;
    min-height: calc(100vh - 200px);
}

footer {
    background-color: var(--dark-color) !important;
    font-size: 0.9rem;
}

/* ===== COMPONENTI COMUNI ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 0 0 10px 10px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.card {
    border-radius: 15px;
    transition: all 0.3s ease-in-out;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card:hover {
   /* transform: translateY(-5px); */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-header {
    font-weight: 600;
    border-radius: 15px 15px 0 0 !important;
}

.btn {
    border-radius: 10px;
    padding: 10px 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn .me-2 {
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    /* transform: translateY(-2px); */
    box-shadow: 0 5px 15px rgba(142, 202, 230, 0.4);
    background: linear-gradient(135deg, #7dbdd9 0%, #1e90af 100%);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border: none;
}

.btn-secondary:hover {
    background-color: #1a8ea9;
    /* transform: translateY(-2px); */
}

.btn-success {
    background-color: var(--success-color);
    border: none;
}

.btn-danger {
    background-color: var(--danger-color);
    border: none;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-gradient:hover {
   /*  transform: translateY(-2px); */
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

/* ===== TABELLE ===== */
.material-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.material-table table {
    width: 100%;
    border-collapse: collapse;
}

.material-table th {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.material-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.material-table tr:last-child td {
    border-bottom: none;
}

.material-table tr:hover {
    background-color: #f8f9fa;
}

.action-cell {
    text-align: center;
}

/* ===== TIPOGRAFIA E UTILITY ===== */
.section-title {
    color: var(--dark-color);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.back-home {
    margin-bottom: 2rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

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

/* ===== DASHBOARD SPECIFICA ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat {
    padding: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

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

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.soap-card {
  /*  transition: transform 0.3s ease; */
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.soap-card:hover {
   /* transform: translateY(-5px); */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.soap-image-card {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-color);
}

.soap-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===== IMMAGINI ===== */
.img-sapone {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 8px;
}

.img-sapone-pubblica {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
}

/* Forza il ridimensionamento delle immagini grandi */
.img-sapone-pubblica[src*=".jpg"],
.img-sapone-pubblica[src*=".jpeg"],
.img-sapone-pubblica[src*=".png"],
.img-sapone-pubblica[src*=".webp"] {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* ===== FORM ===== */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(142, 202, 230, 0.25);
}

/* ===== STILI AREA PUBBLICA ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
}

.card-img-top {
    height: 280px;
    object-fit: cover;
   /* transition: transform 0.3s ease; */
}

.card:hover .card-img-top {
  /*  transform: scale(1.08); */
}

.ingredienti-list {
    list-style: none;
    padding: 0;
}

.ingredienti-list li {
    padding: 0.75rem 0;
    border-bottom: 2px solid #f7fafc;
    position: relative;
    padding-left: 2rem;
    font-size: 1.1rem;
    color: #4a5568;
}

.ingredienti-list li:before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 0.5rem;
}

.back-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 2rem;
    padding: 0.75rem 2rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-button:hover {
    /* transform: translateY(-3px); */
    box-shadow: 0 0.5rem 1.5rem rgba(102, 126, 234, 0.4);
    color: white;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .material-table {
        overflow-x: auto;
    }
    
    .material-table table {
        min-width: 800px;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .img-sapone-pubblica {
        height: 300px;
        max-width: 100%;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .card-img-top {
        height: 200px;
    }
}

/* ===== ANIMAZIONI ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
      /*  transform: translateY(2rem); */
    }
    to {
        opacity: 1;
      /*  transform: translateY(0); */
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ===== BOOTSTRAP ENHANCEMENT ===== */
.shadow-lg-custom {
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175) !important;
}

.rounded-4 {
    border-radius: 1.5rem !important;
}

/* Stile per le intestazioni delle tabelle */
table thead.napoli-header {
    background-color: var(--secondary-color) !important;
    color: white !important;
    border-color: var(--dark-color) !important;
}

/* forza il bianco SOLO al brand (testo + icona fiore) */
.navbar-brand,
.navbar-brand .bi {
  color: white !important;
}
.navbar-brand:hover,
.navbar-brand:focus {
  color: white !important;
}

/* Card di destra dimensioni originali */
.dettaglio-card {
    height: auto !important;
    max-height: none !important;
}