* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1f2430;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
  width: 100%;
}

.centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 32px 36px;
  width: 340px;
  display: flex;
  flex-direction: column;
}

.card h1,
.card h2 {
  font-size: 20px;
  margin: 0 0 20px;
  text-align: center;
}

.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.brand-icon {
  filter: drop-shadow(0 6px 14px rgba(29, 78, 216, 0.25));
}

.brand-title {
  margin: 4px 0 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1d4ed8;
}

.brand-subtitle {
  margin: 0;
  margin-right: -0.25em;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: #93b4f5;
  text-align: center;
}

.card label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #4a5568;
}

.card input,
.card select {
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid #d2d6dc;
  border-radius: 6px;
  font-size: 14px;
}

.card button {
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

#login-btn,
#acessar-btn {
  background: #2563eb;
  color: #fff;
}

#login-btn:hover,
#acessar-btn:hover {
  background: #1d4ed8;
}

.secondary {
  background: transparent;
  color: #4a5568;
  margin-top: 8px;
}

.secondary:hover {
  text-decoration: underline;
}

.error {
  color: #dc2626;
  font-size: 13px;
  min-height: 16px;
  margin: 10px 0 0;
  text-align: center;
}

#dashboard-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

#dashboard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  background: #1f2430;
  color: #fff;
}

#dashboard-header button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 6px;
}

#dashboard-header button:hover {
  color: #93c5fd;
}

#dashboard-title {
  font-size: 12px;
  font-weight: 600;
}

#dashboard-frame-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
}

#dashboard-frame {
  height: 100%;
  width: 100%;
  border: none;
}

#dashboard-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(244, 245, 247, 0.7);
  backdrop-filter: blur(1px);
  color: #4a5568;
  font-size: 13px;
  font-weight: 600;
  opacity: 1;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

#dashboard-loading-overlay.hidden {
  display: flex !important;
  opacity: 0;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(37, 99, 235, 0.25);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: dashboard-spin 0.8s linear infinite;
}

@keyframes dashboard-spin {
  to {
    transform: rotate(360deg);
  }
}
