*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;background:#f5f5f5;color:#333;line-height:1.6;padding:20px}.container{max-width:1400px;margin:0 auto}header{background:#fff;padding:20px 30px;margin-bottom:20px;border:1px solid #ddd;display:flex;justify-content:space-between;align-items:center}.header-left{flex:1;display:flex;align-items:center;gap:14px}.header-brand-logo{height:65px;width:auto;object-fit:contain;flex-shrink:0}.header-title-wrap{min-width:0}.header-right{display:flex;align-items:center;gap:20px;justify-content:flex-end;padding-right:15px}.header-logo{height:40px;width:auto;object-fit:contain}.header-logo[src*=wsava]{margin-top:-4px}.page-footer{margin-top:32px;padding:20px 30px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}.page-footer-logos{display:flex;align-items:center;gap:20px}.page-footer-logo-link{display:inline-flex;align-items:center;text-decoration:none}.page-footer-logo{height:36px;width:auto;object-fit:contain}.page-footer-icp{font-size:12px;color:#888;width:100%;text-align:center;margin-top:4px}.page-footer-icp a{color:#888;text-decoration:none}.page-footer-icp a:hover{text-decoration:underline}.header-left h1{font-size:26px;font-weight:700;color:#1a252f;letter-spacing:-.02em;margin-bottom:4px;line-height:1.25}.header-left .subtitle{font-size:13px;color:#5c6b73;line-height:1.4;font-weight:400}.db-selector{width:100%;min-width:0;padding:8px 12px;border:1px solid #ddd;border-radius:0;background:#fff;color:#333;font-size:14px;cursor:pointer;transition:all .2s;box-sizing:border-box}.db-selector:hover{border-color:#2c3e50}.db-selector:focus{outline:0;border-color:#3498db;box-shadow:0 0 0 2px rgba(52,152,219,.1)}.main-content{display:flex;flex-direction:column;gap:20px;max-width:1400px;margin:0 auto}.top-section{display:grid;grid-template-columns:600px 1fr;gap:20px;align-items:stretch}.food-recipe-card{display:flex;flex-direction:column;width:100%;min-width:0;overflow:hidden}.food-recipe-content{display:grid;grid-template-columns:350px 1fr;gap:20px;flex:1;overflow:hidden;align-items:stretch}.food-pie-chart-wrapper{height:100%;overflow:hidden;border:1px solid #e0e0e0;background:#f8f9fa;padding:10px}.food-pie-chart-container{background:0 0;border:none;border-radius:0;padding:0;height:100%;display:flex;flex-direction:column}.food-stacked-chart-wrapper{width:100%;border:1px solid #e0e0e0;background:#f8f9fa;padding:10px;margin-top:20px}.food-stacked-chart-container{background:0 0;border:none;border-radius:0;padding:0;width:100%;display:flex;flex-direction:column}.food-pie-chart-title,.food-stacked-chart-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.food-stacked-chart-title{font-size:12px;font-weight:600;color:#333}.food-stacked-chart-filter-wrap{position:relative}.btn-stacked-filter{padding:4px 10px;font-size:12px;border:1px solid #ccc;background:#fff;color:#555;cursor:pointer;border-radius:4px}.btn-stacked-filter:hover{border-color:#3498db;color:#3498db}.stacked-chart-filter-dropdown{position:absolute;right:0;top:100%;margin-top:4px;min-width:140px;padding:8px;background:#fff;border:1px solid #e0e0e0;border-radius:4px;box-shadow:0 4px 12px rgba(0,0,0,.1);z-index:100}.stacked-chart-filter-dropdown label{display:flex;align-items:center;gap:6px;padding:4px 0;font-size:12px;cursor:pointer}.stacked-chart-filter-dropdown input{cursor:pointer}.chart-mode-toggle{display:flex;gap:4px;font-size:11px}.chart-mode-toggle button{padding:2px 8px;border:1px solid #ccc;background:#fff;color:#666;cursor:pointer;border-radius:2px;font-size:11px;transition:all .2s}.chart-mode-toggle button:hover{border-color:#3498db;color:#3498db}.chart-mode-toggle button.active{background:#3498db;color:#fff;border-color:#3498db}#foodPieChart{width:100%;height:100%;flex:1;min-height:0}#foodStackedChart{width:100%;height:100%;flex:1;min-height:0}#foodStackedChart+div div[style*=overflow]{overflow:visible!important}#foodStackedChart~div .echarts-legend{flex-wrap:wrap!important;display:flex!important}.echarts-legend-item{flex-shrink:0!important}.basic-info-card{display:grid;grid-template-columns:1fr 1fr;gap:15px;align-items:start}.basic-info-card .card-title{grid-column:1/-1;margin-bottom:0}.basic-info-card .btn-primary{grid-column:1/-1}.basic-info-card>div:not(.card-title):not(.btn-primary){display:flex;flex-direction:column}.form-group-row{display:flex;gap:15px;margin-bottom:15px}.basic-info-card .form-group{margin-bottom:15px;box-sizing:border-box;display:flex;flex-direction:column}.form-group-row .form-group{flex:1;margin-bottom:0!important;display:flex;flex-direction:column}.basic-info-card .form-group label{height:18px;line-height:18px;margin-bottom:5px;flex-shrink:0}.basic-info-card .form-group input,.basic-info-card .form-group select{height:38px;box-sizing:border-box;flex-shrink:0}.basic-info-card .form-group>div[style*="display: flex"]{height:38px;flex-shrink:0}.basic-info-card .form-group>div[style*="display: flex"] input{height:38px}.form-group-row .form-group{display:flex;flex-direction:column}.form-group-row .form-group label{height:18px;line-height:18px;margin-bottom:5px}.form-group-row .form-group input,.form-group-row .form-group select{height:38px}.form-group-row .form-group[style*="display: none"]{display:none!important}.form-group-row .form-group:only-child{flex:1}.nutrition-standards-block{width:100%;margin-bottom:16px}.nutrition-standards-list-vertical{display:flex;flex-direction:column;gap:6px}.nutrition-standards-list-vertical .nutrition-standard-item{width:100%;box-sizing:border-box}.nutrition-standard-item{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f5f5f5;border:none;cursor:pointer;transition:all .15s;font-size:12px}.nutrition-standard-item:hover{background:#eee}.nutrition-standard-item.selected{background:#e8eef5}.nutrition-standard-item input[type=checkbox]{margin:0;cursor:pointer;width:13px;height:13px}.nutrition-standard-name{color:#444;white-space:nowrap;flex:1;min-width:0}.life-stage-badge{font-size:11px;color:#666;background:#e0e0e0;padding:1px 5px;white-space:nowrap;margin-left:auto}.nutrition-standard-item.selected .life-stage-badge{background:#c5d4e4;color:#455a64}.energy-section{width:100%}.food-recipe-section{width:100%}.nutrient-section{width:100%}.nutrient-content{display:grid;grid-template-columns:1fr;gap:20px;align-items:start}.nutrient-content.has-gauges{grid-template-columns:280px 1fr}.nutrient-left-column{display:flex;flex-direction:column;gap:20px;position:sticky;top:20px;align-items:stretch}.nutrient-left-column .nutrition-standards-block{display:block}.gauges-wrapper{display:none;flex-direction:column;gap:30px;position:sticky;top:20px}.gauges-wrapper.visible{display:flex}.gauge-container{display:flex;flex-direction:column;align-items:center}.gauge{--size:180px;--thickness:18px;--font-num:13px;--font-readout:16px;--needle:220deg;width:var(--size);height:var(--size);position:relative;border-radius:50%;display:grid;place-items:center;margin:0 auto;user-select:none}.gauge-title{text-align:center;font-size:14px;font-weight:600;color:#2c3e50;margin-bottom:10px;margin-top:25px}.rim{position:absolute;inset:-12px;border-radius:50%;background:#f4f5f7;z-index:-1;box-shadow:0 12px 28px rgba(44,120,196,0)}.ring{position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 0deg,transparent 0 360deg)}.ring::after{content:"";position:absolute;inset:var(--thickness);border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}.nums,.ticks{position:absolute;inset:0;border-radius:50%;pointer-events:none}.tick{position:absolute;left:50%;top:50%;width:2px;height:calc(var(--size) * .48);transform-origin:50% 100%;transform:translate(-50%,-100%) rotate(var(--a))}.tick::before{content:"";position:absolute;left:50%;transform:translateX(-50%);top:0;width:2px;height:var(--h);background:rgba(0,0,0,.22);border-radius:2px}.tick.major::before{background:rgba(0,0,0,.42);height:12px}.num{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:var(--font-num);color:rgba(0,0,0,.55);background:rgba(255,255,255,.85);padding:1px 4px;border-radius:6px}.needle{position:absolute;left:50%;top:50%;width:3px;height:calc(var(--size) * .4);background:#2b2b2b;border-radius:10px;transform-origin:50% 92%;transform:translate(-50%,-92%) rotate(var(--needle));box-shadow:0 2px 8px rgba(0,0,0,.15);z-index:3}.hub{position:absolute;left:50%;top:50%;width:16px;height:16px;border-radius:50%;background:#f7f7f7;border:2px solid rgba(0,0,0,.5);transform:translate(-50%,-50%);z-index:4}.readout{position:absolute;left:50%;top:63%;transform:translate(-50%,-50%);background:#fff;border:1px solid rgba(0,0,0,.25);border-radius:2px;padding:4px 10px;font-weight:800;font-size:var(--font-readout);box-shadow:0 4px 10px rgba(0,0,0,.06);z-index:2}.gauge-range-info{text-align:center;margin-top:10px;font-size:12px;color:#7f8c8d}.gauge-range-optimal{color:#27ae60;font-weight:600}.balance-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);z-index:10000;display:flex;justify-content:center;align-items:center}.balance-modal-content{background:#fff;border-radius:0;width:90%;max-width:1450px;height:80vh;max-height:80vh;display:flex;flex-direction:column;box-shadow:0 4px 20px rgba(0,0,0,.3);position:relative}.balance-modal-header{padding:15px 20px;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center}.balance-modal-header h3{margin:0;font-size:16px;color:#2c3e50}.balance-modal-close{background:0 0;border:none;font-size:24px;color:#999;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.balance-modal-close:hover{color:#333}.balance-modal-body{padding:20px;overflow:hidden;flex:1;display:flex;gap:20px}.custom-food-modal-content{max-width:840px;width:95%;height:70vh;max-height:70vh;min-height:340px;display:flex;flex-direction:column;background:#fff;border-radius:0;box-shadow:0 4px 20px rgba(0,0,0,.3)}.custom-food-modal-content .balance-modal-body{display:flex!important;flex-direction:row!important;flex:1;min-height:0;overflow:hidden;padding:0;gap:0}.custom-food-list-panel{width:240px;flex-shrink:0;border-right:1px solid #e0e0e0;display:flex;flex-direction:column;background:#fff}.custom-food-list-panel .btn-new-custom{margin:10px 12px;padding:7px 12px;font-size:12px;color:#2c3e50;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:0;cursor:pointer}.custom-food-list-panel .btn-new-custom:hover{background:#e9ecef;border-color:#dee2e6;color:#2c3e50}.custom-food-def-list{list-style:none;margin:0;padding:0;overflow-y:auto;flex:1;min-height:0}.custom-food-list-panel-actions{flex-shrink:0;padding:12px;border-top:1px solid #e0e0e0;display:flex;flex-direction:column;gap:8px;background:#fafbfc}.custom-food-list-panel-actions .btn{width:100%;height:32px;padding:0 12px;font-size:12px;font-weight:500;color:#2c3e50;background:#fff;border:1px solid #e0e0e0;border-radius:0;cursor:pointer;transition:background .2s,border-color .2s;text-align:center;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center}.custom-food-list-panel-actions .btn:hover{background:#f8f9fa;border-color:#dee2e6;color:#2c3e50}.custom-food-def-list li{display:flex;align-items:center;gap:6px;padding:8px 12px;font-size:13px;color:#2c3e50;cursor:pointer;border-bottom:1px solid #e0e0e0;transition:background .2s}.custom-food-def-list li:hover{background:#f8f9fa}.custom-food-def-list li.active{background:#e3f2fd}.custom-food-def-list li .custom-food-item-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.custom-food-def-list li .custom-food-item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}.custom-food-def-list li .custom-food-item-category{font-size:11px;color:#6c757d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.custom-food-def-list li .btn-del{flex-shrink:0;padding:2px 6px;font-size:11px;color:#6c757d;background:0 0;border:none;cursor:pointer;border-radius:0}.custom-food-def-list li .btn-del:hover{color:#e74c3c;background:#fff5f5}.custom-food-form-panel{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:20px;background:#fff}.custom-food-form-panel .form-group{margin-bottom:14px;flex-shrink:0}.custom-food-form-panel .form-group.custom-food-nutrients-group{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;margin-bottom:0}.custom-food-form-panel .form-group.custom-food-nutrients-group label{flex-shrink:0}.custom-food-form-panel .form-group.custom-food-nutrients-group .custom-food-nutrients-wrap{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:block;-webkit-overflow-scrolling:touch}.custom-food-modal-content .balance-modal-body .form-group{display:block;width:100%;margin-bottom:14px}.custom-food-modal-content .balance-modal-body .form-group label{display:block;margin-bottom:4px}.custom-food-modal-content .balance-modal-body .form-group.custom-food-category-supplement-row{display:flex!important;flex-wrap:nowrap;align-items:flex-end;gap:12px}.custom-food-modal-content .balance-modal-body .form-group.custom-food-nutrients-group{display:flex!important;flex-direction:column;flex:1;min-height:0;overflow:hidden;margin-bottom:0}.custom-food-modal-content .balance-modal-body .form-group.custom-food-nutrients-group .custom-food-nutrients-wrap{flex:1;min-height:0;overflow-y:auto}.custom-food-category-supplement-row .custom-food-field{flex:1;min-width:0}.custom-food-category-supplement-row .custom-food-field:not(.custom-food-portion-field){min-width:100px}.custom-food-category-supplement-row .custom-food-field label{display:block;margin-bottom:4px}.custom-food-category-supplement-row .custom-food-field input,.custom-food-category-supplement-row .custom-food-field select{width:100%;box-sizing:border-box}.custom-food-category-supplement-row .custom-food-portion-field{flex:0 0 auto;width:90px;min-width:90px}.custom-food-modal-actions .custom-food-btn-secondary{padding:7px 14px;font-size:12px;font-weight:500;color:#2c3e50;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:0}.custom-food-modal-actions .custom-food-btn-secondary:hover{color:#2c3e50;background:#e9ecef;border-color:#dee2e6}.custom-food-nutrients-wrap{border:1px solid #e0e0e0;border-radius:0;margin-top:6px;background:#fff}.custom-food-nutrients-table{width:100%;border-collapse:collapse;font-size:12px}.custom-food-nutrients-table thead th{padding:6px 8px;background:#f8f9fa;font-weight:600;color:#2c3e50;text-align:left;border-bottom:1px solid #e0e0e0;position:sticky;top:0;z-index:1}.custom-food-nutrients-table tbody td{padding:4px 8px;border-top:1px solid #eee;color:#555}.custom-food-amount-wrap{position:relative;display:block}.custom-food-amount-wrap input{width:100%;padding:4px 32px 4px 6px;font-size:12px;border:1px solid #ccc;box-sizing:border-box;min-width:0}.custom-food-amount-wrap input[type=number]::-webkit-inner-spin-button,.custom-food-amount-wrap input[type=number]::-webkit-outer-spin-button{margin-right:20px}.custom-food-amount-unit{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:12px;color:#888;pointer-events:none}.custom-food-nutrients-table tbody td.custom-food-nutrient-cat{background:#f8f9fa;color:#2c3e50}.balance-nutrient-info-wrapper{width:320px;flex-shrink:0;display:flex;flex-direction:column}.balance-other-nutrients-list{margin-top:12px;padding:10px 12px;background:#fff;border:1px solid #e0e0e0;border-radius:0;display:flex;flex-direction:column;min-height:0}.balance-other-nutrients-header{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.balance-other-nutrients-title{font-size:12px;font-weight:600;color:#2c3e50}.balance-other-nutrients-header label{font-size:11px;font-weight:400;cursor:pointer;user-select:none;display:flex;align-items:center;gap:4px}.balance-other-nutrients-scroll{flex:1;min-height:0;overflow-y:auto;border:1px solid #eee}.balance-other-nutrients-table{width:100%;border-collapse:collapse;font-size:11px}.balance-other-nutrients-table thead{position:sticky;top:0;z-index:1;background:#f8f9fa}.balance-other-nutrients-table td,.balance-other-nutrients-table th{padding:4px 6px;text-align:left;border-bottom:1px solid #eee}.balance-other-nutrients-table th{font-weight:600;color:#2c3e50}.balance-other-nutrients-table .balance-other-name{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.balance-other-nutrients-table .balance-other-name-clickable{cursor:pointer}.balance-other-nutrients-table .balance-other-name-clickable:hover{text-decoration:underline}.balance-other-nutrients-table .balance-other-value{white-space:nowrap}.balance-other-nutrients-table .balance-other-status{white-space:nowrap}.balance-nutrient-title{font-size:15px;font-weight:600;color:#2c3e50;margin-bottom:5px;display:flex;align-items:center;gap:8px}.balance-deficit-badge{display:inline-block;padding:3px 8px;font-size:12px;font-weight:500;border-radius:0;color:#fff}.balance-deficit-badge.negative{background:#e74c3c;margin-left:auto}.balance-deficit-badge.positive{background:#27ae60;margin-left:auto}.balance-deficit-badge.warning{background:#f39c12;margin-left:auto}.balance-deficit-badge.neutral{background:#95a5a6}.balance-nutrient-subtitle{font-size:12px;color:#7f8c8d;margin-bottom:15px}.balance-nutrient-divider{height:1px;background:#e0e0e0;margin:15px 0}.balance-nutrient-row{display:flex;justify-content:space-between;margin-bottom:10px;font-size:13px}.balance-nutrient-row-label{color:#666}.balance-nutrient-row-value{color:#2c3e50;font-weight:500}.balance-nutrient-boxes{display:flex;gap:15px;margin-top:10px}.balance-nutrient-box{flex:1;border:1px solid #ddd;padding:10px;text-align:center}.balance-nutrient-box-label{font-size:11px;color:#999;margin-bottom:5px}.balance-nutrient-box-value{font-size:14px;font-weight:600;color:#2c3e50}.balance-lists-row{flex:1;display:flex;gap:15px;min-width:0;min-height:0}.balance-food-list-wrapper{flex:0 0 32%;display:flex;flex-direction:column;min-width:0}.balance-preview-list-wrapper{flex:1;display:flex;flex-direction:column;min-width:0}.balance-preview-list-container{flex:1;overflow-y:auto;overflow-x:hidden;min-height:0;border:1px solid #e0e0e0;background:#fff}.balance-modal-energy-card{flex-shrink:0;margin-top:10px;padding:10px 12px;background:#f8f9fa;border:1px solid #dee2e6;font-size:12px}.balance-modal-energy-card .balance-energy-title{font-weight:600;color:#2c3e50;margin-bottom:8px;font-size:13px}.balance-modal-energy-card .balance-energy-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:8px}.balance-modal-energy-card .balance-metric-box{padding:8px 10px;background:#fff;border:1px solid #e9ecef}.balance-modal-energy-card .balance-metric-label{font-size:11px;color:#6c757d;margin-bottom:3px}.balance-modal-energy-card .balance-metric-value{font-size:14px;font-weight:600;color:#2c3e50}.balance-modal-energy-card .balance-metric-unit{font-size:11px;color:#7f8c8d;margin-left:2px}.balance-preview-list-container table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px}.balance-preview-list-container thead th:first-child{width:185px}.balance-preview-list-container thead{position:sticky;top:0;z-index:10;background:#f8f9fa}.balance-preview-list-container thead th{padding:8px;text-align:left;font-weight:600;border-bottom:1px solid #e0e0e0;background:#f8f9fa;color:#2c3e50}.balance-preview-list-container tbody tr{border-bottom:1px solid #e0e0e0;transition:background .2s}.balance-preview-list-container tbody tr:hover{background:#f8f9fa}.balance-preview-list-container tr.balance-preview-row-total{position:sticky;bottom:0;z-index:5}.balance-preview-list-container tr.balance-preview-row-total td{padding:8px;font-weight:600;background:#f8f9fa;color:#2c3e50}.balance-preview-list-container tbody td{padding:8px;vertical-align:middle;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-preview-list-container td.balance-preview-cell-name{width:185px;max-width:185px;min-width:185px;white-space:normal;overflow:hidden}.balance-preview-list-container .balance-preview-item-category,.balance-preview-list-container .balance-preview-item-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-preview-list-container .balance-preview-item-name{font-weight:600;color:#2c3e50}.balance-preview-list-container .balance-preview-item-category{font-size:11px;color:#666;margin-top:2px}.balance-preview-list-container td.balance-preview-cell-calories,.balance-preview-list-container td.balance-preview-cell-current{white-space:normal}.balance-preview-list-container .balance-preview-current-value{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-preview-list-container .balance-preview-content-per100g{font-size:11px;color:#666;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-preview-list-container td.balance-preview-cell-original{cursor:pointer}.balance-preview-list-container .balance-preview-amount-wrap{position:relative;display:inline-block}.balance-preview-list-container .balance-preview-amount-input{width:100px;padding:4px 22px 4px 8px;border:1px solid #ddd;border-radius:0;font-size:12px}.balance-preview-list-container .balance-preview-amount-unit{position:absolute;right:8px;top:50%;transform:translateY(-50%);color:#999;font-size:12px;pointer-events:none}.balance-preview-list-container .balance-preview-remove{padding:4px 8px;font-size:12px;background:#e74c3c;color:#fff;border:none;border-radius:0;cursor:pointer}.balance-preview-list-container .balance-preview-remove:hover{background:#c0392b}.balance-search-box{margin-bottom:5px}.balance-search-box input{width:100%;padding:8px 12px;border:1px solid #ddd;border-radius:0;font-size:13px;box-sizing:border-box}.balance-search-box input:focus{outline:0;border-color:#3498db}.balance-food-list-container{flex:1;overflow-y:auto;overflow-x:hidden;min-height:0;border:1px solid #e0e0e0;background:#fff}.balance-food-list-container table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:12px}.balance-food-list-container thead th:nth-child(2){width:180px}.balance-food-list-container thead{position:sticky;top:0;z-index:10;background:#f8f9fa}.balance-food-list-container thead th{padding:8px;text-align:left;font-weight:600;border-bottom:1px solid #e0e0e0;background:#f8f9fa}.balance-food-list-container tbody tr{border-bottom:1px solid #e0e0e0;transition:background .2s;cursor:pointer}.balance-food-list-container tbody tr:hover{background:#f8f9fa}.balance-food-list-container tbody tr.selected{background:#e3f2fd}.balance-food-list-container tbody td{padding:8px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-food-list-container tbody td.balance-food-cell-name{width:180px;max-width:180px;min-width:180px;white-space:normal;overflow:hidden}.balance-food-list-container .balance-food-item-category,.balance-food-list-container .balance-food-item-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.balance-food-list-container .balance-food-item-category{font-size:11px;color:#666;margin-top:2px}.balance-food-item-name{font-weight:600;color:#2c3e50}.balance-food-item-info{font-size:13px;color:#666}.balance-food-amount{display:flex;align-items:center;white-space:nowrap}.balance-food-amount input{width:80px;padding:2px 4px;border:1px solid #ddd;border-radius:0;font-size:12px;height:24px;box-sizing:border-box}.balance-food-amount input::placeholder{font-size:12px;color:#9c9c9c6b}.balance-food-amount span{margin-left:0;color:#666;white-space:nowrap}.balance-modal-actions{padding:15px 20px;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:0;background:#fff;z-index:10}.btn-balance-confirm{padding:8px 16px;background:#3498db;color:#fff;border:none;border-radius:0;cursor:pointer;font-size:13px}.btn-balance-confirm:hover{background:#2980b9}.btn-balance-cancel{padding:8px 16px;background:#95a5a6;color:#fff;border:none;border-radius:0;cursor:pointer;font-size:13px}.btn-balance-cancel:hover{background:#7f8c8d}.input-with-unit{position:relative;display:block}.input-with-unit input[type=number]{padding-right:40px}.input-with-unit .input-unit{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#999;font-size:14px;pointer-events:none}.ideal-weight-input-with-unit{width:100%}.target-weight-input-wrap{position:relative}.target-weight-input-wrap .input-with-unit input[type=number]{padding-right:58px}.target-weight-input-wrap .input-unit{right:36px}.target-weight-help-btn{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:22px;height:22px;border:none;background:#e9ecef;color:#555;font-size:13px;font-weight:700;cursor:pointer;border-radius:50%;display:flex;align-items:center;justify-content:center;padding:0;line-height:1}.target-weight-help-btn:hover{color:#3498db;background:rgba(0,0,0,.06)}.ideal-weight-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);z-index:10001;display:flex;justify-content:center;align-items:center}.ideal-weight-modal-content{background:#fff;border-radius:0;width:90%;max-width:560px;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 4px 20px rgba(0,0,0,.3);position:relative}.ideal-weight-modal-header{padding:15px 20px;border-bottom:1px solid #e0e0e0;display:flex;justify-content:space-between;align-items:center}.ideal-weight-modal-header h3{margin:0;font-size:16px;color:#2c3e50}.ideal-weight-modal-close{background:0 0;border:none;font-size:24px;color:#999;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.ideal-weight-modal-close:hover{color:#333}.ideal-weight-modal-body{padding:20px;overflow-y:auto;flex:1;min-height:0}.ideal-weight-intro{font-size:13px;color:#555;margin-bottom:16px;line-height:1.5}.ideal-weight-intro a{color:#3498db;text-decoration:none}.ideal-weight-intro a:hover{text-decoration:underline}.ideal-weight-current{margin-bottom:20px}.ideal-weight-bcs-section label,.ideal-weight-current label{display:block;font-size:13px;font-weight:600;color:#333;margin-bottom:6px}.ideal-weight-current .input-with-unit input{width:100%;padding:8px 48px 8px 10px;border:1px solid #ddd;font-size:14px}.ideal-weight-bcs-section{margin-bottom:16px}.ideal-weight-bcs-images-row{display:grid;gap:0;margin-bottom:8px;align-items:end}.ideal-weight-bcs-cell{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px}.ideal-weight-bcs-cell img{display:block;max-width:100%;width:auto;height:auto;object-fit:contain}.ideal-weight-modal-body input[type=range]{width:100%;margin:8px 0 4px 0;accent-color:#3498db}.ideal-weight-bcs-ticks{display:flex;justify-content:space-between;margin-top:4px;padding:0 2px;font-size:12px;color:#666}.ideal-weight-bcs-ticks span{width:20px;text-align:center;cursor:pointer}.ideal-weight-bcs-ticks span:hover{color:#3498db}.ideal-weight-bcs-anchor{margin-top:12px;padding:12px;background:#f8f9fa;border:1px solid #e0e0e0}.ideal-weight-bcs-desc{font-size:13px;color:#555;line-height:1.5}.ideal-weight-result{margin:16px 0;padding:12px;background:#e8f4fd;border:1px solid #b8daff;font-size:14px}.ideal-weight-disclaimer{margin-top:16px;padding:12px;background:#fff9e6;border:1px solid #f0e0a0;font-size:12px;color:#666}.ideal-weight-disclaimer p{margin:0 0 6px 0;color:#333}.ideal-weight-disclaimer ul{margin:0;padding-left:18px}.ideal-weight-disclaimer li{margin-bottom:4px}.ideal-weight-modal-actions{padding:15px 20px;border-top:1px solid #e0e0e0;display:flex;justify-content:flex-end;gap:10px;background:#fff}.btn-ideal-weight-apply{padding:8px 16px;background:#3498db;color:#fff;border:none;border-radius:0;cursor:pointer;font-size:13px}.btn-ideal-weight-apply:hover{background:#2980b9}.btn-ideal-weight-close{padding:8px 16px;background:#95a5a6;color:#fff;border:none;border-radius:0;cursor:pointer;font-size:13px}.btn-ideal-weight-close:hover{background:#7f8c8d}.toast{position:fixed;top:20px;right:20px;color:#fff;padding:12px 20px;border-radius:4px;box-shadow:0 4px 12px rgba(0,0,0,.15);z-index:10000;animation:slideIn .3s ease-out;font-weight:500;display:flex;align-items:center;gap:10px}.toast-icon{width:20px;height:20px;flex-shrink:0}.toast-icon svg{width:100%;height:100%;fill:currentColor}.toast.success{background:#27ae60}.toast.error{background:#e74c3c}.toast.warning{background:#f39c12}.toast.info{background:#3498db}.toast.hide{animation:slideOut .3s ease-out forwards}@keyframes slideIn{from{transform:translateX(400px);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes slideOut{from{transform:translateX(0);opacity:1}to{transform:translateX(400px);opacity:0}}.toast-message{font-size:14px}.card{background:#fff;border:1px solid #ddd;padding:20px;margin-bottom:10px}.card-title{font-size:16px;font-weight:600;color:#2c3e50;margin-bottom:15px;padding-bottom:5px;border-bottom:0 solid #34495e}.form-group{margin-bottom:15px}label{display:block;font-size:13px;font-weight:500;color:#555;margin-bottom:5px}input[type=number],input[type=text],select{width:100%;padding:8px 10px;border:1px solid #ccc;font-size:12px;font-weight:500;transition:border-color .3s}input:focus,select:focus{outline:0;border-color:#3498db}.btn{padding:10px 20px;border:none;font-size:14px;font-weight:500;cursor:pointer;transition:all .3s}.btn-primary{background:#3498db;color:#fff;width:100%}.btn-primary:hover{background:#2980b9}.btn-secondary{background:#fff;color:#333;border:1px solid #ccc;margin-top:10px;padding:8px 15px;font-size:13px}.btn-secondary:hover{background:#f8f9fa}.btn-icon{background:0 0;color:#666;border:none;padding:6px;cursor:pointer;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:all .2s}.btn-icon:hover{background:#f0f0f0;color:#333}.btn-icon svg{display:block}.btn-add{background:#27ae60;color:#fff;padding:8px 15px;font-size:13px}.btn-add:hover{background:#229954}.btn-remove{background:#e74c3c;color:#fff;padding:5px 10px;font-size:12px}.btn-remove:hover{background:#c0392b}.info-box{padding:12px 15px;background:#ecf0f1;border-left:3px solid #34495e;font-size:13px;color:#555;margin-bottom:15px}.energy-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px}.metric-box{padding:15px;background:#f8f9fa;border:1px solid #dee2e6}.metric-label{font-size:12px;color:#6c757d;margin-bottom:5px}.metric-value{font-size:20px;font-weight:600;color:#2c3e50}.metric-unit{font-size:13px;color:#7f8c8d;margin-left:3px}input[type=range]{-webkit-appearance:none;appearance:none;height:6px;background:#ddd;border-radius:3px;outline:0;cursor:pointer}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:16px;height:16px;background:#3498db;border-radius:50%;cursor:pointer}input[type=range]::-moz-range-thumb{width:16px;height:16px;background:#3498db;border-radius:50%;cursor:pointer;border:none}input[type=range]:hover::-webkit-slider-thumb{background:#2980b9}input[type=range]:hover::-moz-range-thumb{background:#2980b9}.diff-positive{color:#e67e22!important}.diff-negative{color:#e74c3c!important}.diff-insufficient{color:#e74c3c!important;font-weight:500}.diff-excessive{color:#3b12f3!important;font-weight:500}.value-non-compliant{color:#e74c3c!important;font-weight:500}.nrc-progress-wrap{position:relative;height:24px;min-width:80px;background:rgba(0,0,0,.06);overflow:hidden}.nrc-progress-fill{position:absolute;left:0;top:0;height:100%;transition:width .2s ease,background-color .2s ease}.nrc-progress-fill.nrc-progress-yellow{background:rgba(255,183,83,.5)}.nrc-progress-fill.nrc-progress-green{background:rgba(92,184,92,.5)}.nrc-progress-text{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;height:100%;font-size:13px;font-weight:inherit;color:#555}.food-input-row{display:grid;grid-template-columns:220px minmax(100px,1fr) 130px 130px auto;gap:8px;margin-bottom:15px;align-items:end}.food-amount-proportion-wrap{grid-column:span 2;display:flex;gap:8px;min-width:0}.food-amount-proportion-wrap .form-group{flex:1;min-width:0}.food-input-row .form-group{width:100%;box-sizing:border-box}.food-input-row input[type=number],.food-input-row input[type=text]{padding:8px 12px;font-size:14px;border:1px solid #ddd;border-radius:0;background:#fff;color:#333;box-sizing:border-box;width:100%}.food-input-row input[type=number]:disabled{background:#f5f5f5;color:#999;cursor:not-allowed}.food-input-row .food-input-buttons{display:flex;gap:6px;align-items:stretch}.food-input-row .btn-add{padding:8px 16px;font-size:14px;height:auto;min-width:100px;box-sizing:border-box}.food-input-row .btn-custom-food{padding:8px 14px;font-size:13px;font-weight:500;color:#555;background:#f5f5f5;border:1px solid #ddd;border-radius:0;min-width:0;white-space:nowrap;box-sizing:border-box}.food-input-row .btn-custom-food:hover{background:#ebebeb;border-color:#ccc;color:#333}.food-list{min-height:350px;max-height:350px;border:1px solid #e0e0e0;background:#fff;width:100%;overflow-y:auto;overflow-x:auto;position:relative}.food-list table{width:max-content;min-width:100%;border-collapse:collapse}.food-list tfoot{position:sticky;bottom:0;z-index:10}.food-list tfoot tr{background:#f8f9fa;font-weight:600}.food-item{padding:12px;border-bottom:1px solid #e0e0e0;background:#fff;transition:background .2s}.food-item:hover{background:#f8f9fa}.food-item:last-child{border-bottom:none}.food-item-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.food-item-name{font-weight:600;color:#2c3e50;font-size:14px}.food-item-amount{color:#7f8c8d;font-size:13px;margin-right:8px}.food-item-nutrients{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:#555}.nutrient-badge{background:#ecf0f1;padding:3px 8px;border-radius:3px;white-space:nowrap}.food-summary{padding:12px;background:#f8f9fa;border-top:2px solid #27ae60;font-weight:600;color:#27ae60}.food-search-results{max-height:300px;overflow-y:auto;border:1px solid #ccc;background:#fff;display:none;position:absolute;width:500px;max-width:90vw;left:0;top:100%;z-index:100;box-shadow:0 4px 6px rgba(0,0,0,.1)}.food-search-item{padding:10px 12px;cursor:pointer;border-bottom:1px solid #eee;font-size:13px;white-space:normal;word-wrap:break-word}.food-search-item:hover{background:#f0f0f0}.food-search-item:last-child{border-bottom:none}.nutrients-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:0}.nutrients-table td,.nutrients-table th{padding:10px;border-bottom:1px solid #e0e0e0}.nutrients-table .col-category,.nutrients-table .col-name{text-align:left}.nutrients-table .col-action,.nutrients-table .col-nrc,.nutrients-table .col-unit{text-align:center}.nutrients-table .col-max,.nutrients-table .col-min,.nutrients-table .col-provided{text-align:right}.nutrients-table tbody td.col-provided{background:rgba(77,124,177,.03)}.nutrients-table th{background:#f8f9fa;font-weight:600;color:#2c3e50;position:sticky;top:0}.nutrients-table td{color:#555}.nutrients-table td.col-nrc{font-size:13px;color:#555;padding-left:30px}.nutrients-table th.col-nrc{padding-left:30px}.nutrient-source-badge{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;background:#f0ad4e;color:#fff;font-size:11px;font-weight:700;cursor:help;margin-left:4px;vertical-align:middle;transition:transform .15s ease,background-color .15s ease,box-shadow .15s ease}.nutrient-source-badge:hover{background:#e09a3d;transform:scale(1.05);box-shadow:0 1px 4px rgba(0,0,0,.2)}.table-container{max-height:none;overflow-y:visible;border:1px solid #e0e0e0}.diff-positive{color:#27ae60;font-weight:500}.diff-negative{color:#e74c3c;font-weight:500}.nutrients-table tr.row-excessive td.row-bg-red,.nutrients-table tr.row-insufficient td.row-bg-red{background-color:#fff5f5b9!important}.loading{display:inline-block;width:14px;height:14px;border:2px solid #f3f3f3;border-top:2px solid #3498db;border-radius:50%;animation:spin .8s linear infinite;vertical-align:middle;margin-left:8px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.hidden{display:none}.tabs{display:flex;border-bottom:1px solid #ddd;margin-bottom:15px}.tab{padding:10px 20px;cursor:pointer;border:none;background:0 0;font-size:14px;color:#7f8c8d;border-bottom:2px solid transparent;transition:all .3s}.tab.active{color:#2c3e50;border-bottom-color:#3498db;font-weight:600}.tab-content{display:none}.tab-content.active{display:block}.error-message{padding:10px 15px;background:#fee;border-left:3px solid #e74c3c;color:#c0392b;font-size:13px;margin-top:10px}@media (max-width:1200px){.top-section{grid-template-columns:1fr}.food-recipe-card{height:auto!important}.food-recipe-content{grid-template-columns:1fr}.food-pie-chart-wrapper{max-height:600px}.food-stacked-chart-wrapper{margin-top:20px}.energy-summary{grid-template-columns:1fr}.nutrient-content{grid-template-columns:1fr;display:flex;flex-direction:column}.basic-info-card{grid-template-columns:1fr}.nutrient-left-column{order:-1;position:static}.gauges-wrapper{position:static;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:20px;margin-bottom:20px}#nutrientRequirements{order:1}}