:root {
  --primary: #4376FB;
  --primary-dark: #0046FE;
  --secondary: #002AD4;
  --tertiary: #365A8A;
  --dark: #194277;
  --light: #f8f9fa;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --border: #e9ecef;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff;
  color: #111827;
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Remoção de header/logos para layout minimalista */

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.card {
  background: white;
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-header h2 { color: var(--dark); margin: 0; display: flex; align-items: center; gap: 10px; }

.pre {
  margin-top: 12px;
  background: #0b1220;
  color: #e5e7eb;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  padding: 12px;
  min-height: 64px;
  white-space: pre-wrap;
}

.app-footer {
  margin: 20px auto 0;
  padding: 16px;
  text-align: center;
  color: #6b7280;
  font-size: 12px;
}

@media (max-width: 768px) {
  .container { padding: 15px; }
  header .container { flex-direction: column; text-align: center; }
  .header-controls { justify-content: center; }
}

/* Auth form */
.auth-form { display: grid; gap: 14px; }
.form-group { margin-bottom: 0; }
label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--dark); }
input[type="email"], input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: var(--transition);
  background: #fff;
}
input[type="email"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 118, 251, 0.1);
}
.form-actions { display: flex; gap: 10px; }
.btn-secondary { background: var(--tertiary); color: #fff; }
.btn-secondary:hover { background: var(--dark); }

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8f9fa;
  border: 1px solid var(--border);
  color: #333;
}

/* Centralização do card de login */
.auth-wrapper {
  display: grid;
  place-items: center;
  min-height: calc(70vh - 20px);
}
.auth-card { max-width: 480px; width: 100%; }

/* Layout minimalista centralizado */
.page-center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-minimal {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 380px;
}

.auth-minimal input[type="email"],
.auth-minimal input[type="text"],
.auth-minimal input[type="password"] {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  background: #fff;
  transition: var(--transition);
}

.auth-minimal input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 118, 251, 0.14);
}

.auth-minimal h1 {
  margin: 0 0 4px 0;
  font-size: 22px;
  color: #111827;
  text-align: center;
}

.auth-minimal .subtitle {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.field { display: grid; gap: 6px; }
.hint { font-size: 12px; color: #6b7280; }
.feedback { font-size: 13px; color: #0f5132; text-align: center; }
.feedback.error { color: #842029; }
.resend { font-size: 13px; text-align: center; color: #6b7280; }

.resend button {
  appearance: none;
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

.resend button:disabled { color: #9ca3af; cursor: not-allowed; }

/* UX: estados de validação e placeholder */
.auth-minimal input::placeholder { color: #9ca3af; }
.auth-minimal input:user-invalid { border-color: #dc3545; }
.auth-minimal input:user-invalid:focus { box-shadow: 0 0 0 4px rgba(220,53,69,0.1); }

/* Botão Entrar ocupar largura total no layout minimalista */
.auth-minimal .btn {
  width: 100%;
  justify-content: center;
}

/* Mobile: aumentar área de toque */
@media (max-width: 480px) {
  .auth-minimal { max-width: 92vw; }
  .auth-minimal input { font-size: 17px; }
}
