@import url('/css/obralight-tokens.css');

* { box-sizing: border-box; }
body {
  font-family: var(--ob-font);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #f3f4f6;
  color: #0f172a;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.login-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.10);
  padding: 22px 22px 18px;
}

.login-header {
  display: grid;
  place-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.system-logo {
  width: min(260px, 78%);
  height: auto;
  display: block;
}

.obralight-logo {
  width: min(150px, 56%);
  height: auto;
  display: block;
  margin-top: -2px;
  opacity: 0.95;
}

.login-subtitle {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  text-align: center;
}

.empresa-logo-inline {
  width: 100%;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
  display: none; /* escondido por padrão — JS mostra quando logo carrega */
  justify-items: center;
}

.mx-auto { margin-left: auto; margin-right: auto; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px 0;
}

.tab {
  text-align: center;
  padding: 12px 10px;
  cursor: pointer;
  font-weight: 800;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: 0.2s ease;
  background: #ffffff;
  font-size: 15px;
}

.tab.active {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #0c4a6e;
}

.tab:hover:not(.active) {
  background: #f8fafc;
}

.hint-contexto {
  font-size: 14px;
  color: #475569;
  margin: 8px 0 12px;
  line-height: 1.45;
  text-align: center;
}

.input-group { margin-bottom: 14px; }

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  color: #475569;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.input-group input {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 17px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.campo-senha-wrap {
  position: relative;
}
.campo-senha-wrap input {
  padding-right: 76px;
}
.btn-mostrar-senha {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  padding: 6px 4px;
  font-family: inherit;
  text-transform: none;
}
.btn-mostrar-senha:hover { color: #334155; }

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
}

.remember {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: #334155;
}

.remember input { width: 14px; height: 14px; }

.forgot {
  font-size: 14px;
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 800;
}

.forgot:hover { text-decoration: underline; }

.btn-login {
  width: 100%;
  background: #0284c7;
  color: white;
  border: none;
  padding: 14px 16px;
  font-size: 17px;
  font-weight: 900;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
  margin-top: 6px;
}

.btn-login:hover { filter: brightness(0.95); }
.btn-login:disabled { background: #94a3b8; cursor: not-allowed; }

.empresa-logo {
  max-width: 220px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(0.1);
  opacity: 0.95;
}

.alert {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  display: none;
  text-align: center;
}

.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.login-footnote {
  margin-top: 14px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .login-card { padding: 20px 16px 16px; }
}

@media (max-width: 520px) {
  .tabs { grid-template-columns: 1fr; }
  .system-logo { width: min(240px, 82%); }
}