/* Hús Receptek – frontend stílus */

.hr-app,
.hr-app *,
.hr-app *::before,
.hr-app *::after { box-sizing: border-box; }

.hr-app {
  position: relative;
  overflow: hidden;
  padding: 34px 20px 60px;
  color: #f4efe9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 118%, rgba(255, 104, 20, 0.30), transparent 46%),
    radial-gradient(circle at 12% 6%, rgba(255, 158, 46, 0.12), transparent 34%),
    linear-gradient(180deg, #0a0a0c 0%, #121114 48%, #17110d 100%);
  isolation: isolate;
}

.hr-app.hr-full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 100vh;
}

.hr-app h1,
.hr-app h2,
.hr-app h3 { font-family: inherit; }

/* faszén / grillrács textúra */
.hr-bg-grate {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.055) 0 2px, transparent 2px 54px),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.5) 0 1px, transparent 1px 7px);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  opacity: .55;
}

.hr-bg-ember {
  position: absolute;
  z-index: -2;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: .34;
  animation: hrEmber 7s ease-in-out infinite alternate;
}

.hr-ember-one { left: -180px; bottom: -220px; background: rgba(255, 92, 12, 0.55); }
.hr-ember-two { right: -200px; bottom: -260px; background: rgba(255, 176, 32, 0.40); animation-delay: -3s; }

@keyframes hrEmber {
  from { transform: translate3d(0,0,0) scale(1); opacity: .28; }
  to   { transform: translate3d(26px,-22px,0) scale(1.1); opacity: .42; }
}

@media (prefers-reduced-motion: reduce) {
  .hr-bg-ember { animation: none; }
}

.hr-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
}

/* fejléc */
.hr-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }

.hr-back {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 22px;
  line-height: 1;
  text-decoration: none !important;
  color: #f4efe9 !important;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 180ms ease, transform 180ms ease;
}
.hr-back:hover { background: rgba(255, 124, 32, 0.22); transform: translateX(-3px); }

.hr-title { flex: 1; min-width: 0; }

.hr-title h1 {
  margin: 0;
  padding: 0;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
  background: linear-gradient(135deg, #fff3e2 0%, #ffb648 55%, #ff6b1a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hr-title p { margin: 6px 0 0; font-size: 14px; color: rgba(244, 239, 233, 0.6); }

.hr-lock {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: #f4efe9;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: border-color 180ms ease, background 180ms ease;
}
.hr-lock:hover { border-color: rgba(255, 124, 32, 0.55); background: rgba(255, 124, 32, 0.14); }
.hr-lock.is-open {
  background: linear-gradient(135deg, rgba(255,176,48,0.22), rgba(255,92,12,0.18));
  border-color: rgba(255, 158, 46, 0.6);
}

/* skálázó */
.hr-scale {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 26px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(18, 16, 18, 0.86);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.hr-scale-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 176, 72, 0.85);
  margin-bottom: 12px;
}

.hr-scale-row { display: flex; align-items: center; gap: 10px; }

.hr-step {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 16px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  color: #f4efe9;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  transition: background 160ms ease;
}
.hr-step:hover { background: rgba(255, 124, 32, 0.22); }

.hr-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 52px;
  border-radius: 16px;
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.14);
}

.hr-app .hr-input-wrap input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  outline: none;
  color: #fff;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-family: inherit;
  -moz-appearance: textfield;
}
.hr-input-wrap input::-webkit-outer-spin-button,
.hr-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hr-input-wrap span { font-size: 16px; font-weight: 700; color: rgba(255, 176, 72, 0.9); }

.hr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.hr-chips button {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: rgba(244,239,233,0.82);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 160ms ease;
}
.hr-chips button:hover { color: #fff; border-color: rgba(255,158,46,0.6); }
.hr-chips button.is-active {
  color: #170e06;
  background: linear-gradient(135deg, #ffd79a, #ff8a1e);
  border-color: transparent;
}

.hr-factor { margin-top: 12px; font-size: 13px; font-weight: 700; color: rgba(255, 176, 72, 0.85); }

/* kártyák */
.hr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}

.hr-card {
  position: relative;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03)),
    rgba(16, 14, 16, 0.82);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 26px 70px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.hr-card::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff8a1e, #ff3d00, transparent);
  opacity: .75;
}

.hr-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 138, 30, 0.45);
  box-shadow: 0 32px 84px rgba(0,0,0,0.55), 0 0 40px rgba(255, 92, 12, 0.14);
}

.hr-card-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.hr-card-head { flex: 1; min-width: 0; }

.hr-card-top h2 {
  margin: 0;
  padding: 0;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.16;
  color: #fff;
}

.hr-card-note { margin: 6px 0 0; font-size: 13px; line-height: 1.45; color: rgba(244,239,233,0.55); }

.hr-card-tools { display: flex; gap: 6px; flex: 0 0 auto; }

.hr-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  color: rgba(244,239,233,0.7);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 160ms ease;
}
.hr-icon-btn:hover { color: #fff; background: rgba(255,138,30,0.22); border-color: rgba(255,138,30,0.5); }
.hr-icon-btn.hr-danger:hover { background: rgba(255,60,60,0.2); border-color: rgba(255,80,80,0.5); }

.hr-app .hr-ing { list-style: none; margin: 0; padding: 0; }

.hr-app .hr-ing li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.09);
}
.hr-app .hr-ing li:last-child { border-bottom: 0; }

.hr-ing-name {
  flex: 1 1 130px;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: rgba(244,239,233,0.92);
}

.hr-ing-vals { flex: 0 0 auto; display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.hr-ing-g { font-size: 17px; font-weight: 900; letter-spacing: -0.02em; color: #ffb648; }
.hr-ing-ek { font-size: 13px; font-weight: 700; color: rgba(244,239,233,0.52); }
.hr-ing-exact { flex: 1 0 100%; font-size: 11.5px; color: rgba(244,239,233,0.36); }

.hr-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: rgba(244,239,233,0.55);
}
.hr-card-foot strong { color: #ffb648; font-size: 15px; }

.hr-empty {
  grid-column: 1 / -1;
  padding: 46px 20px;
  text-align: center;
  border-radius: 24px;
  border: 1px dashed rgba(255,255,255,0.16);
  color: rgba(244,239,233,0.55);
}

/* gombsor */
.hr-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hr-btn {
  padding: 13px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  color: #f4efe9;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  transition: all 170ms ease;
}
.hr-btn:hover { border-color: rgba(255,138,30,0.5); background: rgba(255,138,30,0.14); }
.hr-btn[disabled] { opacity: .55; cursor: default; }

.hr-btn-primary {
  color: #180d05;
  background: linear-gradient(135deg, #ffd79a, #ff8a1e);
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(255, 110, 20, 0.28);
}
.hr-btn-primary:hover { background: linear-gradient(135deg, #ffe1b0, #ff9b36); }

.hr-btn-ghost { background: transparent; color: rgba(244,239,233,0.7); }

/* toast */
.hr-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 100000;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #180d05;
  background: linear-gradient(135deg, #ffd79a, #ff8a1e);
  box-shadow: 0 18px 44px rgba(0,0,0,0.5);
}
.hr-toast[hidden] { display: none; }
.hr-toast.is-err { color: #fff; background: linear-gradient(135deg, #ff7a6a, #d92c14); }

/* modal */
.hr-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 3, 4, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow-y: auto;
}
.hr-modal[hidden] { display: none; }

.hr-modal-box {
  width: min(660px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 26px;
  color: #f4efe9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(160deg, #1b181a 0%, #141114 100%);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 40px 120px rgba(0,0,0,0.65);
}
.hr-modal-narrow { width: min(400px, 100%); }

.hr-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.hr-modal-head h3 { margin: 0; padding: 0; font-size: 21px; font-weight: 900; letter-spacing: -0.03em; color: #fff; }

.hr-x {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  color: rgba(244,239,233,0.7);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}
.hr-x:hover { color: #fff; background: rgba(255,255,255,0.12); }

.hr-modal-sub { margin: 0 0 16px; font-size: 13.5px; color: rgba(244,239,233,0.55); }
.hr-small { font-size: 12px; margin-top: 12px; }

.hr-modal #hrPin {
  width: 100%;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.4em;
  font-family: inherit;
  color: #fff;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.16);
  outline: none;
}
.hr-modal #hrPin:focus { border-color: rgba(255,138,30,0.65); }

.hr-pin-err { margin-top: 10px; font-size: 13px; font-weight: 700; color: #ff7a6a; text-align: center; }

.hr-shake { animation: hrShake 380ms ease; }
@keyframes hrShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

.hr-field { display: block; margin-bottom: 14px; }
.hr-field span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,176,72,0.8);
}
.hr-modal .hr-field input {
  width: 100%;
  margin: 0;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: 15px;
  font-family: inherit;
  color: #fff;
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: none;
  outline: none;
}
.hr-modal .hr-field input:focus { border-color: rgba(255,138,30,0.6); }

.hr-ed-head { margin: 20px 0 10px; font-size: 13.5px; color: rgba(244,239,233,0.7); }
.hr-ed-head strong { color: #ffb648; }

.hr-ed-cols,
.hr-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 78px 84px 74px 40px;
  gap: 8px;
  align-items: center;
}

.hr-ed-cols {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(244,239,233,0.4);
}

.hr-rows { display: flex; flex-direction: column; gap: 8px; }

.hr-modal .hr-row input,
.hr-modal .hr-row select {
  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.hr-modal .hr-row option { background: #1b181a; color: #fff; }
.hr-modal .hr-row input:focus,
.hr-modal .hr-row select:focus { border-color: rgba(255,138,30,0.6); }

.hr-row-del {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 17px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  color: rgba(244,239,233,0.6);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
}
.hr-row-del:hover { color: #fff; background: rgba(255,60,60,0.22); }

.hr-add-row { margin-top: 12px; width: 100%; }

.hr-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* mobil */
@media (max-width: 720px) {
  .hr-app { padding: 22px 14px 48px; }
  .hr-app.hr-full { min-height: 100svh; }

  .hr-head { flex-wrap: wrap; gap: 12px; }
  .hr-title { flex: 1 1 100%; order: 3; }
  .hr-lock { margin-left: auto; padding: 13px 15px; }
  .hr-lock-txt { display: none; }

  .hr-scale { padding: 14px; border-radius: 20px; }
  .hr-grid { grid-template-columns: 1fr; gap: 16px; }
  .hr-card { padding: 18px; border-radius: 22px; }

  .hr-bar .hr-btn { flex: 1 1 calc(50% - 5px); }

  .hr-modal-box { padding: 18px; border-radius: 22px; }
  .hr-ed-cols { display: none; }

  .hr-row {
    grid-template-columns: 1fr 1fr 40px;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
  }
  .hr-row .hr-c-name { grid-column: 1 / -1; }
  .hr-row .hr-c-del { grid-row: 2 / 4; grid-column: 3; height: 100%; }
  .hr-row .hr-c-unit { grid-column: 1 / 3; }

  .hr-modal-foot .hr-btn { flex: 1; }
}
