/* heart & ponie brand — see hp-pagina theme brand.md */
:root {
  --bg: #e0e0e0;
  --surface: #ffffff;
  --ink: #2c2c2c;
  --muted: #6c6c6c;
  --taupe: #aca597;
  --rose: #c4abb4;
  --rose-dark: #b0a0a7;
  --gold: #b28d63;
  --gold-dark: #a26c20;
  --line: #e7e2dd;
  --cream: #f9f4f0;
  --ok: #6f8a6c;
  --ok-bg: #eef2ec;
  --warn-bg: #f6efe6;
  --bad: #9a5a55;
  --bad-bg: #f5ecea;
  --heading: 'Lusitana', serif;
  --body: 'Mulish', 'Muli', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  padding: 3rem 2.5rem 2.5rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(44, 44, 44, .08);
  border-top: 3px solid var(--rose);
}
.card.wide { max-width: 520px; }

.logo { width: 108px; height: 108px; display: block; margin: 0 auto 1.75rem; }

h1 {
  font-family: var(--heading);
  font-weight: 400;
  font-size: 1.85rem;
  letter-spacing: .01em;
  margin-bottom: .5rem;
}

.subtitle { color: var(--muted); font-size: .95rem; line-height: 1.6; margin-bottom: 2rem; }

.divider { width: 40px; height: 1px; background: var(--gold); margin: 0 auto 2rem; border: 0; }

label {
  display: block;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .6rem;
}

.field { position: relative; margin-bottom: 1.5rem; }

.field input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  padding: .9rem 3.2rem .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--cream);
  transition: border-color .2s, background .2s;
}
.field input:focus { outline: none; border-color: var(--gold); background: #fff; }

.eye {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 3rem;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
  color: var(--muted);
}
.eye:hover, .eye:focus-visible { color: var(--gold-dark); outline: none; }
.eye svg { width: 20px; height: 20px; }
.eye .ic-hide, .eye.on .ic-show { display: none; }
.eye.on .ic-hide { display: block; }

.btn {
  width: 100%;
  font-family: var(--body);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rose);
  border: 0;
  border-radius: 0;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover:not(:disabled) { background: var(--rose-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.error {
  background: var(--bad-bg);
  color: var(--bad);
  font-size: .9rem;
  padding: .8rem 1rem;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--bad);
  text-align: left;
}

.footer-link {
  display: inline-block;
  margin-top: 2rem;
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--gold);
  text-decoration: none;
}
.footer-link:hover { color: var(--gold-dark); }

/* dashboard */
.state {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .55rem 1.1rem;
  margin-bottom: 1.75rem;
}
.state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.state.open { background: var(--ok-bg); color: var(--ok); }
.state.connecting { background: var(--warn-bg); color: var(--gold-dark); }
.state.connecting::before { animation: pulse 1.4s ease-in-out infinite; }
.state.close, .state.unknown { background: var(--bad-bg); color: var(--bad); }
@keyframes pulse { 50% { opacity: .25; } }

#qr {
  margin: 1.75rem auto 0;
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background: var(--cream);
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
  padding: 1.25rem;
}
#qr img { width: 100%; max-width: 280px; display: block; background: #fff; padding: 8px; }

ol.steps {
  text-align: left;
  counter-reset: step;
  list-style: none;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: .9rem;
  color: var(--muted);
  font-size: .93rem;
  line-height: 1.6;
}
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  font-family: var(--heading);
  font-size: 1.15rem;
  color: var(--gold);
}
ol.steps b { color: var(--ink); font-weight: 600; }

#msg { margin-top: 1rem; color: var(--bad); font-size: .9rem; min-height: 1.2em; }

@media (max-width: 480px) {
  .card { padding: 2.25rem 1.5rem 2rem; }
  h1 { font-size: 1.6rem; }
}
