/* IvaSync — login, senha, usuários e painel da plataforma.
   Visual limpo e claro no formulário; painel de marca escuro e futurista ao lado. */
:root {
  --ink: #0b1b2b; --ink-2: #33475b; --muted: #66788a; --line: #dde5ec; --line-2: #c6d2dc;
  --bg: #f3f6f9; --card: #fff; --field: #f7fafc;
  --navy: #04121f; --navy-2: #073447; --teal: #14c7a8; --green: #8be06a; --blue: #2d8fe0;
  --bad: #b42318; --bad-bg: #fdecea; --good: #05603a; --good-bg: #e7f7ee;
  --f-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font: 400 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
a { color: #0a7f6c; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
h2 { font-size: 1.05rem; margin: 28px 0 10px; }
p.sub { color: var(--muted); margin: 0 0 24px; }

/* ---------- campos e botões (todas as telas) ---------- */
label.field { display: block; margin-bottom: 16px; }
label.field > span:first-child { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--field); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: #9aa9b7; }
input:hover, select:hover { border-color: #aebccb; }
input:focus, select:focus { outline: 0; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(20,199,168,.18); }
.pass { position: relative; display: block; }
.pass input { padding-right: 46px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; }
.eye:hover { color: var(--ink); background: rgba(11,27,43,.06); }
.eye[aria-pressed=true] { color: #0a7f6c; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px 18px; border: 0; border-radius: 12px; cursor: pointer;
  font: 700 1rem var(--f-ui); color: #03202b; text-decoration: none; text-align: center;
  background: linear-gradient(120deg, var(--green), var(--teal) 55%, #22b8e6);
  box-shadow: 0 8px 22px rgba(20,199,168,.32), inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(20,199,168,.4), inset 0 1px 0 rgba(255,255,255,.5); }
.btn:active { transform: translateY(0); filter: brightness(.97); }
.btn:focus-visible { outline: 3px solid rgba(20,199,168,.5); outline-offset: 2px; }
.btn.sm { width: auto; padding: 9px 15px; font-size: .88rem; border-radius: 10px; box-shadow: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--field); transform: none; box-shadow: none; }
.btn.warn { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.msg { padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: .92rem; border: 1px solid transparent; }
.msg.err { background: var(--bad-bg); color: var(--bad); border-color: #f6c9c4; }
.msg.ok { background: var(--good-bg); color: var(--good); border-color: #bfe8d0; }

/* ---------- escolha de empresa ---------- */
.choices { display: grid; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.choice:hover { border-color: var(--teal); box-shadow: 0 6px 20px rgba(20,199,168,.16); transform: translateY(-1px); }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #03202b; background: linear-gradient(135deg, var(--green), var(--teal)); }
.choice-txt { flex: 1; display: grid; line-height: 1.25; }
.choice-txt small { color: var(--muted); }
.chev { color: var(--muted); font-size: 1.2rem; }

/* ---------- tela dividida ---------- */
.split-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.form-panel { display: grid; place-items: center; padding: 32px 24px; background:
  radial-gradient(700px 420px at 100% 0%, rgba(20,199,168,.09), transparent 60%), var(--bg); }
.form-box { width: min(420px, 100%); }
.logo-mobile { display: none; margin: 0 auto 22px; height: auto; }
.foot-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 26px 0 0; color: var(--muted); font-size: .8rem; }

.brand-panel { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: clamp(28px, 4vw, 56px);
  background: radial-gradient(900px 600px at 80% -10%, #0b6a72 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 62%, #08524f 100%); }
.bp-grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 72%); mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 72%); }
.bp-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: flutua 14s ease-in-out infinite alternate; }
.bp-orb.o1 { width: 340px; height: 340px; background: #14c7a8; right: -90px; top: 18%; }
.bp-orb.o2 { width: 280px; height: 280px; background: #2d8fe0; left: -80px; bottom: 6%; opacity: .35; animation-duration: 18s; }
@keyframes flutua { to { transform: translate(-26px, 30px) scale(1.08); } }
.bp-top, .bp-mid, .ledger, .bp-foot { position: relative; z-index: 1; }
.bp-top { display: flex; align-items: center; gap: 10px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 16px; padding: 6px 13px; border-radius: 999px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #bff5e8; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(139,224,106,.7); animation: pulsa 2.4s infinite; }
@keyframes pulsa { 70% { box-shadow: 0 0 0 9px rgba(139,224,106,0); } 100% { box-shadow: 0 0 0 0 rgba(139,224,106,0); } }
.bp-mid h2 { margin: 0 0 14px; font-size: clamp(1.9rem, 3.1vw, 2.9rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.bp-mid h2 em { font-style: normal; background: linear-gradient(100deg, var(--green), var(--teal) 60%, #5cc8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bp-lead { margin: 0; max-width: 46ch; color: rgba(255,255,255,.78); font-size: 1.02rem; }

.ledger { margin: 0; padding: 18px 20px 16px; border-radius: 20px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 50px rgba(0,0,0,.28); max-width: 560px; }
.ledger-head { display: flex; justify-content: space-between; font-size: .82rem; color: rgba(255,255,255,.75); margin-bottom: 14px; }
.ledger-head .mono { color: #bff5e8; }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; align-items: end; }
.bar { display: grid; gap: 8px; justify-items: center; }
.bar .col { position: relative; width: 100%; height: 118px; border-radius: 8px; background: rgba(255,255,255,.07); overflow: hidden; }
.seg { display: block; width: 100%; height: 0; animation: sobe .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.25s + var(--i) * .08s); }
.seg.velho { background: linear-gradient(180deg, #ffd27a, #f59f43); }
.seg.novo { background: linear-gradient(180deg, #7ff0c9, #14c7a8); }
.col { display: flex; flex-direction: column-reverse; }
.bar b { font-size: .7rem; font-weight: 500; color: rgba(255,255,255,.7); }
@keyframes sobe { to { height: calc(var(--h) * .5); } }
figcaption { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: .76rem; color: rgba(255,255,255,.72); }
figcaption span { display: inline-flex; align-items: center; gap: 7px; }
.d { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.d.velho { background: #f59f43; } .d.novo { background: #14c7a8; }
.bp-foot { font-size: .82rem; color: rgba(255,255,255,.6); }
.bp-foot b { color: #fff; }

/* ---------- casca clara simples (hyper admin, usuários) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: start center; padding: 36px 16px; }
.auth-card { width: min(460px, 100%); margin-top: 4vh; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px 30px 24px; box-shadow: 0 20px 60px rgba(11,27,43,.08); }
.auth-card.wide { width: min(1040px, 100%); }
.plain-logo { display: block; width: max-content; margin: 0 auto 10px; }
.plain-logo img { display: block; height: auto; }
.auth-foot { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: .82rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
small { color: var(--muted); }
.pill { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.pill.on { background: var(--good-bg); color: var(--good); } .pill.off { background: var(--bad-bg); color: var(--bad); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { font-size: 1.4rem; margin: 0; }
.topbar .who { color: var(--muted); font-size: .9rem; }
form.inline { display: inline; }

@media (max-width: 900px) {
  .split-grid { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100vh; align-content: center; }
  .logo-mobile { display: block; }
}
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .auth-card { padding: 24px 18px 20px; } h1 { font-size: 1.5rem; } th:nth-child(3), td:nth-child(3) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .bp-orb, .eyebrow i { animation: none; }
  .seg { animation: none; height: calc(var(--h) * .5); }
  .btn, .choice, input { transition: none; }
}
