/* =========================================================
   EVA — TELA DE LOGIN UNIFICADA (ERP + PDV)
   Somente base visual: HTML5 + CSS3.
   Sumário:
   1. Variáveis  2. Base  3. Layout  4. Marca (esquerda)
   5. Login (direita)  6. Rodapé  7. Responsivo
   ========================================================= */

/* ---------- 1. VARIÁVEIS (altere aqui as cores e fontes) ---------- */
:root {
  --gold:        #b9812c;
  --gold-deep:   #98631f;
  --gold-light:  #dba957;
  --cream:       #fdf3e8;
  --beige:       #f6dcc0;
  --white:       #ffffff;
  --brown:       #5a3b1e;
  --brown-soft:  #8a6a47;
  --gray:        #7d7a80;
  --line:        #e6dccf;

  --grad-gold: linear-gradient(135deg, #dba957 0%, #b9812c 55%, #98631f 100%);
  --grad-page: linear-gradient(120deg, #f6d8b9 0%, #fbe5cd 45%, #f3cca2 100%);

  --font-body:   "Nunito", "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-script: "Segoe Script", "Snell Roundhand", "Apple Chancery", "Brush Script MT", "Lucida Handwriting", cursive;

  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-soft: 0 24px 60px rgba(150, 95, 30, .18);
  --footer-h: 78px;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  font-family: var(--font-body);
  color: var(--brown);
  background: var(--grad-page);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
p, h1, ul, hr { margin: 0; padding: 0; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible { outline: 3px solid rgba(185, 129, 44, .55); outline-offset: 2px; }

/* ---------- 3. LAYOUT PRINCIPAL ---------- */
.page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  overflow: hidden;
}

/* curvas douradas decorativas */
.page::before,
.page::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(185, 129, 44, .55);
}
.page::before { width: 70vw; height: 70vw; top: -62vw; right: -22vw; transform: rotate(8deg); }
.page::after  { width: 46vw; height: 46vw; top: -33vw; left: 24vw; transform: rotate(-18deg); border-top-color: rgba(185, 129, 44, .35); }

/* ---------- 4. LADO ESQUERDO: MARCA ---------- */
.brand {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  min-height: 0;
}

.brand__photo { position: relative; min-height: 0; }
.brand__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  -webkit-mask-image: linear-gradient(to right, #000 80%, transparent 100%);
          mask-image: linear-gradient(to right, #000 80%, transparent 100%);
}

.brand__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(.9rem, 2.4vh, 1.8rem);
  padding: 2rem .5rem 1.5rem;
  margin-left: -4%;
  text-align: center;
}

.brand__logo { width: 100%; max-width: 330px; }
.brand__logo img { width: clamp(150px, 14vw, 235px); margin: 0 auto; }

.brand__subtitle {
  margin-top: .5rem;
  font-size: clamp(1.3rem, 2.1vw, 2rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: .02em;
  color: var(--gold);
}

.brand__divider {
  height: 1px;
  margin-top: clamp(.9rem, 2vh, 1.6rem);
  border: 0;
  background: linear-gradient(90deg, transparent, var(--gold) 15%, var(--gold) 85%, transparent);
}

.brand__slogan {
  max-width: 15ch;
  text-wrap: balance;
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 2.6vw, 2.6rem);
  line-height: 1.3;
  color: var(--gold);
  transform: rotate(-5deg);
}
.icon--heart {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: -.35em;
  stroke-width: 1.3;
  transform: rotate(5deg);
}

.perks {
  display: flex;
  gap: clamp(.4rem, .9vw, .9rem);
  width: 100%;
  max-width: 420px;
}
.perks__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  padding: .85rem .4rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .38);
  box-shadow: 0 4px 14px rgba(150, 95, 30, .07);
  font-size: clamp(.72rem, .9vw, .88rem);
  line-height: 1.2;
  color: var(--brown-soft);
}
.perks__item .icon { width: 2rem; height: 2rem; color: var(--gold); stroke-width: 1.4; }

.social { display: grid; justify-items: center; gap: .35rem; }
.social__label { font-family: var(--font-script); font-size: clamp(1rem, 1.4vw, 1.3rem); color: var(--gold); }
.social__handle { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; color: var(--brown); }
.social__handle .icon { color: var(--brown); }

/* ---------- 5. LADO DIREITO: LOGIN ---------- */
.login {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 2rem clamp(1rem, 3vw, 3.2rem) 2rem 0;
}

.auth {
  width: 100%;
  max-width: 640px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 242, .78);
  box-shadow: var(--shadow-soft);
}

/* Seletor ERP / PDV */
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.tabs__input { position: absolute; opacity: 0; pointer-events: none; }

.tabs__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  min-height: 78px;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brown);
  background: rgba(255, 252, 248, .9);
  border: 1px solid #f1e3d3;
  transition: background .2s, color .2s;
}
.tabs__tab .icon { width: 2.1rem; height: 2.1rem; color: var(--gold); stroke-width: 1.6; }
.tabs__tab:first-of-type  { border-radius: 16px 0 0 0; }
.tabs__tab:last-of-type   { border-radius: 0 16px 0 0; }

.tabs__input:checked + .tabs__tab {
  color: var(--white);
  background: var(--grad-gold);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(152, 99, 31, .28);
}
.tabs__input:checked + .tabs__tab .icon { color: var(--white); }
.tabs__tab:hover { background: #fff3e4; }
.tabs__input:checked + .tabs__tab:hover { background: var(--grad-gold); filter: brightness(1.05); }
.tabs__input:focus-visible + .tabs__tab { outline: 3px solid rgba(185, 129, 44, .55); outline-offset: -4px; }

/* Painel branco */
.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
  padding: clamp(1.4rem, 3vw, 2.2rem) clamp(1.2rem, 3vw, 2.2rem) clamp(1.2rem, 2.4vw, 1.6rem);
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, #fffdfa, #fdf8f3);
}

.panel__title    { text-align: center; font-size: clamp(1.8rem, 2.4vw, 2.3rem); font-weight: 500; color: #3f2512; }
.panel__subtitle { margin-top: -.9rem; margin-bottom: .7rem; text-align: center; font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: var(--gray); }

/* Campos */
.field {
  display: flex;
  align-items: center;
  gap: .9rem;
  height: 64px;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field__icon { color: var(--brown); }
.field__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1.15rem;
  color: var(--brown);
}
.field__input::placeholder { color: #8f8c93; opacity: 1; }

.field:hover { border-color: #d8c7b2; }
.field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(185, 129, 44, .18); }
.field:has(.field__input:not(:placeholder-shown)) { border-color: #d9b27a; background: #fffdf9; }

.field__toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -.4rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
}
.field__toggle:hover { color: var(--gold-deep); }

/* Lembrar / esqueci */
.options { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.check { display: inline-flex; align-items: center; gap: .75rem; cursor: pointer; font-size: 1.05rem; }
.check__input { position: absolute; opacity: 0; pointer-events: none; }
.check__box {
  position: relative;
  width: 26px;
  height: 26px;
  border: 1.5px solid #cdbfae;
  border-radius: 7px;
  background: var(--white);
  transition: background .2s, border-color .2s;
}
.check__box::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .15s;
}
.check__input:checked + .check__box { background: var(--grad-gold); border-color: var(--gold); }
.check__input:checked + .check__box::after { transform: rotate(45deg) scale(1); }
.check__input:focus-visible + .check__box { outline: 3px solid rgba(185, 129, 44, .55); outline-offset: 2px; }

.options__link { font-size: 1.05rem; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.options__link:hover { color: var(--gold); }

/* Botão principal */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  width: 100%;
  height: 64px;
  border: 0;
  border-radius: 999px;
  background: var(--grad-gold);
  box-shadow: 0 10px 22px rgba(152, 99, 31, .3);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  transition: transform .15s, filter .2s, box-shadow .2s;
}
.btn .icon { width: 2rem; height: 2rem; }
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 14px 26px rgba(152, 99, 31, .36); }
.btn:active { transform: translateY(0); filter: brightness(.97); }

/* Divisor "ou" */
.or { display: flex; align-items: center; gap: 1rem; margin: -.15rem 0; color: var(--brown); font-size: 1.05rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Segurança */
.security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fcefe3, #f9e8d8);
}
.security__icon { width: 2.4rem; height: 2.4rem; color: var(--gold); stroke-width: 1.4; }
.security__text { display: grid; gap: .1rem; }
.security__text strong { font-size: 1.05rem; font-weight: 500; color: var(--gold-deep); }
.security__text small  { font-size: .88rem; color: var(--brown-soft); }

/* ---------- 6. RODAPÉ ---------- */
.footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem 2rem;
  min-height: var(--footer-h);
  padding: .8rem clamp(1.2rem, 4vw, 4rem);
  background: var(--cream);
  box-shadow: 0 -1px 0 rgba(185, 129, 44, .15);
  font-size: .95rem;
  color: var(--brown);
}
.footer__brand { display: flex; align-items: center; gap: .9rem; font-size: 1rem; line-height: 1.1; color: var(--gold); }
.footer__brand img { width: 74px; }
.footer__copy { text-align: center; }
.footer__links { display: flex; justify-content: flex-end; align-items: center; }
.footer__item { display: inline-flex; align-items: center; gap: .6rem; padding: 0 1.4rem; }
.footer__item .icon { width: 1.4rem; height: 1.4rem; }
.footer__item + .footer__item { border-left: 1px solid rgba(185, 129, 44, .6); }
.footer__item:first-child { border-left: 1px solid rgba(185, 129, 44, .6); }
.footer__item:last-child { padding-right: 0; }

/* ---------- 7. RESPONSIVO ---------- */

/* Tablet (paisagem e telas médias): composição lado a lado, mais compacta */
@media (max-width: 1100px) {
  .page { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .brand { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
  .brand__content { margin-left: -12%; padding-inline: 0; }
  .brand__photo img { object-position: 35% top; }
  .perks__item { padding: .6rem .25rem; }
  .perks__item .icon { width: 1.6rem; height: 1.6rem; }
  .login { padding-right: 1.2rem; }
  .auth { padding: 12px; }
  .tabs__tab { min-height: 64px; font-size: 1.25rem; }
  .field, .btn { height: 56px; }
  .btn { font-size: 1.25rem; }
  .footer { grid-template-columns: auto 1fr auto; font-size: .85rem; }
  .footer__brand span { display: none; }
  .footer__item { padding: 0 .9rem; }
}

/* Tablet retrato e celular: layout empilhado, login com prioridade.
   A mesma estrutura HTML é reordenada com flexbox + display: contents. */
@media (max-width: 980px) {
  .page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1rem 1.5rem;
  }
  .page::before { width: 120vw; height: 120vw; top: -108vw; right: -40vw; }
  .page::after  { display: none; }

  .brand, .brand__content { display: contents; }

  .brand__logo    { order: 1; max-width: 260px; }
  .login          { order: 2; width: 100%; padding: 0; }
  .brand__photo   { order: 3; width: 100%; max-width: 640px; height: clamp(190px, 38vw, 280px); }
  .brand__slogan  { order: 4; max-width: 18ch; font-size: clamp(1.4rem, 5.4vw, 2rem); transform: rotate(-3deg); }
  .perks          { order: 5; max-width: 640px; }
  .social         { order: 6; }

  .brand__logo img { width: 128px; }
  .brand__subtitle { margin-top: .3rem; font-size: 1.15rem; }
  .brand__divider { display: none; }

  .brand__photo { border-radius: 24px; overflow: hidden; box-shadow: 0 12px 30px rgba(150, 95, 30, .18); }
  .brand__photo img {
    object-position: 20% 14%;
    -webkit-mask-image: none;
            mask-image: none;
  }

  .auth { max-width: 640px; margin-inline: auto; padding: 12px; }
  .perks__item { padding: .75rem .35rem; font-size: .8rem; }

  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: .7rem;
    padding-block: 1.1rem;
  }
  .footer__brand { order: 1; }
  .footer__brand span { display: inline; }
  .footer__copy  { order: 3; font-size: .82rem; }
  .footer__links { order: 2; justify-content: center; }
  .footer__item:first-child { border-left: 0; }
}

/* Celular */
@media (max-width: 520px) {
  .page { padding-inline: .75rem; gap: 1rem; }
  .auth { padding: 8px; border-radius: 22px; }
  .tabs__tab { min-height: 58px; font-size: 1.15rem; gap: .55rem; }
  .tabs__tab .icon { width: 1.6rem; height: 1.6rem; }
  .tabs__tab:first-of-type { border-top-left-radius: 14px; }
  .tabs__tab:last-of-type  { border-top-right-radius: 14px; }
  .panel { gap: 1rem; padding: 1.3rem 1rem 1.1rem; border-radius: 0 0 16px 16px; }
  .panel__subtitle { margin-top: -.7rem; margin-bottom: .4rem; font-size: 1rem; }
  .field { height: 54px; padding: 0 .9rem; gap: .7rem; }
  .field__input { font-size: 1rem; }
  .options { font-size: .95rem; }
  .check, .options__link { font-size: .88rem; }
  .check { gap: .55rem; }
  .btn { height: 56px; font-size: 1.2rem; }
  .security { padding: .8rem .9rem; gap: .75rem; }
  .security__icon { width: 2rem; height: 2rem; }
  .security__text strong { font-size: .95rem; }
  .security__text small  { font-size: .8rem; }
  .brand__photo { height: 190px; }
  .perks__item .icon { width: 1.5rem; height: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
