/**
 * Paginas de autenticacao (login.php, create.php) — tela cheia, sem sidebar/navbar.
 * Nao usa o design system do painel logado (style.css) porque a UI aqui e bem
 * diferente (split-screen, toggle de tema proprio via localStorage). Mesma familia
 * de variaveis/nomes do restante do projeto (--pz-*) para ficar facil de unificar
 * futuramente se fizer sentido.
 */
:root{
  --bg: #eef1f6;
  --panel-bg: #ffffff;
  --brand-grad: linear-gradient(160deg, #00a08c 0%, #023f38 100%);
  --text: #1f2430;
  --text-muted: #6b7684;
  --input-bg: #f5f7fa;
  --input-border: #e3e7ee;
  --input-focus: #00a08c;
  --accent: #00a08c;
  --accent-hover: #028a78;
  --danger: #e0304a;
  --success: #1fa66b;
  --shadow: 0 24px 60px rgba(20, 30, 50, .12);
  --toggle-bg: #ffffff;
  --toggle-fg: #1f2430;
}
:root[data-theme="dark"]{
  --bg: #07121a;
  --panel-bg: #0b2136;
  --brand-grad: linear-gradient(160deg, #022e3e 0%, #001018 100%);
  --text: #eaf1f5;
  --text-muted: #93a7b3;
  --input-bg: #0e2b40;
  --input-border: #163f57;
  --input-focus: #29d6bd;
  --accent: #1fc4ab;
  --accent-hover: #29d6bd;
  --danger: #ff6b7d;
  --success: #4fd897;
  --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --toggle-bg: #0e2b40;
  --toggle-fg: #eaf1f5;
}
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color .25s ease, color .25s ease;
  min-height: 100vh;
}
.theme-toggle{
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--input-border);
  background: var(--toggle-bg);
  color: var(--toggle-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 18px;
  transition: transform .15s ease, background-color .25s ease, color .25s ease;
}
.theme-toggle:hover{ transform: translateY(-2px); }
.page{
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.auth-shell{
  display: flex;
  width: 100%;
  max-width: 960px;
  margin: auto;
  padding: 24px;
  gap: 0;
}
.brand-pane{
  flex: 1 1 0;
  background: var(--brand-grad);
  border-radius: 20px 0 0 20px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  min-height: 560px;
}
.brand-pane img{
  width: 56px;
  filter: brightness(0) invert(1);
  opacity: .95;
}
.brand-pane h1{
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin: 32px 0 12px;
}
.brand-pane p{
  font-size: 15px;
  color: rgba(255,255,255,.85);
  line-height: 1.6;
  max-width: 320px;
}
.brand-pane .brand-footer{
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.form-pane{
  flex: 1 1 0;
  background: var(--panel-bg);
  border-radius: 0 20px 20px 0;
  box-shadow: var(--shadow);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 560px;
}
.form-pane h2{
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
}
.form-pane .subtitle{
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
}
.field{
  margin-bottom: 18px;
}
.field label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.input-wrap{
  position: relative;
}
.input-wrap input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-wrap input:focus{
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(0,160,140,.15);
}
.input-wrap .toggle-eye{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
}
.row-between{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
}
.switch{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
}
.switch input{ display: none; }
.switch .track{
  width: 38px;
  height: 20px;
  border-radius: 20px;
  background: var(--input-border);
  position: relative;
  transition: background-color .2s ease;
}
.switch .track::after{
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch input:checked + .track{ background: var(--accent); }
.switch input:checked + .track::after{ transform: translateX(18px); }
.btn-primary{
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn-primary:hover{ background: var(--accent-hover); }
.btn-primary:active{ transform: scale(.98); }
.btn-primary:disabled{ opacity: .6; cursor: not-allowed; }
#response{
  margin: 14px 0 0;
  font-size: 13px;
  min-height: 18px;
}
#response.text-danger{ color: var(--danger); }
#response.text-success{ color: var(--success); }
.form-footer{
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.form-footer a{
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.form-footer a:hover{ text-decoration: underline; }

@media (max-width: 820px){
  .auth-shell{ padding: 0; max-width: 480px; }
  .brand-pane{ display: none; }
  .form-pane{ border-radius: 20px; margin: 24px auto; width: 100%; }
  .page{ align-items: flex-start; }
}
@media (max-width: 480px){
  .form-pane{ padding: 32px 24px; margin: 12px; box-shadow: none; }
  .theme-toggle{ top: 12px; right: 12px; }
}
