GoogleCalc commited on
Commit
5b80c25
Β·
verified Β·
1 Parent(s): 86cc7c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +248 -88
app.py CHANGED
@@ -144,17 +144,17 @@ BREED_INFO = {
144
  "Ross 308": {
145
  "description": "Big chest, thick legs, very fast growth. Excellent for meat production.",
146
  "available_at": "Agrited, Sayed, Valentine",
147
- "color": "#16a34a"
148
  },
149
  "Cobb 500": {
150
  "description": "Good early growth, strong legs, solid feed conversion.",
151
  "available_at": "Chikun, Zartech",
152
- "color": "#2563eb"
153
  },
154
  "Arbor Acres": {
155
  "description": "Balanced growth, hardy and adaptable. Great survival rate.",
156
  "available_at": "Supreme, CHI, GS, Vertex, Fidan, Cascada, Orobor, Sunchi, Farm Support, Ajila",
157
- "color": "#d97706"
158
  }
159
  }
160
 
@@ -571,7 +571,7 @@ def get_share_links(app_url="https://howmuchfeed.com"):
571
 
572
 
573
  # ============================================================
574
- # FEED CALCULATION
575
  # ============================================================
576
 
577
  def calculate_feed(birds, weeks, days, bag_size, price_per_bag, email, country_code, breed, request: gr.Request):
@@ -645,7 +645,7 @@ def calculate_feed(birds, weeks, days, bag_size, price_per_bag, email, country_c
645
  # Generate share links
646
  share_links = get_share_links()
647
 
648
- # Output HTML
649
  starter_bags_display = f"{starter_bags:.1f}"
650
  finisher_bags_display = f"{finisher_bags:.1f}"
651
 
@@ -654,101 +654,229 @@ def calculate_feed(birds, weeks, days, bag_size, price_per_bag, email, country_c
654
  age_text += f" + {days} day{'s' if days != 1 else ''}"
655
 
656
  html = f"""
657
- <div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.5; color: #1a1a1a; background: #ffffff; border-radius: 12px; padding: 12px 14px; border: 1px solid #e5e7eb; width: 100%; box-sizing: border-box;">
658
-
659
- <div style="background: #f0fdf4; border: 2px solid #22c55e; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;">
660
- <div style="font-size: 12px; font-weight: 700; color: #16a34a; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;">πŸ“Š Your Feed Estimate</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
661
 
662
- <div style="font-size: 16px; font-weight: 700; color: #166534;">
663
- You need
664
- <span style="display: inline-block; background: #166534; color: #ffffff; border-radius: 6px; padding: 2px 12px; font-size: 20px; font-weight: 800;">
665
- {total_bags:.1f}
666
- </span>
667
- bags of {bag_size} kg feed
 
 
 
 
 
 
 
 
 
 
668
  </div>
669
- <div style="font-size: 14px; color: #374151; margin-top: 4px;">
670
- To raise <strong>{birds:,}</strong> {breed} broilers from day-old to <strong>{age_text} ({total_days} days)</strong>
 
 
671
  </div>
672
- <div style="margin-top: 6px; font-size: 15px; font-weight: 700; color: #1e40af;">
673
- Buy
674
- <span style="display: inline-block; background: #1e40af; color: #ffffff; border-radius: 6px; padding: 2px 12px; font-size: 18px; font-weight: 800;">
675
- {rounded_bags}
676
- </span>
677
- bags (rounded up for safety)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
678
  </div>
679
  </div>
680
 
 
681
  <div style="margin-bottom: 12px;">
682
- <div style="font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;">🌾 Feed Breakdown</div>
683
- <table style="width: 100%; border-collapse: collapse; font-size: 14px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;">
 
 
 
 
 
 
 
 
684
  <thead>
685
- <tr style="background: #f8fafc; border-bottom: 2px solid #e5e7eb;">
686
- <th style="padding: 8px 10px; text-align: left; font-weight: 600; color: #1a1a1a;">Stage</th>
687
- <th style="padding: 8px 10px; text-align: right; font-weight: 600; color: #1a1a1a;">Feed (kg)</th>
688
- <th style="padding: 8px 10px; text-align: right; font-weight: 600; color: #1a1a1a;">Bags (25 kg)</th>
689
  </tr>
690
  </thead>
691
  <tbody>
692
- <tr style="border-bottom: 1px solid #e5e7eb;">
693
- <td style="padding: 8px 10px; color: #1a1a1a;"><strong>🌱 Starter</strong></td>
694
- <td style="padding: 8px 10px; text-align: right; color: #1a1a1a;">{starter_kg:,.1f}</td>
695
- <td style="padding: 8px 10px; text-align: right; font-weight: 700; color: #1e293b;">{starter_bags_display}</td>
696
  </tr>
697
- <tr style="border-bottom: 1px solid #e5e7eb;">
698
- <td style="padding: 8px 10px; color: #1a1a1a;"><strong>🌽 Finisher</strong></td>
699
- <td style="padding: 8px 10px; text-align: right; color: #1a1a1a;">{finisher_kg:,.1f}</td>
700
- <td style="padding: 8px 10px; text-align: right; font-weight: 700; color: #1e293b;">{finisher_bags_display}</td>
701
  </tr>
702
- <tr style="background: #f8fafc; font-weight: 700;">
703
- <td style="padding: 8px 10px; color: #1a1a1a;">TOTAL</td>
704
- <td style="padding: 8px 10px; text-align: right; color: #1a1a1a;">{total_feed_kg:,.1f}</td>
705
- <td style="padding: 8px 10px; text-align: right; font-weight: 800; font-size: 16px; color: #166534;">{total_bags:.1f}</td>
706
  </tr>
707
  </tbody>
708
  </table>
709
  </div>
710
 
711
- <div style="background: #eff6ff; border: 2px solid #3b82f6; border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;">
712
- <div style="font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px;">πŸ’° Feed Cost</div>
 
 
 
 
 
 
 
713
  <div style="display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 14px;">
714
- <span style="color: #4b5563;">Approximately</span>
715
- <span style="display: inline-block; background: #1e40af; color: #ffffff; border-radius: 6px; padding: 2px 12px; font-size: 18px; font-weight: 700;">
716
- {rounded_bags}
717
- </span>
718
- <span style="color: #4b5563;">bags Γ— {currency_symbol}{price_per_bag:,.0f}</span>
 
 
 
 
 
 
719
  </div>
720
- <div style="font-size: 24px; font-weight: 800; color: #1e40af; margin-top: 2px;">
721
  {currency_symbol}{total_cost:,.0f}
722
  </div>
723
  </div>
724
 
725
- <div style="border-top: 1px solid #e5e7eb; padding-top: 10px; margin-bottom: 12px;">
726
- <div style="font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;">πŸ“ˆ Expected Performance</div>
 
 
 
 
 
727
  <div style="display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px;">
728
- <div>Body weight: <span style="font-weight: 700; color: #1a1a1a;">{expected_weight:.3f} kg</span></div>
729
- <div>Flock weight: <span style="font-weight: 700; color: #1a1a1a;">{flock_weight:,.1f} kg</span></div>
 
 
 
 
730
  </div>
731
  </div>
732
 
733
- <div style="border-top: 1px solid #e5e7eb; padding-top: 12px;">
734
- <div style="font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;">πŸ“€ Share Results</div>
 
 
 
 
735
  <div style="display: flex; gap: 8px; flex-wrap: wrap;">
736
  <a href="{share_links['whatsapp']}" target="_blank" style="text-decoration: none;">
737
- <span style="display: inline-block; background: #25D366; color: #ffffff; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;">WhatsApp</span>
 
 
 
 
 
 
 
 
 
738
  </a>
739
  <a href="{share_links['email']}" target="_blank" style="text-decoration: none;">
740
- <span style="display: inline-block; background: #ea4335; color: #ffffff; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;">Email</span>
 
 
 
 
 
 
 
 
 
741
  </a>
742
  <a href="{share_links['facebook']}" target="_blank" style="text-decoration: none;">
743
- <span style="display: inline-block; background: #1877f2; color: #ffffff; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;">Facebook</span>
 
 
 
 
 
 
 
 
 
744
  </a>
745
  <a href="{share_links['twitter']}" target="_blank" style="text-decoration: none;">
746
- <span style="display: inline-block; background: #000000; color: #ffffff; padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;">Twitter/X</span>
 
 
 
 
 
 
 
 
 
747
  </a>
748
  </div>
749
  </div>
750
 
751
- <div style="margin-top: 10px; font-size: 11px; color: #9ca3af; border-top: 1px solid #f3f4f6; padding-top: 8px;">
 
 
 
 
 
 
752
  ⚠️ Estimate based on {breed} benchmark. Actual results may vary.
753
  </div>
754
  </div>
@@ -968,14 +1096,41 @@ def export_calculations_wrapper():
968
 
969
 
970
  # ============================================================
971
- # CSS
972
  # ============================================================
973
 
974
  CSS = """
975
- /* Force light theme */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
976
  body, .gradio-container, .gradio-row, .gradio-column, .gradio-group {
977
- background-color: #f6f8f4 !important;
978
- color: #1a1a1a !important;
979
  }
980
 
981
  .gradio-container {
@@ -983,6 +1138,7 @@ body, .gradio-container, .gradio-row, .gradio-column, .gradio-group {
983
  padding: 6px 8px !important;
984
  }
985
 
 
986
  .main-title {
987
  text-align: center;
988
  padding: 8px 4px 4px 4px;
@@ -990,51 +1146,55 @@ body, .gradio-container, .gradio-row, .gradio-column, .gradio-group {
990
  .main-title h1 {
991
  font-size: 24px;
992
  margin-bottom: 2px;
993
- color: #1a1a1a !important;
994
  }
995
  .main-title p {
996
  font-size: 14px;
997
- color: #555 !important;
998
  }
999
 
 
1000
  .answer-box {
1001
- background: #ffffff !important;
1002
  border-radius: 12px !important;
1003
  padding: 8px 10px !important;
1004
- border: 1px solid #e5e7eb !important;
1005
  }
1006
 
 
1007
  .email-box {
1008
- border: 2px solid #d9e7d2 !important;
1009
  border-radius: 10px !important;
1010
  padding: 8px !important;
1011
- background: #fbfdf9 !important;
1012
  }
1013
 
1014
- button { min-height: 44px !important; }
1015
-
1016
- .admin-login {
1017
- border: 2px solid #d97706 !important;
1018
- border-radius: 10px !important;
1019
- padding: 12px !important;
1020
- background: #fffbeb !important;
 
1021
  }
1022
 
1023
- /* Fix all text */
1024
- label, span, p, div, h1, h2, h3, h4 {
1025
- color: #1a1a1a !important;
1026
  }
1027
 
1028
- input, select, textarea {
1029
- background: #ffffff !important;
1030
- color: #1a1a1a !important;
1031
- border: 1px solid #d1d5db !important;
 
 
1032
  }
1033
 
1034
  /* Force dark mode override */
1035
  .dark, .dark * {
1036
- background-color: #f6f8f4 !important;
1037
- color: #1a1a1a !important;
1038
  }
1039
 
1040
  /* Mobile */
@@ -1144,10 +1304,10 @@ with gr.Blocks(title=APP_NAME, css=CSS, theme=gr.themes.Default()) as demo:
1144
  gr.Markdown("## πŸ“Š Quick Answer")
1145
  result = gr.HTML(
1146
  value="""
1147
- <div style="font-size: 14px; color: #9ca3af; text-align: center; padding: 30px 10px; background: #ffffff; border-radius: 12px;">
1148
  <div style="font-size: 40px; margin-bottom: 10px;">πŸ”</div>
1149
  <div>Enter your details and click <strong>Calculate</strong></div>
1150
- <div style="font-size: 13px; margin-top: 6px;">Your feed estimate appears here</div>
1151
  </div>
1152
  """,
1153
  elem_classes=["answer-box"],
 
144
  "Ross 308": {
145
  "description": "Big chest, thick legs, very fast growth. Excellent for meat production.",
146
  "available_at": "Agrited, Sayed, Valentine",
147
+ "color": "#1E4620"
148
  },
149
  "Cobb 500": {
150
  "description": "Good early growth, strong legs, solid feed conversion.",
151
  "available_at": "Chikun, Zartech",
152
+ "color": "#1E4620"
153
  },
154
  "Arbor Acres": {
155
  "description": "Balanced growth, hardy and adaptable. Great survival rate.",
156
  "available_at": "Supreme, CHI, GS, Vertex, Fidan, Cascada, Orobor, Sunchi, Farm Support, Ajila",
157
+ "color": "#1E4620"
158
  }
159
  }
160
 
 
571
 
572
 
573
  # ============================================================
574
+ # FEED CALCULATION - WITH PROFESSIONAL COLOR SCHEME
575
  # ============================================================
576
 
577
  def calculate_feed(birds, weeks, days, bag_size, price_per_bag, email, country_code, breed, request: gr.Request):
 
645
  # Generate share links
646
  share_links = get_share_links()
647
 
648
+ # Output HTML - WITH PROFESSIONAL COLOR SCHEME
649
  starter_bags_display = f"{starter_bags:.1f}"
650
  finisher_bags_display = f"{finisher_bags:.1f}"
651
 
 
654
  age_text += f" + {days} day{'s' if days != 1 else ''}"
655
 
656
  html = f"""
657
+ <div style="
658
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
659
+ font-size: 15px;
660
+ line-height: 1.5;
661
+ color: #212529;
662
+ background: #ffffff;
663
+ border-radius: 12px;
664
+ padding: 12px 14px;
665
+ border: 1px solid #DEE2E6;
666
+ width: 100%;
667
+ box-sizing: border-box;
668
+ ">
669
+
670
+ <!-- RESULTS CARD -->
671
+ <div style="
672
+ background: #F8F9FA;
673
+ border: 2px solid #1E4620;
674
+ border-radius: 10px;
675
+ padding: 14px 16px;
676
+ margin-bottom: 14px;
677
+ ">
678
+ <div style="
679
+ font-size: 12px;
680
+ font-weight: 700;
681
+ color: #1E4620;
682
+ text-transform: uppercase;
683
+ letter-spacing: 0.5px;
684
+ margin-bottom: 4px;
685
+ ">πŸ“Š Your Feed Estimate</div>
686
 
687
+ <!-- Total Feed - Brown Card -->
688
+ <div style="
689
+ background: #F5F0EE;
690
+ border-radius: 8px;
691
+ padding: 10px 14px;
692
+ margin: 4px 0 8px 0;
693
+ ">
694
+ <div style="font-size: 13px; color: #6C757D; font-weight: 600;">
695
+ Total Feed Needed
696
+ </div>
697
+ <div style="font-size: 28px; font-weight: 800; color: #8D6E63;">
698
+ {total_feed_kg:,.1f} kg
699
+ </div>
700
+ <div style="font-size: 14px; color: #6C757D;">
701
+ ({total_bags:.1f} bags of {bag_size} kg)
702
+ </div>
703
  </div>
704
+
705
+ <!-- Birds Info -->
706
+ <div style="font-size: 14px; color: #212529;">
707
+ For <strong>{birds:,}</strong> {breed} broilers Β· <strong>{age_text} ({total_days} days)</strong>
708
  </div>
709
+
710
+ <!-- Buy Recommendation - Gold Accent -->
711
+ <div style="
712
+ background: #FFF8E1;
713
+ border: 2px solid #FFB800;
714
+ border-radius: 8px;
715
+ padding: 8px 12px;
716
+ margin-top: 8px;
717
+ ">
718
+ <span style="font-size: 14px; font-weight: 600; color: #212529;">Buy</span>
719
+ <span style="
720
+ display: inline-block;
721
+ background: #FFB800;
722
+ color: #212529;
723
+ border-radius: 6px;
724
+ padding: 2px 12px;
725
+ font-size: 18px;
726
+ font-weight: 800;
727
+ ">{rounded_bags}</span>
728
+ <span style="font-size: 14px; color: #6C757D;">bags (rounded up for safety)</span>
729
  </div>
730
  </div>
731
 
732
+ <!-- FEED BREAKDOWN TABLE -->
733
  <div style="margin-bottom: 12px;">
734
+ <div style="font-size: 12px; font-weight: 700; color: #6C757D; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;">🌾 Feed Breakdown</div>
735
+ <table style="
736
+ width: 100%;
737
+ border-collapse: collapse;
738
+ font-size: 14px;
739
+ background: #ffffff;
740
+ border: 1px solid #DEE2E6;
741
+ border-radius: 8px;
742
+ overflow: hidden;
743
+ ">
744
  <thead>
745
+ <tr style="background: #F8F9FA; border-bottom: 2px solid #DEE2E6;">
746
+ <th style="padding: 8px 10px; text-align: left; font-weight: 600; color: #212529;">Stage</th>
747
+ <th style="padding: 8px 10px; text-align: right; font-weight: 600; color: #212529;">Feed (kg)</th>
748
+ <th style="padding: 8px 10px; text-align: right; font-weight: 600; color: #212529;">Bags (25 kg)</th>
749
  </tr>
750
  </thead>
751
  <tbody>
752
+ <tr style="border-bottom: 1px solid #DEE2E6;">
753
+ <td style="padding: 8px 10px; color: #212529;"><strong>🌱 Starter</strong></td>
754
+ <td style="padding: 8px 10px; text-align: right; color: #212529;">{starter_kg:,.1f}</td>
755
+ <td style="padding: 8px 10px; text-align: right; font-weight: 700; color: #212529;">{starter_bags_display}</td>
756
  </tr>
757
+ <tr style="border-bottom: 1px solid #DEE2E6;">
758
+ <td style="padding: 8px 10px; color: #212529;"><strong>🌽 Finisher</strong></td>
759
+ <td style="padding: 8px 10px; text-align: right; color: #212529;">{finisher_kg:,.1f}</td>
760
+ <td style="padding: 8px 10px; text-align: right; font-weight: 700; color: #212529;">{finisher_bags_display}</td>
761
  </tr>
762
+ <tr style="background: #F8F9FA; font-weight: 700;">
763
+ <td style="padding: 8px 10px; color: #212529;">TOTAL</td>
764
+ <td style="padding: 8px 10px; text-align: right; color: #212529;">{total_feed_kg:,.1f}</td>
765
+ <td style="padding: 8px 10px; text-align: right; font-weight: 800; font-size: 16px; color: #1E4620;">{total_bags:.1f}</td>
766
  </tr>
767
  </tbody>
768
  </table>
769
  </div>
770
 
771
+ <!-- FEED COST - RED CARD -->
772
+ <div style="
773
+ background: #FFEBEE;
774
+ border: 2px solid #C62828;
775
+ border-radius: 10px;
776
+ padding: 12px 16px;
777
+ margin-bottom: 12px;
778
+ ">
779
+ <div style="font-size: 12px; font-weight: 700; color: #6C757D; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px;">πŸ’° Feed Cost</div>
780
  <div style="display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 14px;">
781
+ <span style="color: #212529;">Approximately</span>
782
+ <span style="
783
+ display: inline-block;
784
+ background: #C62828;
785
+ color: #FFFFFF;
786
+ border-radius: 6px;
787
+ padding: 2px 12px;
788
+ font-size: 18px;
789
+ font-weight: 700;
790
+ ">{rounded_bags}</span>
791
+ <span style="color: #212529;">bags Γ— {currency_symbol}{price_per_bag:,.0f}</span>
792
  </div>
793
+ <div style="font-size: 26px; font-weight: 800; color: #C62828; margin-top: 2px;">
794
  {currency_symbol}{total_cost:,.0f}
795
  </div>
796
  </div>
797
 
798
+ <!-- EXPECTED PERFORMANCE -->
799
+ <div style="
800
+ border-top: 1px solid #DEE2E6;
801
+ padding-top: 10px;
802
+ margin-bottom: 12px;
803
+ ">
804
+ <div style="font-size: 12px; font-weight: 700; color: #6C757D; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;">πŸ“ˆ Expected Performance</div>
805
  <div style="display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px;">
806
+ <div>
807
+ Body weight: <span style="font-weight: 700; color: #212529;">{expected_weight:.3f} kg</span>
808
+ </div>
809
+ <div>
810
+ Flock weight: <span style="font-weight: 700; color: #212529;">{flock_weight:,.1f} kg</span>
811
+ </div>
812
  </div>
813
  </div>
814
 
815
+ <!-- SHARE BUTTONS -->
816
+ <div style="
817
+ border-top: 1px solid #DEE2E6;
818
+ padding-top: 12px;
819
+ ">
820
+ <div style="font-size: 12px; font-weight: 700; color: #6C757D; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;">πŸ“€ Share Results</div>
821
  <div style="display: flex; gap: 8px; flex-wrap: wrap;">
822
  <a href="{share_links['whatsapp']}" target="_blank" style="text-decoration: none;">
823
+ <span style="
824
+ display: inline-block;
825
+ background: #25D366;
826
+ color: #ffffff;
827
+ padding: 6px 14px;
828
+ border-radius: 6px;
829
+ font-size: 13px;
830
+ font-weight: 600;
831
+ cursor: pointer;
832
+ ">WhatsApp</span>
833
  </a>
834
  <a href="{share_links['email']}" target="_blank" style="text-decoration: none;">
835
+ <span style="
836
+ display: inline-block;
837
+ background: #ea4335;
838
+ color: #ffffff;
839
+ padding: 6px 14px;
840
+ border-radius: 6px;
841
+ font-size: 13px;
842
+ font-weight: 600;
843
+ cursor: pointer;
844
+ ">Email</span>
845
  </a>
846
  <a href="{share_links['facebook']}" target="_blank" style="text-decoration: none;">
847
+ <span style="
848
+ display: inline-block;
849
+ background: #1877f2;
850
+ color: #ffffff;
851
+ padding: 6px 14px;
852
+ border-radius: 6px;
853
+ font-size: 13px;
854
+ font-weight: 600;
855
+ cursor: pointer;
856
+ ">Facebook</span>
857
  </a>
858
  <a href="{share_links['twitter']}" target="_blank" style="text-decoration: none;">
859
+ <span style="
860
+ display: inline-block;
861
+ background: #000000;
862
+ color: #ffffff;
863
+ padding: 6px 14px;
864
+ border-radius: 6px;
865
+ font-size: 13px;
866
+ font-weight: 600;
867
+ cursor: pointer;
868
+ ">Twitter/X</span>
869
  </a>
870
  </div>
871
  </div>
872
 
873
+ <div style="
874
+ margin-top: 10px;
875
+ font-size: 11px;
876
+ color: #6C757D;
877
+ border-top: 1px solid #DEE2E6;
878
+ padding-top: 8px;
879
+ ">
880
  ⚠️ Estimate based on {breed} benchmark. Actual results may vary.
881
  </div>
882
  </div>
 
1096
 
1097
 
1098
  # ============================================================
1099
+ # CSS - PROFESSIONAL COLOR SCHEME
1100
  # ============================================================
1101
 
1102
  CSS = """
1103
+ /* ============================================================
1104
+ PROFESSIONAL COLOR SCHEME - 60-30-10 Design Rule
1105
+ ============================================================ */
1106
+
1107
+ /* GLOBAL TOKENS - 60% Dominant Neutrals */
1108
+ :root {
1109
+ --color-bg-main: #F8F9FA;
1110
+ --color-bg-surface: #FFFFFF;
1111
+ --color-text-primary: #212529;
1112
+ --color-text-muted: #6C757D;
1113
+ --color-border: #DEE2E6;
1114
+ }
1115
+
1116
+ /* 30% Structural/Brand Colors */
1117
+ :root {
1118
+ --color-brand-primary: #1E4620;
1119
+ --color-brand-secondary: #386F3E;
1120
+ }
1121
+
1122
+ /* 10% Accent Colors */
1123
+ :root {
1124
+ --color-accent-gold: #FFB800;
1125
+ --color-feed-brown: #8D6E63;
1126
+ --color-cost-red: #C62828;
1127
+ --color-yield-green: #2E7D32;
1128
+ }
1129
+
1130
+ /* Apply to body */
1131
  body, .gradio-container, .gradio-row, .gradio-column, .gradio-group {
1132
+ background-color: var(--color-bg-main) !important;
1133
+ color: var(--color-text-primary) !important;
1134
  }
1135
 
1136
  .gradio-container {
 
1138
  padding: 6px 8px !important;
1139
  }
1140
 
1141
+ /* Main Title */
1142
  .main-title {
1143
  text-align: center;
1144
  padding: 8px 4px 4px 4px;
 
1146
  .main-title h1 {
1147
  font-size: 24px;
1148
  margin-bottom: 2px;
1149
+ color: var(--color-text-primary) !important;
1150
  }
1151
  .main-title p {
1152
  font-size: 14px;
1153
+ color: var(--color-text-muted) !important;
1154
  }
1155
 
1156
+ /* Answer Box - Surface */
1157
  .answer-box {
1158
+ background: var(--color-bg-surface) !important;
1159
  border-radius: 12px !important;
1160
  padding: 8px 10px !important;
1161
+ border: 1px solid var(--color-border) !important;
1162
  }
1163
 
1164
+ /* Email Box */
1165
  .email-box {
1166
+ border: 2px solid var(--color-brand-secondary) !important;
1167
  border-radius: 10px !important;
1168
  padding: 8px !important;
1169
+ background: #F8F9FA !important;
1170
  }
1171
 
1172
+ /* Buttons - Brand Primary */
1173
+ button {
1174
+ min-height: 44px !important;
1175
+ background-color: var(--color-brand-primary) !important;
1176
+ color: #FFFFFF !important;
1177
+ font-weight: 600 !important;
1178
+ border: none !important;
1179
+ border-radius: 8px !important;
1180
  }
1181
 
1182
+ button:hover {
1183
+ background-color: #122D14 !important;
 
1184
  }
1185
 
1186
+ /* Admin Login */
1187
+ .admin-login {
1188
+ border: 2px solid var(--color-accent-gold) !important;
1189
+ border-radius: 10px !important;
1190
+ padding: 12px !important;
1191
+ background: #FFF8E1 !important;
1192
  }
1193
 
1194
  /* Force dark mode override */
1195
  .dark, .dark * {
1196
+ background-color: var(--color-bg-main) !important;
1197
+ color: var(--color-text-primary) !important;
1198
  }
1199
 
1200
  /* Mobile */
 
1304
  gr.Markdown("## πŸ“Š Quick Answer")
1305
  result = gr.HTML(
1306
  value="""
1307
+ <div style="font-size: 14px; color: #6C757D; text-align: center; padding: 30px 10px; background: #FFFFFF; border-radius: 12px; border: 1px solid #DEE2E6;">
1308
  <div style="font-size: 40px; margin-bottom: 10px;">πŸ”</div>
1309
  <div>Enter your details and click <strong>Calculate</strong></div>
1310
+ <div style="font-size: 13px; margin-top: 6px; color: #6C757D;">Your feed estimate appears here</div>
1311
  </div>
1312
  """,
1313
  elem_classes=["answer-box"],