
/* Thai Font and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, #f5f5dc 0%, #faf0e6 50%, #fff8dc 100%);
    min-height: 100vh;
    color: #000;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    text-align: center;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-title {
    text-align: left;
}

.header-title h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.header-title p {
    margin: 0.5rem 0 0 0;
    font-size: 1.2em;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-logout {
    background: #DC3545 !important;
    color: white !important;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #C82333 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.5);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 5px;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.tab-btn:hover {
    background: #fff3cd;
    color: #000;
}

.tab-btn.active {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    color: #000;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.card h3 {
    color: #000;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Search Container */
.search-container {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #FFD700;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Prompt', sans-serif;
    background: #fafafa;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #FFA500;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    background: white;
}

.search-box input::placeholder {
    color: #666;
    font-style: italic;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Production Planning */
.production-planning {
    grid-column: 1 / -1;
}

.production-form, .calculator-form {
    background: #fff9c4;
    padding: 20px;
    border-radius: 10px;
    border: 2px dashed #ffd700;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Prompt', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Info and Warning Boxes */
.info-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-box h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 1.1rem;
}

.info-box p {
    margin: 8px 0;
    color: #0d47a1;
    line-height: 1.5;
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0, #ffcc02);
    border: 1px solid #ff9800;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.warning-box p {
    margin: 0;
    color: #e65100;
    font-weight: 500;
    line-height: 1.5;
}

.form-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
    display: block;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: #000;
    color: white;
}

.btn-secondary:hover {
    background: #333;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table th {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    color: #000;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e5e7eb;
}

table tbody tr:hover {
    background: #fff9c4;
}

/* Recipe List in Ingredients Table */
.recipe-list {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
    line-height: 1.3;
    margin-top: 4px;
    display: block;
}

.recipe-list.text-muted {
    color: #9ca3af;
}

/* Ingredient Usage Indicator */
.ingredient-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.usage-indicator {
    position: relative;
    flex-shrink: 0;
}

.usage-circle {
    position: relative;
    display: inline-block;
}

.usage-circle svg {
    transform: rotate(-90deg);
}

.usage-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    font-weight: bold;
    color: #374151;
    text-align: center;
    line-height: 1;
}

.ingredient-info {
    flex: 1;
    min-width: 0;
}

/* Status Indicators */
.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    min-width: 80px;
}

.status-good {
    background: #d1fae5;
    color: #065f46;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.status-available {
    background: #d1fae5;
    color: #065f46;
}

.status-shortage {
    background: #fee2e2;
    color: #991b1b;
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-good {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-warning {
    background: linear-gradient(90deg, #ffd700, #ffeb3b);
}

.progress-danger {
    background: linear-gradient(90deg, #000, #333);
}

/* Stock Item */
.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #fff9c4;
    border-radius: 10px;
    border-left: 4px solid #ffd700;
}

.stock-item.warning {
    border-left-color: #ffd700;
    background: #fffbeb;
}

.stock-item.danger {
    border-left-color: #000;
    background: #f5f5f5;
}

.stock-info {
    flex: 1;
}

.stock-name {
    font-weight: 600;
    color: #000;
    margin-bottom: 5px;
}

.stock-details {
    font-size: 0.9rem;
    color: #333;
}

.stock-level {
    text-align: right;
    min-width: 100px;
}

.stock-amount {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Calculation Results */
.calculation-results {
    margin-top: 20px;
}

.calculation-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    color: #000;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
}

.calculation-table {
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.calculation-summary {
    background: #fff9c4;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cost-info {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
}

.production-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Recipe Details Modal */
.recipe-details {
    color: #000;
}

.recipe-details .detail-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.recipe-details .detail-header h4 {
    color: #000;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.recipe-details .detail-header p {
    color: #374151;
    margin: 5px 0;
    font-size: 0.95rem;
}

.recipe-ingredients {
    margin-top: 20px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.recipe-ingredients h5 {
    color: #000 !important;
    font-size: 1.2rem !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
    display: block !important;
    visibility: visible !important;
}

.recipe-ingredients table {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    overflow: visible !important;
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    border-collapse: collapse !important;
    position: static !important;
    z-index: auto !important;
}

.recipe-ingredients table th {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%) !important;
    color: #000 !important;
    font-weight: 600 !important;
    padding: 12px !important;
    text-align: left !important;
    border-bottom: 2px solid #e5e7eb !important;
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.recipe-ingredients table td {
    color: #000 !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: white !important;
    font-size: 0.9rem !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: table-cell !important;
    font-weight: normal !important;
    text-decoration: none !important;
    line-height: 1.5 !important;
    position: static !important;
    z-index: auto !important;
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
    max-width: none !important;
    min-height: auto !important;
    min-width: auto !important;
}

.recipe-ingredients table tbody tr {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: white !important;
    position: static !important;
    z-index: auto !important;
    height: auto !important;
    overflow: visible !important;
}

.recipe-ingredients table tbody tr:nth-child(even) {
    background: #f9fafb !important;
}

.recipe-ingredients table tbody tr:hover {
    background: #fff9c4 !important;
}

.recipe-ingredients table tbody tr:nth-child(even):hover {
    background: #fff9c4 !important;
}

.recipe-ingredients table tbody {
    display: table-row-group !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    z-index: auto !important;
}

.recipe-ingredients table thead {
    display: table-header-group !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.recipe-ingredients table thead tr {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force visibility for modal content */
#recipeDetailsModal .modal-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#recipeDetailsModal .modal-body {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#recipeDetailsModal .recipe-details {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any global styles that might interfere */
#recipeDetailsModal * {
    position: static !important;
    z-index: auto !important;
}

#recipeDetailsModal table,
#recipeDetailsModal tbody,
#recipeDetailsModal thead,
#recipeDetailsModal tr,
#recipeDetailsModal td,
#recipeDetailsModal th {
    display: revert !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
    position: static !important;
}

/* Calculation Results Modal */
.calculation-summary {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.calculation-summary h4 {
    margin: 0 0 8px 0;
    color: #065f46;
    font-size: 1.1rem;
}

.calculation-summary p {
    margin: 0;
    color: #047857;
    font-weight: 500;
}

.results-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    color: #000;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.results-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.results-table tbody tr:hover {
    background: #fff9c4;
}

.recipes-cell {
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 200px;
}

.recipes-cell strong {
    color: #374151;
}

/* Activity Items */
.activity-item {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.activity-info {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #000;
    margin-bottom: 5px;
}

.activity-details {
    font-size: 0.9rem;
    color: #333;
}

.activity-time {
    font-size: 0.85rem;
    color: #9ca3af;
    text-align: right;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
}

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

.modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffeb3b 100%);
    color: #000;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 25px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Recipe Ingredients */
.ingredient-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff9c4;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ingredient-select {
    flex: 2;
}

.ingredient-quantity {
    flex: 1;
}

/* Tab Header */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    color: #000;
}

.tab-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.5);
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e5e7eb;
    border-top: 5px solid #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
}

.toast {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from { 
        opacity: 0; 
        transform: translateX(100%); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #000;
}

.toast.warning {
    border-left-color: #ffd700;
}

.toast.info {
    border-left-color: #ffd700;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.toast-message {
    font-size: 0.9rem;
    color: #6b7280;
}

.toast-close {
    cursor: pointer;
    opacity: 0.5;
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.toast-close:hover {
    opacity: 1;
}

/* Recipe Status */
.recipe-disabled {
    opacity: 0.6;
    background-color: #f8f9fa !important;
}

.recipe-disabled:hover {
    background-color: #e9ecef !important;
}

.recipe-disabled td {
    color: #6c757d;
}

/* Usage indicator styles */

/* Recipe Selection for Minimum Calculation */
.recipe-selection-header {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: flex-end;
}

.recipe-selection-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #f9fafb;
}

.recipe-selection-item {
    margin-bottom: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.recipe-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-height: 50px;
}

.recipe-header:hover {
    background: #e9ecef;
}

.recipe-checkbox {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    min-width: 18px;
    min-height: 18px;
    accent-color: #ffd700;
    cursor: pointer;
    margin: 0 !important;
    flex-shrink: 0;
    flex-grow: 0;
}

.recipe-name {
    flex: 1;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
    word-wrap: break-word;
    line-height: 1.3;
    padding-right: 10px;
    overflow: visible;
}

.expand-icon {
    font-size: 14px;
    color: #6b7280;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    flex-grow: 0;
    width: 20px;
    text-align: center;
}

.recipe-ingredients {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Fix for modal display - override the collapsed state when in modal */
.modal .recipe-ingredients {
    max-height: none !important;
    overflow: visible !important;
}

.ingredients-edit-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
}

.ingredient-edit-row {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.ingredient-edit-row:last-child {
    border-bottom: none;
}

.ingredient-edit-row:nth-child(even) {
    background: #f5f5f5;
}

.ingredient-name {
    flex: 1;
    font-weight: 500;
    margin-right: 15px;
    color: #333;
}

.ingredient-values {
    display: flex;
    align-items: center;
    gap: 20px;
}

.value-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.value-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
}

.old-value {
    padding: 6px 12px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    min-width: 70px;
    text-align: center;
    font-weight: 500;
}

.new-value-input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.new-value-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.recipe-ingredients.expanded {
    max-height: 300px;
    overflow-y: auto;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-top: 1px solid #f1f3f4;
    background: white;
    min-height: 40px;
}

.ingredient-item:hover {
    background: #f8f9fa;
}

.ingredient-checkbox {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px;
    max-height: 16px;
    min-width: 16px;
    min-height: 16px;
    accent-color: #10b981;
    cursor: pointer;
    margin: 0 !important;
    flex-shrink: 0;
    flex-grow: 0;
}

.ingredient-name {
    flex: 1;
    font-size: 0.85rem;
    color: #4b5563;
    word-wrap: break-word;
    line-height: 1.2;
    overflow: visible;
}

.ingredient-quantity {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    flex-shrink: 0;
    flex-grow: 0;
    text-align: right;
    min-width: 70px;
}

/* Recipe Selection Checkbox Styling */
.recipe-checkbox:checked + .recipe-name {
    color: #059669;
}

.ingredient-checkbox:checked + .ingredient-name {
    color: #065f46;
    font-weight: 500;
}

/* Override any global checkbox styles that might interfere */
.recipe-selection-list input[type="checkbox"] {
    transform: none !important;
    position: static !important;
    opacity: 1 !important;
}

/* Calculation Results Modal */
