/* Standalone styles for the login page (served before authentication). */
:root {
  --bg-app: #090d16;
  --bg-card: #131b2e;
  --bg-input: #0b101c;
  --border-subtle: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #ef4444;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12), transparent 60%),
    var(--bg-app);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  overflow: hidden;
}

/* Mesma lógica da sidebar: o gradiente é o fundo do cubo padrão e sai de cena
   quando existe uma logo própria, que pode ter transparência. */
.login-logo.has-custom-icon {
  background: rgba(148, 163, 184, 0.12);
}

.login-logo.has-custom-icon > svg {
  display: none;
}

.login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 26px;
}

label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

/* Covers every text-like field so adding an input type never leaves it unstyled */
input[type="password"],
input[type="text"] {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="password"]:focus,
input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

input::placeholder {
  color: var(--text-muted);
}

/* Chrome paints its own yellow/white background on autofilled fields */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
  caret-color: var(--text-primary);
}

button {
  margin-top: 18px;
  width: 100%;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

button:hover:not(:disabled) { background-color: var(--primary-hover); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.error-box {
  margin-top: 14px;
  padding: 10px 12px;
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  color: #fca5a5;
  font-size: 0.82rem;
  text-align: center;
}

.footer-note {
  margin-top: 22px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}
