

.ec-wrap {
  max-width: 480px;
  margin: 1.5rem auto;
  font-family: 'Sora', sans-serif;
}
.ec-wrap p,
.ec-wrap p:empty {
  margin: 0 !important;
  padding: 0 !important;
}
.mode-group {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.mode-btn {
  flex: 1;
  height: 54px;
  border-radius: 12px;
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px solid #dedad3;
  background: #f0ede8;
  color: #b0ada8;
}

.mode-btn .mode-label { font-size: 15px; font-weight: 700; }
.mode-btn .mode-sub   { font-size: 12px; font-weight: 700; opacity: 1; font-family: 'DM Mono', monospace; }

.mode-btn.active-sarj {
  background: #2a5cff;
  border-color: #2a5cff;
  color: #fff;
  box-shadow: 0 4px 14px rgba(42, 92, 255, 0.35);
}

.mode-btn.active-desarj {
  background: #d85a30;
  border-color: #d85a30;
  color: #fff;
  box-shadow: 0 4px 14px rgba(216, 90, 48, 0.35);
}

.mode-btn:not(.active-sarj):not(.active-desarj):hover {
  border-color: #b0ada8;
  color: #7a7670;
}

.ec-top-card {
  background: #fff;
  border: 1px solid #dedad3;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 10px;
}

.ec-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ec-lbl {
  font-size: 13px;
  font-weight: 600;
  color: #7a7670;
  width: 90px;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
}

.ec-volt-lbl {
  font-size: 13px;
  color: #7a7670;
  font-family: 'DM Mono', monospace;
}

.ec-input-v {
  height: 40px;
  border: 1.5px solid #dedad3;
  border-radius: 8px;
  background: #f0ede8;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: #1a1916;
  padding: 0 12px;
  outline: none;
  width: 110px;
  display: block;
  vertical-align: middle;
  transition: border-color 0.15s, background 0.15s;
}

.ec-input-v:focus {
  border-color: #2a5cff;
  background: #fff;
}

.ec-hint {
  font-size: 12px;
  color: #777;
  margin-top: 6px;
  font-style: normal;
  padding-left: 98px;
}

.field-box {
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
}

.field-box.r-box { background: #EEF1FF; border: 1.5px solid #b8c4f8; }
.field-box.c-box { background: #E6F7F3; border: 1.5px solid #8fd5c0; }
.field-box.t-box { background: #FFF8EC; border: 1.5px solid #f5d48a; }

.field-top {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 12px;
}

.field-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'DM Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.field-top p,
.field-top div {
  margin: 0 !important;
  padding: 0 !important;
}
.r-box .field-icon { background: #2a5cff; color: #fff; }
.c-box .field-icon { background: #1E8455; color: #fff; }
.t-box .field-icon { background: #c47e00; color: #fff; }

.field-input {
  height: 40px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  color: #1a1916;
  padding: 0 12px;
  outline: none;
  width: 90px !important;
  display: block;
  vertical-align: middle;
  transition: border-color 0.15s, background 0.15s;
}

.r-box .field-input { background: #dce3ff; }
.r-box .field-input:focus { border-color: #2a5cff; background: #fff; }
.c-box .field-input { background: #c8ede3; }
.c-box .field-input:focus { border-color: #1E8455; background: #fff; }
.t-box .field-input { background: #fdefc8; }
.t-box .field-input:focus { border-color: #c47e00; background: #fff; }

.field-hint {
  font-size: 12px;
  color: #777;
  margin-top: 5px;
  font-style: normal;
  padding-left: 44px;
}

.unit-group {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-left: auto;
}

.unit-btn {
  height: 34px;
  padding: 0 14px;
  margin:0 2px;
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: #7a7670;
}

.r-box .unit-btn.active { background: #2a5cff !important; color: #fff !important; border-color: #2a5cff !important; }
.c-box .unit-btn.active { background: #1E8455 !important; color: #fff !important; border-color: #1E8455 !important; }
.t-box .unit-btn.active { background: #c47e00 !important; color: #fff !important; border-color: #c47e00 !important; }

.result-card {
  border: 1.5px solid #dedad3;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
  background: #E6F7F3;
}

.result-card.has-result.sarj   { border-color: #2a5cff; background: #E6F7F3; }
.result-card.has-result.desarj { border-color: #d85a30; background: #FFF0EE; }

.result-hdr {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7a7670;
  margin-bottom: 10px;
}

.formula-strip {
  background: #1a1916;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 14px;
  display: inline-block;
}

.fm {
  font-family: Georgia, serif;
  font-size: 18px;
  color: #f5f4f0;
  white-space: nowrap;
}

.fm sup {
  color: #a8c4ff;
  font-size: 11px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.r-item {
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
}

.r-item-lbl {
  font-size: 12px;
  color: #7a7670;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.r-item-val {
  font-family: 'DM Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
}

.sarj-color   { color: #1E8455; }
.desarj-color { color: #d85a30; }

.r-item-unit {
  font-size: 13px;
  color: #7a7670;
  font-family: 'DM Mono', monospace;
}

.progress-wrap { margin-top: 14px; }

.progress-lbl {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #7a7670;
  margin-bottom: 5px;
}

.progress-bar {
  height: 8px;
  background: #dedad3;
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.4s ease;
  width: 0%;
}

.progress-fill.sarj   { background: #1E8455; }
.progress-fill.desarj { background: #d85a30; }

.placeholder-txt {
  font-size: 14px;
  color: #7a7670;
  font-family: 'DM Mono', monospace;
}

.error-msg {
  color: #b03a2e;
  font-size: 13px;
  font-family: 'DM Mono', monospace;
}

.reset-btn {
  width: 100%;
  height: 40px;
  border: 1.5px solid #dedad3;
  border-radius: 8px;
  background: transparent;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #7a7670;
  cursor: pointer;
  transition: all 0.15s;
}

.reset-btn:hover {
  border-color: #b03a2e;
  color: #b03a2e;
}

@media (max-width: 420px) {
  .result-grid              { grid-template-columns: 1fr 1fr; }
  .r-item-val               { font-size: 16px; }
  .ec-hint, .field-hint     { padding-left: 0; margin-top: 6px; }
  .unit-group               { margin-left: 0; margin-top: 8px; }
}
