/* Comunidade InfoGrau — Login
   Visual moderno, responsivo e independente do restante do site.
*/

:root {
  --ig-bg: #f4f6f3;
  --ig-surface: #ffffff;
  --ig-text: #18231e;
  --ig-muted: #69756f;
  --ig-line: #dde4df;
  --ig-green: #24513d;
  --ig-green-dark: #173a2b;
  --ig-green-soft: #edf4f0;
  --ig-gold: #b89449;
  --ig-danger-bg: #fff3f0;
  --ig-danger-text: #913b2d;
  --ig-radius: 22px;
  --ig-shadow: 0 24px 70px rgba(25, 53, 40, .12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ig-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ig-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 12%, rgba(184,148,73,.13), transparent 28rem),
    radial-gradient(circle at 88% 82%, rgba(36,81,61,.12), transparent 32rem),
    linear-gradient(135deg, #f8faf7 0%, #f0f4f1 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(2px);
}

body::before {
  width: 280px;
  height: 280px;
  top: -110px;
  right: -70px;
  border: 1px solid rgba(184,148,73,.22);
}

body::after {
  width: 360px;
  height: 360px;
  left: -190px;
  bottom: -210px;
  border: 1px solid rgba(36,81,61,.16);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 20px;
}

.login-card {
  position: relative;
  width: min(100%, 470px);
  padding: 38px;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(221,228,223,.9);
  border-radius: var(--ig-radius);
  box-shadow: var(--ig-shadow);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 38px;
  right: 38px;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--ig-green), var(--ig-gold));
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 30px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #f0d99f;
  background: linear-gradient(145deg, #2b6048, #173a2b);
  box-shadow: 0 9px 24px rgba(23,58,43,.18);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -.5px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: var(--ig-text);
  font-size: 16px;
  line-height: 1.2;
}

.brand span {
  margin-top: 4px;
  color: var(--ig-muted);
  font-size: 12.5px;
}

h1 {
  margin: 0 0 8px;
  color: var(--ig-text);
  font-size: clamp(29px, 5vw, 36px);
  line-height: 1.08;
  letter-spacing: -1.1px;
}

.lead {
  margin: 0 0 27px;
  color: var(--ig-muted);
  font-size: 15px;
  line-height: 1.6;
}

.alert {
  margin: 0 0 19px;
  padding: 13px 15px;
  color: var(--ig-danger-text);
  background: var(--ig-danger-bg);
  border: 1px solid #f1d2cb;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.google-btn {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px 18px;
  color: #29312d;
  background: #fff;
  border: 1px solid #d5ddd8;
  border-radius: 13px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(25,53,40,.04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.google-btn:hover {
  transform: translateY(-1px);
  border-color: #b8c5bd;
  box-shadow: 0 8px 22px rgba(25,53,40,.08);
}

.google-btn:active {
  transform: translateY(0);
}

.google-btn .g {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e6e4;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 23px 0 20px;
  color: #8b958f;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--ig-line);
}

form {
  margin: 0;
}

label {
  display: block;
  margin: 15px 0 7px;
  color: #33423a;
  font-size: 13px;
  font-weight: 750;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 50px;
  display: block;
  padding: 12px 14px;
  color: var(--ig-text);
  background: #fbfcfb;
  border: 1px solid #d7dfda;
  border-radius: 12px;
  outline: 0;
  font: inherit;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:hover {
  border-color: #bdc9c2;
}

input:focus {
  background: #fff;
  border-color: #668c79;
  box-shadow: 0 0 0 4px rgba(36,81,61,.09);
}

button[type="submit"] {
  width: 100%;
  min-height: 51px;
  margin-top: 22px;
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(135deg, #2b6048, #1b4432);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(27,68,50,.17);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(27,68,50,.23);
  filter: brightness(1.03);
}

button[type="submit"]:active {
  transform: translateY(0);
}

.foot {
  margin: 22px 0 0;
  padding-top: 19px;
  color: var(--ig-muted);
  border-top: 1px solid #edf0ee;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.55;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(184,148,73,.28);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .login-shell {
    padding: 20px 14px;
  }

  .login-card {
    padding: 30px 22px;
    border-radius: 18px;
  }

  .login-card::before {
    left: 22px;
    right: 22px;
  }

  .brand {
    margin-bottom: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}