/* ==========================================================================
   MRGTEK Assessoria — Portal DashBoard
   Login + Perfil (carregado DEPOIS de style.css; evita redefinir componentes
   globais como .btn-primary/.text-muted/.import-status).
   ========================================================================== */

:root {
  --navy: #1c2a4e;
  --navy-dark: #16223f;
  --blue: #3d6dab;
  --blue-light: #5b8fc9;
  --white: #ffffff;
  --bg-light: #f4f7fb;
  --text-muted-2: #6b7684;

  --danger-bg: #fdecec;
  --danger-border: #f8c9c9;
  --radius-full: 999px;
  --shadow-card: 0 20px 45px -12px rgba(22, 34, 63, 0.35), 0 4px 12px rgba(22, 34, 63, 0.08);
  /* token proprio para nao sobrescrever o --shadow-focus global do style.css */
  --auth-shadow-focus: 0 0 0 3px rgba(61, 109, 171, 0.22);
}

/* ============================ LOGIN ============================ */
.login-body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background-color: #0b1226;
  /* imagem de fundo + leve overlay para contraste do cartao */
  background-image:
    linear-gradient(rgba(10, 17, 38, 0.35), rgba(10, 17, 38, 0.55)),
    url("../images/login-bg.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: fixed, fixed;
}

.login-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 40px 34px 30px;
  box-sizing: border-box;
}

.login-logo { display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.login-logo img { max-width: 150px; width: 100%; height: auto; display: block; }

.login-title {
  margin: 0 0 4px; text-align: center;
  font-size: 21px; font-weight: 700; letter-spacing: 0.2px; color: var(--navy);
}
.login-sub { margin: 0 0 26px; text-align: center; font-size: 13px; color: var(--text-muted-2); }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.login-form .field label {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted-2);
}

.login-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger);
  color: var(--danger);
  font-size: 13px; line-height: 1.4; padding: 10px 12px; border-radius: 6px;
}
.login-error:empty { display: none; padding: 0; border: 0; margin: 0; }

.login-foot { margin: 24px 0 0; text-align: center; font-size: 12px; color: var(--text-muted-2); }

/* ============================ PERFIL ============================ */
.perfil-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 26px; }

.perfil-info {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.perfil-info > div { display: flex; flex-direction: column; gap: 2px; }
.perfil-info strong { font-size: 16px; font-weight: 700; color: var(--navy); }

.perfil-avatar {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: var(--radius-full);
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue) 130%);
  color: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(28, 42, 78, 0.25); user-select: none;
}

.perfil-form { display: flex; flex-direction: column; gap: 18px; }
.perfil-form .field { display: flex; flex-direction: column; gap: 6px; }
.perfil-form .field label {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted-2);
}
.perfil-form .btn-primary { align-self: flex-start; margin-top: 4px; }

/* ============================ INPUT DE TEXTO ============================ */
.input-text {
  width: 100%; box-sizing: border-box; padding: 11px 13px;
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--white); border: 1px solid var(--border); border-radius: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-text::placeholder { color: #a7b0bd; }
.input-text:hover { border-color: var(--blue-light); }
.input-text:focus { outline: none; border-color: var(--blue); box-shadow: var(--auth-shadow-focus); }
.input-text:disabled { background: var(--bg-light); color: var(--text-muted-2); cursor: not-allowed; }

.btn-block { width: 100%; display: flex; justify-content: center; }

/* Bloco do usuario no rodape do menu (clicavel -> abre Perfil) */
a.side-user {
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 5px 6px;
  margin: -5px -6px 0.55rem;
  transition: background 0.15s ease;
}
a.side-user:hover { background: rgba(255, 255, 255, 0.08); }

/* Icone "Sair" com o mesmo peso de traco dos demais itens do menu */
.side-logout svg { stroke-width: 2; }

/* ============================ RESPONSIVO ============================ */
@media (max-width: 420px) {
  .login-page { padding: 16px; }
  .login-card { padding: 32px 22px 24px; border-radius: 10px; }
  .login-logo img { max-width: 120px; }
}
@media (max-width: 480px) {
  .perfil-info { gap: 12px; }
  .perfil-avatar { width: 48px; height: 48px; font-size: 16px; }
  .perfil-form .btn-primary { align-self: stretch; }
}
