/* Multi-entity calculator — designed to work WITH the site's main.css + modern.css */

.calc-section { padding-top: 32px; padding-bottom: 64px; }

/* ── Summary grid ── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}
.summary-box {
  background: #fff;
  padding: 18px 14px;
  border-radius: 12px;
  border: 1px solid rgba(20,37,54,.08);
  box-shadow: 0 8px 24px rgba(20,37,54,.04);
  text-align: center;
}
.summary-box--accent { border-top: 3px solid #c7925b; }
.summary-box--yellow { border-top: 3px solid #e5a118; }
.summary-box--green  { border-top: 3px solid #10b981; }
.summary-box--red    { border-top: 3px solid #dc3545; }
.summary-label {
  font-size: 10px;
  font-weight: 800;
  color: #647182;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
  min-height: 28px;
}
.summary-val {
  font-size: 16px;
  font-weight: 900;
  color: #142536;
}

/* ── Subject cards grid ── */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
.subject-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  border: 1px solid rgba(20,37,54,.08);
  box-shadow: 0 18px 45px rgba(20,37,54,.055);
}
.subject-title {
  font-size: 12px;
  font-weight: 900;
  color: #c7925b;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid rgba(20,37,54,.08);
  padding-bottom: 10px;
}

/* ── Inputs ── */
.input-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 15px;
}
.field label {
  font-size: 10px;
  font-weight: 800;
  color: #647182;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.calc-input {
  font-size: 15px;
  font-weight: 700;
  border: 1px solid rgba(20,37,54,.14);
  border-radius: 8px;
  padding: 10px 14px;
  background-color: #f9f8f5;
  color: #142536;
  width: 100%;
}
.calc-input:focus {
  border-color: #c7925b;
  box-shadow: 0 0 0 3px rgba(199,146,91,.14);
  background-color: #fff;
  outline: none;
}

/* ── Select with dropdown arrow ── */
.select-wrapper { position: relative; }
.calc-select {
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(20,37,54,.14);
  border-radius: 8px;
  padding: 10px 36px 10px 14px;
  background-color: #f9f8f5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23142536' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  color: #142536;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  cursor: pointer;
}
.calc-select:focus {
  border-color: #c7925b;
  box-shadow: 0 0 0 3px rgba(199,146,91,.14);
  outline: none;
}

/* ── Data rows ── */
.data-rows { margin-top: 8px; }
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(20,37,54,.06);
}
.data-row:last-child { border-bottom: none; }
.label-main {
  font-size: 12px;
  color: #4a5566;
  display: block;
}
.label-sub {
  font-size: 10px;
  color: #c7925b;
  display: block;
  font-weight: 500;
}
.value-text {
  font-weight: 700;
  font-size: 13px;
  color: #142536;
  white-space: nowrap;
}

/* Ghost input (inline editable values) */
.ghost-input {
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(20,37,54,.2);
  width: 70px;
  text-align: right;
  color: #142536;
  padding: 2px;
  font-weight: 700;
  outline: none;
  font-size: 13px;
}
.ghost-input:focus {
  border-bottom-color: #c7925b;
}

/* ── Net salary display ── */
.neto-display {
  background: rgba(16,185,129,.06);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(16,185,129,.15);
}
.neto-label {
  color: #10b981;
  font-weight: 800;
  font-size: 14px;
}
.neto-val {
  color: #10b981;
  font-weight: 900;
  font-size: 18px;
}

/* ── Total cost row ── */
.total-cost {
  color: #c7925b;
  font-weight: 800;
  font-size: 14px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 2px solid rgba(20,37,54,.08);
}

/* ── Action buttons ── */
.calc-actions {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.btn-calc-action {
  background: #c7925b;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-calc-action:hover { background: #b5834f; }

.btn-calc-reset {
  background: #dc3545;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-calc-reset:hover { background: #bb2d3b; }

/* ── Error flash for select ── */
.error-select { border-color: #dc3545 !important; animation: shake 0.4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ── Responsive ── */
@media (max-width: 1199px) {
  .subjects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .subject-card { padding: 20px; }
}
@media (max-width: 767px) {
  .calc-section { padding-top: 20px; padding-bottom: 40px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .subjects-grid { grid-template-columns: 1fr; }
  .subject-card { padding: 16px; }
  .calc-actions { flex-direction: column; align-items: stretch; }
  .neto-val { font-size: 16px; }
  .summary-val { font-size: 14px; }
}
