/* MegaSystem32 — CSS crítico da login (não carregar styles.css monolítico) */
:root {
  --ink: #0b111b;
  --panel: #111925;
  --panel-2: #151f2d;
  --line: rgba(157, 176, 199, 0.15);
  --muted: #8491a3;
  --text: #eef3f8;
  --cobalt: #155bd8;
  --cobalt-light: #4382ef;
  --orange: #d86a32;
  --success: #32c89a;
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }

.login-page {
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(7, 12, 20, .91) 0%, rgba(7, 12, 20, .75) 47%, rgba(7, 12, 20, .42) 100%),
    image-set(
      url("/assets/engineering-bg.webp") type("image/webp"),
      url("/assets/engineering-bg.jpg") type("image/jpeg"),
      url("/assets/engineering-bg.png") type("image/png")
    );
  background-position: center;
  background-size: cover;
  background-attachment: scroll;
  background-repeat: no-repeat;
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .login-page {
    background-attachment: fixed;
  }
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(65, 99, 142, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 99, 142, .06) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, #000, transparent 70%);
}

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.12fr .88fr; }
.brand-panel { padding: 52px 6.5vw 38px; display: flex; flex-direction: column; position: relative; }
.brand { color: white; text-decoration: none; display: inline-flex; align-items: center; gap: 13px; width: fit-content; font: 700 17px/1 "Manrope"; letter-spacing: 4px; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; letter-spacing: 6px; }
.brand-mark {
  width: 40px;
  height: 40px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  transform: none;
  background: url("/assets/brand/megasystem32-mark.svg") center / contain no-repeat;
}
.brand-mark i { display: none; }
.brand-message { max-width: 660px; margin: auto 0; padding: 80px 0; }
.eyebrow { color: var(--cobalt-light); text-transform: uppercase; letter-spacing: 3px; font-weight: 700; font-size: 10px; margin: 0 0 20px; }
.brand-message .eyebrow { display: flex; align-items: center; gap: 10px; }
.brand-message .eyebrow span { width: 34px; height: 2px; background: var(--orange); }
.brand-message h1 { margin: 0; max-width: 640px; font: 600 clamp(43px, 5vw, 76px)/1.04 "Manrope"; letter-spacing: -3px; }
.brand-message h1 em { font-style: normal; color: var(--orange); }
.brand-message > p:last-child { color: #aab4c1; font-size: 16px; line-height: 1.7; max-width: 460px; margin-top: 30px; }
.brand-foot { display: flex; align-items: center; gap: 13px; color: #6e7988; font-size: 8px; letter-spacing: 2px; font-weight: 700; }
.brand-foot i { height: 3px; width: 3px; border-radius: 50%; background: var(--orange); }

.brand-mascot {
  margin: 0 0 28px;
  width: 88px;
  height: 88px;
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.brand-mascot img,
.brand-mascot picture {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-mascot img {
  object-fit: contain;
  filter: grayscale(0.35) contrast(1.05);
}
.login-page .copyright a {
  color: inherit;
  text-decoration: none;
  letter-spacing: inherit;
}
.login-page .copyright a:hover {
  color: var(--cobalt-light);
}

.login-area {
  display: grid;
  place-items: center;
  padding: 50px;
  position: relative;
  background: linear-gradient(90deg, rgba(8, 13, 22, .14), rgba(8, 13, 22, .8));
}
.login-card {
  width: min(440px, 100%);
  padding: 48px 48px 34px;
  background: rgba(16, 24, 36, .96);
  border: 1px solid rgba(143, 164, 192, .18);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .48);
  position: relative;
  overflow: hidden;
}
@media (min-width: 900px) {
  .login-card {
    background: rgba(16, 24, 36, .92);
    backdrop-filter: blur(8px);
  }
}
.login-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(58, 108, 184, .16);
  transform: rotate(45deg);
}
.card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cobalt), transparent 45%, var(--orange));
}
.mini-grid {
  display: block;
  width: 26px;
  height: 26px;
  margin-bottom: 25px;
  background: radial-gradient(circle, var(--cobalt-light) 1.2px, transparent 1.5px);
  background-size: 7px 7px;
}
.login-card header { position: relative; z-index: 1; margin-bottom: 34px; }
.login-card header .eyebrow { margin-bottom: 11px; }
.login-card h2 { margin: 0 0 10px; font: 600 31px/1.2 "Manrope"; letter-spacing: -1px; }
.login-card header > p:last-child { color: var(--muted); margin: 0; font-size: 13px; }
.login-card form { position: relative; z-index: 1; }
.login-card label { display: block; color: #bdc6d2; font-size: 11px; font-weight: 700; letter-spacing: .5px; margin-bottom: 9px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 22px;
  position: relative;
  z-index: 1;
}
.auth-tabs[hidden] { display: none; }
.auth-tab {
  border: 1px solid var(--line);
  background: rgba(13, 21, 32, 0.7);
  color: #8b98a8;
  padding: 10px 12px;
  font: 600 11px/1 "DM Sans";
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.auth-tab:hover { color: #dce4ef; border-color: #2c3a4d; }
.auth-tab.active {
  color: #fff;
  border-color: var(--cobalt-light);
  background: linear-gradient(180deg, rgba(21, 91, 216, 0.28), rgba(14, 22, 34, 0.9));
}
.login-card label { margin-top: 18px; }
.login-card label:first-of-type,
#login-form > label:first-child,
#register-form > label:first-child { margin-top: 0; }
.form-success {
  margin: 12px 0 0;
  color: #7ddea8;
  font: 500 12px/1.4 "DM Sans";
}
.form-success[hidden] { display: none; }
.auth-captcha-hint {
  margin: 12px 0 0;
  text-align: center;
  color: #5c6878;
  font: 500 10px/1.45 "DM Sans";
  letter-spacing: 0.02em;
}
.auth-captcha-hint a {
  color: #8491a3;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}
#register-form[hidden],
#login-form[hidden] { display: none; }
.field {
  height: 51px;
  border: 1px solid #293548;
  background: rgba(8, 13, 22, .62);
  display: flex;
  align-items: center;
  transition: .2s;
}
.field:focus-within {
  border-color: var(--cobalt-light);
  box-shadow: 0 0 0 3px rgba(21, 91, 216, .14);
}
.field svg { width: 18px; margin: 0 13px 0 16px; fill: none; stroke: #647186; stroke-width: 1.6; }
.field input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 13px; }
.field input::placeholder { color: #4f5a68; }
.password-toggle { border: 0; background: none; padding: 8px 0 8px 8px; }
.password-toggle svg { margin-left: 0; width: 18px; fill: none; stroke: #647186; stroke-width: 1.6; }
.primary-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  background: linear-gradient(90deg, #164fab, var(--cobalt));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 25px;
  box-shadow: 0 12px 30px rgba(21, 91, 216, .23);
  transition: .2s;
}
.primary-button:hover { filter: brightness(1.15); transform: translateY(-1px); }
.primary-button:disabled { opacity: .6; cursor: wait; }
.primary-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.form-error { min-height: 17px; margin: 10px 0 -10px; color: #ff8d76; font-size: 11px; }
.login-card footer {
  margin-top: 34px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  color: #687587;
  font-size: 9px;
  letter-spacing: .5px;
}
.login-card footer svg { width: 17px; fill: none; stroke: var(--success); stroke-width: 1.5; }
.copyright { position: absolute; bottom: 25px; color: #536071; font-size: 8px; letter-spacing: 1.5px; }

.support-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  transition: transform .15s ease, filter .15s ease;
}
.support-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.support-btn-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.support-btn-icon svg { width: 22px; height: 22px; fill: currentColor; }
.support-btn-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.support-btn-text strong { font: 700 11px/1.1 "DM Sans"; letter-spacing: .02em; }
.support-btn-text small { font: 500 10px/1.1 "DM Sans"; opacity: .9; }
.support-btn-wa { background: #1fa855; }
.support-btn-tg { background: #229ed9; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-panel { min-height: 42vh; padding: 35px 7vw; }
  .brand-message { padding: 70px 0 15px; }
  .brand-message h1 { font-size: clamp(38px, 8vw, 64px); max-width: 700px; }
  .brand-foot { display: none; }
  .brand-mascot { width: 64px; height: 64px; opacity: 0.22; margin-bottom: 18px; }
  .login-area { padding: 50px 20px 80px; }
  .copyright { bottom: 20px; }
}

@media (max-width: 680px) {
  .brand-panel { min-height: 36vh; }
  .brand-message { padding-top: 60px; }
  .brand-message h1 { letter-spacing: -2px; }
  .brand-message > p:last-child { display: none; }
  .login-card { padding: 38px 27px 28px; }
}

@media (max-width: 899px) {
  .support-widget { right: 12px; bottom: 12px; }
  .support-btn { min-width: 0; padding: 11px; border-radius: 999px; }
  .support-btn-text { display: none; }
}
