/* ============================================
   My Eco House - Styles Administration
   ============================================ */

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 50%, var(--secondary) 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo span {
    font-size: 3rem;
    display: block;
    margin-bottom: 8px;
}

.login-logo h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--primary-dark);
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
}

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

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group .form-row {
    display: flex;
    gap: 12px;
}

.form-group .form-row > * {
    flex: 1;
}

.form-error {
    background: #FFEBEE;
    color: var(--danger);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.form-success {
    background: #E8F5E9;
    color: var(--success);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.form-check label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ============================================
   Admin Layout
   ============================================ */

.admin-body {
    background: #F5F0EB;
}

.admin-app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 200;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header .logo-icon {
    font-size: 1.8rem;
}

.sidebar-header strong {
    display: block;
    font-size: 0.95rem;
}

.sidebar-header small {
    font-size: 0.75rem;
    opacity: 0.6;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
    transition: var(--transition);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.admin-section {
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   Dashboard
   ============================================ */

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

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
}

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

.recent-recipes h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--primary-dark);
}

/* ============================================
   Admin Tables
   ============================================ */

.admin-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-search, .input-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: var(--bg-card);
    color: var(--text);
    transition: var(--transition);
}

.input-search {
    flex: 1;
    min-width: 200px;
}

.input-search:focus, .input-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,69,19,0.1);
}

.admin-table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow-x: auto;
    box-shadow: var(--shadow);
}

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

.admin-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    background: #FAFAF7;
}

.admin-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px;
    transition: color 0.2s, background 0.2s;
}

.admin-table th.sortable:hover {
    color: var(--primary-dark);
    background: #f3efe6;
}

.admin-table th.sortable .sort-icon::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    opacity: 0.3;
}

.admin-table th.sortable.sort-asc .sort-icon::after {
    content: '▲';
    opacity: 0.8;
    color: var(--primary);
}

.admin-table th.sortable.sort-desc .sort-icon::after {
    content: '▼';
    opacity: 0.8;
    color: var(--primary);
}

.table-count {
    text-align: right;
    padding: 8px 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

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

.admin-table tr:hover td {
    background: #FAFAF7;
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-active {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-inactive {
    background: #FFEBEE;
    color: #C62828;
}

.badge-allergen {
    background: #FFF3E0;
    color: #E65100;
}

/* ============================================
   Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary-dark);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   Ingredient lines in recipe form
   ============================================ */

.ingredient-line {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    padding: 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.ingredient-line select,
.ingredient-line input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    background: white;
}

.ingredient-line select {
    flex: 2;
}

.ingredient-line input[type="number"] {
    width: 80px;
    flex: 0 0 auto;
}

.ingredient-line .unite-select {
    flex: 1;
}

.ingredient-line .btn-remove-ing {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border: none;
    background: #FFEBEE;
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ingredient-line .btn-remove-ing:hover {
    background: var(--danger);
    color: white;
}

.btn-add-ingredient {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: var(--transition);
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

.btn-add-ingredient:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #FFF8F0;
}

/* ============================================
   Product lines in recipe form
   ============================================ */

.product-headers {
    display: flex;
    gap: 8px;
    padding: 0 10px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-headers .ph-nom   { flex: 2; min-width: 0; }
.product-headers .ph-poids { width: 110px; flex: 0 0 auto; text-align: center; }
.product-headers .ph-qty   { width: 100px; flex: 0 0 auto; text-align: center; }
.product-headers .ph-star  { width: 50px; flex: 0 0 auto; text-align: center; }
.product-headers .ph-del   { width: 32px; flex: 0 0 auto; }

.product-line {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    padding: 10px;
    background: #FFF8F0;
    border-radius: var(--radius-sm);
    border: 1px solid #F0D9B5;
}

.product-line input[type="text"],
.product-line input[type="number"] {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    background: white;
}

.product-line .pl-nom {
    flex: 2;
    min-width: 0;
}

.product-line .pl-poids {
    width: 110px;
    flex: 0 0 auto;
    text-align: right;
}

.product-line .pl-qty {
    width: 100px;
    flex: 0 0 auto;
    text-align: right;
}

.product-line .pl-principal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.85rem;
    width: 50px;
    flex: 0 0 auto;
    cursor: pointer;
}

@media (max-width: 900px) {
    .product-headers {
        display: none;
    }
    .product-line {
        flex-wrap: wrap;
    }
    .product-line .pl-nom {
        flex: 1 1 100%;
    }
    .product-line .pl-poids,
    .product-line .pl-qty {
        flex: 1;
        width: auto;
    }
}

/* ============================================
   Toast notification
   ============================================ */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.9rem;
    font-family: var(--font-body);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    animation: slideUp 0.3s ease;
    max-width: 400px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }

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

/* ============================================
   Mobile responsive admin
   ============================================ */

.admin-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 300;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 900px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
        padding: 20px;
    }

    .admin-sidebar-toggle {
        display: flex;
    }

    .modal-content {
        max-width: 95%;
    }

    .ingredient-line {
        flex-wrap: wrap;
    }

    .ingredient-line select {
        flex: 1 1 100%;
    }
}

/* ============================================
   Paramètres - Settings cards
   ============================================ */

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.settings-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

.badge-role-admin {
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-role-cuisinier {
    background: var(--accent);
    color: var(--text);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ============================================
   Production de la semaine
   ============================================ */

.production-week-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.production-week-nav .btn {
    min-width: 40px;
    padding: 6px 12px;
}

#productionWeekLabel {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.production-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.production-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.production-day {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    min-height: 160px;
    min-width: 0;
    overflow: hidden;
}

.production-day.today {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(181, 131, 45, 0.15);
}

.production-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    gap: 4px;
}

.day-check {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    min-width: 0;
}

.day-check strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-check input[type="checkbox"] {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.day-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.production-day-items {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 350px;
}

.production-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.78rem;
    gap: 4px;
    min-width: 0;
    position: relative;
}

.prod-item-info {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    padding-right: 18px;
}

.prod-item-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.prod-item-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prod-item-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.prod-item-qty {
    width: 48px;
    padding: 2px 3px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
    background: #fff;
}

.prod-item-unite {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.prod-item-del {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    position: absolute;
    top: 3px;
    right: 3px;
}

.prod-item-del:hover {
    background: rgba(220, 53, 69, 0.1);
}

.btn-add-production {
    display: block;
    width: calc(100% - 16px);
    margin: 0 8px 8px;
    padding: 6px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.btn-add-production:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(181, 131, 45, 0.05);
}

/* Commande / Bon de commande */

.commande-zone {
    margin-top: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.commande-zone h3 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.commande-fournisseur {
    margin-bottom: 24px;
}

.commande-fourn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.commande-fourn-header h4 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-size: 1.05rem;
    margin: 0;
}

.commande-table {
    font-size: 0.88rem;
}

.commande-table .commande-qty {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.commande-line-total {
    font-weight: 600;
    white-space: nowrap;
}

.detail-recettes {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 4px 8px;
    background: var(--bg-light);
    border-radius: 4px;
}

/* ============================================
   Bons de commande - Section dédiée
   ============================================ */

/* Badges statut */
.commande-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-brouillon {
    background: #f0f0f0;
    color: #666;
}

.badge-validee {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-envoyee {
    background: #e3f2fd;
    color: #1565c0;
}

/* Boutons d'action */
.action-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.btn-danger {
    background: #e53935;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
}

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

/* Zone détail commande */
.commande-detail-zone {
    margin-top: 24px;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 24px;
    animation: slideDown 0.3s ease;
}

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

.commande-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.commande-detail-header h3 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    margin: 0;
}

.commande-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Table d'édition commande */
.commande-edit-table {
    font-size: 0.88rem;
}

.commande-edit-table .cmd-edit-qty,
.commande-edit-table .cmd-edit-prix {
    width: 90px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

.commande-edit-table .cmd-edit-prix {
    width: 100px;
}

.cmd-line-total {
    font-weight: 600;
    white-space: nowrap;
}

/* Date de modification prix */
.prix-date-info {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    margin-top: 2px;
}

.commande-date-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 6px 0;
}

/* Création commande - lignes dans le modal */
.cmd-ligne-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.cmd-ligne-row select {
    flex: 2;
    min-width: 150px;
}

.cmd-ligne-row input[type="number"],
.cmd-ligne-row input[type="text"] {
    flex: 1;
    min-width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.cmd-ligne-row .cmd-ligne-del {
    flex-shrink: 0;
}

/* Form row pour SMTP */
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 180px;
}

/* Masquer les dates prix à l'impression */
@media print {
    .no-print,
    .prix-date-info {
        display: none !important;
    }
}

.btn-detail-recettes {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px;
    vertical-align: middle;
}

.btn-sm {
    font-size: 0.82rem;
    padding: 5px 12px;
}

/* Production - Responsive Mobile */

@media (max-width: 1100px) {
    .production-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .production-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .production-week-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .production-toolbar {
        justify-content: center;
    }

    .commande-table th:nth-child(2),
    .commande-table td:nth-child(2) {
        display: none;
    }
}

@media (max-width: 480px) {
    .production-grid {
        grid-template-columns: 1fr;
    }

    .commande-fourn-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Multi-produit dans le modal production */

.prod-multi-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 6px;
    background: var(--bg-light);
}

.prod-multi-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prod-multi-poids {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.prod-multi-qty {
    width: 70px;
    padding: 5px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.prod-multi-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Détails sous-produits dans la grille production */

.production-item.multi .prod-item-info {
    width: 100%;
}

.prod-item-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.prod-detail-tag {
    font-size: 0.7rem;
    background: rgba(181, 131, 45, 0.1);
    color: var(--primary-dark);
    padding: 1px 5px;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
