:root {
  --primary: #0d9488;
  --navy: #0a2540;
  --bg-body: #f0f3f7;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #1b2430;
  --text-muted: #64748b;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body.login-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-main);
  display: block;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  min-height: 100vh;
}

/* —— Brand panel (esquerda) — só a imagem —— */
.login-brand {
  position: relative;
  background: #0a2540;
  margin: 0;
  padding: 0;
  overflow: hidden;
  min-height: 100vh;
}

.login-brand-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: none;
}

/* —— Form panel —— */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: #f7f9fc;
}

.login-container {
  background: var(--bg-card);
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px rgba(10, 37, 64, 0.06);
  width: 100%;
  max-width: 400px;
  text-align: left;
}

.logo-area {
  margin-bottom: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
}

.logo-area img {
  max-height: 64px;
  max-width: 220px;
  margin: 0 auto;
  display: block;
}

.logo-area h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.view-hint {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.input-group {
  margin-bottom: 18px;
  color: var(--text-main);
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  border: 1px solid var(--border-color);
  background: #fafbfc;
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.input-wrapper input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.toggle-pass {
  left: auto !important;
  right: 14px;
  cursor: pointer;
}

button {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, border-color 0.15s;
  margin-bottom: 10px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { filter: brightness(0.95); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-body);
  border-color: #cbd5e1;
}

.actions {
  display: flex;
  justify-content: flex-start;
  margin: 4px 0 20px;
  font-size: 0.875rem;
}

.actions a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.actions a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.msg-feedback {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  color: var(--color-danger);
  font-size: 0.875rem;
  border-top: 3px solid var(--color-danger);
  line-height: 1.4;
}

.msg-feedback:empty { display: none; }

.msg-feedback.is-success {
  background: #f0fdf4;
  color: #166534;
  border-top-color: var(--color-success);
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.profile-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  margin: 0;
}

.profile-btn:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, #fff);
}

.profile-btn i {
  color: var(--primary);
  font-size: 1.1rem;
}

.alert-box {
  background: #fffbeb;
  color: #92400e;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.875rem;
  border-top: 3px solid var(--color-warning);
  line-height: 1.4;
}

.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.28s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.text-center { text-align: center; }

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 42vw;
    max-height: 280px;
    padding: 0;
  }

  .login-panel {
    padding: 24px 16px 40px;
    align-items: flex-start;
  }

  .login-container {
    padding: 28px 22px;
    box-shadow: none;
  }
}
