/* HealFast POS — lemon-green + yellow bias */

:root {
  --hf-lemon: #c8f000;
  --hf-lemon-deep: #a8d400;
  --hf-yellow: #ffe566;
  --hf-yellow-hot: #ffd000;
  --hf-ink: #07140a;
  --hf-ink-soft: #132418;
  --hf-mist: #eef8d4;
  --hf-line: rgba(200, 240, 0, 0.28);
  --hf-danger: #ff4d4d;
  --hf-logo-green: #39b54a;
  --ff-display: "Syne", system-ui, sans-serif;
  --ff-body: "Outfit", system-ui, sans-serif;

  --clr-primary: #b8e600;
  --clr-violet: #c8f000;
  --clr-violet-light: rgba(200, 240, 0, 0.16);
  --clr-green: #9fd400;
  --clr-green-light: rgba(159, 212, 0, 0.14);
  --clr-orange: #ffd000;
  --clr-orange-light: rgba(255, 208, 0, 0.16);
}

.text-violet {
  color: var(--hf-lemon-deep) !important;
}

.btn-primary,
.bg-primary {
  background-color: var(--hf-lemon) !important;
  border-color: var(--hf-lemon-deep) !important;
  color: var(--hf-ink) !important;
}

/* ---------- Preloader ---------- */
.hf-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.85rem;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(255, 229, 102, 0.22), transparent 55%),
    linear-gradient(160deg, #061208 0%, #0d1f12 45%, #132a14 100%);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hf-preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hf-preloader__mark {
  position: relative;
  width: clamp(5.5rem, 22vw, 6.75rem);
  height: clamp(5.5rem, 22vw, 6.75rem);
}

.hf-preloader__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--hf-lemon);
  border-right-color: var(--hf-yellow);
  animation: hf-spin 0.95s linear infinite;
}

.hf-preloader__disc {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(57, 181, 74, 0.85),
    0 0 28px rgba(200, 240, 0, 0.35);
  display: grid;
  place-items: center;
  animation: hf-pulse 1.25s ease-in-out infinite;
}

.hf-preloader__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 50%;
}

.hf-preloader__brand {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(0.95rem, 3.6vw, 1.15rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hf-lemon);
  text-align: center;
}

@keyframes hf-spin {
  to { transform: rotate(360deg); }
}

@keyframes hf-pulse {
  0%, 100% { transform: scale(0.97); }
  50% { transform: scale(1); }
}

/* ---------- Login ---------- */
body.hf-auth {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--ff-body);
  color: #f4ffe8;
  background: #061208;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hf-login {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(1.25rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 90% 60% at 15% 10%, rgba(200, 240, 0, 0.18), transparent 50%),
    radial-gradient(ellipse 70% 50% at 90% 85%, rgba(255, 208, 0, 0.14), transparent 45%),
    linear-gradient(165deg, #061208 0%, #0a1a0e 40%, #102416 100%);
}

.hf-login__glow {
  position: absolute;
  width: min(42rem, 90vw);
  height: min(42rem, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 240, 0, 0.12), transparent 65%);
  filter: blur(8px);
  pointer-events: none;
}

.hf-login__panel {
  position: relative;
  width: min(24rem, 100%);
  padding: clamp(1.35rem, 4vw, 1.85rem) clamp(1.1rem, 3.5vw, 1.55rem) 1.25rem;
  border-radius: 1.15rem;
  background: linear-gradient(180deg, rgba(19, 40, 24, 0.92), rgba(10, 24, 14, 0.96));
  border: 1px solid var(--hf-line);
  box-shadow:
    0 0 0 1px rgba(255, 229, 102, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.hf-login__head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.hf-login__logo {
  width: clamp(3.75rem, 16vw, 4.5rem);
  height: clamp(3.75rem, 16vw, 4.5rem);
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 0.85rem;
  background: #fff;
  box-shadow:
    0 0 0 2px rgba(57, 181, 74, 0.9),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.hf-login__brand {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 5vw, 1.85rem);
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: #f7ffe8;
  text-shadow: 0 0 28px rgba(200, 240, 0, 0.25);
}

.hf-login__tag {
  margin: 0.4rem 0 0;
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  color: rgba(244, 255, 232, 0.62);
}

.hf-login__form {
  display: grid;
  gap: 0.9rem;
}

.hf-field {
  display: grid;
  gap: 0.35rem;
}

.hf-field > span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 255, 232, 0.7);
}

.hf-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(200, 240, 0, 0.22);
  border-radius: 0.7rem;
  background: rgba(6, 18, 8, 0.65);
  color: #f7ffe9;
  font: 500 1rem/1.2 var(--ff-body);
  padding: 0.82rem 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 2.85rem;
}

.hf-field__control {
  position: relative;
  display: grid;
}

.hf-field__control input {
  padding-right: 3rem;
}

.hf-eye {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: rgba(244, 255, 232, 0.65);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.hf-eye:hover,
.hf-eye:focus-visible {
  color: var(--hf-lemon);
  background: rgba(200, 240, 0, 0.1);
  outline: none;
}

.hf-eye.is-visible {
  color: var(--hf-yellow);
}

.hf-eye svg {
  display: block;
}

.hf-field input::placeholder {
  color: rgba(244, 255, 232, 0.35);
}

.hf-field input:focus {
  border-color: var(--hf-lemon);
  box-shadow: 0 0 0 3px rgba(200, 240, 0, 0.2);
}

.hf-field__error {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--hf-danger);
}

.hf-login__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.05rem;
}

.hf-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: rgba(244, 255, 232, 0.72);
  cursor: pointer;
}

.hf-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--hf-lemon);
}

.hf-link {
  font-size: 0.85rem;
  color: var(--hf-yellow);
  text-decoration: none;
}

.hf-link:hover {
  color: var(--hf-lemon);
}

.hf-btn {
  margin-top: 0.25rem;
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  min-height: 3rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--hf-ink);
  background: linear-gradient(105deg, var(--hf-lemon) 0%, var(--hf-yellow) 55%, var(--hf-yellow-hot) 100%);
  box-shadow: 0 10px 28px rgba(200, 240, 0, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.hf-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.hf-btn:active {
  transform: translateY(0);
}

.hf-btn:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.hf-login__flash {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.6rem;
  background: rgba(200, 240, 0, 0.12);
  border: 1px solid rgba(200, 240, 0, 0.28);
  color: var(--hf-mist);
  font-size: 0.85rem;
}

.hf-login__flash--warn {
  background: rgba(255, 208, 0, 0.12);
  border-color: rgba(255, 208, 0, 0.35);
}

.hf-login__foot {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 255, 232, 0.42);
}

@media (max-width: 380px) {
  .hf-login__panel {
    border-radius: 1rem;
  }

  .hf-login__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  .hf-login__panel {
    width: min(26rem, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hf-preloader__ring,
  .hf-preloader__disc {
    animation: none;
  }

  .hf-preloader,
  .hf-btn,
  .hf-field input,
  .hf-eye {
    transition: none;
  }
}
