* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e2937 100%);
  min-height: 100vh;
  color: #e2e8f0;
}

/* ==================== LOGIN LAYOUT ==================== */
.login-container {
  min-height: 100vh;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== MENU 3 PONTINHOS ==================== */
.settings-menu {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 100;
}

.settings-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
}

.settings-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: #3b82f6;
}

/* ==================== CARD PRINCIPAL ==================== */
.login-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 16px;
  padding: 48px 40px 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
  backdrop-filter: blur(12px);
  position: relative;
}

.logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  background: #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #3b82f6;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #f8fafc;
}

.subtitle {
  color: #94a3b8;
  margin-bottom: 40px;
  font-size: 15px;
}

.input-group {
  margin-bottom: 24px;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: #1e2937;
  border: 1px solid #475569;
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 16px;
  transition: all 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

.forgot-password {
  margin-top: 24px;
}

.forgot-password a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
}

.forgot-password a:hover {
  color: #3b82f6;
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #1e2937;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
  margin-bottom: 24px;
  color: #f8fafc;
  text-align: center;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: white;
}

.btn-secondary {
  background: #334155;
  color: #e2e8f0;
}

.btn-primary:hover { box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4); }
.btn-secondary:hover { background: #475569; }

.save-msg {
  margin-top: 12px;
  min-height: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #a3e635; /* verde limão */
  opacity: 0;
  transition: opacity 0.2s ease;
}

.save-msg.show {
  opacity: 1;
}

.modal-version {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* ==================== MOBILE ==================== */
@media (max-width: 480px) {

  body {
    overflow-y: auto;
  }

  .login-container {
    min-height: 100dvh;
    padding: 16px;
  }

  .settings-menu {
    top: 12px;
    right: 12px;
  }

  .login-card {
    padding: 32px 20px 24px;
  }

  .btn-login {
    padding: 16px;
    font-size: 16px;
  }
}