/* Atzap branding overrides — safe CSS layer (no bundle surgery) */

/* Sidebar: logo only, hide app name text */
[class*="MuiDrawer"] img[alt*="loading"],
[class*="MuiDrawer"] img[alt*="Atzap"],
[class*="MuiDrawer"] img[alt*="atzap"] {
  max-width: 52px !important;
  max-height: 52px !important;
}

/* Sidebar header: hide app name beside logo only (não afeta menu nem painel) */
[class*="MuiDrawer"] .MuiToolbar-root .brand-text {
  display: none !important;
}

/* Login: hide footer (terms, signup toggle, copyright) */
.atzap-login-hide-footer {
  display: none !important;
}

/* Login form spacing */
.atzap-login-form {
  padding-top: 8px;
}

.atzap-login-form-header {
  margin-bottom: 28px !important;
}

.atzap-login-form .MuiTextField-root,
.atzap-login-form .MuiButton-root {
  margin-top: 4px;
}

.atzap-login-brand {
  gap: 16px !important;
}

.atzap-login-brand img,
.atzap-login-brand .logo-box {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.atzap-login-brand .logo-box img,
.atzap-admin-login-logo img,
.atzap-admin-login-logo .logo-box,
header .logo-box img,
[class*="MuiDrawer"] .logo-box img {
  display: block !important;
  visibility: visible !important;
  object-fit: contain !important;
}

.atzap-admin-login-logo .logo-box,
.atzap-admin-login-logo img {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
}

.atzap-login-brand .brand-text,
.atzap-login-brand .MuiTypography-root {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}

/* Hide split brand accent (fixes stray "S" / .com.br chunk) */
.atzap-login-brand .brand-accent {
  display: none !important;
}

/* Login fields — label acima do campo + autofill claro/escuro */
.atzap-login-form {
  --atzap-login-input-bg-light: #ffffff;
  --atzap-login-input-bg-dark: rgba(255, 255, 255, 0.06);
  --atzap-login-input-bg: var(--atzap-login-input-bg-light);
}

:root[data-mui-color-scheme="dark"] .atzap-login-form {
  --atzap-login-input-bg: var(--atzap-login-input-bg-dark);
}

.atzap-login-form .MuiTextField-root,
.atzap-login-form .MuiFormControl-root {
  margin-bottom: 14px;
}

.atzap-login-form .MuiFormControl-root {
  display: flex;
  flex-direction: column;
}

/* Label fixo acima — não sobrepõe a borda do campo */
.atzap-login-form .MuiInputLabel-root {
  position: static !important;
  transform: none !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  margin: 0 0 8px 2px !important;
  padding: 0 !important;
  background: transparent !important;
  max-width: 100% !important;
  z-index: auto !important;
  pointer-events: none;
}

.atzap-login-form .MuiInputLabel-root.Mui-focused,
.atzap-login-form .MuiInputLabel-root.MuiInputLabel-shrink,
.atzap-login-form .MuiOutlinedInput-root.Mui-focused .MuiInputLabel-root,
.atzap-login-form .MuiOutlinedInput-root:has(.MuiOutlinedInput-input:not(:placeholder-shown)) .MuiInputLabel-root,
.atzap-login-form .MuiOutlinedInput-root:has(.MuiOutlinedInput-input:-webkit-autofill) .MuiInputLabel-root {
  transform: none !important;
}

/* Borda contínua — remove recorte do label flutuante */
.atzap-login-form .MuiOutlinedInput-notchedOutline legend {
  max-width: 0.01px !important;
  padding: 0 !important;
}

.atzap-login-form .MuiOutlinedInput-notchedOutline legend span {
  padding: 0 !important;
}

.atzap-login-form .MuiOutlinedInput-root {
  min-height: 52px;
  align-items: center;
}

.atzap-login-form .MuiOutlinedInput-root .MuiOutlinedInput-input {
  padding: 14px 14px 14px 2px !important;
  font-size: 0.95rem;
  line-height: 1.45;
}

.atzap-login-form .MuiInputAdornment-positionStart {
  margin-left: 10px;
  margin-right: 6px;
  flex-shrink: 0;
}

/* Autofill — fundo conforme tema (evita caixa branca no dark mode) */
.atzap-login-form .MuiOutlinedInput-input:-webkit-autofill,
.atzap-login-form .MuiOutlinedInput-input:-webkit-autofill:hover,
.atzap-login-form .MuiOutlinedInput-input:-webkit-autofill:focus,
.atzap-login-form .MuiOutlinedInput-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--atzap-login-input-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--atzap-login-input-bg) inset !important;
  -webkit-text-fill-color: inherit !important;
  caret-color: inherit;
  transition: background-color 99999s ease-out 0s;
}

:root[data-mui-color-scheme="dark"] .atzap-login-form .MuiOutlinedInput-input:-webkit-autofill,
:root[data-mui-color-scheme="dark"] .atzap-login-form .MuiOutlinedInput-input:-webkit-autofill:hover,
:root[data-mui-color-scheme="dark"] .atzap-login-form .MuiOutlinedInput-input:-webkit-autofill:focus,
:root[data-mui-color-scheme="dark"] .atzap-login-form .MuiOutlinedInput-input:-webkit-autofill:active {
  -webkit-text-fill-color: #e8eaed !important;
}
