/* =========================================================
   PREMIUM ENGINEERING SAAS THEME
========================================================= */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #0B1E3A;
  color: #E6EDF3;
  min-height: 100vh;
  line-height: 1.4;
}


/* =========================================================
   BASE
========================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.power-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.power-value {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.power-unit {
  font-size: 1.2rem;
  opacity: 0.85;
}

.power-secondary {
  margin-top: 6px;
  font-size: 1.1rem;
  opacity: 0.8;
}

.power-unit-secondary {
  margin-left: 4px;
}


/* =========================================================
   HEADER
========================================================= */

.app-header {
  background: linear-gradient(
    180deg,
    #0b3a66 0%,
    #093357 100%
  );
  color: #ffffff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand-logo {
  height: 90px;
  width: auto;
  flex-shrink: 0;
  background: transparent;
  border: none;
}

.brand-text h1 {
  margin: 0;
  font-size: 2.55rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.35);
}

.capability-line {
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  color: #c7d6ea;

  padding-left: 1rem;
  border-left: 3px solid rgba(255,255,255,0.35);
}

/* =========================================================
   LAYOUT
========================================================= */

.container {
  max-width: 1350px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  gap: 28px;
}

.container-learning {
      max-width: 900px;
      margin: 0 auto;
      padding: 48px 20px;
    }

h1 {
      font-size: 1.8rem;
      margin-bottom: 16px;
      color: #f9fafb;
    }

    h2 {
      font-size: 1.3rem;
      margin-top: 40px;
      color: #d1d5db;
    }

    h3 {
      font-size: 1.05rem;
      margin-top: 24px;
      color: #cbd5f5;
    }

p {
      margin: 12px 0;
      color: #cbd5f5;
    }

    ul {
      margin: 12px 0 12px 20px;
      color: #cbd5f5;
    }

    li {
      margin: 6px 0;
    }

    a {
      color: #60a5fa;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

@media (min-width: 1100px) {
  .container {
    grid-template-columns: 1.3fr 0.9fr;
  }
}

/* =========================================================
   CARD DESIGN
========================================================= */

.card {
  background: #141a24; /* match other calculator */
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}

.card:hover {
  border-color: rgba(255,255,255,0.12);
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 22px;
  color: #cbd5f5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* =========================================================
   MODE SELECTOR (SEGMENTED CONTROL STYLE)
========================================================= */

.mode-wrapper {
  max-width: 1350px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.mode-tabs {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #141a24;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}

.tab {
  flex: 1;
  padding: 12px 0;
  border-radius: 10px;
  border: 1px solid #2b3445;
  background: #1e2533;
  color: #cfd8e3;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  background: #243041;
  transform: translateY(-1px);
}

.tab.active {
  background: linear-gradient(
    180deg,
    #0d8cff,
    #006fd6
  );
  border: none;
  color: #ffffff;
  box-shadow:
    0 6px 18px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
/* =========================================================
   FORM STRUCTURE (CLEANED)
========================================================= */

.grid-form {
  display: grid;
  gap: 20px;
}

/* Do NOT split the entire form into 2 columns.
   We split inside groups instead */
@media (min-width: 600px) {
  .grid-form {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   INPUT GROUPS (Proper Internal Grid)
========================================================= */

.input-group {
  background: #0f1520;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
}

/* Two-column layout inside group on desktop */
@media (min-width: 800px) {
  .input-group {
    grid-template-columns: 1fr 1fr;
  }

  .input-group .group-title {
    grid-column: 1 / -1;
  }

  .input-group .helper-text {
    grid-column: 1 / -1;
  }

  .input-group .fitting-row {
    grid-column: 1 / -1;
  }
}

.group-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* Fluid properties helper link */
.helper-text a {
  color: #60a5fa;              /* bright blue */
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(96,165,250,0.4);
  transition: all 0.2s ease;
}

.helper-text a:hover {
  color: #93c5fd;
  border-bottom: 1px solid #93c5fd;
}

.helper-text {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #cbd5f5;              /* lighter text */
}


/* =========================================================
   FIELD
========================================================= */

.field {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #aeb9cc;
}

input,
select {
  background: linear-gradient(
    135deg,
    #0f1b2d,
    #14263f
  );
  border: 1.5px solid rgba(96,165,250,0.35);
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffffff;
  font-weight: 500;
  font-size: 0.95rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

select:focus {
  outline: none;
  border-color: #3fa9ff;
  box-shadow: 0 0 0 3px rgba(63,169,255,0.25);
}

select option {
  background-color: #111827;
  color: #e6edf5;
}
  transition: all 0.2s ease;
}

input:hover,
select:hover {
  border-color: rgba(96,165,250,0.7);
}

input:focus,
select:focus {
  outline: none;
  border-color: #3fa9ff;
  box-shadow:
    0 0 0 3px rgba(63,169,255,0.25),
    0 0 12px rgba(63,169,255,0.25);

  background: linear-gradient(
    135deg,
    #122038,
    #1a2f4d
  );
}
/* =========================================================
   ATM TOGGLE
========================================================= */

.inline-toggle {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================
   FITTING ROW (Compact Action Layout)
========================================================= */

.fitting-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: end;
}

.fitting-row .primary {
  height: 40px;
  font-size: 0.85rem;
}


/* =========================================================
   ATM TOGGLE
========================================================= */

.inline-toggle {
  margin-top: 4px;
  font-size: 0.72rem;
  color: #9fb3c8;
  gap: 6px;
}


/* =========================================================
   BUTTON
========================================================= */

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

/* =========================================
   PREMIUM ACTION BUTTON (Mode-style)
========================================= */

.primary {
  position: relative;
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;

  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;

  color: #ffffff;
  border: 1px solid rgba(63,169,255,0.35);

  background: linear-gradient(
    180deg,
    #1f6fd1,
    #0e4fa3
  );

  box-shadow:
    0 8px 18px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.15);

  cursor: pointer;
  transition: all 0.18s ease;
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.primary:active {
  transform: translateY(0);
  box-shadow:
    0 6px 14px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

#calculateBtn {
  max-width: 320px;
  font-size: 1rem;
}

/* =========================================================
   RESULT HIGHLIGHT
========================================================= */

.result-highlight {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px;
  margin-bottom: 22px;

  background: linear-gradient(
    135deg,
    rgba(14,165,233,0.18),
    rgba(59,130,246,0.22)
  );

  border-radius: 14px;
  border: 1px solid rgba(59,130,246,0.35);
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
}

.result-value {
  font-size: 2.4rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.result-label {
  color: #cbd5f5;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.result-unit {
  margin-left: 6px;
  color: #ffffff;
}

.result-section h3 {
  color: #cbd5f5;
  font-weight: 600;
}

/* =========================================================
   TABLES
========================================================= */

.results-clean {
  color: #ffffff;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.results-clean th {
  text-align: left;
  padding: 8px 0;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 1px solid var(--border-soft);
}

.results-clean td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.results-clean td:nth-child(2) {
  text-align: right;
  font-family: "JetBrains Mono", monospace;
}

.results-clean td:nth-child(3) {
  text-align: right;
  opacity: 0.6;
}

/* =========================================================
   SCHEMATIC PANEL
========================================================= */

#schematicCard {
  max-width: 1350px;
  margin: 40px auto;
  padding: 0 24px;
  margin-bottom: 30px;
}

.schematic-box {
  height: 260px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* =========================================================
   FOOTER
========================================================= */

.site-footer {
  margin-top: 60px;
  padding: 30px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.input-group {
  background: #101722;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px;
}

.group-title {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #9fb3c8;
}

.fitting-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  align-items: end;
}

@media (min-width: 600px) {
  .grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fitting-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: end;
}

.fitting-row .primary {
  height: 42px;
}

.input-group {
  background: #101722;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}

.group-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: #9fb3c8;
  letter-spacing: 0.03em;
}

.fitting-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: end;
}

/* Force Flow group to stay vertical */
.flow-group {
  grid-template-columns: 1fr !important;
}

/* Force Elevation group to be single column */
.elevation-group {
  grid-template-columns: 1fr !important;
}

/* ===============================
   ADDED FITTINGS LIST – UPGRADE
================================ */

#fittingsList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.fitting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px 14px;
  border-radius: 10px;

  background: linear-gradient(
    135deg,
    #0f172a,
    #111827
  );

  border: 1px solid rgba(59,130,246,0.25);

  color: #e2e8f0;
  font-size: 0.88rem;
  letter-spacing: 0.02em;

  transition: all 0.2s ease;
}

.fitting-item:hover {
  border-color: rgba(59,130,246,0.6);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

.fitting-text {
  font-family: "JetBrains Mono", monospace;
  color: #cbd5f5;
}

.fitting-remove {
  cursor: pointer;
  color: #f87171;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.15s ease, color 0.15s ease;
}

.fitting-remove:hover {
  transform: scale(1.2);
  color: #ef4444;
}

/* ===============================
   ADDED FITTINGS HEADER
================================ */

.fittings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 10px 14px;
  margin-bottom: 12px;

  background: linear-gradient(
    135deg,
    rgba(14,165,233,0.15),
    rgba(59,130,246,0.12)
  );

  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 10px;
}

.fittings-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.fittings-badge {
  font-size: 0.75rem;
  font-weight: 600;

  padding: 4px 10px;
  border-radius: 999px;

  background: rgba(59,130,246,0.25);
  border: 1px solid rgba(59,130,246,0.4);
  color: #93c5fd;
}

.fittings-empty {
  padding: 12px;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 8px;
}

.power-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.power-primary {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.power-value {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.power-unit {
  font-size: 1.1rem;
  opacity: 0.85;
}

.power-secondary {
  margin-top: 6px;
  font-size: 1rem;
  opacity: 0.75;
  display: flex;
  gap: 4px;
}

.result-highlight {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-highlight {
  color: #ffffff;
}

.result-highlight .power-value,
.result-highlight .power-unit,
.result-highlight .power-secondary {
  color: #ffffff;
}

.collapsed {
  display: none;
}
.collapse-toggle {
  cursor: pointer;
}

.optimum-value {
  color: #ffffff;
  font-weight: 600;
  font-size: 1.2rem;
}

.optimum-power {
  color: #9ecbff;
  font-size: 0.95rem;
}

.optimum-container {
  margin-top: 8px;
}

.optimum-label {
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: #9ecbff;
  opacity: 0.8;
}

.optimum-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffcc00;
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.35);
}

.optimum-power {
  font-size: 0.95rem;
  color: #ffffff;
  margin-top: 4px;
}

.results-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 10px;
}

#optimumBlock {
  padding: 10px 15px;
}

#optimumBlock h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

#optimumDiameter {
  font-size: 1rem;
}

.hidden {
  display: none;
}

.active-link {
  color: #777;
  cursor: default;
}

/* ===============================
   Related Pump Calculators Block
================================ */

.related-calculators {
  margin-top: 40px;
  padding: 20px;
  border-radius: 12px;
  background: #1f1f1f;
  border: 1px solid #2e2e2e;
}

.related-calculators h3 {
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.related-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-links a {
  text-decoration: none;
  color: #b3d4ff;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.related-links a:hover {
  color: #ffffff;
  padding-left: 6px;
}

/* Mobile spacing */
@media (max-width: 600px) {
  .related-calculators {
    padding: 16px;
  }

  .related-links a {
    font-size: 0.9rem;
  }
}

.learning-section {
  margin-top: 50px;
  padding: 24px;
  border-radius: 12px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  line-height: 1.6;
}

.learning-section h2 {
  margin-top: 25px;
  font-size: 1.1rem;
  color: #ffffff;
}

.learning-section p,
.learning-section li {
  font-size: 0.95rem;
  color: #cccccc;
}

.learning-section ul {
  margin-left: 18px;
}

/* ===============================
   Global Footer
================================ */

.site-footer {
  margin-top: 60px;
  padding: 30px 20px;
  background: #121212;
  border-top: 1px solid #2a2a2a;
}

.footer-inner {
  max-width: 1100px;
  margin: auto;
  text-align: center;
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: #ffffff;
  margin-bottom: 18px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 18px;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: #b3d4ff;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-copy {
  font-size: 0.8rem;
  color: #ffffff;
}

/* Mobile */
@media (max-width: 600px) {
  .footer-links {
    gap: 12px;
  }

  .footer-disclaimer {
    font-size: 0.8rem;
  }
}

/* ===============================
   Related Calculators Upgrade
================================ */

.related-calculators {
  margin-top: 40px;
  padding: 28px;
  background: #0f1c2f;
  border: 1px solid #1f2d45;
  border-radius: 12px;
}

.related-calculators h2 {
  margin-bottom: 10px;
}

.related-subtitle {
  margin-bottom: 20px;
  color: #9fb3d9;
  max-width: 750px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  padding: 16px 18px;
  background: #14263f;
  border: 1px solid #223a5e;
  border-radius: 10px;
  text-decoration: none;
  color: #e5e7eb;
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
}

.related-card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: #ffffff;
}

.related-card span {
  font-size: 0.85rem;
  color: #9fb3d9;
}

#priceInputs {
  display: grid;
  gap: 14px;
}

@media (min-width: 800px) {
  #priceInputs {
    grid-template-columns: 1fr 1fr;
  }
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper th {
  text-align: left;
  padding-bottom: 10px;
  color: #9fb3d9;
}

.table-wrapper th:nth-child(2),
.table-wrapper th:nth-child(3),
.table-wrapper td:nth-child(2),
.table-wrapper td:nth-child(3) {
  text-align: right;
}

.table-wrapper td:nth-child(2),
.table-wrapper td:nth-child(3) {
  font-family: "JetBrains Mono", monospace;
}

.results-clean {
  width: 100%;
  min-width: 750px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.results-clean th,
.results-clean td {
  padding: 10px 14px;
}

.results-clean th {
  text-align: left;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.results-clean td {
  background: #101722;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.results-clean td:nth-child(n+2) {
  text-align: right;
  font-family: "JetBrains Mono", monospace;
}

@media (max-width: 768px) {

  .grid-form {
    grid-template-columns: 1fr !important;
  }

  .results-clean {
    font-size: 0.8rem;
  }

  .results-clean th,
  .results-clean td {
    padding: 8px 10px;
  }

}

.mode-indicator {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #93c5fd;
}

.combo-cell {
  min-width: 260px;
  line-height: 1.4;
}

.combo-cell div {
  margin: 2px 0;
}

.plus-sign {
  color: #60a5fa;
  font-weight: 600;
}

.rank-cell {
  font-weight: 700;
  font-size: 1rem;
  color: #60a5fa;
}

.results-clean tr {
  transition: background 0.2s ease;
}

.results-clean tbody tr:hover {
  background: rgba(59,130,246,0.08);
}

@media (max-width: 768px) {

  .results-clean {
    min-width: unset;
  }

  .results-clean thead {
    display: none;
  }

  .results-clean tr {
    display: block;
    margin-bottom: 18px;
    padding: 12px;
    background: #101722;
    border-radius: 10px;
  }

  .results-clean td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
  }

  .results-clean td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #93c5fd;
  }
}

/* ===============================
   RESULT CARD LAYOUT
================================ */

.result-card {
  background: linear-gradient(
    135deg,
    #0f1c2f,
    #13233b
  );
  border: 1px solid rgba(96,165,250,0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  transition: 0.25s ease;
}

.result-card:hover {
  border-color: rgba(96,165,250,0.5);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.rank-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 12px;
}

.fert-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.fert-name {
  color: #e2e8f0;
   white-space: nowrap;
}

.fert-amount {
  font-family: "JetBrains Mono", monospace;
  color: #ffffff;
}

.divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 12px 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 4px;
}

.cost-row {
  color: #facc15;
}

/* ===============================
   CROP GUIDANCE BOX
================================ */

.guidance-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.guidance-note {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #93c5fd;
}

.secondary {
  margin-top: 10px;
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: 10px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.4);
  color: #93c5fd;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary:hover {
  background: rgba(59,130,246,0.25);
  transform: translateY(-1px);
}

.per-ha-note {
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: #93c5fd;
}

/* Light separator inside target section */
.divider-light {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 16px 0 18px 0;
}

.guidance-box {
  margin-top: 16px;
  padding: 16px 18px;
  background: linear-gradient(
    135deg,
    rgba(59,130,246,0.08),
    rgba(59,130,246,0.04)
  );
  border: 1px solid rgba(59,130,246,0.35);
  border-radius: 12px;
}

.guidance-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #60a5fa;
}

.guidance-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 6px;
  column-gap: 20px;
  font-size: 0.85rem;
}

.guidance-grid div:nth-child(odd) {
  color: #cbd5f5;
}

.guidance-grid div:nth-child(even) {
  font-family: "JetBrains Mono", monospace;
  color: #ffffff;
}

.guidance-note {
  margin-top: 10px;
  font-size: 0.75rem;
  color: #93c5fd;
  opacity: 0.9;
}

.global-note {
  margin-top: 6px;
  font-size: 0.7rem;
  color: #64748b;
}

/* ===============================
   FERTILIZER PRICE UI UPGRADE
================================ */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.price-card {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  transition: 0.2s ease;
}

.price-card:hover {
  border-color: rgba(96,165,250,0.4);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.price-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: #93c5fd;
  line-height: 1.4;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}

.price-row label {
  font-size: 0.8rem;
  color: #cbd5f5;
}

.price-row input {
  width: 120px;
}

/* ===============================
   CALCULATE SECTION
================================ */

.calculate-section {
  margin-top: 30px;
  padding: 24px 20px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(14,165,233,0.08),
    rgba(59,130,246,0.05)
  );
  border: 1px solid rgba(59,130,246,0.25);
  text-align: center;
}

.calculate-section .primary {
  max-width: 360px;
  margin: 0 auto;
  display: block;
  font-size: 1.05rem;
}

.per-ha-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #93c5fd;
}

/* ===============================
   CALCULATE WRAPPER FIX
================================ */

.calculate-wrapper {
  max-width: 1350px;
  margin: 40px auto;
  padding: 0 24px;
}

.calculate-section {
  padding: 28px 24px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(14,165,233,0.08),
    rgba(59,130,246,0.05)
  );
  border: 1px solid rgba(59,130,246,0.25);
  text-align: center;
}

/* ===============================
   STRUCTURED RESULT LAYOUT
================================ */

.structured-card {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  color: #ffffff;
}

.structured-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.rank-label {
  font-weight: 700;
  font-size: 1rem;
  background: #1e293b;
  padding: 6px 10px;
  border-radius: 8px;
}

.best-badge {
  background: #22c55e;
  color: #0b1220;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
}

.structured-table {
  display: grid;
  gap: 8px;
}

.structured-heading {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  font-weight: 600;
  color: #93c5fd;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.result-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 6px 0;
}

.fert-name {
  font-weight: 500;
}

.fert-amount,
.fert-cost {
  text-align: right;
}

.structured-total {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.results-subtitle {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 8px;
  color: #93c5fd;
  font-size: 0.85rem;
}

.price-group {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.bag-main {
  font-weight: 600;
  color: #ffffff;
}

.bag-total {
  font-size: 0.8rem;
  color: #9fb3d9;
  margin-top: 3px;
}

.full-width-card {
  grid-column: 1 / -1;
}

.fert-main-name {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.fert-sub-name {
  font-size: 0.75rem;
  color: #93c5fd;
  opacity: 0.8;
}
