/* Stili personalizzati Pasta della Torre */

/* Calendario produzione */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    min-height: 60px;
}

.calendar-day.production {
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
    cursor: pointer;
}

.calendar-day.production.closed {
    background: var(--pico-secondary-background);
}

.calendar-day.production.in_production {
    background: #f0ad4e;
    color: #fff;
}

.calendar-day.production.completed {
    background: #5cb85c;
    color: #fff;
}

.calendar-day.today {
    border: 2px solid var(--pico-primary);
}

.calendar-day .badge {
    font-size: 0.7em;
    display: block;
}

/* Matrice produzione */
.production-matrix {
    overflow-x: auto;
}

.production-matrix table {
    font-size: 0.85em;
}

.production-matrix th {
    position: sticky;
    top: 0;
    background: var(--pico-background-color);
}

.production-matrix td.qty {
    text-align: center;
    font-weight: bold;
}

.production-matrix td.total {
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
    font-weight: bold;
}

/* Form ordini */
.product-row {
    display: grid;
    grid-template-columns: 1fr 120px;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.product-row .product-name {
    font-weight: 500;
}

.product-row .product-category {
    font-size: 0.8em;
    color: var(--pico-muted-color);
}

.product-row input[type="number"] {
    width: 120px;
    text-align: center;
    margin: 0;
}

/* Pesatura */
.weight-display {
    font-size: 3em;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    font-family: monospace;
}

.weight-display.under {
    background: #f8d7da;
    color: #721c24;
}

.weight-display.ok {
    background: #d4edda;
    color: #155724;
}

.weight-display.over {
    background: #f8d7da;
    color: #721c24;
}

/* Stato ordine */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.status-badge.scheduled { background: #e2e3e5; color: #383d41; }
.status-badge.open { background: #d4edda; color: #155724; }
.status-badge.closed { background: #f8d7da; color: #721c24; }
.status-badge.confirmed { background: #d4edda; color: #155724; }
.status-badge.modified { background: #fff3cd; color: #856404; }
.status-badge.cancelled { background: #f8d7da; color: #721c24; }
.status-badge.pending { background: #e2e3e5; color: #383d41; }
.status-badge.sent { background: #cce5ff; color: #004085; }

/* Notifica AXC */
.axc-alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

/* Stampa */
@media print {
    header, footer, nav, button, .no-print { display: none !important; }
    main { padding: 0 !important; }
    .production-matrix table { font-size: 0.75em; }
}
