/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #27ae60;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px 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, #000000 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark-color);
}

/* Navegación de secciones */
.section-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Espaciado entre dashboards principales */
section.dashboard {
    margin: 30px 0;
}

/* Acordeón */
.accordion {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-bottom: 1px solid #eaeaea;
}
.accordion-title {
    margin: 0;
    font-size: 1.35em;
    font-weight: 800;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.accordion-body {
    display: none;
}
.accordion.open .accordion-body {
    display: block;
}
.accordion-header .arrow {
    transition: transform 0.2s ease;
}
.accordion.open .accordion-header .arrow {
    transform: rotate(180deg);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

/* Indicador de Estado de Conexión */
#connectionStatus {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

#connectionStatus.connected {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

#connectionStatus.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

#connectionStatus.offline {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

#connectionStatus #statusIcon {
    margin-right: 6px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 30px;
}

/* Control Panel */
.control-panel {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-secondary {
    background: var(--info-color);
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

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

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

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

.btn-info:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

.modal-large {
    max-width: 900px;
}

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

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.close:hover {
    transform: rotate(90deg);
}

/* Forms */
form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #dfe6e9;
    border-radius: var(--border-radius);
    font-size: 1em;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #7f8c8d;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    width: auto;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--light-color);
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffc107;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #17a2b8;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard h2 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.8em;
}

.volume-summary {
    display: flex;
    gap: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    flex-wrap: wrap;
}

.volume-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.volume-label {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.volume-value {
    font-size: 1.2em;
    font-weight: bold;
}

.piles-grid, .materials-grid, .recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.pile-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.pile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.pile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pile-number {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--dark-color);
}

.pile-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-ready {
    background: #cce5ff;
    color: #004085;
}

.pile-info {
    margin-bottom: 10px;
}

.pile-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--light-color);
}

.pile-info-label {
    color: #7f8c8d;
    font-size: 0.9em;
}

.pile-info-value {
    font-weight: 600;
    color: var(--dark-color);
}

.progress-bar {
    margin-top: 15px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #7f8c8d;
}

.progress-track {
    height: 10px;
    background: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.temperature-display {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.empty-state .small {
    font-size: 0.95em;
}

/* Pile Auto Created */
.pile-card.auto-created {
    border-left: 4px solid var(--warning-color);
    background: linear-gradient(135deg, #fff9e6, #fff3cd);
}

.pile-card.existing-pile {
    border-left: 4px solid #2196F3;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.2);
}

.pile-card.existing-pile .pile-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
}

.pile-card.existing-pile .pile-info-row {
    background: transparent !important;
}

.pile-card.existing-pile .pile-info-label {
    color: #1565c0 !important;
    font-weight: 600;
}

.pile-card.existing-pile .pile-info-value {
    color: #0d47a1 !important;
    font-weight: 700;
}

.auto-badge {
    background: var(--warning-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 8px;
}

.existing-badge {
    background: #2196F3;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 8px;
}

/* Material Cards - Estilos originales mantenidos para compatibilidad */
.material-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Estilos para el dashboard de materiales con slider */
.materials-slider-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.materials-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.slider-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slider-counter {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.slider-pages {
    font-size: 0.8em;
    color: #999;
}

.slider-controls {
    display: flex;
    gap: 10px;
}

.slider-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.slider-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.materials-slider {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    min-height: 200px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.materials-slider::-webkit-scrollbar {
    height: 6px;
}

.materials-slider::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.materials-slider::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.materials-slider::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.dot:hover {
    background: var(--primary-color);
    opacity: 0.7;
}

/* Tarjetas de material compactas */
.material-card-compact {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 3px solid var(--success-color);
    border: 1px solid #e0e0e0;
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
}

.material-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left-color: var(--primary-color);
}

.material-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.material-id {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--dark-color);
}

.material-origin {
    background: var(--info-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

.material-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-dates {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.material-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
}

.date-label {
    color: #666;
    font-weight: 500;
}

.date-value {
    color: var(--dark-color);
    font-weight: 600;
}

.material-volumes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.volume-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    padding: 4px 0;
}

.volume-label {
    color: #666;
    font-weight: 500;
}

.volume-value {
    color: var(--dark-color);
    font-weight: 600;
}

.volume-value.highlight {
    color: var(--success-color);
    font-weight: 700;
}

.material-progress {
    margin-top: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.progress-label {
    font-size: 0.8em;
    color: #666;
    font-weight: 500;
}

.progress-bar-compact {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill-compact {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, #4caf50 100%);
    transition: width 0.3s ease;
    border-radius: 3px;
}

/* Layout de dos columnas para el dashboard de materiales */
.materials-dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.materials-left-panel {
    min-width: 0; /* Permite que se comprima */
}

.materials-right-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.materials-right-panel h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.stats-charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chart-container h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1em;
    text-align: center;
    font-weight: 600;
}

.chart-container canvas {
    max-height: 200px;
    width: 100% !important;
    height: auto !important;
}

/* Responsive para el slider horizontal */
@media (max-width: 768px) {
    .materials-dashboard-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .materials-right-panel {
        order: -1; /* Mover estadísticas arriba en móvil */
    }
    
    .stats-charts-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .materials-slider {
        gap: 10px;
    }
    
    .material-card-compact {
        min-width: 250px;
        max-width: 280px;
    }
    
    .materials-slider-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .slider-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .material-card-compact {
        min-width: 220px;
        max-width: 250px;
        padding: 12px;
    }
    
    .material-volumes {
        gap: 4px;
    }
    
    .volume-row {
        font-size: 0.75em;
    }
}

.material-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), #2ecc71);
}

.material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--success-color);
}


.material-type-badge {
    background: var(--success-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 8px;
}

/* Recommendation Cards */
.recommendation-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--info-color), #3498db);
}

.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--info-color);
}

.recommendation-type {
    background: var(--info-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 10px;
    display: inline-block;
}

.recommendation-benefit {
    background: #d4edda;
    color: #155724;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 10px;
}

.recommendation-piles {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--light-color);
}

.recommendation-pile-item {
    background: var(--light-color);
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    margin: 2px;
    display: inline-block;
}

/* Pile Detail */
.detail-summary {
    padding: 20px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.detail-item-label {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.detail-item-value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--dark-color);
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.records-table th,
.records-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--light-color);
}

.records-table th {
    background: var(--dark-color);
    color: white;
    font-weight: 600;
}

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

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-yes {
    background: #d4edda;
    color: #155724;
}

.badge-no {
    background: #f8d7da;
    color: #721c24;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .piles-grid {
        grid-template-columns: 1fr;
    }
    
    .control-panel {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .records-table {
        font-size: 0.85em;
    }
    
    .volume-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .volume-item {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* Dashboard Profesional */
.professional-dashboard {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dashboard-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
    border-radius: 6px;
}

/* Métricas Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.metric-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-value {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
}

.metric-label {
    font-size: 0.95em;
    color: #6c757d;
    font-weight: 500;
}

.metric-trend {
    font-size: 0.85em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.metric-trend.positive {
    background: #d4edda;
    color: #155724;
}

.metric-trend.negative {
    background: #f8d7da;
    color: #721c24;
}

.metric-trend.neutral {
    background: #e2e3e5;
    color: #383d41;
}

/* Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 30px 0;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.chart-header h4 {
    color: var(--dark-color);
    font-size: 1.2em;
    font-weight: 600;
}

.chart-controls select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 0.9em;
}

.chart-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Bar Chart */
.bar-chart {
    height: 200px;
    display: flex;
    align-items: end;
    gap: 8px;
    padding: 20px 0;
}

.bar-item {
    flex: 1;
    background: linear-gradient(to top, var(--primary-color), var(--info-color));
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    min-height: 20px;
}

.bar-item:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

.bar-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8em;
    color: #6c757d;
    white-space: nowrap;
}

.bar-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8em;
    font-weight: 600;
    color: var(--dark-color);
}

/* Line Chart */
.line-chart {
    height: 200px;
    position: relative;
    padding: 20px 0;
}

.line-path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.line-point {
    fill: var(--primary-color);
    stroke: white;
    stroke-width: 2;
    r: 4;
    transition: all 0.3s ease;
}

.line-point:hover {
    r: 6;
    fill: var(--info-color);
}

/* Indicadores Circulares */
.indicators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 30px 0;
}

.circular-progress {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring-svg {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    text-align: center;
}

.progress-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
}

.progress-label {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 5px;
}

/* Temperature Gauge */
.temperature-chart {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
}

.temp-gauge {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gauge-needle {
    stroke: #dc3545;
    stroke-width: 3;
    stroke-linecap: round;
    transform-origin: 60px 60px;
    transition: transform 0.5s ease;
}

.gauge-labels {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #6c757d;
}

.temp-value {
    position: absolute;
    bottom: -50px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--dark-color);
}

/* Recomendaciones Inteligentes */
.recommendations-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h4 {
    color: var(--dark-color);
    font-size: 1.3em;
    font-weight: 600;
}

.ai-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #6c757d;
}

.ai-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.smart-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.recommendation-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.recommendation-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.recommendation-description {
    font-size: 0.9em;
    color: #6c757d;
    line-height: 1.4;
}

/* Acelerador de Tiempo */
.time-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.time-preview h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 500;
    color: var(--dark-color);
}

.preview-value {
    font-weight: 600;
    color: var(--primary-color);
}

.preview-change {
    font-size: 0.9em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
}

.preview-change.positive {
    background: #d4edda;
    color: #155724;
}

.preview-change.negative {
    background: #f8d7da;
    color: #721c24;
}

.preview-change.neutral {
    background: #e2e3e5;
    color: #383d41;
}

.time-acceleration-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.time-acceleration-info h5 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1em;
}

.time-acceleration-info p {
    color: #856404;
    font-size: 0.9em;
    margin: 5px 0;
}

/* Mascota IA */
.ai-pet {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    animation: float3D 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.ai-pet:hover {
    transform: scale(1.1) perspective(200px) rotateX(10deg) rotateY(-10deg);
    animation-play-state: paused;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

.pet-body {
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 20%, #FFA500 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, #FF8C00 0%, transparent 40%),
        radial-gradient(ellipse at 50% 70%, #FF7F50 0%, transparent 35%),
        linear-gradient(135deg, #FF8C00 0%, #FFA500 30%, #FF7F50 60%, #FF6347 100%);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    clip-path: polygon(50% 0%, 80% 25%, 95% 50%, 85% 75%, 70% 90%, 50% 100%, 30% 90%, 15% 75%, 5% 50%, 20% 25%);
    transform: perspective(400px) rotateX(1deg) rotateY(-1deg);
}

.pet-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 45%, rgba(139, 69, 19, 0.6) 45%, rgba(139, 69, 19, 0.6) 55%, transparent 55%),
        linear-gradient(25deg, transparent 35%, rgba(139, 69, 19, 0.5) 35%, rgba(139, 69, 19, 0.5) 65%, transparent 65%),
        linear-gradient(-25deg, transparent 35%, rgba(139, 69, 19, 0.5) 35%, rgba(139, 69, 19, 0.5) 65%, transparent 65%),
        linear-gradient(50deg, transparent 30%, rgba(139, 69, 19, 0.4) 30%, rgba(139, 69, 19, 0.4) 70%, transparent 70%),
        linear-gradient(-50deg, transparent 30%, rgba(139, 69, 19, 0.4) 30%, rgba(139, 69, 19, 0.4) 70%, transparent 70%);
    opacity: 0.7;
    border-radius: inherit;
}

.pet-body::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 6px;
    background: #8B4513;
    border-radius: 0.5px;
}

.pet-face {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 50%;
}

.pet-eyes {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 20px;
}

.pet-eye {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, white 0%, #f0f0f0 70%, #ddd 100%);
    border-radius: 50%;
    top: 0;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.pet-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 4px;
    height: 4px;
    background: #000;
    border-radius: 50%;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
}

.pet-eye.left {
    left: 10px;
    animation: blink 4s infinite;
}

.pet-eye.right {
    right: 10px;
    animation: blink 4s infinite 0.1s;
}

.pet-mouth {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    border: 2px solid white;
    border-top: none;
    border-radius: 0 0 20px 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.7));
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.pet-chat-bubble {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border: 2px solid #4CAF50;
    border-radius: 15px;
    padding: 10px 15px;
    max-width: 250px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    animation: bubbleAppear 0.3s ease;
}

.chat-content {
    font-size: 0.9em;
    color: #2E7D32;
    font-weight: 500;
}

.chat-arrow {
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #4CAF50;
}

.pet-status {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #FF5722;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Chat Modal */
.ai-chat-modal {
    max-width: 500px;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8f9fa;
}

.message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    margin-right: 10px;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    max-width: 80%;
    font-size: 0.9em;
    line-height: 1.4;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    margin-right: 0;
    margin-left: 10px;
}

.user-message .message-content {
    background: #2196F3;
    color: white;
    border-color: #1976D2;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-container input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 0.9em;
}

.chat-input-container input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.chat-input-container button {
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9em;
}

/* Animaciones */
@keyframes float3D {
    0%, 100% { 
        transform: perspective(400px) rotateX(1deg) rotateY(-1deg) translateY(0px) rotateZ(0deg); 
    }
    25% { 
        transform: perspective(400px) rotateX(2deg) rotateY(-0.5deg) translateY(-4px) rotateZ(0.5deg); 
    }
    50% { 
        transform: perspective(400px) rotateX(0.5deg) rotateY(-2deg) translateY(-8px) rotateZ(0deg); 
    }
    75% { 
        transform: perspective(400px) rotateX(1.5deg) rotateY(-0.5deg) translateY(-3px) rotateZ(-0.5deg); 
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes bubbleAppear {
    0% { 
        opacity: 0; 
        transform: translateY(10px) scale(0.8); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive Dashboard Profesional */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .indicators-grid {
        grid-template-columns: 1fr;
    }
    
    .smart-recommendations {
        grid-template-columns: 1fr;
    }
    
    .professional-dashboard {
        padding: 15px;
        margin: 15px 0;
    }
    
    .metric-card {
        padding: 20px;
    }
    
    .chart-container {
        padding: 20px;
    }
    
    /* Mascota IA Responsive */
    .ai-pet {
        width: 60px;
        height: 60px;
        bottom: 15px;
        right: 15px;
    }
    
    .pet-chat-bubble {
        max-width: 200px;
        font-size: 0.8em;
    }
    
    .ai-chat-modal {
        max-width: 90%;
        height: 70vh;
    }
}

/* Indicador de Capacidad Compostera - Diseño Profesional */
.site-capacity {
    margin-top: 15px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 1px solid #e3f2fd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.site-capacity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4caf50 0%, #2196f3 50%, #ff9800 100%);
}

.capacity-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.capacity-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.capacity-icon {
    font-size: 1.3em;
    color: #1976d2;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.capacity-title {
    font-weight: 700;
    color: #1565c0;
    font-size: 0.95em;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.capacity-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    background: rgba(25, 118, 210, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(25, 118, 210, 0.1);
}

.capacity-current {
    font-size: 1.6em;
    font-weight: 800;
    color: #1976d2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.capacity-separator {
    font-size: 1.2em;
    color: #90a4ae;
    font-weight: 600;
}

.capacity-max {
    font-size: 1.2em;
    color: #546e7a;
    font-weight: 600;
}

.capacity-percentage {
    font-size: 0.85em;
    color: #78909c;
    margin-left: 6px;
    font-weight: 500;
    background: rgba(25, 118, 210, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.capacity-bar {
    width: 120px;
    height: 8px;
    background: linear-gradient(90deg, #e8f5e8 0%, #fff3e0 50%, #ffebee 100%);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 30%, #ffc107 60%, #ff9800 80%, #f44336 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    position: relative;
}

.capacity-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    border-radius: 3px;
}

.capacity-available {
    font-size: 0.85em;
    color: #546e7a;
    flex: 1;
    text-align: right;
    font-weight: 500;
    background: rgba(76, 175, 80, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(76, 175, 80, 0.1);
}

/* Botón Principal - Ingreso Material Vegetal */
.btn-main {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 1.1em !important;
    padding: 15px 25px !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3) !important;
    transform: translateY(0) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.btn-main::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;
}

.btn-main:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4) !important;
}

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

.btn-main:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3) !important;
}

/* Responsive para el indicador de capacidad */
@media (max-width: 768px) {
    .capacity-indicator {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .capacity-header {
        justify-content: center;
    }
    
    .capacity-stats {
        justify-content: center;
    }
    
    .capacity-available {
        text-align: center;
    }
    
    .capacity-bar {
        width: 80px;
    }
    
    .btn-main {
        font-size: 1em !important;
        padding: 12px 20px !important;
    }
}

/* Estilos para pilas parciales */
.partial-pile {
    border: 2px solid #ff9800 !important;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%) !important;
    animation: partialPilePulse 2s infinite;
}

.partial-badge {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    margin-left: 8px;
    animation: badgeGlow 1.5s infinite;
}

.partial-pile-indicator {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
}

.partial-progress {
    text-align: center;
}

.partial-progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.partial-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800 0%, #f57c00 50%, #ef6c00 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.partial-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

.partial-progress-text {
    font-size: 0.9em;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 4px;
}

.partial-needed {
    font-size: 0.8em;
    color: #d84315;
    font-weight: 500;
}

/* Animaciones para pilas parciales */
@keyframes partialPilePulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(255, 152, 0, 0);
        transform: scale(1.02);
    }
}

@keyframes badgeGlow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(255, 152, 0, 0.5);
    }
    50% { 
        box-shadow: 0 0 15px rgba(255, 152, 0, 0.8);
    }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Estilos para alertas de pilas parciales */
.partial-pile-alert, .pile-completion-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.5s ease-out;
}

.alert-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    position: relative;
}

.partial-pile-alert .alert-content {
    border-left: 4px solid #ff9800;
}

.pile-completion-alert .alert-content {
    border-left: 4px solid #4caf50;
}

.alert-header {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-icon {
    font-size: 1.5em;
    animation: bounce 1s infinite;
}

.alert-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.alert-body {
    padding: 20px;
}

.alert-body p {
    margin: 8px 0;
    color: #555;
}

.alert-message {
    font-style: italic;
    color: #666;
    margin-top: 12px !important;
}

.volume-progress {
    margin: 16px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #666;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800 0%, #f57c00 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-percentage {
    text-align: center;
    font-size: 0.8em;
    font-weight: 600;
    color: #e65100;
}

.alert-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.2em;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.alert-close:hover {
    background: #f5f5f5;
    color: #666;
}

/* Animaciones para alertas */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Estilos para sugerencias de unión de pilas */
.suggestions-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.suggestions-header h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.3em;
}

.criteria-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.criteria-list li {
    padding: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.suggestions-grid {
    display: grid;
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.merge-suggestion {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.merge-suggestion:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.merge-suggestion.high-priority {
    border-left: 4px solid #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
}

.merge-suggestion.medium-priority {
    border-left: 4px solid #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.merge-suggestion.low-priority {
    border-left: 4px solid #4caf50;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
}

.merge-suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.merge-suggestion-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.priority-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.high {
    background: #f44336;
    color: white;
}

.priority-badge.medium {
    background: #ff9800;
    color: white;
}

.priority-badge.low {
    background: #4caf50;
    color: white;
}

.merge-suggestion-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.pile-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.pile-info h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pile-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pile-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.pile-detail-label {
    color: #666;
}

.pile-detail-value {
    font-weight: 600;
    color: #333;
}

.merge-result {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 2px dashed #2196f3;
}

.merge-result h4 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 1em;
}

.merge-result .combined-volume {
    font-size: 1.2em;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 8px;
}

.merge-benefit {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.piles-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.pile-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid var(--info-color);
}

.pile-info h5 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1em;
}

.pile-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pile-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
}

.pile-detail-label {
    color: #666;
    font-weight: 500;
}

.pile-detail-value {
    color: var(--dark-color);
    font-weight: 600;
}

.merge-result {
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.merge-result h5 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1em;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color);
}

.merge-benefit {
    background: var(--success-color);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
}

.merge-suggestion-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-merge {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-merge:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-details {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.no-suggestions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-suggestions-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.suggestion-tips {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.suggestion-tips h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.suggestion-tips ul {
    list-style: none;
    padding: 0;
}

.suggestion-tips li {
    padding: 5px 0;
    color: #856404;
    font-size: 0.9em;
    position: relative;
    padding-left: 20px;
}

.suggestion-tips li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.no-suggestions-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-suggestions h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.no-suggestions p {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

/* ==========================================
   MÓDULO DE DESPACHO DE COMPOST
   ========================================== */

/* Controles de despachos */
.sales-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sales-controls .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sales-controls .btn-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
}

.sales-controls .btn-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
}

.sales-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Contenido de despachos */
.compost-sales-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.sales-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-card, .inventory-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.summary-card h3, .inventory-card h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.summary-stats, .inventory-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item, .inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child, .inventory-item:last-child {
    border-bottom: none;
}

.stat-label, .inventory-label {
    font-weight: 600;
    color: var(--dark-color);
}

.stat-value, .inventory-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1em;
}

/* Historial de despachos */
.sales-history {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.sales-history h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    font-size: 1.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.sales-history-container {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.sales-history-container::-webkit-scrollbar {
    width: 6px;
}

.sales-history-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.sales-history-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.sales-history-container::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* Tarjetas de transacciones */
.transaction-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.transaction-card:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.transaction-card.sale {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, #f1f8e9, #e8f5e8);
}

.transaction-card.donation {
    border-left-color: #FF9800;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.transaction-type {
    font-weight: 700;
    font-size: 1.1em;
}

.transaction-type.sale {
    color: #4CAF50;
}

.transaction-type.donation {
    color: #FF9800;
}

.transaction-date {
    color: #666;
    font-size: 0.9em;
}

.transaction-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.transaction-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.transaction-detail-label {
    font-size: 0.8em;
    color: #666;
    font-weight: 600;
}

.transaction-detail-value {
    font-weight: 700;
    color: var(--dark-color);
}

.transaction-customer {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
}

/* Modal de inventario */
.inventory-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.inventory-section h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.inventory-item-detail {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.inventory-item-detail h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.volume-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.volume-info:last-child {
    margin-bottom: 0;
}

.volume-label {
    font-weight: 600;
    color: var(--dark-color);
}

.volume-value {
    font-weight: 700;
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e0e0e0;
}

.stat-icon {
    font-size: 1.5em;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
}

.stat-value {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1.1em;
}

/* Responsive para módulo de despachos */
@media (max-width: 768px) {
    .compost-sales-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sales-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .sales-controls .btn {
        width: 100%;
        text-align: center;
    }
    
    .inventory-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .transaction-details {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   MODAL DE PILA EXISTENTE
   ========================================== */

.form-help {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.existing-pile-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
}

.existing-pile-preview h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}

.preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.preview-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.preview-stat:last-child {
    border-bottom: none;
}

.preview-stat-label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9em;
}

.preview-stat-value {
    font-weight: 700;
    color: var(--primary-color);
}

.week-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    color: #856404;
    font-size: 0.9em;
}

.week-warning .warning-icon {
    font-weight: bold;
    margin-right: 5px;
}

/* ==========================================
   DEXTER - MASCOTA IA
   ========================================== */

#dexter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 240px;
    height: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: dexterFloat 3s ease-in-out infinite;
}

.dexter-leaf {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ff8c00, #d2691e);
    border-radius: 50% 30% 50% 30%;
    position: relative;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    clip-path: polygon(50% 0%, 70% 15%, 85% 30%, 90% 50%, 85% 70%, 70% 85%, 50% 95%, 30% 85%, 15% 70%, 10% 50%, 15% 30%, 30% 15%);
    transition: all 0.3s ease;
}

.dexter-veins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.vein {
    position: absolute;
    background: linear-gradient(180deg, #8b4513, #a0522d);
    border-radius: 2px;
}

.vein.central {
    top: 15%;
    left: 48%;
    width: 4px;
    height: 70%;
    border-radius: 2px;
}

.vein.left-1 {
    top: 25%;
    left: 25%;
    width: 2px;
    height: 20%;
    transform: rotate(-25deg);
    border-radius: 1px;
}

.vein.left-2 {
    top: 40%;
    left: 20%;
    width: 2px;
    height: 25%;
    transform: rotate(-15deg);
    border-radius: 1px;
}

.vein.right-1 {
    top: 25%;
    right: 25%;
    width: 2px;
    height: 20%;
    transform: rotate(25deg);
    border-radius: 1px;
}

.vein.right-2 {
    top: 40%;
    right: 20%;
    width: 2px;
    height: 25%;
    transform: rotate(15deg);
    border-radius: 1px;
}

.dexter-eyebrows {
    position: absolute;
    top: 35%; /* Posicionadas arriba de los ojos */
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 30px;
    z-index: 3;
}

.dexter-eyebrow {
    width: 25px;
    height: 4px;
    background: #8b4513;
    border-radius: 50px;
    position: relative;
    transition: all 0.3s ease-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.dexter-eyebrow.left {
    transform: rotate(-15deg) translateY(-1px);
}

.dexter-eyebrow.right {
    transform: rotate(15deg) translateY(-1px);
}

.dexter-eyes {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 30px;
    z-index: 2;
}

.dexter-eye {
    width: 40px;
    height: 40px;
    background: #000;
    border-radius: 50%;
    border: 3px solid #fff;
    position: relative;
    animation: dexterBlink 4s infinite;
    box-shadow: 0 0 0 2px #000;
}

.eye-highlight {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.1s ease-out;
}

.eye-highlight.large {
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
}

.eye-highlight.small {
    top: 12px;
    right: 12px;
    width: 6px;
    height: 6px;
}

.dexter-mouth {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 3px;
    background: #000;
    border-radius: 50px;
    margin-top: 50px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.3s ease-out;
}

.dexter-notification {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 36px;
    height: 36px;
    background: #ff4444;
    border-radius: 50%;
    border: 6px solid #fff;
    z-index: 3;
}

.dexter-notification::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
}

#dexter:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 12px 35px rgba(255, 107, 53, 0.6));
}

#dexter:hover .dexter-leaf {
    background: linear-gradient(135deg, #ff8c00, #ff6b35, #f7931e, #d2691e);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.6);
}


@keyframes dexterFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(1deg); }
    50% { transform: translateY(-8px) rotate(0deg); }
    75% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes dexterBlink {
    0%, 90%, 100% { 
        transform: scaleY(1);
        border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    }
    95% { 
        transform: scaleY(0.1);
        border-radius: 50% 50% 50% 50% / 10% 10% 90% 90%;
    }
}

@keyframes dexterEyeMove {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(0, 0); }
    75% { transform: translate(-1px, 1px); }
}

/* Chat de DEXTER */
.dexter-chat-modal {
    max-width: 500px;
    height: 600px;
    display: flex;
    flex-direction: column;
}

.dexter-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dexter-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
    max-height: 400px;
}

.dexter-message {
    margin-bottom: 15px;
    animation: messageSlide 0.3s ease-out;
}

.dexter-message.user {
    text-align: right;
}

.dexter-message.dexter {
    text-align: left;
}

.dexter-message-content {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.dexter-message.user .dexter-message-content {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom-right-radius: 4px;
}

.dexter-message.dexter .dexter-message-content {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border-bottom-left-radius: 4px;
}

.dexter-chat-input {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.dexter-chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.dexter-chat-input input:focus {
    border-color: #28a745;
}

.dexter-chat-input button {
    padding: 12px 20px;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dexter-chat-input button:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    transform: translateY(-1px);
}

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

/* Estilos para el formulario de eliminación de compost */
.elimination-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.elimination-form .form-group {
    margin-bottom: 15px;
}

.elimination-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.elimination-form .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.elimination-form .form-control:focus {
    border-color: #dc3545;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.elimination-form .form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.elimination-form .form-actions {
    margin-top: 20px;
    text-align: center;
}

.elimination-form .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.elimination-form .btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}


