:root {
  --ink: #172033;
  --muted: #5d697d;
  --line: #d9e0ea;
  --panel: #ffffff;
  --soft: #f5f8fb;
  --brand: #146c6f;
  --brand-dark: #0d4f52;
  --warning: #b87900;
  --danger: #b3261e;
  --success: #1f8a5b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #eef3f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  letter-spacing: 0;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px;
  color: #ffffff;
  background: #134e5a;
  border-radius: 8px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.app-header p {
  margin-bottom: 0;
  color: #dcecef;
}

.app-tabs {
  margin-top: 22px;
}

.app-tab {
  padding: 14px 18px;
  color: var(--muted);
  background: #f5f8fb;
  border: 1px solid var(--line);
  font-size: 17px;
  font-weight: 850;
}

.app-tab-selected {
  color: var(--brand-dark);
  background: #ffffff;
  border-top: 4px solid var(--brand);
}

.guide-panel,
.form-section,
.action-bar,
.results {
  margin-top: 22px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.warning-panel {
  padding: 20px;
  background: #fffaf0;
  border: 2px solid #d9a441;
  border-radius: 8px;
}

.warning-panel h2 {
  color: #7a4a00;
}

.warning-text {
  color: #5f4700;
  font-weight: 750;
}

.guide-panel > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

.guide-item {
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.guide-item strong,
.guide-item span {
  display: block;
}

.guide-item span {
  margin: 5px 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.guide-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.indicator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
}

.application-section {
  background: #ffffff;
}

.application-field {
  max-width: 640px;
}

.application-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 850;
}

.application-label-text {
  font-size: 18px;
}

.application-input {
  width: 100%;
}

.indicator-card {
  display: flex;
  min-height: 335px;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #ffffff;
  border: 2px solid var(--line);
  border-left: 8px solid var(--brand);
  border-radius: 8px;
}

.type-rupees-input {
  border-left-color: #7a5799;
}

.type-135-rating-input {
  border-left-color: #b87900;
}

.type-number-input,
.type-numbercount-input {
  border-left-color: #2f6fb2;
}

.type-self-calculated-by-excel {
  border-left-color: #667085;
}

.indicator-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.indicator-title {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
}

.category-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.mandatory-label {
  padding: 3px 7px;
  color: #8a2c0d;
  background: #fff0e8;
  border: 1px solid #f0b39b;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.optional-label {
  color: #344054;
  background: #eef1f4;
  border-color: #c8ced8;
}

.type-pill {
  flex: 0 0 auto;
  align-self: flex-start;
  max-width: 230px;
  padding: 8px 12px;
  color: #163240;
  background: #edf6f6;
  border: 1px solid #c9dfdf;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.badge-self-scored-dropdown {
  color: #0e4d50;
  background: #e4f3f2;
  border-color: #9ccfcb;
}

.badge-rupees-input {
  color: #512b67;
  background: #f1e8f7;
  border-color: #cfb5df;
}

.badge-135-rating-input {
  color: #6b4300;
  background: #fff0c2;
  border-color: #e3bf62;
}

.badge-number-input,
.badge-numbercount-input {
  color: #174d82;
  background: #e8f1fb;
  border-color: #abcbe8;
}

.badge-self-calculated-by-excel {
  color: #344054;
  background: #eef1f4;
  border-color: #c8ced8;
}

.prompt {
  font-weight: 700;
}

.help-text,
.notes,
.supporting-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.notes {
  margin-bottom: auto;
}

.field-control,
.calculated-box {
  width: 100%;
  min-height: 54px;
  font-size: 18px;
}

.field-control {
  border: 2px solid #8fa2b8;
  border-radius: 8px;
  background: #ffffff;
}

.field-control input {
  font-size: 18px;
}

.field-control:focus,
.field-control:focus-within,
.rupee-input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 108, 111, 0.16);
  outline: none;
}

.rupee-input-wrap {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: stretch;
  min-height: 56px;
  overflow: hidden;
  background: #ffffff;
  border: 2px solid #8fa2b8;
  border-radius: 8px;
}

.rupee-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #512b67;
  background: #f1e8f7;
  border-right: 1px solid #cfb5df;
  font-size: 24px;
  font-weight: 850;
}

.rupee-field {
  min-height: 54px;
  border: 0;
  border-radius: 0;
}

.rupee-field:focus,
.rupee-field:focus-within {
  box-shadow: none;
}

.calculated-box {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  color: #344054;
  background: #eef1f4;
  border: 2px dashed #98a2b3;
  border-radius: 8px;
  font-weight: 750;
}

.radio-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  font-size: 17px;
}

.radio-input {
  margin-right: 6px;
}

.radio-label {
  min-height: 52px;
  padding: 13px 12px;
  background: #fffaf0;
  border: 2px solid #d9b45b;
  border-radius: 8px;
  font-weight: 800;
}

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 -4px 18px rgba(23, 32, 51, 0.08);
}

.calculate-button {
  min-height: 50px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.calculate-button:hover {
  background: var(--brand-dark);
}

.download-button {
  min-height: 46px;
  margin-top: 16px;
  padding: 0 18px;
  color: #ffffff;
  background: #2f6fb2;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.download-button:hover {
  background: #24598f;
}

.download-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.download-button-primary {
  min-height: 52px;
  margin-top: 0;
  padding: 0 22px;
  font-size: 18px;
}

.completion-message {
  color: var(--muted);
  font-weight: 700;
}

.hidden {
  display: none;
}

.result-summary {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: stretch;
}

.result-section {
  margin-bottom: 18px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-section:last-child {
  margin-bottom: 0;
}

.report-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.report-meta > div {
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.report-meta span,
.report-meta strong {
  display: block;
}

.report-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-panel,
.table-block {
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.score-number {
  margin: 8px 0 10px;
  font-size: 64px;
  line-height: 1;
  font-weight: 850;
}

.score-number-small {
  font-size: 44px;
}

.metric-label {
  color: var(--muted);
  font-weight: 800;
}

.band {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 850;
}

.band-high {
  color: var(--success);
  background: #dff3e8;
}

.band-moderate {
  color: var(--warning);
  background: #fff2cc;
}

.band-low {
  color: var(--danger);
  background: #fde8e6;
}

.band-poor {
  color: #8b1a1a;
  background: #f9d3cf;
}

.recommendation,
.caution-note {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.45;
}

.gauge {
  max-width: 560px;
  min-height: 300px;
  margin: 0 auto;
}

.gauge-panel {
  padding: 16px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gauge-readout {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  padding-top: 12px;
  text-align: left;
  border-top: 1px solid var(--line);
}

.gauge-readout > div {
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.readout-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.gauge-readout strong {
  display: block;
  font-size: 18px;
  line-height: 1.35;
}

.readout-band {
  display: inline-block;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
}

.tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}

.dash-table-container {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .page {
    padding: 14px;
  }

  .app-header,
  .result-summary,
  .tables-grid,
  .gauge-readout {
    grid-template-columns: 1fr;
  }

  .app-header {
    display: grid;
  }

  .indicator-grid,
  .guide-panel > div {
    grid-template-columns: 1fr;
  }

  .indicator-top {
    flex-direction: column;
  }

  .type-pill {
    max-width: 100%;
  }

  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }
}
