.production-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    color: #222;
}

.production-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    background: #f7f3ec;
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 24px;
}

.production-hero h1 {
    margin: 4px 0 8px;
    font-size: clamp(2rem, 4vw, 4rem);
}

.eyebrow {
    color: #AC0E12;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 700;
    font-size: .78rem;
}

.production-card {
    background: #fff;
    border: 1px solid #e7e0d6;
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

.production-btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    background: #AC0E12;
    color: #fff !important;
    font-weight: 700;
    padding: 12px 20px;
    text-decoration: none;
    cursor: pointer;
}

.production-link {
    margin-left: 12px;
}

.production-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.production-grid label,
.production-card label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.production-card input,
.production-card select,
.production-card textarea {
    border: 1px solid #d7d0c7;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}

.production-card textarea {
    min-height: 90px;
}

.production-note {
    color: #666;
}

.production-alert {
    background: #fff1cc;
    color: #7a4c00;
    border: 1px solid #ead9a4;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-weight: 700;
}

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

.production-table th {
    background: #AC0E12;
    color: #fff;
    text-align: left;
    padding: 11px 12px;
}

.production-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eee;
}

.production-table tbody tr:nth-child(even) {
    background: #f7f7f7;
}

.pill,
.status-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    padding: 8px 12px;
}

.status-box {
    min-width: 180px;
    min-height: 58px;
    font-size: 1.1rem;
}

.ready,
.pill.ready {
    background: #d8ead0;
    color: #244b20;
}

.drying,
.pill.drying {
    background: #fff1cc;
    color: #7a4c00;
}

.done,
.pill.done {
    background: #e8e8e8;
    color: #333;
}

.production-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.production-stats div {
    background: #fff;
    border: 1px solid #e7e0d6;
    border-radius: 16px;
    padding: 18px;
}

.production-stats strong {
    display: block;
    color: #AC0E12;
    margin-bottom: 6px;
}

.production-timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.timeline-time {
    color: #666;
    font-weight: 700;
}

.timeline-body {
    border-left: 4px solid #AC0E12;
    padding-left: 14px;
}

.timeline-type {
    font-weight: 800;
    color: #AC0E12;
    margin-bottom: 4px;
}

.timeline-weight {
    font-size: 1.25rem;
    font-weight: 800;
}

.timeline-change {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    font-size: .95rem;
    font-weight: 600;
}

.timeline-notes {
    white-space: pre-wrap;
    line-height: 1.5;
}

.production-checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}

    .production-checkbox input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin: 0;
        flex-shrink: 0;
    }

.production-card form .production-btn {
    margin-top: 20px;
}

.production-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

    .production-summary-grid div {
        background: #f7f7f7;
        border: 1px solid #e3e3e3;
        border-radius: 12px;
        padding: 16px;
    }

    .production-summary-grid strong,
    .production-summary-notes strong {
        display: block;
        color: #AC0E12;
        margin-bottom: 6px;
    }

.production-summary-notes {
    border-top: 1px solid #eee;
    padding-top: 18px;
}

    .production-summary-notes p {
        margin: 0;
        line-height: 1.6;
        white-space: pre-wrap;
    }

.drying-stage-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.drying-stage-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid #e1d7cc;
    border-radius: 14px;
    background: #fffdf9;
}

    .drying-stage-row legend {
        padding: 0 .5rem;
        font-size: 1.2rem;
        font-weight: 700;
    }

    .drying-stage-row label {
        display: grid;
        gap: .45rem;
        margin: 0;
        font-weight: 700;
    }

.drying-input-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    overflow: hidden;
    border: 1px solid #d8cec4;
    border-radius: 12px;
    background: #fff;
}

    .drying-input-wrap input {
        width: 100%;
        min-width: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

        .drying-input-wrap input:focus {
            outline: none;
            box-shadow: inset 0 0 0 2px rgba(172, 14, 18, .18);
        }

.drying-unit {
    padding: 0 .9rem;
    color: #685f57;
    font-weight: 600;
    white-space: nowrap;
}

.drying-until-stable {
    align-self: end;
    padding: .85rem 0;
    color: #685f57;
    font-style: italic;
}

.timeline-time {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

    .timeline-time small {
        color: #AC0E12;
        font-weight: 700;
    }

.weight-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 1.5rem;
}

    .weight-summary > div {
        padding: 1rem 1.25rem;
        border: 1px solid #e3d7c9;
        border-radius: 14px;
        background: #fffdf9;
    }

    .weight-summary span {
        display: block;
        margin-bottom: 0.25rem;
        color: #6b625b;
        font-size: 0.9rem;
    }

    .weight-summary strong {
        display: block;
        font-size: 1.35rem;
    }

    .weight-summary small {
        font-size: 0.85em;
        font-weight: 600;
        color: #6b625b;
    }

.weight-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weight-summary-status {
    border-left: 5px solid #b8b1aa;
}

    .weight-summary-status small {
        display: block;
        margin-top: 0.3rem;
        font-size: 0.8rem;
        font-weight: 700;
    }

    .weight-summary-status.active {
        border-left-color: #3f6f9f;
        background: #f3f7fb;
    }

    .weight-summary-status.slowing {
        border-left-color: #c17a20;
        background: #fff8ed;
    }

    .weight-summary-status.stable {
        border-left-color: #3f7d4b;
        background: #f1f8f2;
    }

    .weight-summary-status.increased {
        border-left-color: #ac0e12;
        background: #fff3f3;
    }

.last-change-card {
    border: 5px solid #d8d2c8;
    border-radius: 16px;
}

    .last-change-card.active {
        border-color: #2E86DE;
    }

    .last-change-card.slowing {
        border-color: #F39C12;
    }

    .last-change-card.stable {
        border-color: #27AE60;
    }

    .last-change-card.warning {
        border-color: #C0392B;
    }

.collapsible-card {
    padding: 0;
    overflow: hidden;
}

    .collapsible-card > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1.5rem 2rem;
        cursor: pointer;
        list-style: none;
    }

        .collapsible-card > summary::-webkit-details-marker {
            display: none;
        }

        .collapsible-card > summary span:first-child {
            font-family: inherit;
            font-size: clamp(2rem, 4vw, 3.5rem);
            font-weight: 700;
            line-height: 1;
        }

        .collapsible-card > summary::after {
            content: "+";
            flex: 0 0 auto;
            color: #ac0e12;
            font-size: 2rem;
            font-weight: 700;
            line-height: 1;
        }

    .collapsible-card[open] > summary::after {
        content: "-";
    }

.collapse-hint {
    margin-left: auto;
    color: #6b625b;
    font-size: 0.95rem;
    font-weight: 600;
}

.collapsible-content {
    padding: 0 2rem 2rem;
    border-top: 1px solid #eadfd3;
}

@media (max-width: 700px) {
    .collapsible-card > summary {
        padding: 1.25rem;
    }

    .collapsible-content {
        padding: 0 1.25rem 1.25rem;
    }

    .collapse-hint {
        display: none;
    }
}

@media (max-width: 760px) {
    .production-hero,
    .production-grid,
    .production-stats,
    .timeline-item {
        grid-template-columns: 1fr;
        display: grid;
    }

    .timeline-item {
        gap: 6px;
    }

    .production-summary-grid {
        grid-template-columns: 1fr;
    }

    .weight-summary {
        grid-template-columns: 1fr;
    }

    .drying-stage-row {
        grid-template-columns: 1fr;
    }

    .drying-until-stable {
        padding-top: 0;
    }
}

@media (max-width: 900px) {
    .weight-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .weight-summary {
        grid-template-columns: 1fr;
    }
}

.production-alert-success {
    background: #e5f2df;
    color: #244b20;
    border-color: #bfd5b7;
}

.timeline-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.timeline-edit-toggle,
.timeline-cancel-btn {
    border: 0;
    background: transparent;
    color: #AC0E12;
    font: inherit;
    font-weight: 700;
    padding: .25rem 0;
    cursor: pointer;
}

.timeline-edit-toggle:hover,
.timeline-cancel-btn:hover {
    text-decoration: underline;
}

.timeline-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    margin-top: .35rem;
    color: #666;
    font-size: .9rem;
    font-weight: 600;
}

.timeline-edit-form {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e3d7c9;
    border-radius: 12px;
    background: #fffdf9;
}

.timeline-edit-form[hidden] {
    display: none;
}

.timeline-edit-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timeline-edit-form .production-btn {
    margin-top: 1rem;
}

.timeline-edit-form .timeline-cancel-btn {
    margin-top: 1rem;
}
