/* HubSalas — tela de autenticação */

:root {
  --ink: #12211d;
  --ink-2: #40524c;
  --muted: #74857e;
  --line: #e3eae6;
  --line-strong: #d3ddd8;
  --bg: #f4f7f5;
  --brand: #0d2b26;
  --brand-2: #134238;
  --accent: #c9f27a;
  --teal: #1f9d88;
  --danger: #c0445f;
  --danger-bg: #fde9ee;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
svg { display: block; }

.auth { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); min-height: 100vh; }

/* ---------- Painel esquerdo ---------- */

.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 40px 56px 40px;
  color: #e9f5f0;
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(201, 242, 122, .16), transparent 55%),
    radial-gradient(70% 70% at 0% 100%, rgba(31, 157, 136, .28), transparent 60%),
    linear-gradient(150deg, #16493c 0%, #0d2b26 45%, #071c17 100%);
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(75% 75% at 60% 40%, #000 20%, transparent 100%);
  pointer-events: none;
}

.auth-aside::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  bottom: -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 242, 122, .22), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}

.aside-top { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--brand);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px -10px rgba(201, 242, 122, .85);
  flex: 0 0 auto;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 10px; }
.brand-mark.small svg { width: 19px; height: 19px; }

.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.3px; color: #fff; }
.brand-name.dark { color: var(--ink); }

.aside-content { margin: auto 0; max-width: 520px; position: relative; z-index: 2; padding: 48px 0 36px; }

.aside-eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 20px;
}

.aside-content h1 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -1.8px;
  font-weight: 750;
  color: #fff;
}
.aside-content h1 em { font-style: normal; color: var(--accent); }

.aside-sub {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #a9c8bc;
  max-width: 420px;
}

.aside-list { margin-top: 34px; display: flex; flex-direction: column; gap: 13px; }
.aside-list li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: #cfe4db; }
.check {
  width: 22px; height: 22px; border-radius: 7px; flex: 0 0 auto;
  background: rgba(201, 242, 122, .14);
  color: var(--accent);
  display: grid; place-items: center;
}
.check svg { width: 12px; height: 12px; }

.aside-bottom { position: relative; z-index: 2; }

.mini-card {
  width: 310px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55);
}
.mini-card-head { display: flex; align-items: center; gap: 7px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 650; color: var(--accent); }
.mini-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(201, 242, 122, .15); }
.mini-card strong { display: block; font-size: 14px; color: #fff; margin-top: 8px; }
.mini-card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 3px; font-size: 11.5px; color: #9fc0b4; }
.mini-card-row b { color: #ddf3ea; font-size: 12.5px; }

/* ---------- Painel direito ---------- */

.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 32px;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(31, 157, 136, .07), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 32px 24px;
  box-shadow: 0 2px 4px rgba(16, 40, 34, .03), 0 30px 70px -40px rgba(16, 40, 34, .28);
}

.mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f2f6f4;
  border: 1px solid #e8efeb;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 22px;
}
.tab {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s, color .15s, box-shadow .15s;
}
.tab:hover { color: var(--ink-2); }
.tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 40, 34, .08), 0 4px 10px -6px rgba(16, 40, 34, .2);
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  margin-bottom: 16px;
  background: var(--danger-bg);
  border: 1px solid #f5d0d8;
  color: var(--danger);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.alert.is-info { background: #eef7f3; border-color: #cfe6dc; color: #1d6b55; }
.alert[hidden] { display: none; }

.form-head { margin-bottom: 20px; }
.form-head h2 { font-size: 22px; letter-spacing: -.6px; font-weight: 700; }
.form-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.field label span { font-size: 10.5px; color: var(--muted); font-weight: 400; }

.field input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13.5px;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}
.field input::placeholder { color: #9aa9a3; }
.field input:focus { border-color: #8ec3b2; box-shadow: 0 0 0 3px rgba(31, 157, 136, .12); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.reveal {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.reveal:hover { background: #f1f6f3; color: var(--ink-2); }
.reveal svg { width: 17px; height: 17px; }

.btn-submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 650;
  margin-top: 20px;
  transition: background .15s, transform .1s;
  box-shadow: 0 14px 28px -16px rgba(13, 43, 38, .8);
}
.btn-submit:hover { background: var(--brand-2); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit svg { width: 17px; height: 17px; }
.btn-submit[disabled] { opacity: .65; cursor: wait; }

.spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.switch-hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }
.switch-hint button { border: 0; background: none; padding: 0; font-weight: 650; color: var(--teal); font-size: 12px; }
.switch-hint button:hover { text-decoration: underline; }

.terms { font-size: 10.5px; line-height: 1.5; color: #93a29b; text-align: center; margin-top: 14px; }

.footnote {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f0f4f2;
  text-align: center;
  font-size: 10.5px;
  color: #93a29b;
}

form[hidden] { display: none; }

.alert svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }

.shake { animation: shake .28s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- Responsivo ---------- */

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-aside { display: none; }
  .auth-main { padding: 28px 18px; align-items: center; }
  .auth-card { padding: 26px 22px 20px; border-radius: 20px; }
  .mobile-brand { display: flex; }
}

@media (max-height: 720px) and (min-width: 901px) {
  .auth-aside { padding: 28px 40px; }
  .aside-content { padding: 28px 0 20px; }
  .aside-content h1 { font-size: 40px; }
  .aside-sub { margin-top: 14px; }
  .aside-list { margin-top: 24px; }
  .mini-card { display: none; }
  .auth-card { padding: 24px 28px 18px; }
}

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