:root {
  --navy-900: #060f2b;
  --navy-800: #0a1740;
  --navy-700: #0f2050;
  --navy-600: #16306e;
  --line: rgba(120, 160, 235, 0.18);
  --green: #2fbf6b;
  --green-soft: #56d98a;
  --orange: #f2923d;
  --blue: #4a86e5;
  --text: #eaf1ff;
  --muted: #9fb3d9;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(47, 191, 107, 0.12), transparent 60%),
    radial-gradient(1100px 700px at 5% 0%, rgba(242, 146, 61, 0.10), transparent 55%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.accent-green { color: var(--green-soft); }
.accent-orange { color: var(--orange); }

/* ---------- Estrelas / rede de fundo ---------- */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.5), transparent),
    radial-gradient(2px 2px at 70% 20%, rgba(86,217,138,.6), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,.4), transparent),
    radial-gradient(2px 2px at 85% 65%, rgba(242,146,61,.6), transparent),
    radial-gradient(1.5px 1.5px at 15% 85%, rgba(74,134,229,.5), transparent);
  opacity: .8;
}

/* ---------- Splash ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  transition: opacity .6s ease, visibility .6s ease;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash__img {
  width: min(340px, 78vw);
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: floatIn .8s ease both;
}
.splash__bar {
  width: min(320px, 70vw);
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.splash__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--orange));
  animation: load 1.8s ease forwards;
}
.splash__hint { color: var(--muted); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
@keyframes load { to { width: 100%; } }
@keyframes floatIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Topbar ---------- */
.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(6, 15, 43, 0.65);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.topbar__brand { display: flex; align-items: center; gap: 12px; }
.topbar__logo {
  width: 46px; height: 46px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.topbar__title strong { display: block; font-size: 1.05rem; letter-spacing: .06em; }
.topbar__title small { color: var(--muted); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }

.topbar__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.lastlogin {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
}
.lastlogin .ico { width: 20px; height: 20px; color: var(--green-soft); }
.lastlogin__text { display: flex; flex-direction: column; line-height: 1.2; }
.lastlogin__label { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lastlogin__value { font-size: .82rem; }
.lastlogin__value b { color: var(--text); }

.iconbtn {
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.iconbtn:hover { transform: translateY(-2px); background: rgba(255,255,255,.08); border-color: rgba(120,160,235,.4); }
.iconbtn .ico { width: 22px; height: 22px; }

.ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  display: grid; place-items: center;
  font-size: .7rem; font-weight: 700;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
  border: 2px solid var(--navy-900);
}
.badge--green { background: var(--green); }

/* ---------- Main ---------- */
.main {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px) 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  margin-bottom: clamp(36px, 6vw, 72px);
}
.hero__figure { position: relative; }
.hero__figure img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero__figure img:hover { transform: translateY(-4px); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.hero__figure img:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
.hero__zoom-hint {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  color: var(--text);
  background: rgba(6, 15, 43, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.hero__zoom-hint svg { width: 16px; height: 16px; fill: none; stroke: var(--green-soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero__figure:hover .hero__zoom-hint { opacity: 1; }
.eyebrow { color: var(--muted); letter-spacing: .22em; text-transform: uppercase; font-size: .8rem; }
.hero__copy h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: .04em;
  margin: 8px 0 14px;
  line-height: 1;
}
.lede { font-size: 1.05rem; color: var(--muted); max-width: 46ch; }
.tagline {
  margin-top: 22px;
  font-size: .82rem;
  letter-spacing: .12em;
  color: var(--muted);
  border-left: 3px solid var(--orange);
  padding-left: 14px;
}

.section-title {
  font-size: 1.3rem;
  letter-spacing: .04em;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::after {
  content: "";
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ---------- Cards de acesso ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  text-align: left;
  padding: 26px 22px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(22, 48, 110, 0.55), rgba(10, 23, 64, 0.55));
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, border-color .2s ease, box-shadow .25s ease;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { opacity: .18; }

.card__icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card__label { display: block; font-size: 1.12rem; font-weight: 700; letter-spacing: .02em; }
.card__desc { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.card__cta { display: inline-block; margin-top: 16px; font-size: .85rem; font-weight: 600; color: var(--muted); transition: color .2s ease, transform .2s ease; }
.card:hover .card__cta { transform: translateX(4px); }

/* Cores por perfil */
.card--client   { --c: var(--blue); }
.card--supplier { --c: var(--orange); }
.card--caregiver{ --c: var(--green); }
.card--vet      { --c: #7c8cf5; }

.card .card__icon { color: var(--c); }
.card::before { background: radial-gradient(300px 200px at 80% 0%, var(--c), transparent 70%); }
.card:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.card:hover .card__cta { color: var(--c); }
.card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--c);
  opacity: .8;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 28px 16px 40px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}
.footer__contacts {
  display: flex; flex-wrap: wrap; gap: 14px 26px;
  justify-content: center;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 14px;
}
.footer__contacts span,
.footer__contacts .footer__link { display: inline-flex; align-items: center; gap: 8px; }
.footer__link { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.footer__link:hover { color: var(--green-soft); }
.footer__contacts .ico { width: 18px; height: 18px; color: var(--green-soft); }
.footer__note { color: rgba(159,179,217,.6); font-size: .72rem; letter-spacing: .18em; }

/* ---------- Painel lateral ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(3, 8, 24, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.overlay.show { opacity: 1; visibility: visible; }

.panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 90vw);
  z-index: 50;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-900));
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.panel.open { transform: none; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.panel__head h3 { font-size: 1.15rem; letter-spacing: .04em; }
.panel__close {
  background: none; border: none; color: var(--muted);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.panel__close:hover { color: #fff; }
.panel__list { list-style: none; padding: 12px; overflow-y: auto; }
.panel__list li {
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  margin-bottom: 10px;
  display: flex; gap: 12px; align-items: flex-start;
}
.panel__list .dot {
  width: 10px; height: 10px; border-radius: 999px;
  margin-top: 5px; flex: 0 0 auto;
  background: var(--orange);
}
.panel__list .dot--green { background: var(--green); }
.panel__list .dot--blue { background: var(--blue); }
.panel__list .it-title { font-weight: 600; font-size: .95rem; }
.panel__list .it-meta { color: var(--muted); font-size: .78rem; margin-top: 3px; }

/* ---------- Modal login ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: rgba(3, 8, 24, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  padding: 20px;
}
.modal.open { opacity: 1; visibility: visible; }
.modal__box {
  position: relative;
  width: min(420px, 100%);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 30px 28px 28px;
  transform: translateY(14px) scale(.98);
  transition: transform .25s ease;
}
.modal.open .modal__box { transform: none; }
.modal__close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--muted);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.modal__close:hover { color: #fff; }
.modal__pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(47,191,107,.15);
  color: var(--green-soft);
  border: 1px solid rgba(47,191,107,.3);
}
.modal__head h3 { margin: 12px 0 6px; font-size: 1.4rem; }
.modal__head p { color: var(--muted); font-size: .9rem; }
.modal__form { margin-top: 20px; display: grid; gap: 14px; }
.modal__form label { display: grid; gap: 6px; font-size: .82rem; color: var(--muted); }
.modal__form input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
}
.modal__form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,191,107,.15); }
.btn-primary {
  margin-top: 6px;
  padding: 13px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem; font-weight: 700; letter-spacing: .04em;
  color: #04140b;
  background: linear-gradient(90deg, var(--green), var(--green-soft));
  cursor: pointer;
  transition: transform .15s ease, filter .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* ---------- Lightbox com zoom ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 8, 24, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }

.lightbox__stage {
  width: 100%; height: 100%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  touch-action: none;
}
.lightbox__stage img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  transform: translate(0, 0) scale(1);
  transform-origin: center center;
  transition: transform .12s ease-out;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__stage.zoomed img { cursor: grab; }
.lightbox__stage.grabbing img { cursor: grabbing; transition: none; }

.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #fff; font-size: 1.8rem; line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.lightbox__close:hover { background: rgba(255,255,255,.14); transform: scale(1.05); }

.lightbox__toolbar {
  position: absolute;
  bottom: 58px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(6, 15, 43, 0.85);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.lightbox__toolbar button {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--text); cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.lightbox__toolbar button:hover { background: rgba(47,191,107,.25); transform: translateY(-2px); }
.lightbox__toolbar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__level {
  min-width: 56px; text-align: center;
  font-size: .85rem; font-weight: 600; color: var(--text);
}
.lightbox__hint {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: var(--muted); font-size: .76rem; letter-spacing: .04em;
  text-align: center; width: 92%;
}

@media (max-width: 640px) {
  .lightbox__hint { display: none; }
  .lightbox__toolbar { bottom: 24px; }
}

/* ---------- Botão flutuante WhatsApp ---------- */
.whatsapp-fab {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 70;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  transition: transform .18s ease, box-shadow .25s ease;
  animation: wa-pulse 2.4s ease-out infinite;
}
.whatsapp-fab svg { width: 34px; height: 34px; fill: #fff; }
.whatsapp-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 32px rgba(37, 211, 102, 0.6); }
.whatsapp-fab:active { transform: scale(.96); }

@keyframes wa-pulse {
  0% { box-shadow: 0 10px 26px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 10px 26px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 10px 26px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab { animation: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero__figure { max-width: 320px; margin: 0 auto; }
  .tagline { border-left: none; border-top: 3px solid var(--orange); padding: 12px 0 0; }
  .lede { margin: 0 auto; }
  .lastlogin__text { display: none; }
}
